http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz
[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
2061
2062
2063 # After checking to see that --srcdir is correct (which AC_INIT does)
2064 # check for some random other files that come later in the tar file,
2065 # to make sure everything is here.
2066 #
2067 for d in driver utils hacks hacks/glx ; do
2068   f=$srcdir/$d/Makefile.in
2069   if test \! -r $f ; then
2070     echo ""
2071     echo "ERROR: The package is incomplete: $f does not exist."
2072     echo "       This probably means that your download was truncated."
2073     echo ""
2074     exit 1
2075   fi
2076 done
2077
2078 ###############################################################################
2079 #
2080 #       Function to figure out how to run the compiler.
2081 #
2082 ###############################################################################
2083
2084
2085
2086
2087 ###############################################################################
2088 #
2089 #       Check for availability of various gcc command-line options.
2090 #
2091 ###############################################################################
2092
2093
2094
2095
2096
2097
2098
2099
2100 ###############################################################################
2101 #
2102 #       Function to figure out how to disable // comments in ANSI C code.
2103 #
2104 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2105 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2106 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2107 #       so much for compatibility!)
2108 #
2109 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2110 #       declarations preceed statements, without resorting to "-pedantic".
2111 #       This means that there is no way to get gcc3 to issue warnings that
2112 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2113 #       also drowning in totally useless warnings.  Thank you master may I
2114 #       have another.
2115 #
2116 #       So, I give up, let's just use -pedantic.
2117 #
2118 ###############################################################################
2119
2120
2121
2122
2123
2124
2125 ###############################################################################
2126 #
2127 #       Function to figure out how to turn off Objective C on MacOS X.
2128 #       (We have to do this to work around an Apple-specific gcc bug.)
2129 #
2130 ###############################################################################
2131
2132
2133
2134
2135
2136
2137 ###############################################################################
2138 #
2139 #       Function to figure out how to create directory trees.
2140 #
2141 ###############################################################################
2142
2143
2144
2145
2146 ###############################################################################
2147 #
2148 #       Function to check whether gettimeofday() exists, and how to call it.
2149 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2150 #
2151 ###############################################################################
2152
2153
2154
2155
2156 ###############################################################################
2157 #
2158 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2159 #
2160 ###############################################################################
2161
2162 # M4 sucks!!  perl sucks too!!
2163
2164 perl_version_cmd='print $]'
2165
2166
2167
2168
2169
2170 ###############################################################################
2171 #
2172 #       Function to demand "bc".  Losers.
2173 #
2174 ###############################################################################
2175
2176
2177
2178 ###############################################################################
2179 #
2180 #       Functions to check how to do ICMP PING requests.
2181 #
2182 ###############################################################################
2183
2184
2185
2186
2187
2188
2189 ###############################################################################
2190 #
2191 #       Functions to check for various X11 crap.
2192 #
2193 ###############################################################################
2194
2195 # Try and find the app-defaults directory.
2196 # It sucks that autoconf doesn't do this already...
2197 #
2198
2199
2200 ###############################################################################
2201 #
2202 #       Handle the --with-x-app-defaults option HERE
2203 #
2204 ###############################################################################
2205
2206
2207 # Check whether --with-x-app-defaults was given.
2208 if test "${with_x_app_defaults+set}" = set; then
2209   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2210 else
2211   eval ac_x_app_defaults="$withval"
2212 fi
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224 # Random special-cases for X on certain pathological OSes.
2225 # You know who you are.
2226 #
2227
2228
2229
2230
2231 ###############################################################################
2232 #
2233 #       Some utility functions to make checking for X things easier.
2234 #
2235 ###############################################################################
2236
2237 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2238 #
2239
2240
2241 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2242 #
2243
2244
2245 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2246 #
2247
2248
2249
2250 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2251 # Use this sparingly; it probably doesn't work very well on X programs.
2252 #
2253
2254
2255 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2256 # (But not the -L directories!)
2257 #
2258
2259
2260
2261
2262 # Usage: HANDLE_X_PATH_ARG([variable_name],
2263 #                          [--command-line-option],
2264 #                          [descriptive string])
2265 #
2266 # All of the --with options take three forms:
2267 #
2268 #   --with-foo (or --with-foo=yes)
2269 #   --without-foo (or --with-foo=no)
2270 #   --with-foo=/DIR
2271 #
2272 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2273 # a directory (string beginning with a slash) it checks to see whether
2274 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2275 # as appropriate.
2276 #
2277
2278
2279
2280
2281 ###############################################################################
2282 ###############################################################################
2283 #
2284 #       End of function definitions.  Now start actually executing stuff.
2285 #
2286 ###############################################################################
2287 ###############################################################################
2288
2289 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2290 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2291 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2292
2293
2294 # random compiler setup
2295 ac_aux_dir=
2296 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2297   if test -f "$ac_dir/install-sh"; then
2298     ac_aux_dir=$ac_dir
2299     ac_install_sh="$ac_aux_dir/install-sh -c"
2300     break
2301   elif test -f "$ac_dir/install.sh"; then
2302     ac_aux_dir=$ac_dir
2303     ac_install_sh="$ac_aux_dir/install.sh -c"
2304     break
2305   elif test -f "$ac_dir/shtool"; then
2306     ac_aux_dir=$ac_dir
2307     ac_install_sh="$ac_aux_dir/shtool install -c"
2308     break
2309   fi
2310 done
2311 if test -z "$ac_aux_dir"; then
2312   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2313 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2314    { (exit 1); exit 1; }; }
2315 fi
2316
2317 # These three variables are undocumented and unsupported,
2318 # and are intended to be withdrawn in a future Autoconf release.
2319 # They can cause serious problems if a builder's source tree is in a directory
2320 # whose full name contains unusual characters.
2321 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2322 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2323 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2324
2325
2326 # Make sure we can run config.sub.
2327 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2328   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2329 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2330    { (exit 1); exit 1; }; }
2331
2332 { echo "$as_me:$LINENO: checking build system type" >&5
2333 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2334 if test "${ac_cv_build+set}" = set; then
2335   echo $ECHO_N "(cached) $ECHO_C" >&6
2336 else
2337   ac_build_alias=$build_alias
2338 test "x$ac_build_alias" = x &&
2339   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2340 test "x$ac_build_alias" = x &&
2341   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2342 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2343    { (exit 1); exit 1; }; }
2344 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2345   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2346 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2347    { (exit 1); exit 1; }; }
2348
2349 fi
2350 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2351 echo "${ECHO_T}$ac_cv_build" >&6; }
2352 case $ac_cv_build in
2353 *-*-*) ;;
2354 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2355 echo "$as_me: error: invalid value of canonical build" >&2;}
2356    { (exit 1); exit 1; }; };;
2357 esac
2358 build=$ac_cv_build
2359 ac_save_IFS=$IFS; IFS='-'
2360 set x $ac_cv_build
2361 shift
2362 build_cpu=$1
2363 build_vendor=$2
2364 shift; shift
2365 # Remember, the first character of IFS is used to create $*,
2366 # except with old shells:
2367 build_os=$*
2368 IFS=$ac_save_IFS
2369 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2370
2371
2372 { echo "$as_me:$LINENO: checking host system type" >&5
2373 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2374 if test "${ac_cv_host+set}" = set; then
2375   echo $ECHO_N "(cached) $ECHO_C" >&6
2376 else
2377   if test "x$host_alias" = x; then
2378   ac_cv_host=$ac_cv_build
2379 else
2380   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2381     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2382 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2383    { (exit 1); exit 1; }; }
2384 fi
2385
2386 fi
2387 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2388 echo "${ECHO_T}$ac_cv_host" >&6; }
2389 case $ac_cv_host in
2390 *-*-*) ;;
2391 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2392 echo "$as_me: error: invalid value of canonical host" >&2;}
2393    { (exit 1); exit 1; }; };;
2394 esac
2395 host=$ac_cv_host
2396 ac_save_IFS=$IFS; IFS='-'
2397 set x $ac_cv_host
2398 shift
2399 host_cpu=$1
2400 host_vendor=$2
2401 shift; shift
2402 # Remember, the first character of IFS is used to create $*,
2403 # except with old shells:
2404 host_os=$*
2405 IFS=$ac_save_IFS
2406 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2407
2408
2409
2410 ac_ext=c
2411 ac_cpp='$CPP $CPPFLAGS'
2412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2415 if test -n "$ac_tool_prefix"; then
2416   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2417 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2418 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2420 if test "${ac_cv_prog_CC+set}" = set; then
2421   echo $ECHO_N "(cached) $ECHO_C" >&6
2422 else
2423   if test -n "$CC"; then
2424   ac_cv_prog_CC="$CC" # Let the user override the test.
2425 else
2426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2427 for as_dir in $PATH
2428 do
2429   IFS=$as_save_IFS
2430   test -z "$as_dir" && as_dir=.
2431   for ac_exec_ext in '' $ac_executable_extensions; do
2432   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2433     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2434     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2435     break 2
2436   fi
2437 done
2438 done
2439 IFS=$as_save_IFS
2440
2441 fi
2442 fi
2443 CC=$ac_cv_prog_CC
2444 if test -n "$CC"; then
2445   { echo "$as_me:$LINENO: result: $CC" >&5
2446 echo "${ECHO_T}$CC" >&6; }
2447 else
2448   { echo "$as_me:$LINENO: result: no" >&5
2449 echo "${ECHO_T}no" >&6; }
2450 fi
2451
2452
2453 fi
2454 if test -z "$ac_cv_prog_CC"; then
2455   ac_ct_CC=$CC
2456   # Extract the first word of "gcc", so it can be a program name with args.
2457 set dummy gcc; ac_word=$2
2458 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2460 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2461   echo $ECHO_N "(cached) $ECHO_C" >&6
2462 else
2463   if test -n "$ac_ct_CC"; then
2464   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2465 else
2466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467 for as_dir in $PATH
2468 do
2469   IFS=$as_save_IFS
2470   test -z "$as_dir" && as_dir=.
2471   for ac_exec_ext in '' $ac_executable_extensions; do
2472   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2473     ac_cv_prog_ac_ct_CC="gcc"
2474     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2475     break 2
2476   fi
2477 done
2478 done
2479 IFS=$as_save_IFS
2480
2481 fi
2482 fi
2483 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2484 if test -n "$ac_ct_CC"; then
2485   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2486 echo "${ECHO_T}$ac_ct_CC" >&6; }
2487 else
2488   { echo "$as_me:$LINENO: result: no" >&5
2489 echo "${ECHO_T}no" >&6; }
2490 fi
2491
2492   if test "x$ac_ct_CC" = x; then
2493     CC=""
2494   else
2495     case $cross_compiling:$ac_tool_warned in
2496 yes:)
2497 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2498 whose name does not start with the host triplet.  If you think this
2499 configuration is useful to you, please write to autoconf@gnu.org." >&5
2500 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2501 whose name does not start with the host triplet.  If you think this
2502 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2503 ac_tool_warned=yes ;;
2504 esac
2505     CC=$ac_ct_CC
2506   fi
2507 else
2508   CC="$ac_cv_prog_CC"
2509 fi
2510
2511 if test -z "$CC"; then
2512           if test -n "$ac_tool_prefix"; then
2513     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2514 set dummy ${ac_tool_prefix}cc; ac_word=$2
2515 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2517 if test "${ac_cv_prog_CC+set}" = set; then
2518   echo $ECHO_N "(cached) $ECHO_C" >&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2524 for as_dir in $PATH
2525 do
2526   IFS=$as_save_IFS
2527   test -z "$as_dir" && as_dir=.
2528   for ac_exec_ext in '' $ac_executable_extensions; do
2529   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2530     ac_cv_prog_CC="${ac_tool_prefix}cc"
2531     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2532     break 2
2533   fi
2534 done
2535 done
2536 IFS=$as_save_IFS
2537
2538 fi
2539 fi
2540 CC=$ac_cv_prog_CC
2541 if test -n "$CC"; then
2542   { echo "$as_me:$LINENO: result: $CC" >&5
2543 echo "${ECHO_T}$CC" >&6; }
2544 else
2545   { echo "$as_me:$LINENO: result: no" >&5
2546 echo "${ECHO_T}no" >&6; }
2547 fi
2548
2549
2550   fi
2551 fi
2552 if test -z "$CC"; then
2553   # Extract the first word of "cc", so it can be a program name with args.
2554 set dummy cc; ac_word=$2
2555 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2557 if test "${ac_cv_prog_CC+set}" = set; then
2558   echo $ECHO_N "(cached) $ECHO_C" >&6
2559 else
2560   if test -n "$CC"; then
2561   ac_cv_prog_CC="$CC" # Let the user override the test.
2562 else
2563   ac_prog_rejected=no
2564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2565 for as_dir in $PATH
2566 do
2567   IFS=$as_save_IFS
2568   test -z "$as_dir" && as_dir=.
2569   for ac_exec_ext in '' $ac_executable_extensions; do
2570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2571     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2572        ac_prog_rejected=yes
2573        continue
2574      fi
2575     ac_cv_prog_CC="cc"
2576     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2577     break 2
2578   fi
2579 done
2580 done
2581 IFS=$as_save_IFS
2582
2583 if test $ac_prog_rejected = yes; then
2584   # We found a bogon in the path, so make sure we never use it.
2585   set dummy $ac_cv_prog_CC
2586   shift
2587   if test $# != 0; then
2588     # We chose a different compiler from the bogus one.
2589     # However, it has the same basename, so the bogon will be chosen
2590     # first if we set CC to just the basename; use the full file name.
2591     shift
2592     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2593   fi
2594 fi
2595 fi
2596 fi
2597 CC=$ac_cv_prog_CC
2598 if test -n "$CC"; then
2599   { echo "$as_me:$LINENO: result: $CC" >&5
2600 echo "${ECHO_T}$CC" >&6; }
2601 else
2602   { echo "$as_me:$LINENO: result: no" >&5
2603 echo "${ECHO_T}no" >&6; }
2604 fi
2605
2606
2607 fi
2608 if test -z "$CC"; then
2609   if test -n "$ac_tool_prefix"; then
2610   for ac_prog in cl.exe
2611   do
2612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2614 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2616 if test "${ac_cv_prog_CC+set}" = set; then
2617   echo $ECHO_N "(cached) $ECHO_C" >&6
2618 else
2619   if test -n "$CC"; then
2620   ac_cv_prog_CC="$CC" # Let the user override the test.
2621 else
2622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623 for as_dir in $PATH
2624 do
2625   IFS=$as_save_IFS
2626   test -z "$as_dir" && as_dir=.
2627   for ac_exec_ext in '' $ac_executable_extensions; do
2628   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2629     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2630     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2631     break 2
2632   fi
2633 done
2634 done
2635 IFS=$as_save_IFS
2636
2637 fi
2638 fi
2639 CC=$ac_cv_prog_CC
2640 if test -n "$CC"; then
2641   { echo "$as_me:$LINENO: result: $CC" >&5
2642 echo "${ECHO_T}$CC" >&6; }
2643 else
2644   { echo "$as_me:$LINENO: result: no" >&5
2645 echo "${ECHO_T}no" >&6; }
2646 fi
2647
2648
2649     test -n "$CC" && break
2650   done
2651 fi
2652 if test -z "$CC"; then
2653   ac_ct_CC=$CC
2654   for ac_prog in cl.exe
2655 do
2656   # Extract the first word of "$ac_prog", so it can be a program name with args.
2657 set dummy $ac_prog; ac_word=$2
2658 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2661   echo $ECHO_N "(cached) $ECHO_C" >&6
2662 else
2663   if test -n "$ac_ct_CC"; then
2664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2665 else
2666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667 for as_dir in $PATH
2668 do
2669   IFS=$as_save_IFS
2670   test -z "$as_dir" && as_dir=.
2671   for ac_exec_ext in '' $ac_executable_extensions; do
2672   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2673     ac_cv_prog_ac_ct_CC="$ac_prog"
2674     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2675     break 2
2676   fi
2677 done
2678 done
2679 IFS=$as_save_IFS
2680
2681 fi
2682 fi
2683 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2684 if test -n "$ac_ct_CC"; then
2685   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2686 echo "${ECHO_T}$ac_ct_CC" >&6; }
2687 else
2688   { echo "$as_me:$LINENO: result: no" >&5
2689 echo "${ECHO_T}no" >&6; }
2690 fi
2691
2692
2693   test -n "$ac_ct_CC" && break
2694 done
2695
2696   if test "x$ac_ct_CC" = x; then
2697     CC=""
2698   else
2699     case $cross_compiling:$ac_tool_warned in
2700 yes:)
2701 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2702 whose name does not start with the host triplet.  If you think this
2703 configuration is useful to you, please write to autoconf@gnu.org." >&5
2704 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2705 whose name does not start with the host triplet.  If you think this
2706 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2707 ac_tool_warned=yes ;;
2708 esac
2709     CC=$ac_ct_CC
2710   fi
2711 fi
2712
2713 fi
2714
2715
2716 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2717 See \`config.log' for more details." >&5
2718 echo "$as_me: error: no acceptable C compiler found in \$PATH
2719 See \`config.log' for more details." >&2;}
2720    { (exit 1); exit 1; }; }
2721
2722 # Provide some information about the compiler.
2723 echo "$as_me:$LINENO: checking for C compiler version" >&5
2724 ac_compiler=`set X $ac_compile; echo $2`
2725 { (ac_try="$ac_compiler --version >&5"
2726 case "(($ac_try" in
2727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728   *) ac_try_echo=$ac_try;;
2729 esac
2730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731   (eval "$ac_compiler --version >&5") 2>&5
2732   ac_status=$?
2733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734   (exit $ac_status); }
2735 { (ac_try="$ac_compiler -v >&5"
2736 case "(($ac_try" in
2737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2738   *) ac_try_echo=$ac_try;;
2739 esac
2740 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2741   (eval "$ac_compiler -v >&5") 2>&5
2742   ac_status=$?
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); }
2745 { (ac_try="$ac_compiler -V >&5"
2746 case "(($ac_try" in
2747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2748   *) ac_try_echo=$ac_try;;
2749 esac
2750 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2751   (eval "$ac_compiler -V >&5") 2>&5
2752   ac_status=$?
2753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754   (exit $ac_status); }
2755
2756 cat >conftest.$ac_ext <<_ACEOF
2757 /* confdefs.h.  */
2758 _ACEOF
2759 cat confdefs.h >>conftest.$ac_ext
2760 cat >>conftest.$ac_ext <<_ACEOF
2761 /* end confdefs.h.  */
2762
2763 int
2764 main ()
2765 {
2766
2767   ;
2768   return 0;
2769 }
2770 _ACEOF
2771 ac_clean_files_save=$ac_clean_files
2772 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2773 # Try to create an executable without -o first, disregard a.out.
2774 # It will help us diagnose broken compilers, and finding out an intuition
2775 # of exeext.
2776 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2777 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2778 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2779 #
2780 # List of possible output files, starting from the most likely.
2781 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2782 # only as a last resort.  b.out is created by i960 compilers.
2783 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2784 #
2785 # The IRIX 6 linker writes into existing files which may not be
2786 # executable, retaining their permissions.  Remove them first so a
2787 # subsequent execution test works.
2788 ac_rmfiles=
2789 for ac_file in $ac_files
2790 do
2791   case $ac_file in
2792     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2793     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2794   esac
2795 done
2796 rm -f $ac_rmfiles
2797
2798 if { (ac_try="$ac_link_default"
2799 case "(($ac_try" in
2800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2801   *) ac_try_echo=$ac_try;;
2802 esac
2803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2804   (eval "$ac_link_default") 2>&5
2805   ac_status=$?
2806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807   (exit $ac_status); }; then
2808   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2809 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2810 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2811 # so that the user can short-circuit this test for compilers unknown to
2812 # Autoconf.
2813 for ac_file in $ac_files ''
2814 do
2815   test -f "$ac_file" || continue
2816   case $ac_file in
2817     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2818         ;;
2819     [ab].out )
2820         # We found the default executable, but exeext='' is most
2821         # certainly right.
2822         break;;
2823     *.* )
2824         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2825         then :; else
2826            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2827         fi
2828         # We set ac_cv_exeext here because the later test for it is not
2829         # safe: cross compilers may not add the suffix if given an `-o'
2830         # argument, so we may need to know it at that point already.
2831         # Even if this section looks crufty: it has the advantage of
2832         # actually working.
2833         break;;
2834     * )
2835         break;;
2836   esac
2837 done
2838 test "$ac_cv_exeext" = no && ac_cv_exeext=
2839
2840 else
2841   ac_file=''
2842 fi
2843
2844 { echo "$as_me:$LINENO: result: $ac_file" >&5
2845 echo "${ECHO_T}$ac_file" >&6; }
2846 if test -z "$ac_file"; then
2847   echo "$as_me: failed program was:" >&5
2848 sed 's/^/| /' conftest.$ac_ext >&5
2849
2850 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2851 See \`config.log' for more details." >&5
2852 echo "$as_me: error: C compiler cannot create executables
2853 See \`config.log' for more details." >&2;}
2854    { (exit 77); exit 77; }; }
2855 fi
2856
2857 ac_exeext=$ac_cv_exeext
2858
2859 # Check that the compiler produces executables we can run.  If not, either
2860 # the compiler is broken, or we cross compile.
2861 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2862 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2863 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2864 # If not cross compiling, check that we can run a simple program.
2865 if test "$cross_compiling" != yes; then
2866   if { ac_try='./$ac_file'
2867   { (case "(($ac_try" in
2868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2869   *) ac_try_echo=$ac_try;;
2870 esac
2871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2872   (eval "$ac_try") 2>&5
2873   ac_status=$?
2874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875   (exit $ac_status); }; }; then
2876     cross_compiling=no
2877   else
2878     if test "$cross_compiling" = maybe; then
2879         cross_compiling=yes
2880     else
2881         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2882 If you meant to cross compile, use \`--host'.
2883 See \`config.log' for more details." >&5
2884 echo "$as_me: error: cannot run C compiled programs.
2885 If you meant to cross compile, use \`--host'.
2886 See \`config.log' for more details." >&2;}
2887    { (exit 1); exit 1; }; }
2888     fi
2889   fi
2890 fi
2891 { echo "$as_me:$LINENO: result: yes" >&5
2892 echo "${ECHO_T}yes" >&6; }
2893
2894 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2895 ac_clean_files=$ac_clean_files_save
2896 # Check that the compiler produces executables we can run.  If not, either
2897 # the compiler is broken, or we cross compile.
2898 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2899 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2900 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2901 echo "${ECHO_T}$cross_compiling" >&6; }
2902
2903 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2904 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2905 if { (ac_try="$ac_link"
2906 case "(($ac_try" in
2907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2908   *) ac_try_echo=$ac_try;;
2909 esac
2910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2911   (eval "$ac_link") 2>&5
2912   ac_status=$?
2913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2914   (exit $ac_status); }; then
2915   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2916 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2917 # work properly (i.e., refer to `conftest.exe'), while it won't with
2918 # `rm'.
2919 for ac_file in conftest.exe conftest conftest.*; do
2920   test -f "$ac_file" || continue
2921   case $ac_file in
2922     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2923     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2924           break;;
2925     * ) break;;
2926   esac
2927 done
2928 else
2929   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2930 See \`config.log' for more details." >&5
2931 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2932 See \`config.log' for more details." >&2;}
2933    { (exit 1); exit 1; }; }
2934 fi
2935
2936 rm -rf conftest$ac_cv_exeext
2937 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2938 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2939
2940 rm -rf conftest.$ac_ext
2941 EXEEXT=$ac_cv_exeext
2942 ac_exeext=$EXEEXT
2943 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2944 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2945 if test "${ac_cv_objext+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   cat >conftest.$ac_ext <<_ACEOF
2949 /* confdefs.h.  */
2950 _ACEOF
2951 cat confdefs.h >>conftest.$ac_ext
2952 cat >>conftest.$ac_ext <<_ACEOF
2953 /* end confdefs.h.  */
2954
2955 int
2956 main ()
2957 {
2958
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 rm -rf conftest.o conftest.obj
2964 if { (ac_try="$ac_compile"
2965 case "(($ac_try" in
2966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2967   *) ac_try_echo=$ac_try;;
2968 esac
2969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2970   (eval "$ac_compile") 2>&5
2971   ac_status=$?
2972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2973   (exit $ac_status); }; then
2974   for ac_file in conftest.o conftest.obj conftest.*; do
2975   test -f "$ac_file" || continue;
2976   case $ac_file in
2977     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2978     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2979        break;;
2980   esac
2981 done
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985
2986 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2987 See \`config.log' for more details." >&5
2988 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2989 See \`config.log' for more details." >&2;}
2990    { (exit 1); exit 1; }; }
2991 fi
2992
2993 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
2994 fi
2995 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2996 echo "${ECHO_T}$ac_cv_objext" >&6; }
2997 OBJEXT=$ac_cv_objext
2998 ac_objext=$OBJEXT
2999 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3000 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3001 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3002   echo $ECHO_N "(cached) $ECHO_C" >&6
3003 else
3004   cat >conftest.$ac_ext <<_ACEOF
3005 /* confdefs.h.  */
3006 _ACEOF
3007 cat confdefs.h >>conftest.$ac_ext
3008 cat >>conftest.$ac_ext <<_ACEOF
3009 /* end confdefs.h.  */
3010
3011 int
3012 main ()
3013 {
3014 #ifndef __GNUC__
3015        choke me
3016 #endif
3017
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -rf conftest.$ac_objext
3023 if { (ac_try="$ac_compile"
3024 case "(($ac_try" in
3025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026   *) ac_try_echo=$ac_try;;
3027 esac
3028 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3029   (eval "$ac_compile") 2>conftest.er1
3030   ac_status=$?
3031   grep -v '^ *+' conftest.er1 >conftest.err
3032   rm -rf conftest.er1
3033   cat conftest.err >&5
3034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035   (exit $ac_status); } && {
3036          test -z "$ac_c_werror_flag" ||
3037          test ! -s conftest.err
3038        } && test -s conftest.$ac_objext; then
3039   ac_compiler_gnu=yes
3040 else
3041   echo "$as_me: failed program was:" >&5
3042 sed 's/^/| /' conftest.$ac_ext >&5
3043
3044         ac_compiler_gnu=no
3045 fi
3046
3047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3048 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3049
3050 fi
3051 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3052 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3053 GCC=`test $ac_compiler_gnu = yes && echo yes`
3054 ac_test_CFLAGS=${CFLAGS+set}
3055 ac_save_CFLAGS=$CFLAGS
3056 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3057 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3058 if test "${ac_cv_prog_cc_g+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   ac_save_c_werror_flag=$ac_c_werror_flag
3062    ac_c_werror_flag=yes
3063    ac_cv_prog_cc_g=no
3064    CFLAGS="-g"
3065    cat >conftest.$ac_ext <<_ACEOF
3066 /* confdefs.h.  */
3067 _ACEOF
3068 cat confdefs.h >>conftest.$ac_ext
3069 cat >>conftest.$ac_ext <<_ACEOF
3070 /* end confdefs.h.  */
3071
3072 int
3073 main ()
3074 {
3075
3076   ;
3077   return 0;
3078 }
3079 _ACEOF
3080 rm -rf conftest.$ac_objext
3081 if { (ac_try="$ac_compile"
3082 case "(($ac_try" in
3083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084   *) ac_try_echo=$ac_try;;
3085 esac
3086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3087   (eval "$ac_compile") 2>conftest.er1
3088   ac_status=$?
3089   grep -v '^ *+' conftest.er1 >conftest.err
3090   rm -rf conftest.er1
3091   cat conftest.err >&5
3092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3093   (exit $ac_status); } && {
3094          test -z "$ac_c_werror_flag" ||
3095          test ! -s conftest.err
3096        } && test -s conftest.$ac_objext; then
3097   ac_cv_prog_cc_g=yes
3098 else
3099   echo "$as_me: failed program was:" >&5
3100 sed 's/^/| /' conftest.$ac_ext >&5
3101
3102         CFLAGS=""
3103       cat >conftest.$ac_ext <<_ACEOF
3104 /* confdefs.h.  */
3105 _ACEOF
3106 cat confdefs.h >>conftest.$ac_ext
3107 cat >>conftest.$ac_ext <<_ACEOF
3108 /* end confdefs.h.  */
3109
3110 int
3111 main ()
3112 {
3113
3114   ;
3115   return 0;
3116 }
3117 _ACEOF
3118 rm -rf conftest.$ac_objext
3119 if { (ac_try="$ac_compile"
3120 case "(($ac_try" in
3121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3122   *) ac_try_echo=$ac_try;;
3123 esac
3124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3125   (eval "$ac_compile") 2>conftest.er1
3126   ac_status=$?
3127   grep -v '^ *+' conftest.er1 >conftest.err
3128   rm -rf conftest.er1
3129   cat conftest.err >&5
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); } && {
3132          test -z "$ac_c_werror_flag" ||
3133          test ! -s conftest.err
3134        } && test -s conftest.$ac_objext; then
3135   :
3136 else
3137   echo "$as_me: failed program was:" >&5
3138 sed 's/^/| /' conftest.$ac_ext >&5
3139
3140         ac_c_werror_flag=$ac_save_c_werror_flag
3141          CFLAGS="-g"
3142          cat >conftest.$ac_ext <<_ACEOF
3143 /* confdefs.h.  */
3144 _ACEOF
3145 cat confdefs.h >>conftest.$ac_ext
3146 cat >>conftest.$ac_ext <<_ACEOF
3147 /* end confdefs.h.  */
3148
3149 int
3150 main ()
3151 {
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -rf conftest.$ac_objext
3158 if { (ac_try="$ac_compile"
3159 case "(($ac_try" in
3160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161   *) ac_try_echo=$ac_try;;
3162 esac
3163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3164   (eval "$ac_compile") 2>conftest.er1
3165   ac_status=$?
3166   grep -v '^ *+' conftest.er1 >conftest.err
3167   rm -rf conftest.er1
3168   cat conftest.err >&5
3169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3170   (exit $ac_status); } && {
3171          test -z "$ac_c_werror_flag" ||
3172          test ! -s conftest.err
3173        } && test -s conftest.$ac_objext; then
3174   ac_cv_prog_cc_g=yes
3175 else
3176   echo "$as_me: failed program was:" >&5
3177 sed 's/^/| /' conftest.$ac_ext >&5
3178
3179
3180 fi
3181
3182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3183 fi
3184
3185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3186 fi
3187
3188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3189    ac_c_werror_flag=$ac_save_c_werror_flag
3190 fi
3191 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3192 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3193 if test "$ac_test_CFLAGS" = set; then
3194   CFLAGS=$ac_save_CFLAGS
3195 elif test $ac_cv_prog_cc_g = yes; then
3196   if test "$GCC" = yes; then
3197     CFLAGS="-g -O2"
3198   else
3199     CFLAGS="-g"
3200   fi
3201 else
3202   if test "$GCC" = yes; then
3203     CFLAGS="-O2"
3204   else
3205     CFLAGS=
3206   fi
3207 fi
3208 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3209 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3210 if test "${ac_cv_prog_cc_c89+set}" = set; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   ac_cv_prog_cc_c89=no
3214 ac_save_CC=$CC
3215 cat >conftest.$ac_ext <<_ACEOF
3216 /* confdefs.h.  */
3217 _ACEOF
3218 cat confdefs.h >>conftest.$ac_ext
3219 cat >>conftest.$ac_ext <<_ACEOF
3220 /* end confdefs.h.  */
3221 #include <stdarg.h>
3222 #include <stdio.h>
3223 #include <sys/types.h>
3224 #include <sys/stat.h>
3225 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3226 struct buf { int x; };
3227 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3228 static char *e (p, i)
3229      char **p;
3230      int i;
3231 {
3232   return p[i];
3233 }
3234 static char *f (char * (*g) (char **, int), char **p, ...)
3235 {
3236   char *s;
3237   va_list v;
3238   va_start (v,p);
3239   s = g (p, va_arg (v,int));
3240   va_end (v);
3241   return s;
3242 }
3243
3244 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3245    function prototypes and stuff, but not '\xHH' hex character constants.
3246    These don't provoke an error unfortunately, instead are silently treated
3247    as 'x'.  The following induces an error, until -std is added to get
3248    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3249    array size at least.  It's necessary to write '\x00'==0 to get something
3250    that's true only with -std.  */
3251 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3252
3253 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3254    inside strings and character constants.  */
3255 #define FOO(x) 'x'
3256 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3257
3258 int test (int i, double x);
3259 struct s1 {int (*f) (int a);};
3260 struct s2 {int (*f) (double a);};
3261 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3262 int argc;
3263 char **argv;
3264 int
3265 main ()
3266 {
3267 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3268   ;
3269   return 0;
3270 }
3271 _ACEOF
3272 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3273         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3274 do
3275   CC="$ac_save_CC $ac_arg"
3276   rm -rf conftest.$ac_objext
3277 if { (ac_try="$ac_compile"
3278 case "(($ac_try" in
3279   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280   *) ac_try_echo=$ac_try;;
3281 esac
3282 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3283   (eval "$ac_compile") 2>conftest.er1
3284   ac_status=$?
3285   grep -v '^ *+' conftest.er1 >conftest.err
3286   rm -rf conftest.er1
3287   cat conftest.err >&5
3288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3289   (exit $ac_status); } && {
3290          test -z "$ac_c_werror_flag" ||
3291          test ! -s conftest.err
3292        } && test -s conftest.$ac_objext; then
3293   ac_cv_prog_cc_c89=$ac_arg
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 sed 's/^/| /' conftest.$ac_ext >&5
3297
3298
3299 fi
3300
3301 rm -f core conftest.err conftest.$ac_objext
3302   test "x$ac_cv_prog_cc_c89" != "xno" && break
3303 done
3304 rm -rf conftest.$ac_ext
3305 CC=$ac_save_CC
3306
3307 fi
3308 # AC_CACHE_VAL
3309 case "x$ac_cv_prog_cc_c89" in
3310   x)
3311     { echo "$as_me:$LINENO: result: none needed" >&5
3312 echo "${ECHO_T}none needed" >&6; } ;;
3313   xno)
3314     { echo "$as_me:$LINENO: result: unsupported" >&5
3315 echo "${ECHO_T}unsupported" >&6; } ;;
3316   *)
3317     CC="$CC $ac_cv_prog_cc_c89"
3318     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3319 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3320 esac
3321
3322
3323 ac_ext=c
3324 ac_cpp='$CPP $CPPFLAGS'
3325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3328
3329
3330   if test -z "$GCC"; then
3331     # not using GCC
3332     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3333 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3334     case "$host" in
3335       *-hpux* )
3336         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3337 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3338         CC="$CC -Ae"
3339       ;;
3340       *-aix* )
3341         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3342 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3343         CC="$CC -qlanglvl=ansi -qhalt=e"
3344       ;;
3345       *-dec-* )
3346         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3347 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3348         CC="$CC -std1"
3349       ;;
3350       *)
3351         { echo "$as_me:$LINENO: result: no idea" >&5
3352 echo "${ECHO_T}no idea" >&6; }
3353       ;;
3354     esac
3355   else
3356     # using GCC
3357     case "$host" in
3358       *-solaris*)
3359         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3360 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3361         CC="$CC -D__EXTENSIONS__"
3362       ;;
3363     esac
3364   fi
3365
3366   OBJCC="$CC"
3367
3368   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3369 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3370   if test "$cross_compiling" = yes; then
3371   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3372 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3373    { (exit 1); exit 1; }; }
3374 else
3375   cat >conftest.$ac_ext <<_ACEOF
3376 /* confdefs.h.  */
3377 _ACEOF
3378 cat confdefs.h >>conftest.$ac_ext
3379 cat >>conftest.$ac_ext <<_ACEOF
3380 /* end confdefs.h.  */
3381  main(int ac, char **av) { return 0; }
3382 _ACEOF
3383 rm -rf conftest$ac_exeext
3384 if { (ac_try="$ac_link"
3385 case "(($ac_try" in
3386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3387   *) ac_try_echo=$ac_try;;
3388 esac
3389 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3390   (eval "$ac_link") 2>&5
3391   ac_status=$?
3392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3394   { (case "(($ac_try" in
3395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3396   *) ac_try_echo=$ac_try;;
3397 esac
3398 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3399   (eval "$ac_try") 2>&5
3400   ac_status=$?
3401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3402   (exit $ac_status); }; }; then
3403   { echo "$as_me:$LINENO: result: yes" >&5
3404 echo "${ECHO_T}yes" >&6; }
3405 else
3406   echo "$as_me: program exited with status $ac_status" >&5
3407 echo "$as_me: failed program was:" >&5
3408 sed 's/^/| /' conftest.$ac_ext >&5
3409
3410 ( exit $ac_status )
3411 { echo "$as_me:$LINENO: result: no" >&5
3412 echo "${ECHO_T}no" >&6; }
3413      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3414 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3415    { (exit 1); exit 1; }; }
3416 fi
3417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3418 fi
3419
3420
3421
3422   if test -n "$GCC"; then
3423     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3424 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3425     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3426     OBJCC="$OBJCC -Wall"
3427     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3428     # and so perhaps now we can do without -pedantic?
3429   else
3430     case "$host" in
3431       *-irix5* |*-irix6.0-3* )
3432         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3433 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3434         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3435       ;;
3436 #     *-dec-osf* )
3437 #       if test -z "$GCC"; then
3438 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3439 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3440 #       fi
3441 #     ;;
3442     esac
3443   fi
3444
3445 if test -n "$GCC"; then
3446    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3447 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3448 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3449   echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451   rm -rf conftest.$ac_ext
3452      touch conftest.$ac_ext
3453      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3454           grep unrecognized >/dev/null ); then
3455        ac_cv_gcc_accepts_no_overlength=no
3456      else
3457        ac_cv_gcc_accepts_no_overlength=yes
3458      fi
3459 fi
3460 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3461 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3462    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3463   fi
3464
3465 if test -n "$GCC"; then
3466    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3467 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3468 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3469   echo $ECHO_N "(cached) $ECHO_C" >&6
3470 else
3471   rm -rf conftest.$ac_ext
3472      touch conftest.$ac_ext
3473      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3474           grep unrecognized >/dev/null ); then
3475        ac_cv_gcc_accepts_no_decl_after=no
3476      else
3477        ac_cv_gcc_accepts_no_decl_after=yes
3478      fi
3479 fi
3480 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3481 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3482    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3483   fi
3484
3485 if test -n "$GCC"; then
3486    if test -n "$GCC"; then
3487    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3488 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3489 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492   rm -rf conftest.$ac_ext
3493      touch conftest.$ac_ext
3494      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3495           grep unrecognized >/dev/null ); then
3496        ac_cv_gcc_accepts_no_cpp_precomp=no
3497      else
3498        ac_cv_gcc_accepts_no_cpp_precomp=yes
3499      fi
3500 fi
3501 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3502 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3503    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3504   fi
3505
3506    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
3507      { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
3508 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
3509      CC="$CC -no-cpp-precomp"
3510    fi
3511   fi
3512
3513 if test -n "$GCC"; then
3514    if test -n "$GCC"; then
3515    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3516 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3517 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3518   echo $ECHO_N "(cached) $ECHO_C" >&6
3519 else
3520   rm -rf conftest.$ac_ext
3521      touch conftest.$ac_ext
3522      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3523           grep unrecognized >/dev/null ); then
3524        ac_cv_gcc_accepts_std=no
3525      else
3526        ac_cv_gcc_accepts_std=yes
3527      fi
3528 fi
3529 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3530 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3531    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3532   fi
3533
3534    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3535 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3536    #
3537    # The reason that // comments are banned from xscreensaver is that gcc is
3538    # basically the only compiler in the world that supports them in C code.
3539    # All other vendors support them only in their C++ compilers, not in their
3540    # ANSI C compilers.  This means that it's a portability problem: every time
3541    # these comments have snuck into the xscreensaver source code, I've gotten
3542    # complaints about it the next day.  So we turn off support for them in gcc
3543    # as well to prevent them from accidentially slipping in.
3544    #
3545    if test "$ac_gcc_accepts_std" = yes ; then
3546      #
3547      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3548      # (That appears to be the only additional preprocessor symbol
3549      # it defines, in addition to the syntax changes it makes.)
3550      #
3551      # -std=gnu89 is no good, because // comments were a GNU extension
3552      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3553      # with -std=gnu89 but not with -std=c89.)
3554      #
3555      CC="$CC -std=c89 -U__STRICT_ANSI__"
3556    else
3557      # The old way:
3558      CC="$CC -Wp,-lang-c89"
3559    fi
3560   fi
3561
3562 ac_ext=c
3563 ac_cpp='$CPP $CPPFLAGS'
3564 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3567 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3568 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3569 # On Suns, sometimes $CPP names a directory.
3570 if test -n "$CPP" && test -d "$CPP"; then
3571   CPP=
3572 fi
3573 if test -z "$CPP"; then
3574   if test "${ac_cv_prog_CPP+set}" = set; then
3575   echo $ECHO_N "(cached) $ECHO_C" >&6
3576 else
3577       # Double quotes because CPP needs to be expanded
3578     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3579     do
3580       ac_preproc_ok=false
3581 for ac_c_preproc_warn_flag in '' yes
3582 do
3583   # Use a header file that comes with gcc, so configuring glibc
3584   # with a fresh cross-compiler works.
3585   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3586   # <limits.h> exists even on freestanding compilers.
3587   # On the NeXT, cc -E runs the code through the compiler's parser,
3588   # not just through cpp. "Syntax error" is here to catch this case.
3589   cat >conftest.$ac_ext <<_ACEOF
3590 /* confdefs.h.  */
3591 _ACEOF
3592 cat confdefs.h >>conftest.$ac_ext
3593 cat >>conftest.$ac_ext <<_ACEOF
3594 /* end confdefs.h.  */
3595 #ifdef __STDC__
3596 # include <limits.h>
3597 #else
3598 # include <assert.h>
3599 #endif
3600                      Syntax error
3601 _ACEOF
3602 if { (ac_try="$ac_cpp conftest.$ac_ext"
3603 case "(($ac_try" in
3604   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605   *) ac_try_echo=$ac_try;;
3606 esac
3607 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3608   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3609   ac_status=$?
3610   grep -v '^ *+' conftest.er1 >conftest.err
3611   rm -rf conftest.er1
3612   cat conftest.err >&5
3613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3614   (exit $ac_status); } >/dev/null && {
3615          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3616          test ! -s conftest.err
3617        }; then
3618   :
3619 else
3620   echo "$as_me: failed program was:" >&5
3621 sed 's/^/| /' conftest.$ac_ext >&5
3622
3623   # Broken: fails on valid input.
3624 continue
3625 fi
3626
3627 rm -rf conftest.err conftest.$ac_ext
3628
3629   # OK, works on sane cases.  Now check whether nonexistent headers
3630   # can be detected and how.
3631   cat >conftest.$ac_ext <<_ACEOF
3632 /* confdefs.h.  */
3633 _ACEOF
3634 cat confdefs.h >>conftest.$ac_ext
3635 cat >>conftest.$ac_ext <<_ACEOF
3636 /* end confdefs.h.  */
3637 #include <ac_nonexistent.h>
3638 _ACEOF
3639 if { (ac_try="$ac_cpp conftest.$ac_ext"
3640 case "(($ac_try" in
3641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3642   *) ac_try_echo=$ac_try;;
3643 esac
3644 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3645   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3646   ac_status=$?
3647   grep -v '^ *+' conftest.er1 >conftest.err
3648   rm -rf conftest.er1
3649   cat conftest.err >&5
3650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3651   (exit $ac_status); } >/dev/null && {
3652          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3653          test ! -s conftest.err
3654        }; then
3655   # Broken: success on invalid input.
3656 continue
3657 else
3658   echo "$as_me: failed program was:" >&5
3659 sed 's/^/| /' conftest.$ac_ext >&5
3660
3661   # Passes both tests.
3662 ac_preproc_ok=:
3663 break
3664 fi
3665
3666 rm -rf conftest.err conftest.$ac_ext
3667
3668 done
3669 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3670 rm -rf conftest.err conftest.$ac_ext
3671 if $ac_preproc_ok; then
3672   break
3673 fi
3674
3675     done
3676     ac_cv_prog_CPP=$CPP
3677
3678 fi
3679   CPP=$ac_cv_prog_CPP
3680 else
3681   ac_cv_prog_CPP=$CPP
3682 fi
3683 { echo "$as_me:$LINENO: result: $CPP" >&5
3684 echo "${ECHO_T}$CPP" >&6; }
3685 ac_preproc_ok=false
3686 for ac_c_preproc_warn_flag in '' yes
3687 do
3688   # Use a header file that comes with gcc, so configuring glibc
3689   # with a fresh cross-compiler works.
3690   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3691   # <limits.h> exists even on freestanding compilers.
3692   # On the NeXT, cc -E runs the code through the compiler's parser,
3693   # not just through cpp. "Syntax error" is here to catch this case.
3694   cat >conftest.$ac_ext <<_ACEOF
3695 /* confdefs.h.  */
3696 _ACEOF
3697 cat confdefs.h >>conftest.$ac_ext
3698 cat >>conftest.$ac_ext <<_ACEOF
3699 /* end confdefs.h.  */
3700 #ifdef __STDC__
3701 # include <limits.h>
3702 #else
3703 # include <assert.h>
3704 #endif
3705                      Syntax error
3706 _ACEOF
3707 if { (ac_try="$ac_cpp conftest.$ac_ext"
3708 case "(($ac_try" in
3709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3710   *) ac_try_echo=$ac_try;;
3711 esac
3712 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3713   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3714   ac_status=$?
3715   grep -v '^ *+' conftest.er1 >conftest.err
3716   rm -rf conftest.er1
3717   cat conftest.err >&5
3718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3719   (exit $ac_status); } >/dev/null && {
3720          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3721          test ! -s conftest.err
3722        }; then
3723   :
3724 else
3725   echo "$as_me: failed program was:" >&5
3726 sed 's/^/| /' conftest.$ac_ext >&5
3727
3728   # Broken: fails on valid input.
3729 continue
3730 fi
3731
3732 rm -rf conftest.err conftest.$ac_ext
3733
3734   # OK, works on sane cases.  Now check whether nonexistent headers
3735   # can be detected and how.
3736   cat >conftest.$ac_ext <<_ACEOF
3737 /* confdefs.h.  */
3738 _ACEOF
3739 cat confdefs.h >>conftest.$ac_ext
3740 cat >>conftest.$ac_ext <<_ACEOF
3741 /* end confdefs.h.  */
3742 #include <ac_nonexistent.h>
3743 _ACEOF
3744 if { (ac_try="$ac_cpp conftest.$ac_ext"
3745 case "(($ac_try" in
3746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3747   *) ac_try_echo=$ac_try;;
3748 esac
3749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3750   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3751   ac_status=$?
3752   grep -v '^ *+' conftest.er1 >conftest.err
3753   rm -rf conftest.er1
3754   cat conftest.err >&5
3755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756   (exit $ac_status); } >/dev/null && {
3757          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3758          test ! -s conftest.err
3759        }; then
3760   # Broken: success on invalid input.
3761 continue
3762 else
3763   echo "$as_me: failed program was:" >&5
3764 sed 's/^/| /' conftest.$ac_ext >&5
3765
3766   # Passes both tests.
3767 ac_preproc_ok=:
3768 break
3769 fi
3770
3771 rm -rf conftest.err conftest.$ac_ext
3772
3773 done
3774 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3775 rm -rf conftest.err conftest.$ac_ext
3776 if $ac_preproc_ok; then
3777   :
3778 else
3779   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3780 See \`config.log' for more details." >&5
3781 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3782 See \`config.log' for more details." >&2;}
3783    { (exit 1); exit 1; }; }
3784 fi
3785
3786 ac_ext=c
3787 ac_cpp='$CPP $CPPFLAGS'
3788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3791
3792 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3793 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3794 if test "${ac_cv_c_const+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   cat >conftest.$ac_ext <<_ACEOF
3798 /* confdefs.h.  */
3799 _ACEOF
3800 cat confdefs.h >>conftest.$ac_ext
3801 cat >>conftest.$ac_ext <<_ACEOF
3802 /* end confdefs.h.  */
3803
3804 int
3805 main ()
3806 {
3807 /* FIXME: Include the comments suggested by Paul. */
3808 #ifndef __cplusplus
3809   /* Ultrix mips cc rejects this.  */
3810   typedef int charset[2];
3811   const charset cs;
3812   /* SunOS 4.1.1 cc rejects this.  */
3813   char const *const *pcpcc;
3814   char **ppc;
3815   /* NEC SVR4.0.2 mips cc rejects this.  */
3816   struct point {int x, y;};
3817   static struct point const zero = {0,0};
3818   /* AIX XL C 1.02.0.0 rejects this.
3819      It does not let you subtract one const X* pointer from another in
3820      an arm of an if-expression whose if-part is not a constant
3821      expression */
3822   const char *g = "string";
3823   pcpcc = &g + (g ? g-g : 0);
3824   /* HPUX 7.0 cc rejects these. */
3825   ++pcpcc;
3826   ppc = (char**) pcpcc;
3827   pcpcc = (char const *const *) ppc;
3828   { /* SCO 3.2v4 cc rejects this.  */
3829     char *t;
3830     char const *s = 0 ? (char *) 0 : (char const *) 0;
3831
3832     *t++ = 0;
3833     if (s) return 0;
3834   }
3835   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3836     int x[] = {25, 17};
3837     const int *foo = &x[0];
3838     ++foo;
3839   }
3840   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3841     typedef const int *iptr;
3842     iptr p = 0;
3843     ++p;
3844   }
3845   { /* AIX XL C 1.02.0.0 rejects this saying
3846        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3847     struct s { int j; const int *ap[3]; };
3848     struct s *b; b->j = 5;
3849   }
3850   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3851     const int foo = 10;
3852     if (!foo) return 0;
3853   }
3854   return !cs[0] && !zero.x;
3855 #endif
3856
3857   ;
3858   return 0;
3859 }
3860 _ACEOF
3861 rm -rf conftest.$ac_objext
3862 if { (ac_try="$ac_compile"
3863 case "(($ac_try" in
3864   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3865   *) ac_try_echo=$ac_try;;
3866 esac
3867 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3868   (eval "$ac_compile") 2>conftest.er1
3869   ac_status=$?
3870   grep -v '^ *+' conftest.er1 >conftest.err
3871   rm -rf conftest.er1
3872   cat conftest.err >&5
3873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874   (exit $ac_status); } && {
3875          test -z "$ac_c_werror_flag" ||
3876          test ! -s conftest.err
3877        } && test -s conftest.$ac_objext; then
3878   ac_cv_c_const=yes
3879 else
3880   echo "$as_me: failed program was:" >&5
3881 sed 's/^/| /' conftest.$ac_ext >&5
3882
3883         ac_cv_c_const=no
3884 fi
3885
3886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3887 fi
3888 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3889 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3890 if test $ac_cv_c_const = no; then
3891
3892 cat >>confdefs.h <<\_ACEOF
3893 #define const
3894 _ACEOF
3895
3896 fi
3897
3898 { echo "$as_me:$LINENO: checking for inline" >&5
3899 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3900 if test "${ac_cv_c_inline+set}" = set; then
3901   echo $ECHO_N "(cached) $ECHO_C" >&6
3902 else
3903   ac_cv_c_inline=no
3904 for ac_kw in inline __inline__ __inline; do
3905   cat >conftest.$ac_ext <<_ACEOF
3906 /* confdefs.h.  */
3907 _ACEOF
3908 cat confdefs.h >>conftest.$ac_ext
3909 cat >>conftest.$ac_ext <<_ACEOF
3910 /* end confdefs.h.  */
3911 #ifndef __cplusplus
3912 typedef int foo_t;
3913 static $ac_kw foo_t static_foo () {return 0; }
3914 $ac_kw foo_t foo () {return 0; }
3915 #endif
3916
3917 _ACEOF
3918 rm -rf conftest.$ac_objext
3919 if { (ac_try="$ac_compile"
3920 case "(($ac_try" in
3921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3922   *) ac_try_echo=$ac_try;;
3923 esac
3924 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3925   (eval "$ac_compile") 2>conftest.er1
3926   ac_status=$?
3927   grep -v '^ *+' conftest.er1 >conftest.err
3928   rm -rf conftest.er1
3929   cat conftest.err >&5
3930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931   (exit $ac_status); } && {
3932          test -z "$ac_c_werror_flag" ||
3933          test ! -s conftest.err
3934        } && test -s conftest.$ac_objext; then
3935   ac_cv_c_inline=$ac_kw
3936 else
3937   echo "$as_me: failed program was:" >&5
3938 sed 's/^/| /' conftest.$ac_ext >&5
3939
3940
3941 fi
3942
3943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3944   test "$ac_cv_c_inline" != no && break
3945 done
3946
3947 fi
3948 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3949 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3950
3951
3952 case $ac_cv_c_inline in
3953   inline | yes) ;;
3954   *)
3955     case $ac_cv_c_inline in
3956       no) ac_val=;;
3957       *) ac_val=$ac_cv_c_inline;;
3958     esac
3959     cat >>confdefs.h <<_ACEOF
3960 #ifndef __cplusplus
3961 #define inline $ac_val
3962 #endif
3963 _ACEOF
3964     ;;
3965 esac
3966
3967
3968 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3969   { echo "$as_me:$LINENO: checking for bc" >&5
3970 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3971   if test "$ac_bc_result" = "15" ; then
3972     { echo "$as_me:$LINENO: result: yes" >&5
3973 echo "${ECHO_T}yes" >&6; }
3974   else
3975     { echo "$as_me:$LINENO: result: no" >&5
3976 echo "${ECHO_T}no" >&6; }
3977     echo ''
3978     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3979                   part of Unix since the 1970s.  Come back when your vendor
3980                   has grown a clue." >&5
3981 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3982                   part of Unix since the 1970s.  Come back when your vendor
3983                   has grown a clue." >&2;}
3984    { (exit 1); exit 1; }; }
3985   fi
3986
3987
3988 # stuff for Makefiles
3989 # Find a good install program.  We prefer a C program (faster),
3990 # so one script is as good as another.  But avoid the broken or
3991 # incompatible versions:
3992 # SysV /etc/install, /usr/sbin/install
3993 # SunOS /usr/etc/install
3994 # IRIX /sbin/install
3995 # AIX /bin/install
3996 # AmigaOS /C/install, which installs bootblocks on floppy discs
3997 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3998 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3999 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4000 # OS/2's system install, which has a completely different semantic
4001 # ./install, which can be erroneously created by make from ./install.sh.
4002 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4003 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4004 if test -z "$INSTALL"; then
4005 if test "${ac_cv_path_install+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009 for as_dir in $PATH
4010 do
4011   IFS=$as_save_IFS
4012   test -z "$as_dir" && as_dir=.
4013   # Account for people who put trailing slashes in PATH elements.
4014 case $as_dir/ in
4015   ./ | .// | /cC/* | \
4016   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4017   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4018   /usr/ucb/* ) ;;
4019   *)
4020     # OSF1 and SCO ODT 3.0 have their own names for install.
4021     # Don't use installbsd from OSF since it installs stuff as root
4022     # by default.
4023     for ac_prog in ginstall scoinst install; do
4024       for ac_exec_ext in '' $ac_executable_extensions; do
4025         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4026           if test $ac_prog = install &&
4027             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4028             # AIX install.  It has an incompatible calling convention.
4029             :
4030           elif test $ac_prog = install &&
4031             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4032             # program-specific install script used by HP pwplus--don't use.
4033             :
4034           else
4035             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4036             break 3
4037           fi
4038         fi
4039       done
4040     done
4041     ;;
4042 esac
4043 done
4044 IFS=$as_save_IFS
4045
4046
4047 fi
4048   if test "${ac_cv_path_install+set}" = set; then
4049     INSTALL=$ac_cv_path_install
4050   else
4051     # As a last resort, use the slow shell script.  Don't cache a
4052     # value for INSTALL within a source directory, because that will
4053     # break other packages using the cache if that directory is
4054     # removed, or if the value is a relative name.
4055     INSTALL=$ac_install_sh
4056   fi
4057 fi
4058 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4059 echo "${ECHO_T}$INSTALL" >&6; }
4060
4061 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4062 # It thinks the first close brace ends the variable substitution.
4063 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4064
4065 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4066
4067 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4068
4069 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4070 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4071 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4072   echo $ECHO_N "(cached) $ECHO_C" >&6
4073 else
4074   ac_cv_install_d_creates_dirs=no
4075      rm -rf conftestdir
4076      if mkdir conftestdir; then
4077        cd conftestdir 2>/dev/null
4078        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4079        if test -d dir1/dir2/. ; then
4080          ac_cv_install_d_creates_dirs=yes
4081        fi
4082        cd .. 2>/dev/null
4083        rm -rf conftestdir
4084      fi
4085
4086 fi
4087 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4088 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4089
4090   if test "$ac_cv_install_d_creates_dirs" = no ; then
4091     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4092 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4093 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4094   echo $ECHO_N "(cached) $ECHO_C" >&6
4095 else
4096   ac_cv_mkdir_p_creates_dirs=no
4097        rm -rf conftestdir
4098        if mkdir conftestdir; then
4099          cd conftestdir 2>/dev/null
4100          mkdir -p dir1/dir2 >/dev/null 2>&1
4101          if test -d dir1/dir2/. ; then
4102            ac_cv_mkdir_p_creates_dirs=yes
4103          fi
4104          cd .. 2>/dev/null
4105          rm -rf conftestdir
4106        fi
4107
4108 fi
4109 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4110 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4111   fi
4112
4113   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4114     INSTALL_DIRS='${INSTALL} -d'
4115   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4116     INSTALL_DIRS='mkdir -p'
4117   else
4118     # any other ideas?
4119     INSTALL_DIRS='${INSTALL} -d'
4120   fi
4121
4122 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4123 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4124 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4125 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4126   echo $ECHO_N "(cached) $ECHO_C" >&6
4127 else
4128   cat >conftest.make <<\_ACEOF
4129 SHELL = /bin/sh
4130 all:
4131         @echo '@@@%%%=$(MAKE)=@@@%%%'
4132 _ACEOF
4133 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4134 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4135   *@@@%%%=?*=@@@%%%*)
4136     eval ac_cv_prog_make_${ac_make}_set=yes;;
4137   *)
4138     eval ac_cv_prog_make_${ac_make}_set=no;;
4139 esac
4140 rm -rf conftest.make
4141 fi
4142 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4143   { echo "$as_me:$LINENO: result: yes" >&5
4144 echo "${ECHO_T}yes" >&6; }
4145   SET_MAKE=
4146 else
4147   { echo "$as_me:$LINENO: result: no" >&5
4148 echo "${ECHO_T}no" >&6; }
4149   SET_MAKE="MAKE=${MAKE-make}"
4150 fi
4151
4152
4153 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4154 # That's wrong: it should be set to '${INSTALL}', so that one can
4155 # implement the "install-strip" target properly (strip executables,
4156 # but do not try to strip scripts.)
4157 #
4158 INSTALL_SCRIPT='${INSTALL}'
4159
4160 # random libc stuff
4161
4162 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4163 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4164 if test "${ac_cv_path_GREP+set}" = set; then
4165   echo $ECHO_N "(cached) $ECHO_C" >&6
4166 else
4167   # Extract the first word of "grep ggrep" to use in msg output
4168 if test -z "$GREP"; then
4169 set dummy grep ggrep; ac_prog_name=$2
4170 if test "${ac_cv_path_GREP+set}" = set; then
4171   echo $ECHO_N "(cached) $ECHO_C" >&6
4172 else
4173   ac_path_GREP_found=false
4174 # Loop through the user's path and test for each of PROGNAME-LIST
4175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4177 do
4178   IFS=$as_save_IFS
4179   test -z "$as_dir" && as_dir=.
4180   for ac_prog in grep ggrep; do
4181   for ac_exec_ext in '' $ac_executable_extensions; do
4182     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4183     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4184     # Check for GNU ac_path_GREP and select it if it is found.
4185   # Check for GNU $ac_path_GREP
4186 case `"$ac_path_GREP" --version 2>&1` in
4187 *GNU*)
4188   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4189 *)
4190   ac_count=0
4191   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4192   while :
4193   do
4194     cat "conftest.in" "conftest.in" >"conftest.tmp"
4195     mv "conftest.tmp" "conftest.in"
4196     cp "conftest.in" "conftest.nl"
4197     echo 'GREP' >> "conftest.nl"
4198     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4199     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4200     ac_count=`expr $ac_count + 1`
4201     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4202       # Best one so far, save it but keep looking for a better one
4203       ac_cv_path_GREP="$ac_path_GREP"
4204       ac_path_GREP_max=$ac_count
4205     fi
4206     # 10*(2^10) chars as input seems more than enough
4207     test $ac_count -gt 10 && break
4208   done
4209   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4210 esac
4211
4212
4213     $ac_path_GREP_found && break 3
4214   done
4215 done
4216
4217 done
4218 IFS=$as_save_IFS
4219
4220
4221 fi
4222
4223 GREP="$ac_cv_path_GREP"
4224 if test -z "$GREP"; then
4225   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4226 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4227    { (exit 1); exit 1; }; }
4228 fi
4229
4230 else
4231   ac_cv_path_GREP=$GREP
4232 fi
4233
4234
4235 fi
4236 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4237 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4238  GREP="$ac_cv_path_GREP"
4239
4240
4241 { echo "$as_me:$LINENO: checking for egrep" >&5
4242 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4243 if test "${ac_cv_path_EGREP+set}" = set; then
4244   echo $ECHO_N "(cached) $ECHO_C" >&6
4245 else
4246   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4247    then ac_cv_path_EGREP="$GREP -E"
4248    else
4249      # Extract the first word of "egrep" to use in msg output
4250 if test -z "$EGREP"; then
4251 set dummy egrep; ac_prog_name=$2
4252 if test "${ac_cv_path_EGREP+set}" = set; then
4253   echo $ECHO_N "(cached) $ECHO_C" >&6
4254 else
4255   ac_path_EGREP_found=false
4256 # Loop through the user's path and test for each of PROGNAME-LIST
4257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4258 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4259 do
4260   IFS=$as_save_IFS
4261   test -z "$as_dir" && as_dir=.
4262   for ac_prog in egrep; do
4263   for ac_exec_ext in '' $ac_executable_extensions; do
4264     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4265     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4266     # Check for GNU ac_path_EGREP and select it if it is found.
4267   # Check for GNU $ac_path_EGREP
4268 case `"$ac_path_EGREP" --version 2>&1` in
4269 *GNU*)
4270   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4271 *)
4272   ac_count=0
4273   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4274   while :
4275   do
4276     cat "conftest.in" "conftest.in" >"conftest.tmp"
4277     mv "conftest.tmp" "conftest.in"
4278     cp "conftest.in" "conftest.nl"
4279     echo 'EGREP' >> "conftest.nl"
4280     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4281     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4282     ac_count=`expr $ac_count + 1`
4283     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4284       # Best one so far, save it but keep looking for a better one
4285       ac_cv_path_EGREP="$ac_path_EGREP"
4286       ac_path_EGREP_max=$ac_count
4287     fi
4288     # 10*(2^10) chars as input seems more than enough
4289     test $ac_count -gt 10 && break
4290   done
4291   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4292 esac
4293
4294
4295     $ac_path_EGREP_found && break 3
4296   done
4297 done
4298
4299 done
4300 IFS=$as_save_IFS
4301
4302
4303 fi
4304
4305 EGREP="$ac_cv_path_EGREP"
4306 if test -z "$EGREP"; then
4307   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4308 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4309    { (exit 1); exit 1; }; }
4310 fi
4311
4312 else
4313   ac_cv_path_EGREP=$EGREP
4314 fi
4315
4316
4317    fi
4318 fi
4319 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4320 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4321  EGREP="$ac_cv_path_EGREP"
4322
4323
4324 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4325 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4326 if test "${ac_cv_header_stdc+set}" = set; then
4327   echo $ECHO_N "(cached) $ECHO_C" >&6
4328 else
4329   cat >conftest.$ac_ext <<_ACEOF
4330 /* confdefs.h.  */
4331 _ACEOF
4332 cat confdefs.h >>conftest.$ac_ext
4333 cat >>conftest.$ac_ext <<_ACEOF
4334 /* end confdefs.h.  */
4335 #include <stdlib.h>
4336 #include <stdarg.h>
4337 #include <string.h>
4338 #include <float.h>
4339
4340 int
4341 main ()
4342 {
4343
4344   ;
4345   return 0;
4346 }
4347 _ACEOF
4348 rm -rf conftest.$ac_objext
4349 if { (ac_try="$ac_compile"
4350 case "(($ac_try" in
4351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4352   *) ac_try_echo=$ac_try;;
4353 esac
4354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4355   (eval "$ac_compile") 2>conftest.er1
4356   ac_status=$?
4357   grep -v '^ *+' conftest.er1 >conftest.err
4358   rm -rf conftest.er1
4359   cat conftest.err >&5
4360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361   (exit $ac_status); } && {
4362          test -z "$ac_c_werror_flag" ||
4363          test ! -s conftest.err
4364        } && test -s conftest.$ac_objext; then
4365   ac_cv_header_stdc=yes
4366 else
4367   echo "$as_me: failed program was:" >&5
4368 sed 's/^/| /' conftest.$ac_ext >&5
4369
4370         ac_cv_header_stdc=no
4371 fi
4372
4373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4374
4375 if test $ac_cv_header_stdc = yes; then
4376   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4377   cat >conftest.$ac_ext <<_ACEOF
4378 /* confdefs.h.  */
4379 _ACEOF
4380 cat confdefs.h >>conftest.$ac_ext
4381 cat >>conftest.$ac_ext <<_ACEOF
4382 /* end confdefs.h.  */
4383 #include <string.h>
4384
4385 _ACEOF
4386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4387   $EGREP "memchr" >/dev/null 2>&1; then
4388   :
4389 else
4390   ac_cv_header_stdc=no
4391 fi
4392 rm -rf conftest*
4393
4394 fi
4395
4396 if test $ac_cv_header_stdc = yes; then
4397   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4398   cat >conftest.$ac_ext <<_ACEOF
4399 /* confdefs.h.  */
4400 _ACEOF
4401 cat confdefs.h >>conftest.$ac_ext
4402 cat >>conftest.$ac_ext <<_ACEOF
4403 /* end confdefs.h.  */
4404 #include <stdlib.h>
4405
4406 _ACEOF
4407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4408   $EGREP "free" >/dev/null 2>&1; then
4409   :
4410 else
4411   ac_cv_header_stdc=no
4412 fi
4413 rm -rf conftest*
4414
4415 fi
4416
4417 if test $ac_cv_header_stdc = yes; then
4418   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4419   if test "$cross_compiling" = yes; then
4420   :
4421 else
4422   cat >conftest.$ac_ext <<_ACEOF
4423 /* confdefs.h.  */
4424 _ACEOF
4425 cat confdefs.h >>conftest.$ac_ext
4426 cat >>conftest.$ac_ext <<_ACEOF
4427 /* end confdefs.h.  */
4428 #include <ctype.h>
4429 #include <stdlib.h>
4430 #if ((' ' & 0x0FF) == 0x020)
4431 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4432 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4433 #else
4434 # define ISLOWER(c) \
4435                    (('a' <= (c) && (c) <= 'i') \
4436                      || ('j' <= (c) && (c) <= 'r') \
4437                      || ('s' <= (c) && (c) <= 'z'))
4438 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4439 #endif
4440
4441 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4442 int
4443 main ()
4444 {
4445   int i;
4446   for (i = 0; i < 256; i++)
4447     if (XOR (islower (i), ISLOWER (i))
4448         || toupper (i) != TOUPPER (i))
4449       return 2;
4450   return 0;
4451 }
4452 _ACEOF
4453 rm -rf conftest$ac_exeext
4454 if { (ac_try="$ac_link"
4455 case "(($ac_try" in
4456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4457   *) ac_try_echo=$ac_try;;
4458 esac
4459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4460   (eval "$ac_link") 2>&5
4461   ac_status=$?
4462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4464   { (case "(($ac_try" in
4465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4466   *) ac_try_echo=$ac_try;;
4467 esac
4468 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4469   (eval "$ac_try") 2>&5
4470   ac_status=$?
4471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472   (exit $ac_status); }; }; then
4473   :
4474 else
4475   echo "$as_me: program exited with status $ac_status" >&5
4476 echo "$as_me: failed program was:" >&5
4477 sed 's/^/| /' conftest.$ac_ext >&5
4478
4479 ( exit $ac_status )
4480 ac_cv_header_stdc=no
4481 fi
4482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4483 fi
4484
4485
4486 fi
4487 fi
4488 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4489 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4490 if test $ac_cv_header_stdc = yes; then
4491
4492 cat >>confdefs.h <<\_ACEOF
4493 #define STDC_HEADERS 1
4494 _ACEOF
4495
4496 fi
4497
4498 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4509                   inttypes.h stdint.h unistd.h
4510 do
4511 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
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 else
4517   cat >conftest.$ac_ext <<_ACEOF
4518 /* confdefs.h.  */
4519 _ACEOF
4520 cat confdefs.h >>conftest.$ac_ext
4521 cat >>conftest.$ac_ext <<_ACEOF
4522 /* end confdefs.h.  */
4523 $ac_includes_default
4524
4525 #include <$ac_header>
4526 _ACEOF
4527 rm -rf conftest.$ac_objext
4528 if { (ac_try="$ac_compile"
4529 case "(($ac_try" in
4530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4531   *) ac_try_echo=$ac_try;;
4532 esac
4533 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4534   (eval "$ac_compile") 2>conftest.er1
4535   ac_status=$?
4536   grep -v '^ *+' conftest.er1 >conftest.err
4537   rm -rf conftest.er1
4538   cat conftest.err >&5
4539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540   (exit $ac_status); } && {
4541          test -z "$ac_c_werror_flag" ||
4542          test ! -s conftest.err
4543        } && test -s conftest.$ac_objext; then
4544   eval "$as_ac_Header=yes"
4545 else
4546   echo "$as_me: failed program was:" >&5
4547 sed 's/^/| /' conftest.$ac_ext >&5
4548
4549         eval "$as_ac_Header=no"
4550 fi
4551
4552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 fi
4554 ac_res=`eval echo '${'$as_ac_Header'}'`
4555                { echo "$as_me:$LINENO: result: $ac_res" >&5
4556 echo "${ECHO_T}$ac_res" >&6; }
4557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4558   cat >>confdefs.h <<_ACEOF
4559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4560 _ACEOF
4561
4562 fi
4563
4564 done
4565
4566
4567
4568 for ac_header in unistd.h
4569 do
4570 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4571 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4572   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4573 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4574 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4575   echo $ECHO_N "(cached) $ECHO_C" >&6
4576 fi
4577 ac_res=`eval echo '${'$as_ac_Header'}'`
4578                { echo "$as_me:$LINENO: result: $ac_res" >&5
4579 echo "${ECHO_T}$ac_res" >&6; }
4580 else
4581   # Is the header compilable?
4582 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4583 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4584 cat >conftest.$ac_ext <<_ACEOF
4585 /* confdefs.h.  */
4586 _ACEOF
4587 cat confdefs.h >>conftest.$ac_ext
4588 cat >>conftest.$ac_ext <<_ACEOF
4589 /* end confdefs.h.  */
4590 $ac_includes_default
4591 #include <$ac_header>
4592 _ACEOF
4593 rm -rf conftest.$ac_objext
4594 if { (ac_try="$ac_compile"
4595 case "(($ac_try" in
4596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597   *) ac_try_echo=$ac_try;;
4598 esac
4599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4600   (eval "$ac_compile") 2>conftest.er1
4601   ac_status=$?
4602   grep -v '^ *+' conftest.er1 >conftest.err
4603   rm -rf conftest.er1
4604   cat conftest.err >&5
4605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606   (exit $ac_status); } && {
4607          test -z "$ac_c_werror_flag" ||
4608          test ! -s conftest.err
4609        } && test -s conftest.$ac_objext; then
4610   ac_header_compiler=yes
4611 else
4612   echo "$as_me: failed program was:" >&5
4613 sed 's/^/| /' conftest.$ac_ext >&5
4614
4615         ac_header_compiler=no
4616 fi
4617
4618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4619 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4620 echo "${ECHO_T}$ac_header_compiler" >&6; }
4621
4622 # Is the header present?
4623 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4624 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4625 cat >conftest.$ac_ext <<_ACEOF
4626 /* confdefs.h.  */
4627 _ACEOF
4628 cat confdefs.h >>conftest.$ac_ext
4629 cat >>conftest.$ac_ext <<_ACEOF
4630 /* end confdefs.h.  */
4631 #include <$ac_header>
4632 _ACEOF
4633 if { (ac_try="$ac_cpp conftest.$ac_ext"
4634 case "(($ac_try" in
4635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4636   *) ac_try_echo=$ac_try;;
4637 esac
4638 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4639   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4640   ac_status=$?
4641   grep -v '^ *+' conftest.er1 >conftest.err
4642   rm -rf conftest.er1
4643   cat conftest.err >&5
4644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645   (exit $ac_status); } >/dev/null && {
4646          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4647          test ! -s conftest.err
4648        }; then
4649   ac_header_preproc=yes
4650 else
4651   echo "$as_me: failed program was:" >&5
4652 sed 's/^/| /' conftest.$ac_ext >&5
4653
4654   ac_header_preproc=no
4655 fi
4656
4657 rm -rf conftest.err conftest.$ac_ext
4658 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4659 echo "${ECHO_T}$ac_header_preproc" >&6; }
4660
4661 # So?  What about this header?
4662 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4663   yes:no: )
4664     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4665 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4666     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4667 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4668     ac_header_preproc=yes
4669     ;;
4670   no:yes:* )
4671     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4672 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4673     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4674 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4675     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4676 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4677     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4678 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4679     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4680 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4681     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4682 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4683
4684     ;;
4685 esac
4686 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4687 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4688 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   eval "$as_ac_Header=\$ac_header_preproc"
4692 fi
4693 ac_res=`eval echo '${'$as_ac_Header'}'`
4694                { echo "$as_me:$LINENO: result: $ac_res" >&5
4695 echo "${ECHO_T}$ac_res" >&6; }
4696
4697 fi
4698 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4699   cat >>confdefs.h <<_ACEOF
4700 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4701 _ACEOF
4702
4703 fi
4704
4705 done
4706
4707 { echo "$as_me:$LINENO: checking for mode_t" >&5
4708 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4709 if test "${ac_cv_type_mode_t+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   cat >conftest.$ac_ext <<_ACEOF
4713 /* confdefs.h.  */
4714 _ACEOF
4715 cat confdefs.h >>conftest.$ac_ext
4716 cat >>conftest.$ac_ext <<_ACEOF
4717 /* end confdefs.h.  */
4718 $ac_includes_default
4719 typedef mode_t ac__type_new_;
4720 int
4721 main ()
4722 {
4723 if ((ac__type_new_ *) 0)
4724   return 0;
4725 if (sizeof (ac__type_new_))
4726   return 0;
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 rm -rf conftest.$ac_objext
4732 if { (ac_try="$ac_compile"
4733 case "(($ac_try" in
4734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735   *) ac_try_echo=$ac_try;;
4736 esac
4737 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738   (eval "$ac_compile") 2>conftest.er1
4739   ac_status=$?
4740   grep -v '^ *+' conftest.er1 >conftest.err
4741   rm -rf conftest.er1
4742   cat conftest.err >&5
4743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744   (exit $ac_status); } && {
4745          test -z "$ac_c_werror_flag" ||
4746          test ! -s conftest.err
4747        } && test -s conftest.$ac_objext; then
4748   ac_cv_type_mode_t=yes
4749 else
4750   echo "$as_me: failed program was:" >&5
4751 sed 's/^/| /' conftest.$ac_ext >&5
4752
4753         ac_cv_type_mode_t=no
4754 fi
4755
4756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4757 fi
4758 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4759 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4760 if test $ac_cv_type_mode_t = yes; then
4761   :
4762 else
4763
4764 cat >>confdefs.h <<_ACEOF
4765 #define mode_t int
4766 _ACEOF
4767
4768 fi
4769
4770 { echo "$as_me:$LINENO: checking for pid_t" >&5
4771 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4772 if test "${ac_cv_type_pid_t+set}" = set; then
4773   echo $ECHO_N "(cached) $ECHO_C" >&6
4774 else
4775   cat >conftest.$ac_ext <<_ACEOF
4776 /* confdefs.h.  */
4777 _ACEOF
4778 cat confdefs.h >>conftest.$ac_ext
4779 cat >>conftest.$ac_ext <<_ACEOF
4780 /* end confdefs.h.  */
4781 $ac_includes_default
4782 typedef pid_t ac__type_new_;
4783 int
4784 main ()
4785 {
4786 if ((ac__type_new_ *) 0)
4787   return 0;
4788 if (sizeof (ac__type_new_))
4789   return 0;
4790   ;
4791   return 0;
4792 }
4793 _ACEOF
4794 rm -rf conftest.$ac_objext
4795 if { (ac_try="$ac_compile"
4796 case "(($ac_try" in
4797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4798   *) ac_try_echo=$ac_try;;
4799 esac
4800 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4801   (eval "$ac_compile") 2>conftest.er1
4802   ac_status=$?
4803   grep -v '^ *+' conftest.er1 >conftest.err
4804   rm -rf conftest.er1
4805   cat conftest.err >&5
4806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807   (exit $ac_status); } && {
4808          test -z "$ac_c_werror_flag" ||
4809          test ! -s conftest.err
4810        } && test -s conftest.$ac_objext; then
4811   ac_cv_type_pid_t=yes
4812 else
4813   echo "$as_me: failed program was:" >&5
4814 sed 's/^/| /' conftest.$ac_ext >&5
4815
4816         ac_cv_type_pid_t=no
4817 fi
4818
4819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4820 fi
4821 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4822 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4823 if test $ac_cv_type_pid_t = yes; then
4824   :
4825 else
4826
4827 cat >>confdefs.h <<_ACEOF
4828 #define pid_t int
4829 _ACEOF
4830
4831 fi
4832
4833 { echo "$as_me:$LINENO: checking for size_t" >&5
4834 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4835 if test "${ac_cv_type_size_t+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   cat >conftest.$ac_ext <<_ACEOF
4839 /* confdefs.h.  */
4840 _ACEOF
4841 cat confdefs.h >>conftest.$ac_ext
4842 cat >>conftest.$ac_ext <<_ACEOF
4843 /* end confdefs.h.  */
4844 $ac_includes_default
4845 typedef size_t ac__type_new_;
4846 int
4847 main ()
4848 {
4849 if ((ac__type_new_ *) 0)
4850   return 0;
4851 if (sizeof (ac__type_new_))
4852   return 0;
4853   ;
4854   return 0;
4855 }
4856 _ACEOF
4857 rm -rf conftest.$ac_objext
4858 if { (ac_try="$ac_compile"
4859 case "(($ac_try" in
4860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4861   *) ac_try_echo=$ac_try;;
4862 esac
4863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4864   (eval "$ac_compile") 2>conftest.er1
4865   ac_status=$?
4866   grep -v '^ *+' conftest.er1 >conftest.err
4867   rm -rf conftest.er1
4868   cat conftest.err >&5
4869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4870   (exit $ac_status); } && {
4871          test -z "$ac_c_werror_flag" ||
4872          test ! -s conftest.err
4873        } && test -s conftest.$ac_objext; then
4874   ac_cv_type_size_t=yes
4875 else
4876   echo "$as_me: failed program was:" >&5
4877 sed 's/^/| /' conftest.$ac_ext >&5
4878
4879         ac_cv_type_size_t=no
4880 fi
4881
4882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4883 fi
4884 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4885 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4886 if test $ac_cv_type_size_t = yes; then
4887   :
4888 else
4889
4890 cat >>confdefs.h <<_ACEOF
4891 #define size_t unsigned int
4892 _ACEOF
4893
4894 fi
4895
4896 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4897 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4898 if test "${ac_cv_type_signal+set}" = set; then
4899   echo $ECHO_N "(cached) $ECHO_C" >&6
4900 else
4901   cat >conftest.$ac_ext <<_ACEOF
4902 /* confdefs.h.  */
4903 _ACEOF
4904 cat confdefs.h >>conftest.$ac_ext
4905 cat >>conftest.$ac_ext <<_ACEOF
4906 /* end confdefs.h.  */
4907 #include <sys/types.h>
4908 #include <signal.h>
4909
4910 int
4911 main ()
4912 {
4913 return *(signal (0, 0)) (0) == 1;
4914   ;
4915   return 0;
4916 }
4917 _ACEOF
4918 rm -rf conftest.$ac_objext
4919 if { (ac_try="$ac_compile"
4920 case "(($ac_try" in
4921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4922   *) ac_try_echo=$ac_try;;
4923 esac
4924 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4925   (eval "$ac_compile") 2>conftest.er1
4926   ac_status=$?
4927   grep -v '^ *+' conftest.er1 >conftest.err
4928   rm -rf conftest.er1
4929   cat conftest.err >&5
4930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931   (exit $ac_status); } && {
4932          test -z "$ac_c_werror_flag" ||
4933          test ! -s conftest.err
4934        } && test -s conftest.$ac_objext; then
4935   ac_cv_type_signal=int
4936 else
4937   echo "$as_me: failed program was:" >&5
4938 sed 's/^/| /' conftest.$ac_ext >&5
4939
4940         ac_cv_type_signal=void
4941 fi
4942
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4944 fi
4945 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4946 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4947
4948 cat >>confdefs.h <<_ACEOF
4949 #define RETSIGTYPE $ac_cv_type_signal
4950 _ACEOF
4951
4952
4953 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4954 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4955 if test "${ac_cv_header_time+set}" = set; then
4956   echo $ECHO_N "(cached) $ECHO_C" >&6
4957 else
4958   cat >conftest.$ac_ext <<_ACEOF
4959 /* confdefs.h.  */
4960 _ACEOF
4961 cat confdefs.h >>conftest.$ac_ext
4962 cat >>conftest.$ac_ext <<_ACEOF
4963 /* end confdefs.h.  */
4964 #include <sys/types.h>
4965 #include <sys/time.h>
4966 #include <time.h>
4967
4968 int
4969 main ()
4970 {
4971 if ((struct tm *) 0)
4972 return 0;
4973   ;
4974   return 0;
4975 }
4976 _ACEOF
4977 rm -rf conftest.$ac_objext
4978 if { (ac_try="$ac_compile"
4979 case "(($ac_try" in
4980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981   *) ac_try_echo=$ac_try;;
4982 esac
4983 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984   (eval "$ac_compile") 2>conftest.er1
4985   ac_status=$?
4986   grep -v '^ *+' conftest.er1 >conftest.err
4987   rm -rf conftest.er1
4988   cat conftest.err >&5
4989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990   (exit $ac_status); } && {
4991          test -z "$ac_c_werror_flag" ||
4992          test ! -s conftest.err
4993        } && test -s conftest.$ac_objext; then
4994   ac_cv_header_time=yes
4995 else
4996   echo "$as_me: failed program was:" >&5
4997 sed 's/^/| /' conftest.$ac_ext >&5
4998
4999         ac_cv_header_time=no
5000 fi
5001
5002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003 fi
5004 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5005 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5006 if test $ac_cv_header_time = yes; then
5007
5008 cat >>confdefs.h <<\_ACEOF
5009 #define TIME_WITH_SYS_TIME 1
5010 _ACEOF
5011
5012 fi
5013
5014 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5015 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5016 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5017   echo $ECHO_N "(cached) $ECHO_C" >&6
5018 else
5019   cat >conftest.$ac_ext <<_ACEOF
5020 /* confdefs.h.  */
5021 _ACEOF
5022 cat confdefs.h >>conftest.$ac_ext
5023 cat >>conftest.$ac_ext <<_ACEOF
5024 /* end confdefs.h.  */
5025 #include <sys/types.h>
5026 #include <sys/wait.h>
5027 #ifndef WEXITSTATUS
5028 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5029 #endif
5030 #ifndef WIFEXITED
5031 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5032 #endif
5033
5034 int
5035 main ()
5036 {
5037   int s;
5038   wait (&s);
5039   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -rf conftest.$ac_objext
5045 if { (ac_try="$ac_compile"
5046 case "(($ac_try" in
5047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5048   *) ac_try_echo=$ac_try;;
5049 esac
5050 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5051   (eval "$ac_compile") 2>conftest.er1
5052   ac_status=$?
5053   grep -v '^ *+' conftest.er1 >conftest.err
5054   rm -rf conftest.er1
5055   cat conftest.err >&5
5056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5057   (exit $ac_status); } && {
5058          test -z "$ac_c_werror_flag" ||
5059          test ! -s conftest.err
5060        } && test -s conftest.$ac_objext; then
5061   ac_cv_header_sys_wait_h=yes
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 sed 's/^/| /' conftest.$ac_ext >&5
5065
5066         ac_cv_header_sys_wait_h=no
5067 fi
5068
5069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5070 fi
5071 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5072 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5073 if test $ac_cv_header_sys_wait_h = yes; then
5074
5075 cat >>confdefs.h <<\_ACEOF
5076 #define HAVE_SYS_WAIT_H 1
5077 _ACEOF
5078
5079 fi
5080
5081
5082
5083
5084
5085
5086 ac_header_dirent=no
5087 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5088   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5089 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5090 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5091 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5092   echo $ECHO_N "(cached) $ECHO_C" >&6
5093 else
5094   cat >conftest.$ac_ext <<_ACEOF
5095 /* confdefs.h.  */
5096 _ACEOF
5097 cat confdefs.h >>conftest.$ac_ext
5098 cat >>conftest.$ac_ext <<_ACEOF
5099 /* end confdefs.h.  */
5100 #include <sys/types.h>
5101 #include <$ac_hdr>
5102
5103 int
5104 main ()
5105 {
5106 if ((DIR *) 0)
5107 return 0;
5108   ;
5109   return 0;
5110 }
5111 _ACEOF
5112 rm -rf conftest.$ac_objext
5113 if { (ac_try="$ac_compile"
5114 case "(($ac_try" in
5115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116   *) ac_try_echo=$ac_try;;
5117 esac
5118 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5119   (eval "$ac_compile") 2>conftest.er1
5120   ac_status=$?
5121   grep -v '^ *+' conftest.er1 >conftest.err
5122   rm -rf conftest.er1
5123   cat conftest.err >&5
5124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125   (exit $ac_status); } && {
5126          test -z "$ac_c_werror_flag" ||
5127          test ! -s conftest.err
5128        } && test -s conftest.$ac_objext; then
5129   eval "$as_ac_Header=yes"
5130 else
5131   echo "$as_me: failed program was:" >&5
5132 sed 's/^/| /' conftest.$ac_ext >&5
5133
5134         eval "$as_ac_Header=no"
5135 fi
5136
5137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5138 fi
5139 ac_res=`eval echo '${'$as_ac_Header'}'`
5140                { echo "$as_me:$LINENO: result: $ac_res" >&5
5141 echo "${ECHO_T}$ac_res" >&6; }
5142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5143   cat >>confdefs.h <<_ACEOF
5144 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5145 _ACEOF
5146
5147 ac_header_dirent=$ac_hdr; break
5148 fi
5149
5150 done
5151 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5152 if test $ac_header_dirent = dirent.h; then
5153   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5154 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5155 if test "${ac_cv_search_opendir+set}" = set; then
5156   echo $ECHO_N "(cached) $ECHO_C" >&6
5157 else
5158   ac_func_search_save_LIBS=$LIBS
5159 cat >conftest.$ac_ext <<_ACEOF
5160 /* confdefs.h.  */
5161 _ACEOF
5162 cat confdefs.h >>conftest.$ac_ext
5163 cat >>conftest.$ac_ext <<_ACEOF
5164 /* end confdefs.h.  */
5165
5166 /* Override any GCC internal prototype to avoid an error.
5167    Use char because int might match the return type of a GCC
5168    builtin and then its argument prototype would still apply.  */
5169 #ifdef __cplusplus
5170 extern "C"
5171 #endif
5172 char opendir ();
5173 int
5174 main ()
5175 {
5176 return opendir ();
5177   ;
5178   return 0;
5179 }
5180 _ACEOF
5181 for ac_lib in '' dir; do
5182   if test -z "$ac_lib"; then
5183     ac_res="none required"
5184   else
5185     ac_res=-l$ac_lib
5186     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5187   fi
5188   rm -rf conftest.$ac_objext conftest$ac_exeext
5189 if { (ac_try="$ac_link"
5190 case "(($ac_try" in
5191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192   *) ac_try_echo=$ac_try;;
5193 esac
5194 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5195   (eval "$ac_link") 2>conftest.er1
5196   ac_status=$?
5197   grep -v '^ *+' conftest.er1 >conftest.err
5198   rm -rf conftest.er1
5199   cat conftest.err >&5
5200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201   (exit $ac_status); } && {
5202          test -z "$ac_c_werror_flag" ||
5203          test ! -s conftest.err
5204        } && test -s conftest$ac_exeext &&
5205        $as_test_x conftest$ac_exeext; then
5206   ac_cv_search_opendir=$ac_res
5207 else
5208   echo "$as_me: failed program was:" >&5
5209 sed 's/^/| /' conftest.$ac_ext >&5
5210
5211
5212 fi
5213
5214 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5215       conftest$ac_exeext
5216   if test "${ac_cv_search_opendir+set}" = set; then
5217   break
5218 fi
5219 done
5220 if test "${ac_cv_search_opendir+set}" = set; then
5221   :
5222 else
5223   ac_cv_search_opendir=no
5224 fi
5225 rm conftest.$ac_ext
5226 LIBS=$ac_func_search_save_LIBS
5227 fi
5228 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5229 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5230 ac_res=$ac_cv_search_opendir
5231 if test "$ac_res" != no; then
5232   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5233
5234 fi
5235
5236 else
5237   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5238 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5239 if test "${ac_cv_search_opendir+set}" = set; then
5240   echo $ECHO_N "(cached) $ECHO_C" >&6
5241 else
5242   ac_func_search_save_LIBS=$LIBS
5243 cat >conftest.$ac_ext <<_ACEOF
5244 /* confdefs.h.  */
5245 _ACEOF
5246 cat confdefs.h >>conftest.$ac_ext
5247 cat >>conftest.$ac_ext <<_ACEOF
5248 /* end confdefs.h.  */
5249
5250 /* Override any GCC internal prototype to avoid an error.
5251    Use char because int might match the return type of a GCC
5252    builtin and then its argument prototype would still apply.  */
5253 #ifdef __cplusplus
5254 extern "C"
5255 #endif
5256 char opendir ();
5257 int
5258 main ()
5259 {
5260 return opendir ();
5261   ;
5262   return 0;
5263 }
5264 _ACEOF
5265 for ac_lib in '' x; do
5266   if test -z "$ac_lib"; then
5267     ac_res="none required"
5268   else
5269     ac_res=-l$ac_lib
5270     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5271   fi
5272   rm -rf conftest.$ac_objext conftest$ac_exeext
5273 if { (ac_try="$ac_link"
5274 case "(($ac_try" in
5275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5276   *) ac_try_echo=$ac_try;;
5277 esac
5278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5279   (eval "$ac_link") 2>conftest.er1
5280   ac_status=$?
5281   grep -v '^ *+' conftest.er1 >conftest.err
5282   rm -rf conftest.er1
5283   cat conftest.err >&5
5284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285   (exit $ac_status); } && {
5286          test -z "$ac_c_werror_flag" ||
5287          test ! -s conftest.err
5288        } && test -s conftest$ac_exeext &&
5289        $as_test_x conftest$ac_exeext; then
5290   ac_cv_search_opendir=$ac_res
5291 else
5292   echo "$as_me: failed program was:" >&5
5293 sed 's/^/| /' conftest.$ac_ext >&5
5294
5295
5296 fi
5297
5298 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5299       conftest$ac_exeext
5300   if test "${ac_cv_search_opendir+set}" = set; then
5301   break
5302 fi
5303 done
5304 if test "${ac_cv_search_opendir+set}" = set; then
5305   :
5306 else
5307   ac_cv_search_opendir=no
5308 fi
5309 rm conftest.$ac_ext
5310 LIBS=$ac_func_search_save_LIBS
5311 fi
5312 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5313 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5314 ac_res=$ac_cv_search_opendir
5315 if test "$ac_res" != no; then
5316   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5317
5318 fi
5319
5320 fi
5321
5322 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5323 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5324   if test "${ac_cv_gettimeofday_args+set}" = set; then
5325   echo $ECHO_N "(cached) $ECHO_C" >&6
5326 else
5327   cat >conftest.$ac_ext <<_ACEOF
5328 /* confdefs.h.  */
5329 _ACEOF
5330 cat confdefs.h >>conftest.$ac_ext
5331 cat >>conftest.$ac_ext <<_ACEOF
5332 /* end confdefs.h.  */
5333 #include <stdlib.h>
5334                     #include <sys/time.h>
5335 int
5336 main ()
5337 {
5338 struct timeval tv; struct timezone tzp;
5339                     gettimeofday(&tv, &tzp);
5340   ;
5341   return 0;
5342 }
5343 _ACEOF
5344 rm -rf conftest.$ac_objext
5345 if { (ac_try="$ac_compile"
5346 case "(($ac_try" in
5347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5348   *) ac_try_echo=$ac_try;;
5349 esac
5350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5351   (eval "$ac_compile") 2>conftest.er1
5352   ac_status=$?
5353   grep -v '^ *+' conftest.er1 >conftest.err
5354   rm -rf conftest.er1
5355   cat conftest.err >&5
5356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357   (exit $ac_status); } && {
5358          test -z "$ac_c_werror_flag" ||
5359          test ! -s conftest.err
5360        } && test -s conftest.$ac_objext; then
5361   ac_gettimeofday_args=2
5362 else
5363   echo "$as_me: failed program was:" >&5
5364 sed 's/^/| /' conftest.$ac_ext >&5
5365
5366         cat >conftest.$ac_ext <<_ACEOF
5367 /* confdefs.h.  */
5368 _ACEOF
5369 cat confdefs.h >>conftest.$ac_ext
5370 cat >>conftest.$ac_ext <<_ACEOF
5371 /* end confdefs.h.  */
5372 #include <stdlib.h>
5373                                     #include <sys/time.h>
5374 int
5375 main ()
5376 {
5377 struct timeval tv; gettimeofday(&tv);
5378   ;
5379   return 0;
5380 }
5381 _ACEOF
5382 rm -rf conftest.$ac_objext
5383 if { (ac_try="$ac_compile"
5384 case "(($ac_try" in
5385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386   *) ac_try_echo=$ac_try;;
5387 esac
5388 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5389   (eval "$ac_compile") 2>conftest.er1
5390   ac_status=$?
5391   grep -v '^ *+' conftest.er1 >conftest.err
5392   rm -rf conftest.er1
5393   cat conftest.err >&5
5394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395   (exit $ac_status); } && {
5396          test -z "$ac_c_werror_flag" ||
5397          test ! -s conftest.err
5398        } && test -s conftest.$ac_objext; then
5399   ac_gettimeofday_args=1
5400 else
5401   echo "$as_me: failed program was:" >&5
5402 sed 's/^/| /' conftest.$ac_ext >&5
5403
5404         ac_gettimeofday_args=0
5405 fi
5406
5407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5408 fi
5409
5410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5411     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5412 fi
5413
5414   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5415   if test "$ac_gettimeofday_args" = 1 ; then
5416     cat >>confdefs.h <<\_ACEOF
5417 #define HAVE_GETTIMEOFDAY 1
5418 _ACEOF
5419
5420     { echo "$as_me:$LINENO: result: one argument" >&5
5421 echo "${ECHO_T}one argument" >&6; }
5422   elif test "$ac_gettimeofday_args" = 2 ; then
5423     cat >>confdefs.h <<\_ACEOF
5424 #define HAVE_GETTIMEOFDAY 1
5425 _ACEOF
5426
5427     cat >>confdefs.h <<\_ACEOF
5428 #define GETTIMEOFDAY_TWO_ARGS 1
5429 _ACEOF
5430
5431     { echo "$as_me:$LINENO: result: two arguments" >&5
5432 echo "${ECHO_T}two arguments" >&6; }
5433   else
5434     { echo "$as_me:$LINENO: result: unknown" >&5
5435 echo "${ECHO_T}unknown" >&6; }
5436   fi
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5448 do
5449 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5450 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5451 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5452 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5453   echo $ECHO_N "(cached) $ECHO_C" >&6
5454 else
5455   cat >conftest.$ac_ext <<_ACEOF
5456 /* confdefs.h.  */
5457 _ACEOF
5458 cat confdefs.h >>conftest.$ac_ext
5459 cat >>conftest.$ac_ext <<_ACEOF
5460 /* end confdefs.h.  */
5461 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5462    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5463 #define $ac_func innocuous_$ac_func
5464
5465 /* System header to define __stub macros and hopefully few prototypes,
5466     which can conflict with char $ac_func (); below.
5467     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5468     <limits.h> exists even on freestanding compilers.  */
5469
5470 #ifdef __STDC__
5471 # include <limits.h>
5472 #else
5473 # include <assert.h>
5474 #endif
5475
5476 #undef $ac_func
5477
5478 /* Override any GCC internal prototype to avoid an error.
5479    Use char because int might match the return type of a GCC
5480    builtin and then its argument prototype would still apply.  */
5481 #ifdef __cplusplus
5482 extern "C"
5483 #endif
5484 char $ac_func ();
5485 /* The GNU C library defines this for functions which it implements
5486     to always fail with ENOSYS.  Some functions are actually named
5487     something starting with __ and the normal name is an alias.  */
5488 #if defined __stub_$ac_func || defined __stub___$ac_func
5489 choke me
5490 #endif
5491
5492 int
5493 main ()
5494 {
5495 return $ac_func ();
5496   ;
5497   return 0;
5498 }
5499 _ACEOF
5500 rm -rf conftest.$ac_objext conftest$ac_exeext
5501 if { (ac_try="$ac_link"
5502 case "(($ac_try" in
5503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5504   *) ac_try_echo=$ac_try;;
5505 esac
5506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5507   (eval "$ac_link") 2>conftest.er1
5508   ac_status=$?
5509   grep -v '^ *+' conftest.er1 >conftest.err
5510   rm -rf conftest.er1
5511   cat conftest.err >&5
5512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5513   (exit $ac_status); } && {
5514          test -z "$ac_c_werror_flag" ||
5515          test ! -s conftest.err
5516        } && test -s conftest$ac_exeext &&
5517        $as_test_x conftest$ac_exeext; then
5518   eval "$as_ac_var=yes"
5519 else
5520   echo "$as_me: failed program was:" >&5
5521 sed 's/^/| /' conftest.$ac_ext >&5
5522
5523         eval "$as_ac_var=no"
5524 fi
5525
5526 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5527       conftest$ac_exeext conftest.$ac_ext
5528 fi
5529 ac_res=`eval echo '${'$as_ac_var'}'`
5530                { echo "$as_me:$LINENO: result: $ac_res" >&5
5531 echo "${ECHO_T}$ac_res" >&6; }
5532 if test `eval echo '${'$as_ac_var'}'` = yes; then
5533   cat >>confdefs.h <<_ACEOF
5534 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5535 _ACEOF
5536
5537 fi
5538 done
5539
5540
5541
5542
5543
5544 for ac_func in sigaction syslog realpath setrlimit
5545 do
5546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5547 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5549 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5550   echo $ECHO_N "(cached) $ECHO_C" >&6
5551 else
5552   cat >conftest.$ac_ext <<_ACEOF
5553 /* confdefs.h.  */
5554 _ACEOF
5555 cat confdefs.h >>conftest.$ac_ext
5556 cat >>conftest.$ac_ext <<_ACEOF
5557 /* end confdefs.h.  */
5558 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5559    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5560 #define $ac_func innocuous_$ac_func
5561
5562 /* System header to define __stub macros and hopefully few prototypes,
5563     which can conflict with char $ac_func (); below.
5564     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5565     <limits.h> exists even on freestanding compilers.  */
5566
5567 #ifdef __STDC__
5568 # include <limits.h>
5569 #else
5570 # include <assert.h>
5571 #endif
5572
5573 #undef $ac_func
5574
5575 /* Override any GCC internal prototype to avoid an error.
5576    Use char because int might match the return type of a GCC
5577    builtin and then its argument prototype would still apply.  */
5578 #ifdef __cplusplus
5579 extern "C"
5580 #endif
5581 char $ac_func ();
5582 /* The GNU C library defines this for functions which it implements
5583     to always fail with ENOSYS.  Some functions are actually named
5584     something starting with __ and the normal name is an alias.  */
5585 #if defined __stub_$ac_func || defined __stub___$ac_func
5586 choke me
5587 #endif
5588
5589 int
5590 main ()
5591 {
5592 return $ac_func ();
5593   ;
5594   return 0;
5595 }
5596 _ACEOF
5597 rm -rf conftest.$ac_objext conftest$ac_exeext
5598 if { (ac_try="$ac_link"
5599 case "(($ac_try" in
5600   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5601   *) ac_try_echo=$ac_try;;
5602 esac
5603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5604   (eval "$ac_link") 2>conftest.er1
5605   ac_status=$?
5606   grep -v '^ *+' conftest.er1 >conftest.err
5607   rm -rf conftest.er1
5608   cat conftest.err >&5
5609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610   (exit $ac_status); } && {
5611          test -z "$ac_c_werror_flag" ||
5612          test ! -s conftest.err
5613        } && test -s conftest$ac_exeext &&
5614        $as_test_x conftest$ac_exeext; then
5615   eval "$as_ac_var=yes"
5616 else
5617   echo "$as_me: failed program was:" >&5
5618 sed 's/^/| /' conftest.$ac_ext >&5
5619
5620         eval "$as_ac_var=no"
5621 fi
5622
5623 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5624       conftest$ac_exeext conftest.$ac_ext
5625 fi
5626 ac_res=`eval echo '${'$as_ac_var'}'`
5627                { echo "$as_me:$LINENO: result: $ac_res" >&5
5628 echo "${ECHO_T}$ac_res" >&6; }
5629 if test `eval echo '${'$as_ac_var'}'` = yes; then
5630   cat >>confdefs.h <<_ACEOF
5631 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5632 _ACEOF
5633
5634 fi
5635 done
5636
5637
5638 for ac_func in setlocale
5639 do
5640 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5641 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5642 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5643 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5644   echo $ECHO_N "(cached) $ECHO_C" >&6
5645 else
5646   cat >conftest.$ac_ext <<_ACEOF
5647 /* confdefs.h.  */
5648 _ACEOF
5649 cat confdefs.h >>conftest.$ac_ext
5650 cat >>conftest.$ac_ext <<_ACEOF
5651 /* end confdefs.h.  */
5652 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5653    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5654 #define $ac_func innocuous_$ac_func
5655
5656 /* System header to define __stub macros and hopefully few prototypes,
5657     which can conflict with char $ac_func (); below.
5658     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5659     <limits.h> exists even on freestanding compilers.  */
5660
5661 #ifdef __STDC__
5662 # include <limits.h>
5663 #else
5664 # include <assert.h>
5665 #endif
5666
5667 #undef $ac_func
5668
5669 /* Override any GCC internal prototype to avoid an error.
5670    Use char because int might match the return type of a GCC
5671    builtin and then its argument prototype would still apply.  */
5672 #ifdef __cplusplus
5673 extern "C"
5674 #endif
5675 char $ac_func ();
5676 /* The GNU C library defines this for functions which it implements
5677     to always fail with ENOSYS.  Some functions are actually named
5678     something starting with __ and the normal name is an alias.  */
5679 #if defined __stub_$ac_func || defined __stub___$ac_func
5680 choke me
5681 #endif
5682
5683 int
5684 main ()
5685 {
5686 return $ac_func ();
5687   ;
5688   return 0;
5689 }
5690 _ACEOF
5691 rm -rf conftest.$ac_objext conftest$ac_exeext
5692 if { (ac_try="$ac_link"
5693 case "(($ac_try" in
5694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5695   *) ac_try_echo=$ac_try;;
5696 esac
5697 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5698   (eval "$ac_link") 2>conftest.er1
5699   ac_status=$?
5700   grep -v '^ *+' conftest.er1 >conftest.err
5701   rm -rf conftest.er1
5702   cat conftest.err >&5
5703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704   (exit $ac_status); } && {
5705          test -z "$ac_c_werror_flag" ||
5706          test ! -s conftest.err
5707        } && test -s conftest$ac_exeext &&
5708        $as_test_x conftest$ac_exeext; then
5709   eval "$as_ac_var=yes"
5710 else
5711   echo "$as_me: failed program was:" >&5
5712 sed 's/^/| /' conftest.$ac_ext >&5
5713
5714         eval "$as_ac_var=no"
5715 fi
5716
5717 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5718       conftest$ac_exeext conftest.$ac_ext
5719 fi
5720 ac_res=`eval echo '${'$as_ac_var'}'`
5721                { echo "$as_me:$LINENO: result: $ac_res" >&5
5722 echo "${ECHO_T}$ac_res" >&6; }
5723 if test `eval echo '${'$as_ac_var'}'` = yes; then
5724   cat >>confdefs.h <<_ACEOF
5725 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5726 _ACEOF
5727
5728 fi
5729 done
5730
5731 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5732 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5733 if test "${ac_cv_have_icmp+set}" = set; then
5734   echo $ECHO_N "(cached) $ECHO_C" >&6
5735 else
5736   cat >conftest.$ac_ext <<_ACEOF
5737 /* confdefs.h.  */
5738 _ACEOF
5739 cat confdefs.h >>conftest.$ac_ext
5740 cat >>conftest.$ac_ext <<_ACEOF
5741 /* end confdefs.h.  */
5742 #include <stdlib.h>
5743                    #include <stdio.h>
5744                    #include <math.h>
5745                    #include <unistd.h>
5746                    #include <limits.h>
5747                    #include <signal.h>
5748                    #include <fcntl.h>
5749                    #include <sys/types.h>
5750                    #include <sys/time.h>
5751                    #include <sys/ipc.h>
5752                    #include <sys/shm.h>
5753                    #include <sys/socket.h>
5754                    #include <netinet/in_systm.h>
5755                    #include <netinet/in.h>
5756                    #include <netinet/ip.h>
5757                    #include <netinet/ip_icmp.h>
5758                    #include <netinet/udp.h>
5759                    #include <arpa/inet.h>
5760                    #include <netdb.h>
5761 int
5762 main ()
5763 {
5764 struct icmp i;
5765                    struct sockaddr s;
5766                    struct sockaddr_in si;
5767                    struct ip ip;
5768                    i.icmp_type = ICMP_ECHO;
5769                    i.icmp_code = 0;
5770                    i.icmp_cksum = 0;
5771                    i.icmp_id = 0;
5772                    i.icmp_seq = 0;
5773                    si.sin_family = AF_INET;
5774                    #if defined(__DECC) || defined(_IP_VHL)
5775                    ip.ip_vhl = 0;
5776                    #else
5777                    ip.ip_hl = 0;
5778                    #endif
5779
5780   ;
5781   return 0;
5782 }
5783 _ACEOF
5784 rm -rf conftest.$ac_objext
5785 if { (ac_try="$ac_compile"
5786 case "(($ac_try" in
5787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5788   *) ac_try_echo=$ac_try;;
5789 esac
5790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5791   (eval "$ac_compile") 2>conftest.er1
5792   ac_status=$?
5793   grep -v '^ *+' conftest.er1 >conftest.err
5794   rm -rf conftest.er1
5795   cat conftest.err >&5
5796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797   (exit $ac_status); } && {
5798          test -z "$ac_c_werror_flag" ||
5799          test ! -s conftest.err
5800        } && test -s conftest.$ac_objext; then
5801   ac_cv_have_icmp=yes
5802 else
5803   echo "$as_me: failed program was:" >&5
5804 sed 's/^/| /' conftest.$ac_ext >&5
5805
5806         ac_cv_have_icmp=no
5807 fi
5808
5809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5810 fi
5811 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5812 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5813  if test "$ac_cv_have_icmp" = yes ; then
5814    cat >>confdefs.h <<\_ACEOF
5815 #define HAVE_ICMP 1
5816 _ACEOF
5817
5818  fi
5819 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5820 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5821 if test "${ac_cv_have_icmphdr+set}" = set; then
5822   echo $ECHO_N "(cached) $ECHO_C" >&6
5823 else
5824   cat >conftest.$ac_ext <<_ACEOF
5825 /* confdefs.h.  */
5826 _ACEOF
5827 cat confdefs.h >>conftest.$ac_ext
5828 cat >>conftest.$ac_ext <<_ACEOF
5829 /* end confdefs.h.  */
5830 #include <stdlib.h>
5831                    #include <stdio.h>
5832                    #include <math.h>
5833                    #include <unistd.h>
5834                    #include <limits.h>
5835                    #include <signal.h>
5836                    #include <fcntl.h>
5837                    #include <sys/types.h>
5838                    #include <sys/time.h>
5839                    #include <sys/ipc.h>
5840                    #include <sys/shm.h>
5841                    #include <sys/socket.h>
5842                    #include <netinet/in_systm.h>
5843                    #include <netinet/in.h>
5844                    #include <netinet/ip.h>
5845                    #include <netinet/ip_icmp.h>
5846                    #include <netinet/udp.h>
5847                    #include <arpa/inet.h>
5848                    #include <netdb.h>
5849 int
5850 main ()
5851 {
5852 struct icmphdr i;
5853                    struct sockaddr s;
5854                    struct sockaddr_in si;
5855                    struct ip ip;
5856                    i.type = ICMP_ECHO;
5857                    i.code = 0;
5858                    i.checksum = 0;
5859                    i.un.echo.id = 0;
5860                    i.un.echo.sequence = 0;
5861                    si.sin_family = AF_INET;
5862                    ip.ip_hl = 0;
5863   ;
5864   return 0;
5865 }
5866 _ACEOF
5867 rm -rf conftest.$ac_objext
5868 if { (ac_try="$ac_compile"
5869 case "(($ac_try" in
5870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871   *) ac_try_echo=$ac_try;;
5872 esac
5873 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5874   (eval "$ac_compile") 2>conftest.er1
5875   ac_status=$?
5876   grep -v '^ *+' conftest.er1 >conftest.err
5877   rm -rf conftest.er1
5878   cat conftest.err >&5
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); } && {
5881          test -z "$ac_c_werror_flag" ||
5882          test ! -s conftest.err
5883        } && test -s conftest.$ac_objext; then
5884   ac_cv_have_icmphdr=yes
5885 else
5886   echo "$as_me: failed program was:" >&5
5887 sed 's/^/| /' conftest.$ac_ext >&5
5888
5889         ac_cv_have_icmphdr=no
5890 fi
5891
5892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5893 fi
5894 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5895 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5896  if test "$ac_cv_have_icmphdr" = yes ; then
5897    cat >>confdefs.h <<\_ACEOF
5898 #define HAVE_ICMPHDR 1
5899 _ACEOF
5900
5901  fi
5902
5903
5904 for ac_header in crypt.h sys/select.h
5905 do
5906 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5907 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5908   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5910 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5911   echo $ECHO_N "(cached) $ECHO_C" >&6
5912 fi
5913 ac_res=`eval echo '${'$as_ac_Header'}'`
5914                { echo "$as_me:$LINENO: result: $ac_res" >&5
5915 echo "${ECHO_T}$ac_res" >&6; }
5916 else
5917   # Is the header compilable?
5918 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5919 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5920 cat >conftest.$ac_ext <<_ACEOF
5921 /* confdefs.h.  */
5922 _ACEOF
5923 cat confdefs.h >>conftest.$ac_ext
5924 cat >>conftest.$ac_ext <<_ACEOF
5925 /* end confdefs.h.  */
5926 $ac_includes_default
5927 #include <$ac_header>
5928 _ACEOF
5929 rm -rf conftest.$ac_objext
5930 if { (ac_try="$ac_compile"
5931 case "(($ac_try" in
5932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5933   *) ac_try_echo=$ac_try;;
5934 esac
5935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5936   (eval "$ac_compile") 2>conftest.er1
5937   ac_status=$?
5938   grep -v '^ *+' conftest.er1 >conftest.err
5939   rm -rf conftest.er1
5940   cat conftest.err >&5
5941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942   (exit $ac_status); } && {
5943          test -z "$ac_c_werror_flag" ||
5944          test ! -s conftest.err
5945        } && test -s conftest.$ac_objext; then
5946   ac_header_compiler=yes
5947 else
5948   echo "$as_me: failed program was:" >&5
5949 sed 's/^/| /' conftest.$ac_ext >&5
5950
5951         ac_header_compiler=no
5952 fi
5953
5954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5955 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5956 echo "${ECHO_T}$ac_header_compiler" >&6; }
5957
5958 # Is the header present?
5959 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5960 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5961 cat >conftest.$ac_ext <<_ACEOF
5962 /* confdefs.h.  */
5963 _ACEOF
5964 cat confdefs.h >>conftest.$ac_ext
5965 cat >>conftest.$ac_ext <<_ACEOF
5966 /* end confdefs.h.  */
5967 #include <$ac_header>
5968 _ACEOF
5969 if { (ac_try="$ac_cpp conftest.$ac_ext"
5970 case "(($ac_try" in
5971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5972   *) ac_try_echo=$ac_try;;
5973 esac
5974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5975   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5976   ac_status=$?
5977   grep -v '^ *+' conftest.er1 >conftest.err
5978   rm -rf conftest.er1
5979   cat conftest.err >&5
5980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981   (exit $ac_status); } >/dev/null && {
5982          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5983          test ! -s conftest.err
5984        }; then
5985   ac_header_preproc=yes
5986 else
5987   echo "$as_me: failed program was:" >&5
5988 sed 's/^/| /' conftest.$ac_ext >&5
5989
5990   ac_header_preproc=no
5991 fi
5992
5993 rm -rf conftest.err conftest.$ac_ext
5994 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5995 echo "${ECHO_T}$ac_header_preproc" >&6; }
5996
5997 # So?  What about this header?
5998 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5999   yes:no: )
6000     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6001 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6002     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6003 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6004     ac_header_preproc=yes
6005     ;;
6006   no:yes:* )
6007     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6008 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6009     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6010 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6011     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6012 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6013     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6014 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6015     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6016 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6017     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6018 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6019
6020     ;;
6021 esac
6022 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6024 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6025   echo $ECHO_N "(cached) $ECHO_C" >&6
6026 else
6027   eval "$as_ac_Header=\$ac_header_preproc"
6028 fi
6029 ac_res=`eval echo '${'$as_ac_Header'}'`
6030                { echo "$as_me:$LINENO: result: $ac_res" >&5
6031 echo "${ECHO_T}$ac_res" >&6; }
6032
6033 fi
6034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6035   cat >>confdefs.h <<_ACEOF
6036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6037 _ACEOF
6038
6039 fi
6040
6041 done
6042
6043 for ac_prog in perl5 perl
6044 do
6045   # Extract the first word of "$ac_prog", so it can be a program name with args.
6046 set dummy $ac_prog; ac_word=$2
6047 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6049 if test "${ac_cv_path_PERL+set}" = set; then
6050   echo $ECHO_N "(cached) $ECHO_C" >&6
6051 else
6052   case $PERL in
6053   [\\/]* | ?:[\\/]*)
6054   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6055   ;;
6056   *)
6057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058 for as_dir in $PATH
6059 do
6060   IFS=$as_save_IFS
6061   test -z "$as_dir" && as_dir=.
6062   for ac_exec_ext in '' $ac_executable_extensions; do
6063   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6064     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6065     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6066     break 2
6067   fi
6068 done
6069 done
6070 IFS=$as_save_IFS
6071
6072   ;;
6073 esac
6074 fi
6075 PERL=$ac_cv_path_PERL
6076 if test -n "$PERL"; then
6077   { echo "$as_me:$LINENO: result: $PERL" >&5
6078 echo "${ECHO_T}$PERL" >&6; }
6079 else
6080   { echo "$as_me:$LINENO: result: no" >&5
6081 echo "${ECHO_T}no" >&6; }
6082 fi
6083
6084
6085   test -n "$PERL" && break
6086 done
6087
6088   if test -z "$PERL" ; then
6089     PERL_VERSION=0
6090   else
6091     { echo "$as_me:$LINENO: checking perl version" >&5
6092 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6093 if test "${ac_cv_perl_version+set}" = set; then
6094   echo $ECHO_N "(cached) $ECHO_C" >&6
6095 else
6096   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6097 fi
6098 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6099 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6100     PERL_VERSION=$ac_cv_perl_version
6101   fi
6102
6103
6104 if test -z "$PERL" ; then
6105   # don't let it be blank...
6106   PERL=/usr/bin/perl
6107 fi
6108
6109 { echo "$as_me:$LINENO: checking for X" >&5
6110 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6111
6112
6113 # Check whether --with-x was given.
6114 if test "${with_x+set}" = set; then
6115   withval=$with_x;
6116 fi
6117
6118 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6119 if test "x$with_x" = xno; then
6120   # The user explicitly disabled X.
6121   have_x=disabled
6122 else
6123   case $x_includes,$x_libraries in #(
6124     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6125 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6126    { (exit 1); exit 1; }; };; #(
6127     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6128   echo $ECHO_N "(cached) $ECHO_C" >&6
6129 else
6130   # One or both of the vars are not set, and there is no cached value.
6131 ac_x_includes=no ac_x_libraries=no
6132 rm -f -r conftest.dir
6133 if mkdir conftest.dir; then
6134   cd conftest.dir
6135   cat >Imakefile <<'_ACEOF'
6136 incroot:
6137         @echo incroot='${INCROOT}'
6138 usrlibdir:
6139         @echo usrlibdir='${USRLIBDIR}'
6140 libdir:
6141         @echo libdir='${LIBDIR}'
6142 _ACEOF
6143   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6144     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6145     for ac_var in incroot usrlibdir libdir; do
6146       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6147     done
6148     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6149     for ac_extension in a so sl; do
6150       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6151          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6152         ac_im_usrlibdir=$ac_im_libdir; break
6153       fi
6154     done
6155     # Screen out bogus values from the imake configuration.  They are
6156     # bogus both because they are the default anyway, and because
6157     # using them would break gcc on systems where it needs fixed includes.
6158     case $ac_im_incroot in
6159         /usr/include) ac_x_includes= ;;
6160         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6161     esac
6162     case $ac_im_usrlibdir in
6163         /usr/lib | /lib) ;;
6164         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6165     esac
6166   fi
6167   cd ..
6168   rm -f -r conftest.dir
6169 fi
6170
6171 # Standard set of common directories for X headers.
6172 # Check X11 before X11Rn because it is often a symlink to the current release.
6173 ac_x_header_dirs='
6174 /usr/X11/include
6175 /usr/X11R6/include
6176 /usr/X11R5/include
6177 /usr/X11R4/include
6178
6179 /usr/include/X11
6180 /usr/include/X11R6
6181 /usr/include/X11R5
6182 /usr/include/X11R4
6183
6184 /usr/local/X11/include
6185 /usr/local/X11R6/include
6186 /usr/local/X11R5/include
6187 /usr/local/X11R4/include
6188
6189 /usr/local/include/X11
6190 /usr/local/include/X11R6
6191 /usr/local/include/X11R5
6192 /usr/local/include/X11R4
6193
6194 /usr/X386/include
6195 /usr/x386/include
6196 /usr/XFree86/include/X11
6197
6198 /usr/include
6199 /usr/local/include
6200 /usr/unsupported/include
6201 /usr/athena/include
6202 /usr/local/x11r5/include
6203 /usr/lpp/Xamples/include
6204
6205 /usr/openwin/include
6206 /usr/openwin/share/include'
6207
6208 if test "$ac_x_includes" = no; then
6209   # Guess where to find include files, by looking for Xlib.h.
6210   # First, try using that file with no special directory specified.
6211   cat >conftest.$ac_ext <<_ACEOF
6212 /* confdefs.h.  */
6213 _ACEOF
6214 cat confdefs.h >>conftest.$ac_ext
6215 cat >>conftest.$ac_ext <<_ACEOF
6216 /* end confdefs.h.  */
6217 #include <X11/Xlib.h>
6218 _ACEOF
6219 if { (ac_try="$ac_cpp conftest.$ac_ext"
6220 case "(($ac_try" in
6221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6222   *) ac_try_echo=$ac_try;;
6223 esac
6224 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6225   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6226   ac_status=$?
6227   grep -v '^ *+' conftest.er1 >conftest.err
6228   rm -rf conftest.er1
6229   cat conftest.err >&5
6230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6231   (exit $ac_status); } >/dev/null && {
6232          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6233          test ! -s conftest.err
6234        }; then
6235   # We can compile using X headers with no special include directory.
6236 ac_x_includes=
6237 else
6238   echo "$as_me: failed program was:" >&5
6239 sed 's/^/| /' conftest.$ac_ext >&5
6240
6241   for ac_dir in $ac_x_header_dirs; do
6242   if test -r "$ac_dir/X11/Xlib.h"; then
6243     ac_x_includes=$ac_dir
6244     break
6245   fi
6246 done
6247 fi
6248
6249 rm -rf conftest.err conftest.$ac_ext
6250 fi # $ac_x_includes = no
6251
6252 if test "$ac_x_libraries" = no; then
6253   # Check for the libraries.
6254   # See if we find them without any special options.
6255   # Don't add to $LIBS permanently.
6256   ac_save_LIBS=$LIBS
6257   LIBS="-lX11 $LIBS"
6258   cat >conftest.$ac_ext <<_ACEOF
6259 /* confdefs.h.  */
6260 _ACEOF
6261 cat confdefs.h >>conftest.$ac_ext
6262 cat >>conftest.$ac_ext <<_ACEOF
6263 /* end confdefs.h.  */
6264 #include <X11/Xlib.h>
6265 int
6266 main ()
6267 {
6268 XrmInitialize ()
6269   ;
6270   return 0;
6271 }
6272 _ACEOF
6273 rm -rf conftest.$ac_objext conftest$ac_exeext
6274 if { (ac_try="$ac_link"
6275 case "(($ac_try" in
6276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6277   *) ac_try_echo=$ac_try;;
6278 esac
6279 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6280   (eval "$ac_link") 2>conftest.er1
6281   ac_status=$?
6282   grep -v '^ *+' conftest.er1 >conftest.err
6283   rm -rf conftest.er1
6284   cat conftest.err >&5
6285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286   (exit $ac_status); } && {
6287          test -z "$ac_c_werror_flag" ||
6288          test ! -s conftest.err
6289        } && test -s conftest$ac_exeext &&
6290        $as_test_x conftest$ac_exeext; then
6291   LIBS=$ac_save_LIBS
6292 # We can link X programs with no special library path.
6293 ac_x_libraries=
6294 else
6295   echo "$as_me: failed program was:" >&5
6296 sed 's/^/| /' conftest.$ac_ext >&5
6297
6298         LIBS=$ac_save_LIBS
6299 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6300 do
6301   # Don't even attempt the hair of trying to link an X program!
6302   for ac_extension in a so sl; do
6303     if test -r "$ac_dir/libX11.$ac_extension"; then
6304       ac_x_libraries=$ac_dir
6305       break 2
6306     fi
6307   done
6308 done
6309 fi
6310
6311 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6312       conftest$ac_exeext conftest.$ac_ext
6313 fi # $ac_x_libraries = no
6314
6315 case $ac_x_includes,$ac_x_libraries in #(
6316   no,* | *,no | *\'*)
6317     # Didn't find X, or a directory has "'" in its name.
6318     ac_cv_have_x="have_x=no";; #(
6319   *)
6320     # Record where we found X for the cache.
6321     ac_cv_have_x="have_x=yes\
6322         ac_x_includes='$ac_x_includes'\
6323         ac_x_libraries='$ac_x_libraries'"
6324 esac
6325 fi
6326 ;; #(
6327     *) have_x=yes;;
6328   esac
6329   eval "$ac_cv_have_x"
6330 fi # $with_x != no
6331
6332 if test "$have_x" != yes; then
6333   { echo "$as_me:$LINENO: result: $have_x" >&5
6334 echo "${ECHO_T}$have_x" >&6; }
6335   no_x=yes
6336 else
6337   # If each of the values was on the command line, it overrides each guess.
6338   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6339   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6340   # Update the cache value to reflect the command line values.
6341   ac_cv_have_x="have_x=yes\
6342         ac_x_includes='$x_includes'\
6343         ac_x_libraries='$x_libraries'"
6344   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6345 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6346 fi
6347
6348 if test "$no_x" = yes; then
6349   # Not all programs may use this symbol, but it does not hurt to define it.
6350
6351 cat >>confdefs.h <<\_ACEOF
6352 #define X_DISPLAY_MISSING 1
6353 _ACEOF
6354
6355   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6356 else
6357   if test -n "$x_includes"; then
6358     X_CFLAGS="$X_CFLAGS -I$x_includes"
6359   fi
6360
6361   # It would also be nice to do this for all -L options, not just this one.
6362   if test -n "$x_libraries"; then
6363     X_LIBS="$X_LIBS -L$x_libraries"
6364     # For Solaris; some versions of Sun CC require a space after -R and
6365     # others require no space.  Words are not sufficient . . . .
6366     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6367 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6368     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6369     ac_xsave_c_werror_flag=$ac_c_werror_flag
6370     ac_c_werror_flag=yes
6371     cat >conftest.$ac_ext <<_ACEOF
6372 /* confdefs.h.  */
6373 _ACEOF
6374 cat confdefs.h >>conftest.$ac_ext
6375 cat >>conftest.$ac_ext <<_ACEOF
6376 /* end confdefs.h.  */
6377
6378 int
6379 main ()
6380 {
6381
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 rm -rf conftest.$ac_objext conftest$ac_exeext
6387 if { (ac_try="$ac_link"
6388 case "(($ac_try" in
6389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6390   *) ac_try_echo=$ac_try;;
6391 esac
6392 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6393   (eval "$ac_link") 2>conftest.er1
6394   ac_status=$?
6395   grep -v '^ *+' conftest.er1 >conftest.err
6396   rm -rf conftest.er1
6397   cat conftest.err >&5
6398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399   (exit $ac_status); } && {
6400          test -z "$ac_c_werror_flag" ||
6401          test ! -s conftest.err
6402        } && test -s conftest$ac_exeext &&
6403        $as_test_x conftest$ac_exeext; then
6404   { echo "$as_me:$LINENO: result: no" >&5
6405 echo "${ECHO_T}no" >&6; }
6406        X_LIBS="$X_LIBS -R$x_libraries"
6407 else
6408   echo "$as_me: failed program was:" >&5
6409 sed 's/^/| /' conftest.$ac_ext >&5
6410
6411         LIBS="$ac_xsave_LIBS -R $x_libraries"
6412        cat >conftest.$ac_ext <<_ACEOF
6413 /* confdefs.h.  */
6414 _ACEOF
6415 cat confdefs.h >>conftest.$ac_ext
6416 cat >>conftest.$ac_ext <<_ACEOF
6417 /* end confdefs.h.  */
6418
6419 int
6420 main ()
6421 {
6422
6423   ;
6424   return 0;
6425 }
6426 _ACEOF
6427 rm -rf conftest.$ac_objext conftest$ac_exeext
6428 if { (ac_try="$ac_link"
6429 case "(($ac_try" in
6430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6431   *) ac_try_echo=$ac_try;;
6432 esac
6433 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6434   (eval "$ac_link") 2>conftest.er1
6435   ac_status=$?
6436   grep -v '^ *+' conftest.er1 >conftest.err
6437   rm -rf conftest.er1
6438   cat conftest.err >&5
6439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6440   (exit $ac_status); } && {
6441          test -z "$ac_c_werror_flag" ||
6442          test ! -s conftest.err
6443        } && test -s conftest$ac_exeext &&
6444        $as_test_x conftest$ac_exeext; then
6445   { echo "$as_me:$LINENO: result: yes" >&5
6446 echo "${ECHO_T}yes" >&6; }
6447           X_LIBS="$X_LIBS -R $x_libraries"
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 sed 's/^/| /' conftest.$ac_ext >&5
6451
6452         { echo "$as_me:$LINENO: result: neither works" >&5
6453 echo "${ECHO_T}neither works" >&6; }
6454 fi
6455
6456 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6457       conftest$ac_exeext conftest.$ac_ext
6458 fi
6459
6460 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6461       conftest$ac_exeext conftest.$ac_ext
6462     ac_c_werror_flag=$ac_xsave_c_werror_flag
6463     LIBS=$ac_xsave_LIBS
6464   fi
6465
6466   # Check for system-dependent libraries X programs must link with.
6467   # Do this before checking for the system-independent R6 libraries
6468   # (-lICE), since we may need -lsocket or whatever for X linking.
6469
6470   if test "$ISC" = yes; then
6471     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6472   else
6473     # Martyn Johnson says this is needed for Ultrix, if the X
6474     # libraries were built with DECnet support.  And Karl Berry says
6475     # the Alpha needs dnet_stub (dnet does not exist).
6476     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6477     cat >conftest.$ac_ext <<_ACEOF
6478 /* confdefs.h.  */
6479 _ACEOF
6480 cat confdefs.h >>conftest.$ac_ext
6481 cat >>conftest.$ac_ext <<_ACEOF
6482 /* end confdefs.h.  */
6483
6484 /* Override any GCC internal prototype to avoid an error.
6485    Use char because int might match the return type of a GCC
6486    builtin and then its argument prototype would still apply.  */
6487 #ifdef __cplusplus
6488 extern "C"
6489 #endif
6490 char XOpenDisplay ();
6491 int
6492 main ()
6493 {
6494 return XOpenDisplay ();
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -rf conftest.$ac_objext conftest$ac_exeext
6500 if { (ac_try="$ac_link"
6501 case "(($ac_try" in
6502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6503   *) ac_try_echo=$ac_try;;
6504 esac
6505 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6506   (eval "$ac_link") 2>conftest.er1
6507   ac_status=$?
6508   grep -v '^ *+' conftest.er1 >conftest.err
6509   rm -rf conftest.er1
6510   cat conftest.err >&5
6511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512   (exit $ac_status); } && {
6513          test -z "$ac_c_werror_flag" ||
6514          test ! -s conftest.err
6515        } && test -s conftest$ac_exeext &&
6516        $as_test_x conftest$ac_exeext; then
6517   :
6518 else
6519   echo "$as_me: failed program was:" >&5
6520 sed 's/^/| /' conftest.$ac_ext >&5
6521
6522         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6523 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6524 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6525   echo $ECHO_N "(cached) $ECHO_C" >&6
6526 else
6527   ac_check_lib_save_LIBS=$LIBS
6528 LIBS="-ldnet  $LIBS"
6529 cat >conftest.$ac_ext <<_ACEOF
6530 /* confdefs.h.  */
6531 _ACEOF
6532 cat confdefs.h >>conftest.$ac_ext
6533 cat >>conftest.$ac_ext <<_ACEOF
6534 /* end confdefs.h.  */
6535
6536 /* Override any GCC internal prototype to avoid an error.
6537    Use char because int might match the return type of a GCC
6538    builtin and then its argument prototype would still apply.  */
6539 #ifdef __cplusplus
6540 extern "C"
6541 #endif
6542 char dnet_ntoa ();
6543 int
6544 main ()
6545 {
6546 return dnet_ntoa ();
6547   ;
6548   return 0;
6549 }
6550 _ACEOF
6551 rm -rf conftest.$ac_objext conftest$ac_exeext
6552 if { (ac_try="$ac_link"
6553 case "(($ac_try" in
6554   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6555   *) ac_try_echo=$ac_try;;
6556 esac
6557 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6558   (eval "$ac_link") 2>conftest.er1
6559   ac_status=$?
6560   grep -v '^ *+' conftest.er1 >conftest.err
6561   rm -rf conftest.er1
6562   cat conftest.err >&5
6563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6564   (exit $ac_status); } && {
6565          test -z "$ac_c_werror_flag" ||
6566          test ! -s conftest.err
6567        } && test -s conftest$ac_exeext &&
6568        $as_test_x conftest$ac_exeext; then
6569   ac_cv_lib_dnet_dnet_ntoa=yes
6570 else
6571   echo "$as_me: failed program was:" >&5
6572 sed 's/^/| /' conftest.$ac_ext >&5
6573
6574         ac_cv_lib_dnet_dnet_ntoa=no
6575 fi
6576
6577 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6578       conftest$ac_exeext conftest.$ac_ext
6579 LIBS=$ac_check_lib_save_LIBS
6580 fi
6581 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6582 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6583 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6584   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6585 fi
6586
6587     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6588       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6589 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6590 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6591   echo $ECHO_N "(cached) $ECHO_C" >&6
6592 else
6593   ac_check_lib_save_LIBS=$LIBS
6594 LIBS="-ldnet_stub  $LIBS"
6595 cat >conftest.$ac_ext <<_ACEOF
6596 /* confdefs.h.  */
6597 _ACEOF
6598 cat confdefs.h >>conftest.$ac_ext
6599 cat >>conftest.$ac_ext <<_ACEOF
6600 /* end confdefs.h.  */
6601
6602 /* Override any GCC internal prototype to avoid an error.
6603    Use char because int might match the return type of a GCC
6604    builtin and then its argument prototype would still apply.  */
6605 #ifdef __cplusplus
6606 extern "C"
6607 #endif
6608 char dnet_ntoa ();
6609 int
6610 main ()
6611 {
6612 return dnet_ntoa ();
6613   ;
6614   return 0;
6615 }
6616 _ACEOF
6617 rm -rf conftest.$ac_objext conftest$ac_exeext
6618 if { (ac_try="$ac_link"
6619 case "(($ac_try" in
6620   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6621   *) ac_try_echo=$ac_try;;
6622 esac
6623 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6624   (eval "$ac_link") 2>conftest.er1
6625   ac_status=$?
6626   grep -v '^ *+' conftest.er1 >conftest.err
6627   rm -rf conftest.er1
6628   cat conftest.err >&5
6629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630   (exit $ac_status); } && {
6631          test -z "$ac_c_werror_flag" ||
6632          test ! -s conftest.err
6633        } && test -s conftest$ac_exeext &&
6634        $as_test_x conftest$ac_exeext; then
6635   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6636 else
6637   echo "$as_me: failed program was:" >&5
6638 sed 's/^/| /' conftest.$ac_ext >&5
6639
6640         ac_cv_lib_dnet_stub_dnet_ntoa=no
6641 fi
6642
6643 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6644       conftest$ac_exeext conftest.$ac_ext
6645 LIBS=$ac_check_lib_save_LIBS
6646 fi
6647 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6648 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6649 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6650   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6651 fi
6652
6653     fi
6654 fi
6655
6656 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6657       conftest$ac_exeext conftest.$ac_ext
6658     LIBS="$ac_xsave_LIBS"
6659
6660     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6661     # to get the SysV transport functions.
6662     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6663     # needs -lnsl.
6664     # The nsl library prevents programs from opening the X display
6665     # on Irix 5.2, according to T.E. Dickey.
6666     # The functions gethostbyname, getservbyname, and inet_addr are
6667     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6668     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6669 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6670 if test "${ac_cv_func_gethostbyname+set}" = set; then
6671   echo $ECHO_N "(cached) $ECHO_C" >&6
6672 else
6673   cat >conftest.$ac_ext <<_ACEOF
6674 /* confdefs.h.  */
6675 _ACEOF
6676 cat confdefs.h >>conftest.$ac_ext
6677 cat >>conftest.$ac_ext <<_ACEOF
6678 /* end confdefs.h.  */
6679 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6680    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6681 #define gethostbyname innocuous_gethostbyname
6682
6683 /* System header to define __stub macros and hopefully few prototypes,
6684     which can conflict with char gethostbyname (); below.
6685     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6686     <limits.h> exists even on freestanding compilers.  */
6687
6688 #ifdef __STDC__
6689 # include <limits.h>
6690 #else
6691 # include <assert.h>
6692 #endif
6693
6694 #undef gethostbyname
6695
6696 /* Override any GCC internal prototype to avoid an error.
6697    Use char because int might match the return type of a GCC
6698    builtin and then its argument prototype would still apply.  */
6699 #ifdef __cplusplus
6700 extern "C"
6701 #endif
6702 char gethostbyname ();
6703 /* The GNU C library defines this for functions which it implements
6704     to always fail with ENOSYS.  Some functions are actually named
6705     something starting with __ and the normal name is an alias.  */
6706 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6707 choke me
6708 #endif
6709
6710 int
6711 main ()
6712 {
6713 return gethostbyname ();
6714   ;
6715   return 0;
6716 }
6717 _ACEOF
6718 rm -rf conftest.$ac_objext conftest$ac_exeext
6719 if { (ac_try="$ac_link"
6720 case "(($ac_try" in
6721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6722   *) ac_try_echo=$ac_try;;
6723 esac
6724 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6725   (eval "$ac_link") 2>conftest.er1
6726   ac_status=$?
6727   grep -v '^ *+' conftest.er1 >conftest.err
6728   rm -rf conftest.er1
6729   cat conftest.err >&5
6730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6731   (exit $ac_status); } && {
6732          test -z "$ac_c_werror_flag" ||
6733          test ! -s conftest.err
6734        } && test -s conftest$ac_exeext &&
6735        $as_test_x conftest$ac_exeext; then
6736   ac_cv_func_gethostbyname=yes
6737 else
6738   echo "$as_me: failed program was:" >&5
6739 sed 's/^/| /' conftest.$ac_ext >&5
6740
6741         ac_cv_func_gethostbyname=no
6742 fi
6743
6744 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6745       conftest$ac_exeext conftest.$ac_ext
6746 fi
6747 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6748 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6749
6750     if test $ac_cv_func_gethostbyname = no; then
6751       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6752 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6753 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6754   echo $ECHO_N "(cached) $ECHO_C" >&6
6755 else
6756   ac_check_lib_save_LIBS=$LIBS
6757 LIBS="-lnsl  $LIBS"
6758 cat >conftest.$ac_ext <<_ACEOF
6759 /* confdefs.h.  */
6760 _ACEOF
6761 cat confdefs.h >>conftest.$ac_ext
6762 cat >>conftest.$ac_ext <<_ACEOF
6763 /* end confdefs.h.  */
6764
6765 /* Override any GCC internal prototype to avoid an error.
6766    Use char because int might match the return type of a GCC
6767    builtin and then its argument prototype would still apply.  */
6768 #ifdef __cplusplus
6769 extern "C"
6770 #endif
6771 char gethostbyname ();
6772 int
6773 main ()
6774 {
6775 return gethostbyname ();
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 rm -rf conftest.$ac_objext conftest$ac_exeext
6781 if { (ac_try="$ac_link"
6782 case "(($ac_try" in
6783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6784   *) ac_try_echo=$ac_try;;
6785 esac
6786 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6787   (eval "$ac_link") 2>conftest.er1
6788   ac_status=$?
6789   grep -v '^ *+' conftest.er1 >conftest.err
6790   rm -rf conftest.er1
6791   cat conftest.err >&5
6792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793   (exit $ac_status); } && {
6794          test -z "$ac_c_werror_flag" ||
6795          test ! -s conftest.err
6796        } && test -s conftest$ac_exeext &&
6797        $as_test_x conftest$ac_exeext; then
6798   ac_cv_lib_nsl_gethostbyname=yes
6799 else
6800   echo "$as_me: failed program was:" >&5
6801 sed 's/^/| /' conftest.$ac_ext >&5
6802
6803         ac_cv_lib_nsl_gethostbyname=no
6804 fi
6805
6806 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6807       conftest$ac_exeext conftest.$ac_ext
6808 LIBS=$ac_check_lib_save_LIBS
6809 fi
6810 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6811 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6812 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6813   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6814 fi
6815
6816       if test $ac_cv_lib_nsl_gethostbyname = no; then
6817         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6818 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6819 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6820   echo $ECHO_N "(cached) $ECHO_C" >&6
6821 else
6822   ac_check_lib_save_LIBS=$LIBS
6823 LIBS="-lbsd  $LIBS"
6824 cat >conftest.$ac_ext <<_ACEOF
6825 /* confdefs.h.  */
6826 _ACEOF
6827 cat confdefs.h >>conftest.$ac_ext
6828 cat >>conftest.$ac_ext <<_ACEOF
6829 /* end confdefs.h.  */
6830
6831 /* Override any GCC internal prototype to avoid an error.
6832    Use char because int might match the return type of a GCC
6833    builtin and then its argument prototype would still apply.  */
6834 #ifdef __cplusplus
6835 extern "C"
6836 #endif
6837 char gethostbyname ();
6838 int
6839 main ()
6840 {
6841 return gethostbyname ();
6842   ;
6843   return 0;
6844 }
6845 _ACEOF
6846 rm -rf conftest.$ac_objext conftest$ac_exeext
6847 if { (ac_try="$ac_link"
6848 case "(($ac_try" in
6849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6850   *) ac_try_echo=$ac_try;;
6851 esac
6852 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6853   (eval "$ac_link") 2>conftest.er1
6854   ac_status=$?
6855   grep -v '^ *+' conftest.er1 >conftest.err
6856   rm -rf conftest.er1
6857   cat conftest.err >&5
6858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6859   (exit $ac_status); } && {
6860          test -z "$ac_c_werror_flag" ||
6861          test ! -s conftest.err
6862        } && test -s conftest$ac_exeext &&
6863        $as_test_x conftest$ac_exeext; then
6864   ac_cv_lib_bsd_gethostbyname=yes
6865 else
6866   echo "$as_me: failed program was:" >&5
6867 sed 's/^/| /' conftest.$ac_ext >&5
6868
6869         ac_cv_lib_bsd_gethostbyname=no
6870 fi
6871
6872 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6873       conftest$ac_exeext conftest.$ac_ext
6874 LIBS=$ac_check_lib_save_LIBS
6875 fi
6876 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6877 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6878 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6879   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6880 fi
6881
6882       fi
6883     fi
6884
6885     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6886     # socket/setsockopt and other routines are undefined under SCO ODT
6887     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6888     # on later versions), says Simon Leinen: it contains gethostby*
6889     # variants that don't use the name server (or something).  -lsocket
6890     # must be given before -lnsl if both are needed.  We assume that
6891     # if connect needs -lnsl, so does gethostbyname.
6892     { echo "$as_me:$LINENO: checking for connect" >&5
6893 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6894 if test "${ac_cv_func_connect+set}" = set; then
6895   echo $ECHO_N "(cached) $ECHO_C" >&6
6896 else
6897   cat >conftest.$ac_ext <<_ACEOF
6898 /* confdefs.h.  */
6899 _ACEOF
6900 cat confdefs.h >>conftest.$ac_ext
6901 cat >>conftest.$ac_ext <<_ACEOF
6902 /* end confdefs.h.  */
6903 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6904    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6905 #define connect innocuous_connect
6906
6907 /* System header to define __stub macros and hopefully few prototypes,
6908     which can conflict with char connect (); below.
6909     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6910     <limits.h> exists even on freestanding compilers.  */
6911
6912 #ifdef __STDC__
6913 # include <limits.h>
6914 #else
6915 # include <assert.h>
6916 #endif
6917
6918 #undef connect
6919
6920 /* Override any GCC internal prototype to avoid an error.
6921    Use char because int might match the return type of a GCC
6922    builtin and then its argument prototype would still apply.  */
6923 #ifdef __cplusplus
6924 extern "C"
6925 #endif
6926 char connect ();
6927 /* The GNU C library defines this for functions which it implements
6928     to always fail with ENOSYS.  Some functions are actually named
6929     something starting with __ and the normal name is an alias.  */
6930 #if defined __stub_connect || defined __stub___connect
6931 choke me
6932 #endif
6933
6934 int
6935 main ()
6936 {
6937 return connect ();
6938   ;
6939   return 0;
6940 }
6941 _ACEOF
6942 rm -rf conftest.$ac_objext conftest$ac_exeext
6943 if { (ac_try="$ac_link"
6944 case "(($ac_try" in
6945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946   *) ac_try_echo=$ac_try;;
6947 esac
6948 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6949   (eval "$ac_link") 2>conftest.er1
6950   ac_status=$?
6951   grep -v '^ *+' conftest.er1 >conftest.err
6952   rm -rf conftest.er1
6953   cat conftest.err >&5
6954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955   (exit $ac_status); } && {
6956          test -z "$ac_c_werror_flag" ||
6957          test ! -s conftest.err
6958        } && test -s conftest$ac_exeext &&
6959        $as_test_x conftest$ac_exeext; then
6960   ac_cv_func_connect=yes
6961 else
6962   echo "$as_me: failed program was:" >&5
6963 sed 's/^/| /' conftest.$ac_ext >&5
6964
6965         ac_cv_func_connect=no
6966 fi
6967
6968 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6969       conftest$ac_exeext conftest.$ac_ext
6970 fi
6971 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6972 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6973
6974     if test $ac_cv_func_connect = no; then
6975       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6976 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6977 if test "${ac_cv_lib_socket_connect+set}" = set; then
6978   echo $ECHO_N "(cached) $ECHO_C" >&6
6979 else
6980   ac_check_lib_save_LIBS=$LIBS
6981 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6982 cat >conftest.$ac_ext <<_ACEOF
6983 /* confdefs.h.  */
6984 _ACEOF
6985 cat confdefs.h >>conftest.$ac_ext
6986 cat >>conftest.$ac_ext <<_ACEOF
6987 /* end confdefs.h.  */
6988
6989 /* Override any GCC internal prototype to avoid an error.
6990    Use char because int might match the return type of a GCC
6991    builtin and then its argument prototype would still apply.  */
6992 #ifdef __cplusplus
6993 extern "C"
6994 #endif
6995 char connect ();
6996 int
6997 main ()
6998 {
6999 return connect ();
7000   ;
7001   return 0;
7002 }
7003 _ACEOF
7004 rm -rf conftest.$ac_objext conftest$ac_exeext
7005 if { (ac_try="$ac_link"
7006 case "(($ac_try" in
7007   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7008   *) ac_try_echo=$ac_try;;
7009 esac
7010 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7011   (eval "$ac_link") 2>conftest.er1
7012   ac_status=$?
7013   grep -v '^ *+' conftest.er1 >conftest.err
7014   rm -rf conftest.er1
7015   cat conftest.err >&5
7016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017   (exit $ac_status); } && {
7018          test -z "$ac_c_werror_flag" ||
7019          test ! -s conftest.err
7020        } && test -s conftest$ac_exeext &&
7021        $as_test_x conftest$ac_exeext; then
7022   ac_cv_lib_socket_connect=yes
7023 else
7024   echo "$as_me: failed program was:" >&5
7025 sed 's/^/| /' conftest.$ac_ext >&5
7026
7027         ac_cv_lib_socket_connect=no
7028 fi
7029
7030 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7031       conftest$ac_exeext conftest.$ac_ext
7032 LIBS=$ac_check_lib_save_LIBS
7033 fi
7034 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7035 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7036 if test $ac_cv_lib_socket_connect = yes; then
7037   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7038 fi
7039
7040     fi
7041
7042     # Guillermo Gomez says -lposix is necessary on A/UX.
7043     { echo "$as_me:$LINENO: checking for remove" >&5
7044 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7045 if test "${ac_cv_func_remove+set}" = set; then
7046   echo $ECHO_N "(cached) $ECHO_C" >&6
7047 else
7048   cat >conftest.$ac_ext <<_ACEOF
7049 /* confdefs.h.  */
7050 _ACEOF
7051 cat confdefs.h >>conftest.$ac_ext
7052 cat >>conftest.$ac_ext <<_ACEOF
7053 /* end confdefs.h.  */
7054 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7055    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7056 #define remove innocuous_remove
7057
7058 /* System header to define __stub macros and hopefully few prototypes,
7059     which can conflict with char remove (); below.
7060     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7061     <limits.h> exists even on freestanding compilers.  */
7062
7063 #ifdef __STDC__
7064 # include <limits.h>
7065 #else
7066 # include <assert.h>
7067 #endif
7068
7069 #undef remove
7070
7071 /* Override any GCC internal prototype to avoid an error.
7072    Use char because int might match the return type of a GCC
7073    builtin and then its argument prototype would still apply.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 char remove ();
7078 /* The GNU C library defines this for functions which it implements
7079     to always fail with ENOSYS.  Some functions are actually named
7080     something starting with __ and the normal name is an alias.  */
7081 #if defined __stub_remove || defined __stub___remove
7082 choke me
7083 #endif
7084
7085 int
7086 main ()
7087 {
7088 return remove ();
7089   ;
7090   return 0;
7091 }
7092 _ACEOF
7093 rm -rf conftest.$ac_objext conftest$ac_exeext
7094 if { (ac_try="$ac_link"
7095 case "(($ac_try" in
7096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097   *) ac_try_echo=$ac_try;;
7098 esac
7099 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7100   (eval "$ac_link") 2>conftest.er1
7101   ac_status=$?
7102   grep -v '^ *+' conftest.er1 >conftest.err
7103   rm -rf conftest.er1
7104   cat conftest.err >&5
7105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106   (exit $ac_status); } && {
7107          test -z "$ac_c_werror_flag" ||
7108          test ! -s conftest.err
7109        } && test -s conftest$ac_exeext &&
7110        $as_test_x conftest$ac_exeext; then
7111   ac_cv_func_remove=yes
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 sed 's/^/| /' conftest.$ac_ext >&5
7115
7116         ac_cv_func_remove=no
7117 fi
7118
7119 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7120       conftest$ac_exeext conftest.$ac_ext
7121 fi
7122 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7123 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7124
7125     if test $ac_cv_func_remove = no; then
7126       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7127 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7128 if test "${ac_cv_lib_posix_remove+set}" = set; then
7129   echo $ECHO_N "(cached) $ECHO_C" >&6
7130 else
7131   ac_check_lib_save_LIBS=$LIBS
7132 LIBS="-lposix  $LIBS"
7133 cat >conftest.$ac_ext <<_ACEOF
7134 /* confdefs.h.  */
7135 _ACEOF
7136 cat confdefs.h >>conftest.$ac_ext
7137 cat >>conftest.$ac_ext <<_ACEOF
7138 /* end confdefs.h.  */
7139
7140 /* Override any GCC internal prototype to avoid an error.
7141    Use char because int might match the return type of a GCC
7142    builtin and then its argument prototype would still apply.  */
7143 #ifdef __cplusplus
7144 extern "C"
7145 #endif
7146 char remove ();
7147 int
7148 main ()
7149 {
7150 return remove ();
7151   ;
7152   return 0;
7153 }
7154 _ACEOF
7155 rm -rf conftest.$ac_objext conftest$ac_exeext
7156 if { (ac_try="$ac_link"
7157 case "(($ac_try" in
7158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7159   *) ac_try_echo=$ac_try;;
7160 esac
7161 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7162   (eval "$ac_link") 2>conftest.er1
7163   ac_status=$?
7164   grep -v '^ *+' conftest.er1 >conftest.err
7165   rm -rf conftest.er1
7166   cat conftest.err >&5
7167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168   (exit $ac_status); } && {
7169          test -z "$ac_c_werror_flag" ||
7170          test ! -s conftest.err
7171        } && test -s conftest$ac_exeext &&
7172        $as_test_x conftest$ac_exeext; then
7173   ac_cv_lib_posix_remove=yes
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 sed 's/^/| /' conftest.$ac_ext >&5
7177
7178         ac_cv_lib_posix_remove=no
7179 fi
7180
7181 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7182       conftest$ac_exeext conftest.$ac_ext
7183 LIBS=$ac_check_lib_save_LIBS
7184 fi
7185 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7186 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7187 if test $ac_cv_lib_posix_remove = yes; then
7188   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7189 fi
7190
7191     fi
7192
7193     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7194     { echo "$as_me:$LINENO: checking for shmat" >&5
7195 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7196 if test "${ac_cv_func_shmat+set}" = set; then
7197   echo $ECHO_N "(cached) $ECHO_C" >&6
7198 else
7199   cat >conftest.$ac_ext <<_ACEOF
7200 /* confdefs.h.  */
7201 _ACEOF
7202 cat confdefs.h >>conftest.$ac_ext
7203 cat >>conftest.$ac_ext <<_ACEOF
7204 /* end confdefs.h.  */
7205 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7206    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7207 #define shmat innocuous_shmat
7208
7209 /* System header to define __stub macros and hopefully few prototypes,
7210     which can conflict with char shmat (); below.
7211     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7212     <limits.h> exists even on freestanding compilers.  */
7213
7214 #ifdef __STDC__
7215 # include <limits.h>
7216 #else
7217 # include <assert.h>
7218 #endif
7219
7220 #undef shmat
7221
7222 /* Override any GCC internal prototype to avoid an error.
7223    Use char because int might match the return type of a GCC
7224    builtin and then its argument prototype would still apply.  */
7225 #ifdef __cplusplus
7226 extern "C"
7227 #endif
7228 char shmat ();
7229 /* The GNU C library defines this for functions which it implements
7230     to always fail with ENOSYS.  Some functions are actually named
7231     something starting with __ and the normal name is an alias.  */
7232 #if defined __stub_shmat || defined __stub___shmat
7233 choke me
7234 #endif
7235
7236 int
7237 main ()
7238 {
7239 return shmat ();
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -rf conftest.$ac_objext conftest$ac_exeext
7245 if { (ac_try="$ac_link"
7246 case "(($ac_try" in
7247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7248   *) ac_try_echo=$ac_try;;
7249 esac
7250 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7251   (eval "$ac_link") 2>conftest.er1
7252   ac_status=$?
7253   grep -v '^ *+' conftest.er1 >conftest.err
7254   rm -rf conftest.er1
7255   cat conftest.err >&5
7256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257   (exit $ac_status); } && {
7258          test -z "$ac_c_werror_flag" ||
7259          test ! -s conftest.err
7260        } && test -s conftest$ac_exeext &&
7261        $as_test_x conftest$ac_exeext; then
7262   ac_cv_func_shmat=yes
7263 else
7264   echo "$as_me: failed program was:" >&5
7265 sed 's/^/| /' conftest.$ac_ext >&5
7266
7267         ac_cv_func_shmat=no
7268 fi
7269
7270 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7271       conftest$ac_exeext conftest.$ac_ext
7272 fi
7273 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7274 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7275
7276     if test $ac_cv_func_shmat = no; then
7277       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7278 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7279 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7280   echo $ECHO_N "(cached) $ECHO_C" >&6
7281 else
7282   ac_check_lib_save_LIBS=$LIBS
7283 LIBS="-lipc  $LIBS"
7284 cat >conftest.$ac_ext <<_ACEOF
7285 /* confdefs.h.  */
7286 _ACEOF
7287 cat confdefs.h >>conftest.$ac_ext
7288 cat >>conftest.$ac_ext <<_ACEOF
7289 /* end confdefs.h.  */
7290
7291 /* Override any GCC internal prototype to avoid an error.
7292    Use char because int might match the return type of a GCC
7293    builtin and then its argument prototype would still apply.  */
7294 #ifdef __cplusplus
7295 extern "C"
7296 #endif
7297 char shmat ();
7298 int
7299 main ()
7300 {
7301 return shmat ();
7302   ;
7303   return 0;
7304 }
7305 _ACEOF
7306 rm -rf conftest.$ac_objext conftest$ac_exeext
7307 if { (ac_try="$ac_link"
7308 case "(($ac_try" in
7309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7310   *) ac_try_echo=$ac_try;;
7311 esac
7312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7313   (eval "$ac_link") 2>conftest.er1
7314   ac_status=$?
7315   grep -v '^ *+' conftest.er1 >conftest.err
7316   rm -rf conftest.er1
7317   cat conftest.err >&5
7318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319   (exit $ac_status); } && {
7320          test -z "$ac_c_werror_flag" ||
7321          test ! -s conftest.err
7322        } && test -s conftest$ac_exeext &&
7323        $as_test_x conftest$ac_exeext; then
7324   ac_cv_lib_ipc_shmat=yes
7325 else
7326   echo "$as_me: failed program was:" >&5
7327 sed 's/^/| /' conftest.$ac_ext >&5
7328
7329         ac_cv_lib_ipc_shmat=no
7330 fi
7331
7332 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7333       conftest$ac_exeext conftest.$ac_ext
7334 LIBS=$ac_check_lib_save_LIBS
7335 fi
7336 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7337 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7338 if test $ac_cv_lib_ipc_shmat = yes; then
7339   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7340 fi
7341
7342     fi
7343   fi
7344
7345   # Check for libraries that X11R6 Xt/Xaw programs need.
7346   ac_save_LDFLAGS=$LDFLAGS
7347   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7348   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7349   # check for ICE first), but we must link in the order -lSM -lICE or
7350   # we get undefined symbols.  So assume we have SM if we have ICE.
7351   # These have to be linked with before -lX11, unlike the other
7352   # libraries we check for below, so use a different variable.
7353   # John Interrante, Karl Berry
7354   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7355 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7356 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7357   echo $ECHO_N "(cached) $ECHO_C" >&6
7358 else
7359   ac_check_lib_save_LIBS=$LIBS
7360 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7361 cat >conftest.$ac_ext <<_ACEOF
7362 /* confdefs.h.  */
7363 _ACEOF
7364 cat confdefs.h >>conftest.$ac_ext
7365 cat >>conftest.$ac_ext <<_ACEOF
7366 /* end confdefs.h.  */
7367
7368 /* Override any GCC internal prototype to avoid an error.
7369    Use char because int might match the return type of a GCC
7370    builtin and then its argument prototype would still apply.  */
7371 #ifdef __cplusplus
7372 extern "C"
7373 #endif
7374 char IceConnectionNumber ();
7375 int
7376 main ()
7377 {
7378 return IceConnectionNumber ();
7379   ;
7380   return 0;
7381 }
7382 _ACEOF
7383 rm -rf conftest.$ac_objext conftest$ac_exeext
7384 if { (ac_try="$ac_link"
7385 case "(($ac_try" in
7386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7387   *) ac_try_echo=$ac_try;;
7388 esac
7389 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7390   (eval "$ac_link") 2>conftest.er1
7391   ac_status=$?
7392   grep -v '^ *+' conftest.er1 >conftest.err
7393   rm -rf conftest.er1
7394   cat conftest.err >&5
7395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396   (exit $ac_status); } && {
7397          test -z "$ac_c_werror_flag" ||
7398          test ! -s conftest.err
7399        } && test -s conftest$ac_exeext &&
7400        $as_test_x conftest$ac_exeext; then
7401   ac_cv_lib_ICE_IceConnectionNumber=yes
7402 else
7403   echo "$as_me: failed program was:" >&5
7404 sed 's/^/| /' conftest.$ac_ext >&5
7405
7406         ac_cv_lib_ICE_IceConnectionNumber=no
7407 fi
7408
7409 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7410       conftest$ac_exeext conftest.$ac_ext
7411 LIBS=$ac_check_lib_save_LIBS
7412 fi
7413 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7414 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7415 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7416   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7417 fi
7418
7419   LDFLAGS=$ac_save_LDFLAGS
7420
7421 fi
7422
7423
7424 if test "$have_x" != yes; then
7425   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7426 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7427    { (exit 1); exit 1; }; }
7428 fi
7429
7430
7431     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7432 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7433 if test "${ac_cv_x_app_defaults+set}" = set; then
7434   echo $ECHO_N "(cached) $ECHO_C" >&6
7435 else
7436
7437   rm -fr conftestdir
7438   if mkdir conftestdir; then
7439     cd conftestdir 2>/dev/null
7440     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7441     cat > Imakefile <<'EOF'
7442 acfindx:
7443         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7444 EOF
7445     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7446       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7447       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7448     fi
7449     cd .. 2>/dev/null
7450     rm -fr conftestdir
7451   fi
7452       if test x"$ac_x_app_defaults" = x; then
7453
7454   # Look for the directory under a standard set of common directories.
7455   # Check X11 before X11Rn because it's often a symlink to the current release.
7456   for ac_dir in                                 \
7457     /usr/X11/lib/app-defaults                   \
7458     /usr/X11R6/lib/app-defaults                 \
7459     /usr/X11R6/lib/X11/app-defaults             \
7460     /usr/X11R5/lib/app-defaults                 \
7461     /usr/X11R5/lib/X11/app-defaults             \
7462     /usr/X11R4/lib/app-defaults                 \
7463     /usr/X11R4/lib/X11/app-defaults             \
7464                                                 \
7465     /usr/lib/X11/app-defaults                   \
7466     /usr/lib/X11R6/app-defaults                 \
7467     /usr/lib/X11R5/app-defaults                 \
7468     /usr/lib/X11R4/app-defaults                 \
7469                                                 \
7470     /usr/local/X11/lib/app-defaults             \
7471     /usr/local/X11R6/lib/app-defaults           \
7472     /usr/local/X11R5/lib/app-defaults           \
7473     /usr/local/X11R4/lib/app-defaults           \
7474                                                 \
7475     /usr/local/lib/X11/app-defaults             \
7476     /usr/local/lib/X11R6/app-defaults           \
7477     /usr/local/lib/X11R6/X11/app-defaults       \
7478     /usr/local/lib/X11R5/app-defaults           \
7479     /usr/local/lib/X11R5/X11/app-defaults       \
7480     /usr/local/lib/X11R4/app-defaults           \
7481     /usr/local/lib/X11R4/X11/app-defaults       \
7482                                                 \
7483     /usr/X386/lib/X11/app-defaults              \
7484     /usr/x386/lib/X11/app-defaults              \
7485     /usr/XFree86/lib/X11/app-defaults           \
7486                                                 \
7487     /usr/lib/X11/app-defaults                   \
7488     /usr/local/lib/X11/app-defaults             \
7489     /usr/unsupported/lib/X11/app-defaults       \
7490     /usr/athena/lib/X11/app-defaults            \
7491     /usr/local/x11r5/lib/X11/app-defaults       \
7492     /usr/lpp/Xamples/lib/X11/app-defaults       \
7493     /lib/usr/lib/X11/app-defaults               \
7494                                                 \
7495     /usr/openwin/lib/app-defaults               \
7496     /usr/openwin/lib/X11/app-defaults           \
7497     /usr/openwin/share/lib/app-defaults         \
7498     /usr/openwin/share/lib/X11/app-defaults     \
7499                                                 \
7500     /X11R6/lib/app-defaults                     \
7501     /X11R5/lib/app-defaults                     \
7502     /X11R4/lib/app-defaults                     \
7503     ; \
7504   do
7505     if test -d "$ac_dir"; then
7506       ac_x_app_defaults=$ac_dir
7507       break
7508     fi
7509   done
7510
7511       fi
7512       if test x"$ac_x_app_defaults" = x; then
7513         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7514       else
7515         # Record where we found app-defaults for the cache.
7516         ac_cv_x_app_defaults="$ac_x_app_defaults"
7517       fi
7518 fi
7519 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7520 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7521     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7522 case "$host" in
7523     *-hpux*)
7524
7525       # The following arcana was gleaned from conversations with
7526       # Eric Schwartz <erics@col.hp.com>:
7527       #
7528       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7529       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7530       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7531       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7532       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7533       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7534       # you don't need any -I or -L arguments.
7535       #
7536       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7537       # are the same division as 10.x.  However, there are no symlinks to
7538       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7539       # arguments are always necessary.
7540       #
7541       # However, X11R6 was available on HPUX 9.x as a patch: if that
7542       # patch was installed, then all of X11R6 went in to
7543       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7544       #
7545       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7546       # whether R5 was available as a patch; R6 undoubtedly was not.)
7547       #
7548       # So.  We try and use the highest numbered pair of
7549       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7550       # that are available.  We do not mix and match different versions
7551       # of X.
7552       #
7553       # Question I still don't know the answer to: (do you?)
7554       #
7555       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7556       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7557       #     that contrib directory?  Did it contain so-called "standard"
7558       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7559       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7560       #     be a situation where one had to reach into the R5 headers and
7561       #     libs to find Xmu?  That is, must both R6 and R5 directories
7562       #     be on the -I and -L lists in that case?
7563       #
7564       for version in X11R6 X11R5 X11R4 ; do
7565         # if either pair of directories exists...
7566         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7567         then
7568            # if contrib exists, use it...
7569            if test -d /usr/contrib/$version/include ; then
7570              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7571              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7572            fi
7573            # if the "standard" one exists, use it.
7574            if test -d /usr/include/$version ; then
7575              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7576              X_LIBS="$X_LIBS -L/usr/lib/$version"
7577            fi
7578            # since at least one of the pair exists, go no farther.
7579            break
7580         fi
7581       done
7582
7583       # Now find Motif.  Thanks for not making xmkmf find this by
7584       # default, you losers.
7585       #
7586       if test -d /usr/include/Motif2.1 ; then
7587         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7588         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7589       elif test -d /usr/include/Motif1.2 ; then
7590         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7591         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7592       elif test -d /usr/include/Motif1.1 ; then
7593         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7594         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7595       fi
7596
7597       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7598       #
7599       if test -d /opt/graphics/OpenGL/include ; then
7600         # HP-UX 10.20 puts it here
7601         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7602         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7603       elif test -d /opt/Mesa/lib ; then
7604         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7605         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7606       fi
7607
7608
7609       if test -d /opt/xpm/lib/X11 ; then
7610         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7611         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7612       fi
7613
7614       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7615       # in /usr/local/, unless there is already an xscreensaver in
7616       # /usr/local/bin/.  This can be overridden with the --prefix arg
7617       # to configure.  I'm not sure this is the right thing to do, but
7618       # Richard Lloyd says so...
7619       #
7620       if test \! -x /usr/local/bin/xscreensaver ; then
7621         ac_default_prefix=/opt/xscreensaver
7622       fi
7623
7624     ;;
7625     *-solaris*)
7626
7627       # Thanks for not making xmkmf find this by default, pinheads.
7628       # And thanks for moving things around again, too.  Is this
7629       # really the standard location now?  What happened to the
7630       # joke that this kind of thing went in /opt?
7631       # cthomp says "answer: CDE (Common Disorganized Environment)"
7632       #
7633       if test -f /usr/dt/include/Xm/Xm.h ; then
7634         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7635         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7636
7637         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7638         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7639 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7640 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7641   echo $ECHO_N "(cached) $ECHO_C" >&6
7642 else
7643   ac_check_lib_save_LIBS=$LIBS
7644 LIBS="-lgen  $LIBS"
7645 cat >conftest.$ac_ext <<_ACEOF
7646 /* confdefs.h.  */
7647 _ACEOF
7648 cat confdefs.h >>conftest.$ac_ext
7649 cat >>conftest.$ac_ext <<_ACEOF
7650 /* end confdefs.h.  */
7651
7652 /* Override any GCC internal prototype to avoid an error.
7653    Use char because int might match the return type of a GCC
7654    builtin and then its argument prototype would still apply.  */
7655 #ifdef __cplusplus
7656 extern "C"
7657 #endif
7658 char regcmp ();
7659 int
7660 main ()
7661 {
7662 return regcmp ();
7663   ;
7664   return 0;
7665 }
7666 _ACEOF
7667 rm -rf conftest.$ac_objext conftest$ac_exeext
7668 if { (ac_try="$ac_link"
7669 case "(($ac_try" in
7670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7671   *) ac_try_echo=$ac_try;;
7672 esac
7673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7674   (eval "$ac_link") 2>conftest.er1
7675   ac_status=$?
7676   grep -v '^ *+' conftest.er1 >conftest.err
7677   rm -rf conftest.er1
7678   cat conftest.err >&5
7679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680   (exit $ac_status); } && {
7681          test -z "$ac_c_werror_flag" ||
7682          test ! -s conftest.err
7683        } && test -s conftest$ac_exeext &&
7684        $as_test_x conftest$ac_exeext; then
7685   ac_cv_lib_gen_regcmp=yes
7686 else
7687   echo "$as_me: failed program was:" >&5
7688 sed 's/^/| /' conftest.$ac_ext >&5
7689
7690         ac_cv_lib_gen_regcmp=no
7691 fi
7692
7693 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7694       conftest$ac_exeext conftest.$ac_ext
7695 LIBS=$ac_check_lib_save_LIBS
7696 fi
7697 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7698 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7699 if test $ac_cv_lib_gen_regcmp = yes; then
7700   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7701 fi
7702
7703       fi
7704
7705     ;;
7706     *-darwin*)
7707
7708       # On MacOS X (10.x with "fink"), many things are under /sw/.
7709       #
7710       if test -d /sw/include ; then
7711         X_CFLAGS="-I/sw/include $X_CFLAGS"
7712         X_LIBS="-L/sw/lib $X_LIBS"
7713       fi
7714     ;;
7715   esac
7716 { echo "$as_me:$LINENO: checking for XPointer" >&5
7717 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7718 if test "${ac_cv_xpointer+set}" = set; then
7719   echo $ECHO_N "(cached) $ECHO_C" >&6
7720 else
7721
7722   ac_save_CPPFLAGS="$CPPFLAGS"
7723   if test \! -z "$includedir" ; then
7724     CPPFLAGS="$CPPFLAGS -I$includedir"
7725   fi
7726   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7727   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7728   cat >conftest.$ac_ext <<_ACEOF
7729 /* confdefs.h.  */
7730 _ACEOF
7731 cat confdefs.h >>conftest.$ac_ext
7732 cat >>conftest.$ac_ext <<_ACEOF
7733 /* end confdefs.h.  */
7734 #include <X11/Xlib.h>
7735 int
7736 main ()
7737 {
7738 XPointer foo = (XPointer) 0;
7739   ;
7740   return 0;
7741 }
7742 _ACEOF
7743 rm -rf conftest.$ac_objext
7744 if { (ac_try="$ac_compile"
7745 case "(($ac_try" in
7746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7747   *) ac_try_echo=$ac_try;;
7748 esac
7749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7750   (eval "$ac_compile") 2>conftest.er1
7751   ac_status=$?
7752   grep -v '^ *+' conftest.er1 >conftest.err
7753   rm -rf conftest.er1
7754   cat conftest.err >&5
7755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756   (exit $ac_status); } && {
7757          test -z "$ac_c_werror_flag" ||
7758          test ! -s conftest.err
7759        } && test -s conftest.$ac_objext; then
7760   ac_cv_xpointer=yes
7761 else
7762   echo "$as_me: failed program was:" >&5
7763 sed 's/^/| /' conftest.$ac_ext >&5
7764
7765         ac_cv_xpointer=no
7766 fi
7767
7768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7769   CPPFLAGS="$ac_save_CPPFLAGS"
7770 fi
7771 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7772 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7773   if test "$ac_cv_xpointer" != yes; then
7774    cat >>confdefs.h <<\_ACEOF
7775 #define XPointer char*
7776 _ACEOF
7777
7778   fi
7779
7780 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7781 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7782   ac_macosx=no
7783   case "$host" in
7784     *-apple-darwin* )
7785       ac_macosx=yes
7786     ;;
7787   esac
7788 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7789 echo "${ECHO_T}$ac_macosx" >&6; }
7790
7791
7792 ###############################################################################
7793 #
7794 #       Gettext support
7795 #
7796 ###############################################################################
7797
7798
7799
7800 if test -n ""; then
7801     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7802 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7803
7804     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7805     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7806
7807     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7808
7809
7810     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7811         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7812 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7813     else
7814         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7815 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7816         exit 1
7817     fi
7818 fi
7819
7820   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'
7821 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'
7822      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'
7823       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7824      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'
7825    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'
7826     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'
7827 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'
7828        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'
7829       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'
7830     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'
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844 # Use the tools built into the package, not the ones that are installed.
7845
7846 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7847 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7848 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7849
7850
7851
7852
7853
7854 # Extract the first word of "perl", so it can be a program name with args.
7855 set dummy perl; ac_word=$2
7856 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7858 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7859   echo $ECHO_N "(cached) $ECHO_C" >&6
7860 else
7861   case $INTLTOOL_PERL in
7862   [\\/]* | ?:[\\/]*)
7863   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7864   ;;
7865   *)
7866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869   IFS=$as_save_IFS
7870   test -z "$as_dir" && as_dir=.
7871   for ac_exec_ext in '' $ac_executable_extensions; do
7872   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7873     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7874     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7875     break 2
7876   fi
7877 done
7878 done
7879 IFS=$as_save_IFS
7880
7881   ;;
7882 esac
7883 fi
7884 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7885 if test -n "$INTLTOOL_PERL"; then
7886   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7887 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7888 else
7889   { echo "$as_me:$LINENO: result: no" >&5
7890 echo "${ECHO_T}no" >&6; }
7891 fi
7892
7893
7894 if test -z "$INTLTOOL_PERL"; then
7895    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7896 echo "$as_me: error: perl not found; required for intltool" >&2;}
7897    { (exit 1); exit 1; }; }
7898 fi
7899 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7900    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7901 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7902    { (exit 1); exit 1; }; }
7903 fi
7904
7905 # Remove file type tags (using []) from po/POTFILES.
7906
7907
7908
7909
7910
7911
7912
7913 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7914
7915 ac_config_commands="$ac_config_commands default-1"
7916
7917
7918
7919 GETTEXT_PACKAGE=xscreensaver
7920
7921 cat >>confdefs.h <<_ACEOF
7922 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7923 _ACEOF
7924
7925
7926 cat >>confdefs.h <<_ACEOF
7927 #define PACKAGE "$GETTEXT_PACKAGE"
7928 _ACEOF
7929
7930
7931
7932 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"
7933 if test -n "$ac_tool_prefix"; then
7934   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7935 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7936 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7938 if test "${ac_cv_prog_RANLIB+set}" = set; then
7939   echo $ECHO_N "(cached) $ECHO_C" >&6
7940 else
7941   if test -n "$RANLIB"; then
7942   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7943 else
7944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945 for as_dir in $PATH
7946 do
7947   IFS=$as_save_IFS
7948   test -z "$as_dir" && as_dir=.
7949   for ac_exec_ext in '' $ac_executable_extensions; do
7950   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7951     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7952     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7953     break 2
7954   fi
7955 done
7956 done
7957 IFS=$as_save_IFS
7958
7959 fi
7960 fi
7961 RANLIB=$ac_cv_prog_RANLIB
7962 if test -n "$RANLIB"; then
7963   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7964 echo "${ECHO_T}$RANLIB" >&6; }
7965 else
7966   { echo "$as_me:$LINENO: result: no" >&5
7967 echo "${ECHO_T}no" >&6; }
7968 fi
7969
7970
7971 fi
7972 if test -z "$ac_cv_prog_RANLIB"; then
7973   ac_ct_RANLIB=$RANLIB
7974   # Extract the first word of "ranlib", so it can be a program name with args.
7975 set dummy ranlib; ac_word=$2
7976 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7978 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7979   echo $ECHO_N "(cached) $ECHO_C" >&6
7980 else
7981   if test -n "$ac_ct_RANLIB"; then
7982   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7983 else
7984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7985 for as_dir in $PATH
7986 do
7987   IFS=$as_save_IFS
7988   test -z "$as_dir" && as_dir=.
7989   for ac_exec_ext in '' $ac_executable_extensions; do
7990   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7991     ac_cv_prog_ac_ct_RANLIB="ranlib"
7992     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7993     break 2
7994   fi
7995 done
7996 done
7997 IFS=$as_save_IFS
7998
7999 fi
8000 fi
8001 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8002 if test -n "$ac_ct_RANLIB"; then
8003   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8004 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8005 else
8006   { echo "$as_me:$LINENO: result: no" >&5
8007 echo "${ECHO_T}no" >&6; }
8008 fi
8009
8010   if test "x$ac_ct_RANLIB" = x; then
8011     RANLIB=":"
8012   else
8013     case $cross_compiling:$ac_tool_warned in
8014 yes:)
8015 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8016 whose name does not start with the host triplet.  If you think this
8017 configuration is useful to you, please write to autoconf@gnu.org." >&5
8018 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8019 whose name does not start with the host triplet.  If you think this
8020 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8021 ac_tool_warned=yes ;;
8022 esac
8023     RANLIB=$ac_ct_RANLIB
8024   fi
8025 else
8026   RANLIB="$ac_cv_prog_RANLIB"
8027 fi
8028
8029 { echo "$as_me:$LINENO: checking for off_t" >&5
8030 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8031 if test "${ac_cv_type_off_t+set}" = set; then
8032   echo $ECHO_N "(cached) $ECHO_C" >&6
8033 else
8034   cat >conftest.$ac_ext <<_ACEOF
8035 /* confdefs.h.  */
8036 _ACEOF
8037 cat confdefs.h >>conftest.$ac_ext
8038 cat >>conftest.$ac_ext <<_ACEOF
8039 /* end confdefs.h.  */
8040 $ac_includes_default
8041 typedef off_t ac__type_new_;
8042 int
8043 main ()
8044 {
8045 if ((ac__type_new_ *) 0)
8046   return 0;
8047 if (sizeof (ac__type_new_))
8048   return 0;
8049   ;
8050   return 0;
8051 }
8052 _ACEOF
8053 rm -rf conftest.$ac_objext
8054 if { (ac_try="$ac_compile"
8055 case "(($ac_try" in
8056   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057   *) ac_try_echo=$ac_try;;
8058 esac
8059 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8060   (eval "$ac_compile") 2>conftest.er1
8061   ac_status=$?
8062   grep -v '^ *+' conftest.er1 >conftest.err
8063   rm -rf conftest.er1
8064   cat conftest.err >&5
8065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066   (exit $ac_status); } && {
8067          test -z "$ac_c_werror_flag" ||
8068          test ! -s conftest.err
8069        } && test -s conftest.$ac_objext; then
8070   ac_cv_type_off_t=yes
8071 else
8072   echo "$as_me: failed program was:" >&5
8073 sed 's/^/| /' conftest.$ac_ext >&5
8074
8075         ac_cv_type_off_t=no
8076 fi
8077
8078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8079 fi
8080 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8081 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8082 if test $ac_cv_type_off_t = yes; then
8083   :
8084 else
8085
8086 cat >>confdefs.h <<_ACEOF
8087 #define off_t long int
8088 _ACEOF
8089
8090 fi
8091
8092 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8093 # for constant arguments.  Useless!
8094 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8095 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8096 if test "${ac_cv_working_alloca_h+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 #include <alloca.h>
8106 int
8107 main ()
8108 {
8109 char *p = (char *) alloca (2 * sizeof (int));
8110                           if (p) return 0;
8111   ;
8112   return 0;
8113 }
8114 _ACEOF
8115 rm -rf conftest.$ac_objext conftest$ac_exeext
8116 if { (ac_try="$ac_link"
8117 case "(($ac_try" in
8118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8119   *) ac_try_echo=$ac_try;;
8120 esac
8121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8122   (eval "$ac_link") 2>conftest.er1
8123   ac_status=$?
8124   grep -v '^ *+' conftest.er1 >conftest.err
8125   rm -rf conftest.er1
8126   cat conftest.err >&5
8127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128   (exit $ac_status); } && {
8129          test -z "$ac_c_werror_flag" ||
8130          test ! -s conftest.err
8131        } && test -s conftest$ac_exeext &&
8132        $as_test_x conftest$ac_exeext; then
8133   ac_cv_working_alloca_h=yes
8134 else
8135   echo "$as_me: failed program was:" >&5
8136 sed 's/^/| /' conftest.$ac_ext >&5
8137
8138         ac_cv_working_alloca_h=no
8139 fi
8140
8141 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8142       conftest$ac_exeext conftest.$ac_ext
8143 fi
8144 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8145 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8146 if test $ac_cv_working_alloca_h = yes; then
8147
8148 cat >>confdefs.h <<\_ACEOF
8149 #define HAVE_ALLOCA_H 1
8150 _ACEOF
8151
8152 fi
8153
8154 { echo "$as_me:$LINENO: checking for alloca" >&5
8155 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8156 if test "${ac_cv_func_alloca_works+set}" = set; then
8157   echo $ECHO_N "(cached) $ECHO_C" >&6
8158 else
8159   cat >conftest.$ac_ext <<_ACEOF
8160 /* confdefs.h.  */
8161 _ACEOF
8162 cat confdefs.h >>conftest.$ac_ext
8163 cat >>conftest.$ac_ext <<_ACEOF
8164 /* end confdefs.h.  */
8165 #ifdef __GNUC__
8166 # define alloca __builtin_alloca
8167 #else
8168 # ifdef _MSC_VER
8169 #  include <malloc.h>
8170 #  define alloca _alloca
8171 # else
8172 #  ifdef HAVE_ALLOCA_H
8173 #   include <alloca.h>
8174 #  else
8175 #   ifdef _AIX
8176  #pragma alloca
8177 #   else
8178 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8179 char *alloca ();
8180 #    endif
8181 #   endif
8182 #  endif
8183 # endif
8184 #endif
8185
8186 int
8187 main ()
8188 {
8189 char *p = (char *) alloca (1);
8190                                     if (p) return 0;
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195 rm -rf conftest.$ac_objext conftest$ac_exeext
8196 if { (ac_try="$ac_link"
8197 case "(($ac_try" in
8198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8199   *) ac_try_echo=$ac_try;;
8200 esac
8201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8202   (eval "$ac_link") 2>conftest.er1
8203   ac_status=$?
8204   grep -v '^ *+' conftest.er1 >conftest.err
8205   rm -rf conftest.er1
8206   cat conftest.err >&5
8207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208   (exit $ac_status); } && {
8209          test -z "$ac_c_werror_flag" ||
8210          test ! -s conftest.err
8211        } && test -s conftest$ac_exeext &&
8212        $as_test_x conftest$ac_exeext; then
8213   ac_cv_func_alloca_works=yes
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 sed 's/^/| /' conftest.$ac_ext >&5
8217
8218         ac_cv_func_alloca_works=no
8219 fi
8220
8221 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8222       conftest$ac_exeext conftest.$ac_ext
8223 fi
8224 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8225 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8226
8227 if test $ac_cv_func_alloca_works = yes; then
8228
8229 cat >>confdefs.h <<\_ACEOF
8230 #define HAVE_ALLOCA 1
8231 _ACEOF
8232
8233 else
8234   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8235 # that cause trouble.  Some versions do not even contain alloca or
8236 # contain a buggy version.  If you still want to use their alloca,
8237 # use ar to extract alloca.o from them instead of compiling alloca.c.
8238
8239 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8240
8241 cat >>confdefs.h <<\_ACEOF
8242 #define C_ALLOCA 1
8243 _ACEOF
8244
8245
8246 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8247 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8248 if test "${ac_cv_os_cray+set}" = set; then
8249   echo $ECHO_N "(cached) $ECHO_C" >&6
8250 else
8251   cat >conftest.$ac_ext <<_ACEOF
8252 /* confdefs.h.  */
8253 _ACEOF
8254 cat confdefs.h >>conftest.$ac_ext
8255 cat >>conftest.$ac_ext <<_ACEOF
8256 /* end confdefs.h.  */
8257 #if defined CRAY && ! defined CRAY2
8258 webecray
8259 #else
8260 wenotbecray
8261 #endif
8262
8263 _ACEOF
8264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8265   $EGREP "webecray" >/dev/null 2>&1; then
8266   ac_cv_os_cray=yes
8267 else
8268   ac_cv_os_cray=no
8269 fi
8270 rm -rf conftest*
8271
8272 fi
8273 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8274 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8275 if test $ac_cv_os_cray = yes; then
8276   for ac_func in _getb67 GETB67 getb67; do
8277     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8278 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8279 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8280 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283   cat >conftest.$ac_ext <<_ACEOF
8284 /* confdefs.h.  */
8285 _ACEOF
8286 cat confdefs.h >>conftest.$ac_ext
8287 cat >>conftest.$ac_ext <<_ACEOF
8288 /* end confdefs.h.  */
8289 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8290    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8291 #define $ac_func innocuous_$ac_func
8292
8293 /* System header to define __stub macros and hopefully few prototypes,
8294     which can conflict with char $ac_func (); below.
8295     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8296     <limits.h> exists even on freestanding compilers.  */
8297
8298 #ifdef __STDC__
8299 # include <limits.h>
8300 #else
8301 # include <assert.h>
8302 #endif
8303
8304 #undef $ac_func
8305
8306 /* Override any GCC internal prototype to avoid an error.
8307    Use char because int might match the return type of a GCC
8308    builtin and then its argument prototype would still apply.  */
8309 #ifdef __cplusplus
8310 extern "C"
8311 #endif
8312 char $ac_func ();
8313 /* The GNU C library defines this for functions which it implements
8314     to always fail with ENOSYS.  Some functions are actually named
8315     something starting with __ and the normal name is an alias.  */
8316 #if defined __stub_$ac_func || defined __stub___$ac_func
8317 choke me
8318 #endif
8319
8320 int
8321 main ()
8322 {
8323 return $ac_func ();
8324   ;
8325   return 0;
8326 }
8327 _ACEOF
8328 rm -rf conftest.$ac_objext conftest$ac_exeext
8329 if { (ac_try="$ac_link"
8330 case "(($ac_try" in
8331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8332   *) ac_try_echo=$ac_try;;
8333 esac
8334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8335   (eval "$ac_link") 2>conftest.er1
8336   ac_status=$?
8337   grep -v '^ *+' conftest.er1 >conftest.err
8338   rm -rf conftest.er1
8339   cat conftest.err >&5
8340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341   (exit $ac_status); } && {
8342          test -z "$ac_c_werror_flag" ||
8343          test ! -s conftest.err
8344        } && test -s conftest$ac_exeext &&
8345        $as_test_x conftest$ac_exeext; then
8346   eval "$as_ac_var=yes"
8347 else
8348   echo "$as_me: failed program was:" >&5
8349 sed 's/^/| /' conftest.$ac_ext >&5
8350
8351         eval "$as_ac_var=no"
8352 fi
8353
8354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8355       conftest$ac_exeext conftest.$ac_ext
8356 fi
8357 ac_res=`eval echo '${'$as_ac_var'}'`
8358                { echo "$as_me:$LINENO: result: $ac_res" >&5
8359 echo "${ECHO_T}$ac_res" >&6; }
8360 if test `eval echo '${'$as_ac_var'}'` = yes; then
8361
8362 cat >>confdefs.h <<_ACEOF
8363 #define CRAY_STACKSEG_END $ac_func
8364 _ACEOF
8365
8366     break
8367 fi
8368
8369   done
8370 fi
8371
8372 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8373 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8374 if test "${ac_cv_c_stack_direction+set}" = set; then
8375   echo $ECHO_N "(cached) $ECHO_C" >&6
8376 else
8377   if test "$cross_compiling" = yes; then
8378   ac_cv_c_stack_direction=0
8379 else
8380   cat >conftest.$ac_ext <<_ACEOF
8381 /* confdefs.h.  */
8382 _ACEOF
8383 cat confdefs.h >>conftest.$ac_ext
8384 cat >>conftest.$ac_ext <<_ACEOF
8385 /* end confdefs.h.  */
8386 $ac_includes_default
8387 int
8388 find_stack_direction ()
8389 {
8390   static char *addr = 0;
8391   auto char dummy;
8392   if (addr == 0)
8393     {
8394       addr = &dummy;
8395       return find_stack_direction ();
8396     }
8397   else
8398     return (&dummy > addr) ? 1 : -1;
8399 }
8400
8401 int
8402 main ()
8403 {
8404   return find_stack_direction () < 0;
8405 }
8406 _ACEOF
8407 rm -rf conftest$ac_exeext
8408 if { (ac_try="$ac_link"
8409 case "(($ac_try" in
8410   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8411   *) ac_try_echo=$ac_try;;
8412 esac
8413 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8414   (eval "$ac_link") 2>&5
8415   ac_status=$?
8416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8418   { (case "(($ac_try" in
8419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420   *) ac_try_echo=$ac_try;;
8421 esac
8422 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423   (eval "$ac_try") 2>&5
8424   ac_status=$?
8425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426   (exit $ac_status); }; }; then
8427   ac_cv_c_stack_direction=1
8428 else
8429   echo "$as_me: program exited with status $ac_status" >&5
8430 echo "$as_me: failed program was:" >&5
8431 sed 's/^/| /' conftest.$ac_ext >&5
8432
8433 ( exit $ac_status )
8434 ac_cv_c_stack_direction=-1
8435 fi
8436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8437 fi
8438
8439
8440 fi
8441 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8442 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8443
8444 cat >>confdefs.h <<_ACEOF
8445 #define STACK_DIRECTION $ac_cv_c_stack_direction
8446 _ACEOF
8447
8448
8449 fi
8450
8451
8452
8453 for ac_header in stdlib.h unistd.h
8454 do
8455 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8456 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8457   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8459 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8460   echo $ECHO_N "(cached) $ECHO_C" >&6
8461 fi
8462 ac_res=`eval echo '${'$as_ac_Header'}'`
8463                { echo "$as_me:$LINENO: result: $ac_res" >&5
8464 echo "${ECHO_T}$ac_res" >&6; }
8465 else
8466   # Is the header compilable?
8467 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8468 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8469 cat >conftest.$ac_ext <<_ACEOF
8470 /* confdefs.h.  */
8471 _ACEOF
8472 cat confdefs.h >>conftest.$ac_ext
8473 cat >>conftest.$ac_ext <<_ACEOF
8474 /* end confdefs.h.  */
8475 $ac_includes_default
8476 #include <$ac_header>
8477 _ACEOF
8478 rm -rf conftest.$ac_objext
8479 if { (ac_try="$ac_compile"
8480 case "(($ac_try" in
8481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8482   *) ac_try_echo=$ac_try;;
8483 esac
8484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8485   (eval "$ac_compile") 2>conftest.er1
8486   ac_status=$?
8487   grep -v '^ *+' conftest.er1 >conftest.err
8488   rm -rf conftest.er1
8489   cat conftest.err >&5
8490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491   (exit $ac_status); } && {
8492          test -z "$ac_c_werror_flag" ||
8493          test ! -s conftest.err
8494        } && test -s conftest.$ac_objext; then
8495   ac_header_compiler=yes
8496 else
8497   echo "$as_me: failed program was:" >&5
8498 sed 's/^/| /' conftest.$ac_ext >&5
8499
8500         ac_header_compiler=no
8501 fi
8502
8503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8504 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8505 echo "${ECHO_T}$ac_header_compiler" >&6; }
8506
8507 # Is the header present?
8508 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8509 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8510 cat >conftest.$ac_ext <<_ACEOF
8511 /* confdefs.h.  */
8512 _ACEOF
8513 cat confdefs.h >>conftest.$ac_ext
8514 cat >>conftest.$ac_ext <<_ACEOF
8515 /* end confdefs.h.  */
8516 #include <$ac_header>
8517 _ACEOF
8518 if { (ac_try="$ac_cpp conftest.$ac_ext"
8519 case "(($ac_try" in
8520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8521   *) ac_try_echo=$ac_try;;
8522 esac
8523 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8524   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8525   ac_status=$?
8526   grep -v '^ *+' conftest.er1 >conftest.err
8527   rm -rf conftest.er1
8528   cat conftest.err >&5
8529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8530   (exit $ac_status); } >/dev/null && {
8531          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8532          test ! -s conftest.err
8533        }; then
8534   ac_header_preproc=yes
8535 else
8536   echo "$as_me: failed program was:" >&5
8537 sed 's/^/| /' conftest.$ac_ext >&5
8538
8539   ac_header_preproc=no
8540 fi
8541
8542 rm -rf conftest.err conftest.$ac_ext
8543 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8544 echo "${ECHO_T}$ac_header_preproc" >&6; }
8545
8546 # So?  What about this header?
8547 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8548   yes:no: )
8549     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8550 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8551     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8552 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8553     ac_header_preproc=yes
8554     ;;
8555   no:yes:* )
8556     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8557 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8558     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8559 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8560     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8561 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8562     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8563 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8564     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8565 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8566     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8567 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8568
8569     ;;
8570 esac
8571 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8572 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8573 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8574   echo $ECHO_N "(cached) $ECHO_C" >&6
8575 else
8576   eval "$as_ac_Header=\$ac_header_preproc"
8577 fi
8578 ac_res=`eval echo '${'$as_ac_Header'}'`
8579                { echo "$as_me:$LINENO: result: $ac_res" >&5
8580 echo "${ECHO_T}$ac_res" >&6; }
8581
8582 fi
8583 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8584   cat >>confdefs.h <<_ACEOF
8585 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8586 _ACEOF
8587
8588 fi
8589
8590 done
8591
8592
8593 for ac_func in getpagesize
8594 do
8595 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8596 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8597 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8598 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8599   echo $ECHO_N "(cached) $ECHO_C" >&6
8600 else
8601   cat >conftest.$ac_ext <<_ACEOF
8602 /* confdefs.h.  */
8603 _ACEOF
8604 cat confdefs.h >>conftest.$ac_ext
8605 cat >>conftest.$ac_ext <<_ACEOF
8606 /* end confdefs.h.  */
8607 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8608    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8609 #define $ac_func innocuous_$ac_func
8610
8611 /* System header to define __stub macros and hopefully few prototypes,
8612     which can conflict with char $ac_func (); below.
8613     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8614     <limits.h> exists even on freestanding compilers.  */
8615
8616 #ifdef __STDC__
8617 # include <limits.h>
8618 #else
8619 # include <assert.h>
8620 #endif
8621
8622 #undef $ac_func
8623
8624 /* Override any GCC internal prototype to avoid an error.
8625    Use char because int might match the return type of a GCC
8626    builtin and then its argument prototype would still apply.  */
8627 #ifdef __cplusplus
8628 extern "C"
8629 #endif
8630 char $ac_func ();
8631 /* The GNU C library defines this for functions which it implements
8632     to always fail with ENOSYS.  Some functions are actually named
8633     something starting with __ and the normal name is an alias.  */
8634 #if defined __stub_$ac_func || defined __stub___$ac_func
8635 choke me
8636 #endif
8637
8638 int
8639 main ()
8640 {
8641 return $ac_func ();
8642   ;
8643   return 0;
8644 }
8645 _ACEOF
8646 rm -rf conftest.$ac_objext conftest$ac_exeext
8647 if { (ac_try="$ac_link"
8648 case "(($ac_try" in
8649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8650   *) ac_try_echo=$ac_try;;
8651 esac
8652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8653   (eval "$ac_link") 2>conftest.er1
8654   ac_status=$?
8655   grep -v '^ *+' conftest.er1 >conftest.err
8656   rm -rf conftest.er1
8657   cat conftest.err >&5
8658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659   (exit $ac_status); } && {
8660          test -z "$ac_c_werror_flag" ||
8661          test ! -s conftest.err
8662        } && test -s conftest$ac_exeext &&
8663        $as_test_x conftest$ac_exeext; then
8664   eval "$as_ac_var=yes"
8665 else
8666   echo "$as_me: failed program was:" >&5
8667 sed 's/^/| /' conftest.$ac_ext >&5
8668
8669         eval "$as_ac_var=no"
8670 fi
8671
8672 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8673       conftest$ac_exeext conftest.$ac_ext
8674 fi
8675 ac_res=`eval echo '${'$as_ac_var'}'`
8676                { echo "$as_me:$LINENO: result: $ac_res" >&5
8677 echo "${ECHO_T}$ac_res" >&6; }
8678 if test `eval echo '${'$as_ac_var'}'` = yes; then
8679   cat >>confdefs.h <<_ACEOF
8680 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8681 _ACEOF
8682
8683 fi
8684 done
8685
8686 { echo "$as_me:$LINENO: checking for working mmap" >&5
8687 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8688 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8689   echo $ECHO_N "(cached) $ECHO_C" >&6
8690 else
8691   if test "$cross_compiling" = yes; then
8692   ac_cv_func_mmap_fixed_mapped=no
8693 else
8694   cat >conftest.$ac_ext <<_ACEOF
8695 /* confdefs.h.  */
8696 _ACEOF
8697 cat confdefs.h >>conftest.$ac_ext
8698 cat >>conftest.$ac_ext <<_ACEOF
8699 /* end confdefs.h.  */
8700 $ac_includes_default
8701 /* malloc might have been renamed as rpl_malloc. */
8702 #undef malloc
8703
8704 /* Thanks to Mike Haertel and Jim Avera for this test.
8705    Here is a matrix of mmap possibilities:
8706         mmap private not fixed
8707         mmap private fixed at somewhere currently unmapped
8708         mmap private fixed at somewhere already mapped
8709         mmap shared not fixed
8710         mmap shared fixed at somewhere currently unmapped
8711         mmap shared fixed at somewhere already mapped
8712    For private mappings, we should verify that changes cannot be read()
8713    back from the file, nor mmap's back from the file at a different
8714    address.  (There have been systems where private was not correctly
8715    implemented like the infamous i386 svr4.0, and systems where the
8716    VM page cache was not coherent with the file system buffer cache
8717    like early versions of FreeBSD and possibly contemporary NetBSD.)
8718    For shared mappings, we should conversely verify that changes get
8719    propagated back to all the places they're supposed to be.
8720
8721    Grep wants private fixed already mapped.
8722    The main things grep needs to know about mmap are:
8723    * does it exist and is it safe to write into the mmap'd area
8724    * how to use it (BSD variants)  */
8725
8726 #include <fcntl.h>
8727 #include <sys/mman.h>
8728
8729 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8730 char *malloc ();
8731 #endif
8732
8733 /* This mess was copied from the GNU getpagesize.h.  */
8734 #ifndef HAVE_GETPAGESIZE
8735 /* Assume that all systems that can run configure have sys/param.h.  */
8736 # ifndef HAVE_SYS_PARAM_H
8737 #  define HAVE_SYS_PARAM_H 1
8738 # endif
8739
8740 # ifdef _SC_PAGESIZE
8741 #  define getpagesize() sysconf(_SC_PAGESIZE)
8742 # else /* no _SC_PAGESIZE */
8743 #  ifdef HAVE_SYS_PARAM_H
8744 #   include <sys/param.h>
8745 #   ifdef EXEC_PAGESIZE
8746 #    define getpagesize() EXEC_PAGESIZE
8747 #   else /* no EXEC_PAGESIZE */
8748 #    ifdef NBPG
8749 #     define getpagesize() NBPG * CLSIZE
8750 #     ifndef CLSIZE
8751 #      define CLSIZE 1
8752 #     endif /* no CLSIZE */
8753 #    else /* no NBPG */
8754 #     ifdef NBPC
8755 #      define getpagesize() NBPC
8756 #     else /* no NBPC */
8757 #      ifdef PAGESIZE
8758 #       define getpagesize() PAGESIZE
8759 #      endif /* PAGESIZE */
8760 #     endif /* no NBPC */
8761 #    endif /* no NBPG */
8762 #   endif /* no EXEC_PAGESIZE */
8763 #  else /* no HAVE_SYS_PARAM_H */
8764 #   define getpagesize() 8192   /* punt totally */
8765 #  endif /* no HAVE_SYS_PARAM_H */
8766 # endif /* no _SC_PAGESIZE */
8767
8768 #endif /* no HAVE_GETPAGESIZE */
8769
8770 int
8771 main ()
8772 {
8773   char *data, *data2, *data3;
8774   int i, pagesize;
8775   int fd;
8776
8777   pagesize = getpagesize ();
8778
8779   /* First, make a file with some known garbage in it. */
8780   data = (char *) malloc (pagesize);
8781   if (!data)
8782     return 1;
8783   for (i = 0; i < pagesize; ++i)
8784     *(data + i) = rand ();
8785   umask (0);
8786   fd = creat ("conftest.mmap", 0600);
8787   if (fd < 0)
8788     return 1;
8789   if (write (fd, data, pagesize) != pagesize)
8790     return 1;
8791   close (fd);
8792
8793   /* Next, try to mmap the file at a fixed address which already has
8794      something else allocated at it.  If we can, also make sure that
8795      we see the same garbage.  */
8796   fd = open ("conftest.mmap", O_RDWR);
8797   if (fd < 0)
8798     return 1;
8799   data2 = (char *) malloc (2 * pagesize);
8800   if (!data2)
8801     return 1;
8802   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8803   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8804                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8805     return 1;
8806   for (i = 0; i < pagesize; ++i)
8807     if (*(data + i) != *(data2 + i))
8808       return 1;
8809
8810   /* Finally, make sure that changes to the mapped area do not
8811      percolate back to the file as seen by read().  (This is a bug on
8812      some variants of i386 svr4.0.)  */
8813   for (i = 0; i < pagesize; ++i)
8814     *(data2 + i) = *(data2 + i) + 1;
8815   data3 = (char *) malloc (pagesize);
8816   if (!data3)
8817     return 1;
8818   if (read (fd, data3, pagesize) != pagesize)
8819     return 1;
8820   for (i = 0; i < pagesize; ++i)
8821     if (*(data + i) != *(data3 + i))
8822       return 1;
8823   close (fd);
8824   return 0;
8825 }
8826 _ACEOF
8827 rm -rf conftest$ac_exeext
8828 if { (ac_try="$ac_link"
8829 case "(($ac_try" in
8830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8831   *) ac_try_echo=$ac_try;;
8832 esac
8833 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8834   (eval "$ac_link") 2>&5
8835   ac_status=$?
8836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8838   { (case "(($ac_try" in
8839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8840   *) ac_try_echo=$ac_try;;
8841 esac
8842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8843   (eval "$ac_try") 2>&5
8844   ac_status=$?
8845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8846   (exit $ac_status); }; }; then
8847   ac_cv_func_mmap_fixed_mapped=yes
8848 else
8849   echo "$as_me: program exited with status $ac_status" >&5
8850 echo "$as_me: failed program was:" >&5
8851 sed 's/^/| /' conftest.$ac_ext >&5
8852
8853 ( exit $ac_status )
8854 ac_cv_func_mmap_fixed_mapped=no
8855 fi
8856 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8857 fi
8858
8859
8860 fi
8861 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8862 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8863 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8864
8865 cat >>confdefs.h <<\_ACEOF
8866 #define HAVE_MMAP 1
8867 _ACEOF
8868
8869 fi
8870 rm -rf conftest.mmap
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8882 unistd.h sys/param.h
8883 do
8884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8885 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8886   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8888 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8889   echo $ECHO_N "(cached) $ECHO_C" >&6
8890 fi
8891 ac_res=`eval echo '${'$as_ac_Header'}'`
8892                { echo "$as_me:$LINENO: result: $ac_res" >&5
8893 echo "${ECHO_T}$ac_res" >&6; }
8894 else
8895   # Is the header compilable?
8896 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8897 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8898 cat >conftest.$ac_ext <<_ACEOF
8899 /* confdefs.h.  */
8900 _ACEOF
8901 cat confdefs.h >>conftest.$ac_ext
8902 cat >>conftest.$ac_ext <<_ACEOF
8903 /* end confdefs.h.  */
8904 $ac_includes_default
8905 #include <$ac_header>
8906 _ACEOF
8907 rm -rf conftest.$ac_objext
8908 if { (ac_try="$ac_compile"
8909 case "(($ac_try" in
8910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8911   *) ac_try_echo=$ac_try;;
8912 esac
8913 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8914   (eval "$ac_compile") 2>conftest.er1
8915   ac_status=$?
8916   grep -v '^ *+' conftest.er1 >conftest.err
8917   rm -rf conftest.er1
8918   cat conftest.err >&5
8919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920   (exit $ac_status); } && {
8921          test -z "$ac_c_werror_flag" ||
8922          test ! -s conftest.err
8923        } && test -s conftest.$ac_objext; then
8924   ac_header_compiler=yes
8925 else
8926   echo "$as_me: failed program was:" >&5
8927 sed 's/^/| /' conftest.$ac_ext >&5
8928
8929         ac_header_compiler=no
8930 fi
8931
8932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8934 echo "${ECHO_T}$ac_header_compiler" >&6; }
8935
8936 # Is the header present?
8937 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8938 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8939 cat >conftest.$ac_ext <<_ACEOF
8940 /* confdefs.h.  */
8941 _ACEOF
8942 cat confdefs.h >>conftest.$ac_ext
8943 cat >>conftest.$ac_ext <<_ACEOF
8944 /* end confdefs.h.  */
8945 #include <$ac_header>
8946 _ACEOF
8947 if { (ac_try="$ac_cpp conftest.$ac_ext"
8948 case "(($ac_try" in
8949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8950   *) ac_try_echo=$ac_try;;
8951 esac
8952 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8953   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8954   ac_status=$?
8955   grep -v '^ *+' conftest.er1 >conftest.err
8956   rm -rf conftest.er1
8957   cat conftest.err >&5
8958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959   (exit $ac_status); } >/dev/null && {
8960          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8961          test ! -s conftest.err
8962        }; then
8963   ac_header_preproc=yes
8964 else
8965   echo "$as_me: failed program was:" >&5
8966 sed 's/^/| /' conftest.$ac_ext >&5
8967
8968   ac_header_preproc=no
8969 fi
8970
8971 rm -rf conftest.err conftest.$ac_ext
8972 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8973 echo "${ECHO_T}$ac_header_preproc" >&6; }
8974
8975 # So?  What about this header?
8976 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8977   yes:no: )
8978     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8979 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8980     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8981 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8982     ac_header_preproc=yes
8983     ;;
8984   no:yes:* )
8985     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8986 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8987     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8988 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8989     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8990 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8991     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8992 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8993     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8994 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8995     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8996 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8997
8998     ;;
8999 esac
9000 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9001 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9002 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9003   echo $ECHO_N "(cached) $ECHO_C" >&6
9004 else
9005   eval "$as_ac_Header=\$ac_header_preproc"
9006 fi
9007 ac_res=`eval echo '${'$as_ac_Header'}'`
9008                { echo "$as_me:$LINENO: result: $ac_res" >&5
9009 echo "${ECHO_T}$ac_res" >&6; }
9010
9011 fi
9012 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9013   cat >>confdefs.h <<_ACEOF
9014 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9015 _ACEOF
9016
9017 fi
9018
9019 done
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9033 strdup __argz_count __argz_stringify __argz_next
9034 do
9035 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9036 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9037 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9038 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9039   echo $ECHO_N "(cached) $ECHO_C" >&6
9040 else
9041   cat >conftest.$ac_ext <<_ACEOF
9042 /* confdefs.h.  */
9043 _ACEOF
9044 cat confdefs.h >>conftest.$ac_ext
9045 cat >>conftest.$ac_ext <<_ACEOF
9046 /* end confdefs.h.  */
9047 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9048    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9049 #define $ac_func innocuous_$ac_func
9050
9051 /* System header to define __stub macros and hopefully few prototypes,
9052     which can conflict with char $ac_func (); below.
9053     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9054     <limits.h> exists even on freestanding compilers.  */
9055
9056 #ifdef __STDC__
9057 # include <limits.h>
9058 #else
9059 # include <assert.h>
9060 #endif
9061
9062 #undef $ac_func
9063
9064 /* Override any GCC internal prototype to avoid an error.
9065    Use char because int might match the return type of a GCC
9066    builtin and then its argument prototype would still apply.  */
9067 #ifdef __cplusplus
9068 extern "C"
9069 #endif
9070 char $ac_func ();
9071 /* The GNU C library defines this for functions which it implements
9072     to always fail with ENOSYS.  Some functions are actually named
9073     something starting with __ and the normal name is an alias.  */
9074 #if defined __stub_$ac_func || defined __stub___$ac_func
9075 choke me
9076 #endif
9077
9078 int
9079 main ()
9080 {
9081 return $ac_func ();
9082   ;
9083   return 0;
9084 }
9085 _ACEOF
9086 rm -rf conftest.$ac_objext conftest$ac_exeext
9087 if { (ac_try="$ac_link"
9088 case "(($ac_try" in
9089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9090   *) ac_try_echo=$ac_try;;
9091 esac
9092 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9093   (eval "$ac_link") 2>conftest.er1
9094   ac_status=$?
9095   grep -v '^ *+' conftest.er1 >conftest.err
9096   rm -rf conftest.er1
9097   cat conftest.err >&5
9098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099   (exit $ac_status); } && {
9100          test -z "$ac_c_werror_flag" ||
9101          test ! -s conftest.err
9102        } && test -s conftest$ac_exeext &&
9103        $as_test_x conftest$ac_exeext; then
9104   eval "$as_ac_var=yes"
9105 else
9106   echo "$as_me: failed program was:" >&5
9107 sed 's/^/| /' conftest.$ac_ext >&5
9108
9109         eval "$as_ac_var=no"
9110 fi
9111
9112 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9113       conftest$ac_exeext conftest.$ac_ext
9114 fi
9115 ac_res=`eval echo '${'$as_ac_var'}'`
9116                { echo "$as_me:$LINENO: result: $ac_res" >&5
9117 echo "${ECHO_T}$ac_res" >&6; }
9118 if test `eval echo '${'$as_ac_var'}'` = yes; then
9119   cat >>confdefs.h <<_ACEOF
9120 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9121 _ACEOF
9122
9123 fi
9124 done
9125
9126
9127    if test $ac_cv_header_locale_h = yes; then
9128     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9129 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9130 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9131   echo $ECHO_N "(cached) $ECHO_C" >&6
9132 else
9133   cat >conftest.$ac_ext <<_ACEOF
9134 /* confdefs.h.  */
9135 _ACEOF
9136 cat confdefs.h >>conftest.$ac_ext
9137 cat >>conftest.$ac_ext <<_ACEOF
9138 /* end confdefs.h.  */
9139 #include <locale.h>
9140 int
9141 main ()
9142 {
9143 return LC_MESSAGES
9144   ;
9145   return 0;
9146 }
9147 _ACEOF
9148 rm -rf conftest.$ac_objext conftest$ac_exeext
9149 if { (ac_try="$ac_link"
9150 case "(($ac_try" in
9151   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9152   *) ac_try_echo=$ac_try;;
9153 esac
9154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9155   (eval "$ac_link") 2>conftest.er1
9156   ac_status=$?
9157   grep -v '^ *+' conftest.er1 >conftest.err
9158   rm -rf conftest.er1
9159   cat conftest.err >&5
9160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161   (exit $ac_status); } && {
9162          test -z "$ac_c_werror_flag" ||
9163          test ! -s conftest.err
9164        } && test -s conftest$ac_exeext &&
9165        $as_test_x conftest$ac_exeext; then
9166   am_cv_val_LC_MESSAGES=yes
9167 else
9168   echo "$as_me: failed program was:" >&5
9169 sed 's/^/| /' conftest.$ac_ext >&5
9170
9171         am_cv_val_LC_MESSAGES=no
9172 fi
9173
9174 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9175       conftest$ac_exeext conftest.$ac_ext
9176 fi
9177 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9178 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9179     if test $am_cv_val_LC_MESSAGES = yes; then
9180
9181 cat >>confdefs.h <<\_ACEOF
9182 #define HAVE_LC_MESSAGES 1
9183 _ACEOF
9184
9185     fi
9186   fi
9187      USE_NLS=yes
9188
9189
9190         nls_cv_force_use_gnu_gettext="no"
9191
9192     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9193     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9194                               nls_cv_header_intl=
9195       nls_cv_header_libgt=
9196       CATOBJEXT=NONE
9197
9198       if test "${ac_cv_header_libintl_h+set}" = set; then
9199   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9200 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9201 if test "${ac_cv_header_libintl_h+set}" = set; then
9202   echo $ECHO_N "(cached) $ECHO_C" >&6
9203 fi
9204 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9205 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9206 else
9207   # Is the header compilable?
9208 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9209 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9210 cat >conftest.$ac_ext <<_ACEOF
9211 /* confdefs.h.  */
9212 _ACEOF
9213 cat confdefs.h >>conftest.$ac_ext
9214 cat >>conftest.$ac_ext <<_ACEOF
9215 /* end confdefs.h.  */
9216 $ac_includes_default
9217 #include <libintl.h>
9218 _ACEOF
9219 rm -rf conftest.$ac_objext
9220 if { (ac_try="$ac_compile"
9221 case "(($ac_try" in
9222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9223   *) ac_try_echo=$ac_try;;
9224 esac
9225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9226   (eval "$ac_compile") 2>conftest.er1
9227   ac_status=$?
9228   grep -v '^ *+' conftest.er1 >conftest.err
9229   rm -rf conftest.er1
9230   cat conftest.err >&5
9231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232   (exit $ac_status); } && {
9233          test -z "$ac_c_werror_flag" ||
9234          test ! -s conftest.err
9235        } && test -s conftest.$ac_objext; then
9236   ac_header_compiler=yes
9237 else
9238   echo "$as_me: failed program was:" >&5
9239 sed 's/^/| /' conftest.$ac_ext >&5
9240
9241         ac_header_compiler=no
9242 fi
9243
9244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9245 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9246 echo "${ECHO_T}$ac_header_compiler" >&6; }
9247
9248 # Is the header present?
9249 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9250 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9251 cat >conftest.$ac_ext <<_ACEOF
9252 /* confdefs.h.  */
9253 _ACEOF
9254 cat confdefs.h >>conftest.$ac_ext
9255 cat >>conftest.$ac_ext <<_ACEOF
9256 /* end confdefs.h.  */
9257 #include <libintl.h>
9258 _ACEOF
9259 if { (ac_try="$ac_cpp conftest.$ac_ext"
9260 case "(($ac_try" in
9261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262   *) ac_try_echo=$ac_try;;
9263 esac
9264 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9265   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9266   ac_status=$?
9267   grep -v '^ *+' conftest.er1 >conftest.err
9268   rm -rf conftest.er1
9269   cat conftest.err >&5
9270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271   (exit $ac_status); } >/dev/null && {
9272          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9273          test ! -s conftest.err
9274        }; then
9275   ac_header_preproc=yes
9276 else
9277   echo "$as_me: failed program was:" >&5
9278 sed 's/^/| /' conftest.$ac_ext >&5
9279
9280   ac_header_preproc=no
9281 fi
9282
9283 rm -rf conftest.err conftest.$ac_ext
9284 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9285 echo "${ECHO_T}$ac_header_preproc" >&6; }
9286
9287 # So?  What about this header?
9288 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9289   yes:no: )
9290     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9291 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9292     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9293 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9294     ac_header_preproc=yes
9295     ;;
9296   no:yes:* )
9297     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9298 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9299     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9300 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9301     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9302 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9303     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9304 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9305     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9306 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9307     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9308 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9309
9310     ;;
9311 esac
9312 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9313 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9314 if test "${ac_cv_header_libintl_h+set}" = set; then
9315   echo $ECHO_N "(cached) $ECHO_C" >&6
9316 else
9317   ac_cv_header_libintl_h=$ac_header_preproc
9318 fi
9319 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9320 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9321
9322 fi
9323 if test $ac_cv_header_libintl_h = yes; then
9324   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9325 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9326 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   cat >conftest.$ac_ext <<_ACEOF
9330 /* confdefs.h.  */
9331 _ACEOF
9332 cat confdefs.h >>conftest.$ac_ext
9333 cat >>conftest.$ac_ext <<_ACEOF
9334 /* end confdefs.h.  */
9335 #include <libintl.h>
9336 int
9337 main ()
9338 {
9339 return (int) dgettext ("","")
9340   ;
9341   return 0;
9342 }
9343 _ACEOF
9344 rm -rf conftest.$ac_objext conftest$ac_exeext
9345 if { (ac_try="$ac_link"
9346 case "(($ac_try" in
9347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9348   *) ac_try_echo=$ac_try;;
9349 esac
9350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9351   (eval "$ac_link") 2>conftest.er1
9352   ac_status=$?
9353   grep -v '^ *+' conftest.er1 >conftest.err
9354   rm -rf conftest.er1
9355   cat conftest.err >&5
9356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9357   (exit $ac_status); } && {
9358          test -z "$ac_c_werror_flag" ||
9359          test ! -s conftest.err
9360        } && test -s conftest$ac_exeext &&
9361        $as_test_x conftest$ac_exeext; then
9362   gt_cv_func_dgettext_libc=yes
9363 else
9364   echo "$as_me: failed program was:" >&5
9365 sed 's/^/| /' conftest.$ac_ext >&5
9366
9367         gt_cv_func_dgettext_libc=no
9368 fi
9369
9370 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9371       conftest$ac_exeext conftest.$ac_ext
9372 fi
9373 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9374 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9375
9376           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9377             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9378 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9379 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9380   echo $ECHO_N "(cached) $ECHO_C" >&6
9381 else
9382   ac_check_lib_save_LIBS=$LIBS
9383 LIBS="-lintl  $LIBS"
9384 cat >conftest.$ac_ext <<_ACEOF
9385 /* confdefs.h.  */
9386 _ACEOF
9387 cat confdefs.h >>conftest.$ac_ext
9388 cat >>conftest.$ac_ext <<_ACEOF
9389 /* end confdefs.h.  */
9390
9391 /* Override any GCC internal prototype to avoid an error.
9392    Use char because int might match the return type of a GCC
9393    builtin and then its argument prototype would still apply.  */
9394 #ifdef __cplusplus
9395 extern "C"
9396 #endif
9397 char bindtextdomain ();
9398 int
9399 main ()
9400 {
9401 return bindtextdomain ();
9402   ;
9403   return 0;
9404 }
9405 _ACEOF
9406 rm -rf conftest.$ac_objext conftest$ac_exeext
9407 if { (ac_try="$ac_link"
9408 case "(($ac_try" in
9409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9410   *) ac_try_echo=$ac_try;;
9411 esac
9412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9413   (eval "$ac_link") 2>conftest.er1
9414   ac_status=$?
9415   grep -v '^ *+' conftest.er1 >conftest.err
9416   rm -rf conftest.er1
9417   cat conftest.err >&5
9418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419   (exit $ac_status); } && {
9420          test -z "$ac_c_werror_flag" ||
9421          test ! -s conftest.err
9422        } && test -s conftest$ac_exeext &&
9423        $as_test_x conftest$ac_exeext; then
9424   ac_cv_lib_intl_bindtextdomain=yes
9425 else
9426   echo "$as_me: failed program was:" >&5
9427 sed 's/^/| /' conftest.$ac_ext >&5
9428
9429         ac_cv_lib_intl_bindtextdomain=no
9430 fi
9431
9432 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9433       conftest$ac_exeext conftest.$ac_ext
9434 LIBS=$ac_check_lib_save_LIBS
9435 fi
9436 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9437 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9438 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9439   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9440 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9441 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9442   echo $ECHO_N "(cached) $ECHO_C" >&6
9443 else
9444   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9445 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9446 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9447   echo $ECHO_N "(cached) $ECHO_C" >&6
9448 else
9449   ac_check_lib_save_LIBS=$LIBS
9450 LIBS="-lintl  $LIBS"
9451 cat >conftest.$ac_ext <<_ACEOF
9452 /* confdefs.h.  */
9453 _ACEOF
9454 cat confdefs.h >>conftest.$ac_ext
9455 cat >>conftest.$ac_ext <<_ACEOF
9456 /* end confdefs.h.  */
9457
9458 /* Override any GCC internal prototype to avoid an error.
9459    Use char because int might match the return type of a GCC
9460    builtin and then its argument prototype would still apply.  */
9461 #ifdef __cplusplus
9462 extern "C"
9463 #endif
9464 char dgettext ();
9465 int
9466 main ()
9467 {
9468 return dgettext ();
9469   ;
9470   return 0;
9471 }
9472 _ACEOF
9473 rm -rf conftest.$ac_objext conftest$ac_exeext
9474 if { (ac_try="$ac_link"
9475 case "(($ac_try" in
9476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9477   *) ac_try_echo=$ac_try;;
9478 esac
9479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9480   (eval "$ac_link") 2>conftest.er1
9481   ac_status=$?
9482   grep -v '^ *+' conftest.er1 >conftest.err
9483   rm -rf conftest.er1
9484   cat conftest.err >&5
9485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486   (exit $ac_status); } && {
9487          test -z "$ac_c_werror_flag" ||
9488          test ! -s conftest.err
9489        } && test -s conftest$ac_exeext &&
9490        $as_test_x conftest$ac_exeext; then
9491   ac_cv_lib_intl_dgettext=yes
9492 else
9493   echo "$as_me: failed program was:" >&5
9494 sed 's/^/| /' conftest.$ac_ext >&5
9495
9496         ac_cv_lib_intl_dgettext=no
9497 fi
9498
9499 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9500       conftest$ac_exeext conftest.$ac_ext
9501 LIBS=$ac_check_lib_save_LIBS
9502 fi
9503 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9504 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9505 if test $ac_cv_lib_intl_dgettext = yes; then
9506   gt_cv_func_dgettext_libintl=yes
9507 else
9508   gt_cv_func_dgettext_libintl=no
9509 fi
9510
9511 fi
9512 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9513 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9514 fi
9515
9516           fi
9517
9518           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9519             LIBS="$LIBS -lintl";
9520           fi
9521
9522           if test "$gt_cv_func_dgettext_libc" = "yes" \
9523             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9524
9525 cat >>confdefs.h <<\_ACEOF
9526 #define HAVE_GETTEXT 1
9527 _ACEOF
9528
9529             # Extract the first word of "msgfmt", so it can be a program name with args.
9530 set dummy msgfmt; ac_word=$2
9531 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9533 if test "${ac_cv_path_MSGFMT+set}" = set; then
9534   echo $ECHO_N "(cached) $ECHO_C" >&6
9535 else
9536   case "$MSGFMT" in
9537   /*)
9538   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9539   ;;
9540   *)
9541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9542   for ac_dir in $PATH; do
9543     test -z "$ac_dir" && ac_dir=.
9544     if test -f $ac_dir/$ac_word; then
9545       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9546         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9547         break
9548       fi
9549     fi
9550   done
9551   IFS="$ac_save_ifs"
9552   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9553   ;;
9554 esac
9555 fi
9556 MSGFMT="$ac_cv_path_MSGFMT"
9557 if test -n "$MSGFMT"; then
9558   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9559 echo "${ECHO_T}$MSGFMT" >&6; }
9560 else
9561   { echo "$as_me:$LINENO: result: no" >&5
9562 echo "${ECHO_T}no" >&6; }
9563 fi
9564             if test "$MSGFMT" != "no"; then
9565
9566 for ac_func in dcgettext
9567 do
9568 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9569 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9570 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9571 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9572   echo $ECHO_N "(cached) $ECHO_C" >&6
9573 else
9574   cat >conftest.$ac_ext <<_ACEOF
9575 /* confdefs.h.  */
9576 _ACEOF
9577 cat confdefs.h >>conftest.$ac_ext
9578 cat >>conftest.$ac_ext <<_ACEOF
9579 /* end confdefs.h.  */
9580 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9581    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9582 #define $ac_func innocuous_$ac_func
9583
9584 /* System header to define __stub macros and hopefully few prototypes,
9585     which can conflict with char $ac_func (); below.
9586     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9587     <limits.h> exists even on freestanding compilers.  */
9588
9589 #ifdef __STDC__
9590 # include <limits.h>
9591 #else
9592 # include <assert.h>
9593 #endif
9594
9595 #undef $ac_func
9596
9597 /* Override any GCC internal prototype to avoid an error.
9598    Use char because int might match the return type of a GCC
9599    builtin and then its argument prototype would still apply.  */
9600 #ifdef __cplusplus
9601 extern "C"
9602 #endif
9603 char $ac_func ();
9604 /* The GNU C library defines this for functions which it implements
9605     to always fail with ENOSYS.  Some functions are actually named
9606     something starting with __ and the normal name is an alias.  */
9607 #if defined __stub_$ac_func || defined __stub___$ac_func
9608 choke me
9609 #endif
9610
9611 int
9612 main ()
9613 {
9614 return $ac_func ();
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -rf conftest.$ac_objext conftest$ac_exeext
9620 if { (ac_try="$ac_link"
9621 case "(($ac_try" in
9622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9623   *) ac_try_echo=$ac_try;;
9624 esac
9625 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9626   (eval "$ac_link") 2>conftest.er1
9627   ac_status=$?
9628   grep -v '^ *+' conftest.er1 >conftest.err
9629   rm -rf conftest.er1
9630   cat conftest.err >&5
9631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632   (exit $ac_status); } && {
9633          test -z "$ac_c_werror_flag" ||
9634          test ! -s conftest.err
9635        } && test -s conftest$ac_exeext &&
9636        $as_test_x conftest$ac_exeext; then
9637   eval "$as_ac_var=yes"
9638 else
9639   echo "$as_me: failed program was:" >&5
9640 sed 's/^/| /' conftest.$ac_ext >&5
9641
9642         eval "$as_ac_var=no"
9643 fi
9644
9645 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9646       conftest$ac_exeext conftest.$ac_ext
9647 fi
9648 ac_res=`eval echo '${'$as_ac_var'}'`
9649                { echo "$as_me:$LINENO: result: $ac_res" >&5
9650 echo "${ECHO_T}$ac_res" >&6; }
9651 if test `eval echo '${'$as_ac_var'}'` = yes; then
9652   cat >>confdefs.h <<_ACEOF
9653 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9654 _ACEOF
9655
9656 fi
9657 done
9658
9659               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9660 set dummy gmsgfmt; ac_word=$2
9661 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9662 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9663 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9664   echo $ECHO_N "(cached) $ECHO_C" >&6
9665 else
9666   case $GMSGFMT in
9667   [\\/]* | ?:[\\/]*)
9668   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9669   ;;
9670   *)
9671   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672 for as_dir in $PATH
9673 do
9674   IFS=$as_save_IFS
9675   test -z "$as_dir" && as_dir=.
9676   for ac_exec_ext in '' $ac_executable_extensions; do
9677   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9678     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9679     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9680     break 2
9681   fi
9682 done
9683 done
9684 IFS=$as_save_IFS
9685
9686   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9687   ;;
9688 esac
9689 fi
9690 GMSGFMT=$ac_cv_path_GMSGFMT
9691 if test -n "$GMSGFMT"; then
9692   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9693 echo "${ECHO_T}$GMSGFMT" >&6; }
9694 else
9695   { echo "$as_me:$LINENO: result: no" >&5
9696 echo "${ECHO_T}no" >&6; }
9697 fi
9698
9699
9700               # Extract the first word of "xgettext", so it can be a program name with args.
9701 set dummy xgettext; ac_word=$2
9702 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9703 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9704 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 else
9707   case "$XGETTEXT" in
9708   /*)
9709   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9710   ;;
9711   *)
9712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9713   for ac_dir in $PATH; do
9714     test -z "$ac_dir" && ac_dir=.
9715     if test -f $ac_dir/$ac_word; then
9716       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9717         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9718         break
9719       fi
9720     fi
9721   done
9722   IFS="$ac_save_ifs"
9723   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9724   ;;
9725 esac
9726 fi
9727 XGETTEXT="$ac_cv_path_XGETTEXT"
9728 if test -n "$XGETTEXT"; then
9729   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9730 echo "${ECHO_T}$XGETTEXT" >&6; }
9731 else
9732   { echo "$as_me:$LINENO: result: no" >&5
9733 echo "${ECHO_T}no" >&6; }
9734 fi
9735
9736               cat >conftest.$ac_ext <<_ACEOF
9737 /* confdefs.h.  */
9738 _ACEOF
9739 cat confdefs.h >>conftest.$ac_ext
9740 cat >>conftest.$ac_ext <<_ACEOF
9741 /* end confdefs.h.  */
9742
9743 int
9744 main ()
9745 {
9746 extern int _nl_msg_cat_cntr;
9747                              return _nl_msg_cat_cntr
9748   ;
9749   return 0;
9750 }
9751 _ACEOF
9752 rm -rf conftest.$ac_objext conftest$ac_exeext
9753 if { (ac_try="$ac_link"
9754 case "(($ac_try" in
9755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756   *) ac_try_echo=$ac_try;;
9757 esac
9758 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9759   (eval "$ac_link") 2>conftest.er1
9760   ac_status=$?
9761   grep -v '^ *+' conftest.er1 >conftest.err
9762   rm -rf conftest.er1
9763   cat conftest.err >&5
9764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765   (exit $ac_status); } && {
9766          test -z "$ac_c_werror_flag" ||
9767          test ! -s conftest.err
9768        } && test -s conftest$ac_exeext &&
9769        $as_test_x conftest$ac_exeext; then
9770   CATOBJEXT=.gmo
9771                  DATADIRNAME=share
9772 else
9773   echo "$as_me: failed program was:" >&5
9774 sed 's/^/| /' conftest.$ac_ext >&5
9775
9776         CATOBJEXT=.mo
9777                  DATADIRNAME=lib
9778 fi
9779
9780 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9781       conftest$ac_exeext conftest.$ac_ext
9782               INSTOBJEXT=.mo
9783             fi
9784           fi
9785
9786           # Added by Martin Baulig 12/15/98 for libc5 systems
9787           if test "$gt_cv_func_dgettext_libc" != "yes" \
9788             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9789             INTLLIBS=-lintl
9790             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9791           fi
9792
9793 fi
9794
9795
9796
9797       if test "$CATOBJEXT" = "NONE"; then
9798                         nls_cv_use_gnu_gettext=yes
9799       fi
9800     fi
9801
9802     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9803
9804 cat >>confdefs.h <<\_ACEOF
9805 #define ENABLE_NLS 1
9806 _ACEOF
9807
9808     else
9809             CATOBJEXT=
9810     fi
9811
9812         if test "$XGETTEXT" != ":"; then
9813                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9814         : ;
9815       else
9816         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9817 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9818         XGETTEXT=":"
9819       fi
9820     fi
9821
9822     # We need to process the po/ directory.
9823     POSUB=po
9824
9825     ac_config_commands="$ac_config_commands default-2"
9826
9827
9828                 for lang in $ALL_LINGUAS; do
9829       GMOFILES="$GMOFILES $lang.gmo"
9830       POFILES="$POFILES $lang.po"
9831     done
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845    if test "x$CATOBJEXT" != "x"; then
9846      if test "x$ALL_LINGUAS" = "x"; then
9847        LINGUAS=
9848      else
9849        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9850 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9851        NEW_LINGUAS=
9852        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9853          case "$ALL_LINGUAS" in
9854           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9855          esac
9856        done
9857        LINGUAS=$NEW_LINGUAS
9858        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9859 echo "${ECHO_T}$LINGUAS" >&6; }
9860      fi
9861
9862           if test -n "$LINGUAS"; then
9863        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9864      fi
9865    fi
9866
9867             test -d po || mkdir po
9868    if test "$CATOBJEXT" = ".cat"; then
9869      if test "${ac_cv_header_linux_version_h+set}" = set; then
9870   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9871 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9872 if test "${ac_cv_header_linux_version_h+set}" = set; then
9873   echo $ECHO_N "(cached) $ECHO_C" >&6
9874 fi
9875 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9876 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9877 else
9878   # Is the header compilable?
9879 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9880 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9881 cat >conftest.$ac_ext <<_ACEOF
9882 /* confdefs.h.  */
9883 _ACEOF
9884 cat confdefs.h >>conftest.$ac_ext
9885 cat >>conftest.$ac_ext <<_ACEOF
9886 /* end confdefs.h.  */
9887 $ac_includes_default
9888 #include <linux/version.h>
9889 _ACEOF
9890 rm -rf conftest.$ac_objext
9891 if { (ac_try="$ac_compile"
9892 case "(($ac_try" in
9893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9894   *) ac_try_echo=$ac_try;;
9895 esac
9896 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9897   (eval "$ac_compile") 2>conftest.er1
9898   ac_status=$?
9899   grep -v '^ *+' conftest.er1 >conftest.err
9900   rm -rf conftest.er1
9901   cat conftest.err >&5
9902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9903   (exit $ac_status); } && {
9904          test -z "$ac_c_werror_flag" ||
9905          test ! -s conftest.err
9906        } && test -s conftest.$ac_objext; then
9907   ac_header_compiler=yes
9908 else
9909   echo "$as_me: failed program was:" >&5
9910 sed 's/^/| /' conftest.$ac_ext >&5
9911
9912         ac_header_compiler=no
9913 fi
9914
9915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9916 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9917 echo "${ECHO_T}$ac_header_compiler" >&6; }
9918
9919 # Is the header present?
9920 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9921 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9922 cat >conftest.$ac_ext <<_ACEOF
9923 /* confdefs.h.  */
9924 _ACEOF
9925 cat confdefs.h >>conftest.$ac_ext
9926 cat >>conftest.$ac_ext <<_ACEOF
9927 /* end confdefs.h.  */
9928 #include <linux/version.h>
9929 _ACEOF
9930 if { (ac_try="$ac_cpp conftest.$ac_ext"
9931 case "(($ac_try" in
9932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9933   *) ac_try_echo=$ac_try;;
9934 esac
9935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9936   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9937   ac_status=$?
9938   grep -v '^ *+' conftest.er1 >conftest.err
9939   rm -rf conftest.er1
9940   cat conftest.err >&5
9941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942   (exit $ac_status); } >/dev/null && {
9943          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9944          test ! -s conftest.err
9945        }; then
9946   ac_header_preproc=yes
9947 else
9948   echo "$as_me: failed program was:" >&5
9949 sed 's/^/| /' conftest.$ac_ext >&5
9950
9951   ac_header_preproc=no
9952 fi
9953
9954 rm -rf conftest.err conftest.$ac_ext
9955 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9956 echo "${ECHO_T}$ac_header_preproc" >&6; }
9957
9958 # So?  What about this header?
9959 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9960   yes:no: )
9961     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9962 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9963     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9964 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9965     ac_header_preproc=yes
9966     ;;
9967   no:yes:* )
9968     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9969 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9971 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9972     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9973 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9974     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9975 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9976     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9977 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9978     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9979 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9980
9981     ;;
9982 esac
9983 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9984 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9985 if test "${ac_cv_header_linux_version_h+set}" = set; then
9986   echo $ECHO_N "(cached) $ECHO_C" >&6
9987 else
9988   ac_cv_header_linux_version_h=$ac_header_preproc
9989 fi
9990 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9991 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9992
9993 fi
9994 if test $ac_cv_header_linux_version_h = yes; then
9995   msgformat=linux
9996 else
9997   msgformat=xopen
9998 fi
9999
10000
10001
10002                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10003    fi
10004
10005             MKINSTALLDIRS=
10006 #
10007 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10008 #
10009 #   if test -n "$ac_aux_dir"; then
10010 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10011 #   fi
10012    if test -z "$MKINSTALLDIRS"; then
10013      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10014    fi
10015
10016    # jwz: you know what, screw it.  Let's just use the version that I
10017    # already computed in configure.in, instead of this version that came
10018    # with the i18n crud, ok?
10019    MKINSTALLDIRS="$INSTALL_DIRS"
10020
10021
10022
10023
10024          test -d po || mkdir po
10025    if test "x$srcdir" != "x."; then
10026      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10027        posrcprefix="$srcdir/"
10028      else
10029        posrcprefix="../$srcdir/"
10030      fi
10031    else
10032      posrcprefix="../"
10033    fi
10034    rm -f po/POTFILES
10035    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10036         < $srcdir/po/POTFILES.in > po/POTFILES
10037
10038 MKINSTALLDIRS="$INSTALL_DIRS"
10039
10040
10041 ###############################################################################
10042 #
10043 #       Check for -lXmu (some fucked up vendors don't ship it...)
10044 #
10045 ###############################################################################
10046
10047 have_xmu=no
10048
10049   ac_save_CPPFLAGS="$CPPFLAGS"
10050   if test \! -z "$includedir" ; then
10051     CPPFLAGS="$CPPFLAGS -I$includedir"
10052   fi
10053   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10054   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10055   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10056 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10057 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10058   echo $ECHO_N "(cached) $ECHO_C" >&6
10059 else
10060   cat >conftest.$ac_ext <<_ACEOF
10061 /* confdefs.h.  */
10062 _ACEOF
10063 cat confdefs.h >>conftest.$ac_ext
10064 cat >>conftest.$ac_ext <<_ACEOF
10065 /* end confdefs.h.  */
10066 #include <stdlib.h>
10067                    #include <stdio.h>
10068                    #include <X11/Intrinsic.h>
10069
10070 #include <X11/Xmu/Error.h>
10071 _ACEOF
10072 rm -rf conftest.$ac_objext
10073 if { (ac_try="$ac_compile"
10074 case "(($ac_try" in
10075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076   *) ac_try_echo=$ac_try;;
10077 esac
10078 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10079   (eval "$ac_compile") 2>conftest.er1
10080   ac_status=$?
10081   grep -v '^ *+' conftest.er1 >conftest.err
10082   rm -rf conftest.er1
10083   cat conftest.err >&5
10084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10085   (exit $ac_status); } && {
10086          test -z "$ac_c_werror_flag" ||
10087          test ! -s conftest.err
10088        } && test -s conftest.$ac_objext; then
10089   ac_cv_header_X11_Xmu_Error_h=yes
10090 else
10091   echo "$as_me: failed program was:" >&5
10092 sed 's/^/| /' conftest.$ac_ext >&5
10093
10094         ac_cv_header_X11_Xmu_Error_h=no
10095 fi
10096
10097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098 fi
10099 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10100 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10101 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10102   have_xmu=yes
10103 fi
10104
10105
10106   CPPFLAGS="$ac_save_CPPFLAGS"
10107 if test "$have_xmu" = no ; then
10108   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10109   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10110   XMU_LIBS=''
10111 else
10112   XMU_SRCS=''
10113   XMU_OBJS=''
10114   XMU_LIBS='-lXmu'
10115   cat >>confdefs.h <<\_ACEOF
10116 #define HAVE_XMU 1
10117 _ACEOF
10118
10119 fi
10120
10121
10122 ###############################################################################
10123 #
10124 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10125 #       See comp.windows.x FAQ question 124.  The right fix is to
10126 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10127 #
10128 ###############################################################################
10129
10130 if test "$have_xmu" = yes ; then
10131   case "$host" in
10132     *-sunos4*)
10133     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10134 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10135 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10136   echo $ECHO_N "(cached) $ECHO_C" >&6
10137 else
10138   ac_save_LDFLAGS="$LDFLAGS"
10139                     if test \! -z "$x_libraries" ; then
10140                       LDFLAGS="$LDFLAGS -L$x_libraries"
10141                     fi
10142                     # Note: this trick never works!  (Generally.)
10143                     # We're only getting away with using AC_TRY_LINK
10144                     # with X libraries because we know it's SunOS.
10145                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10146                     cat >conftest.$ac_ext <<_ACEOF
10147 /* confdefs.h.  */
10148 _ACEOF
10149 cat confdefs.h >>conftest.$ac_ext
10150 cat >>conftest.$ac_ext <<_ACEOF
10151 /* end confdefs.h.  */
10152
10153 int
10154 main ()
10155 {
10156
10157   ;
10158   return 0;
10159 }
10160 _ACEOF
10161 rm -rf conftest.$ac_objext conftest$ac_exeext
10162 if { (ac_try="$ac_link"
10163 case "(($ac_try" in
10164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10165   *) ac_try_echo=$ac_try;;
10166 esac
10167 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10168   (eval "$ac_link") 2>conftest.er1
10169   ac_status=$?
10170   grep -v '^ *+' conftest.er1 >conftest.err
10171   rm -rf conftest.er1
10172   cat conftest.err >&5
10173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174   (exit $ac_status); } && {
10175          test -z "$ac_c_werror_flag" ||
10176          test ! -s conftest.err
10177        } && test -s conftest$ac_exeext &&
10178        $as_test_x conftest$ac_exeext; then
10179   ac_cv_sunos_xmu_bug=no
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 sed 's/^/| /' conftest.$ac_ext >&5
10183
10184         ac_cv_sunos_xmu_bug=yes
10185 fi
10186
10187 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10188       conftest$ac_exeext conftest.$ac_ext
10189                     LDFLAGS="$ac_save_LDFLAGS"
10190 fi
10191 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10192 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10193     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10194       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10195 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10196 if test "${ac_cv_ld_static+set}" = set; then
10197   echo $ECHO_N "(cached) $ECHO_C" >&6
10198 else
10199   ac_save_LDFLAGS="$LDFLAGS"
10200                       LDFLAGS="$LDFLAGS -static"
10201                       cat >conftest.$ac_ext <<_ACEOF
10202 /* confdefs.h.  */
10203 _ACEOF
10204 cat confdefs.h >>conftest.$ac_ext
10205 cat >>conftest.$ac_ext <<_ACEOF
10206 /* end confdefs.h.  */
10207
10208 int
10209 main ()
10210 {
10211
10212   ;
10213   return 0;
10214 }
10215 _ACEOF
10216 rm -rf conftest.$ac_objext conftest$ac_exeext
10217 if { (ac_try="$ac_link"
10218 case "(($ac_try" in
10219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10220   *) ac_try_echo=$ac_try;;
10221 esac
10222 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10223   (eval "$ac_link") 2>conftest.er1
10224   ac_status=$?
10225   grep -v '^ *+' conftest.er1 >conftest.err
10226   rm -rf conftest.er1
10227   cat conftest.err >&5
10228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229   (exit $ac_status); } && {
10230          test -z "$ac_c_werror_flag" ||
10231          test ! -s conftest.err
10232        } && test -s conftest$ac_exeext &&
10233        $as_test_x conftest$ac_exeext; then
10234   ac_cv_ld_static=yes
10235 else
10236   echo "$as_me: failed program was:" >&5
10237 sed 's/^/| /' conftest.$ac_ext >&5
10238
10239         ac_cv_ld_static=no
10240 fi
10241
10242 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10243       conftest$ac_exeext conftest.$ac_ext
10244                     LDFLAGS="$ac_save_LDFLAGS"
10245 fi
10246 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10247 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10248       if test "$ac_cv_ld_static" = yes ; then
10249         LDFLAGS="$LDFLAGS -static"
10250       else
10251         LDFLAGS="$LDFLAGS -Bstatic"
10252       fi
10253     fi
10254     ;;
10255   esac
10256 fi
10257
10258
10259 ###############################################################################
10260 #
10261 #       Handle the --with-hackdir option
10262 #
10263 ###############################################################################
10264
10265 have_hackdir=yes
10266 with_hackdir_req=unspecified
10267
10268 # Check whether --with-hackdir was given.
10269 if test "${with_hackdir+set}" = set; then
10270   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10271 else
10272   with_hackdir=yes
10273 fi
10274
10275
10276 if test x"$with_hackdir" = xyes; then
10277   HACKDIR='${libexecdir}/xscreensaver'
10278 elif test x"$with_hackdir" = xno; then
10279   HACKDIR='${bindir}'
10280 else
10281   HACKDIR=$with_hackdir
10282 fi
10283
10284 # canonicalize slashes.
10285 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10286
10287 # Expand HACKDIR as HACKDIR_FULL
10288 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10289
10290 # This option used to be called --enable-subdir; make sure that is no longer
10291 # used, since configure brain-damagedly ignores unknown --enable options.
10292
10293 obsolete_enable=
10294 # Check whether --enable-subdir was given.
10295 if test "${enable_subdir+set}" = set; then
10296   enableval=$enable_subdir; obsolete_enable=yes
10297 fi
10298
10299 if test -n "$obsolete_enable"; then
10300   echo "error: the --enable-subdir option has been replaced with"
10301   echo "       the new --with-hackdir option; see \`configure --help'"
10302   echo "       for more information."
10303   exit 1
10304 fi
10305
10306
10307 ###############################################################################
10308 #
10309 #       Handle the --with-configdir option
10310 #       Help for --with-x-app-defaults option added..
10311 #
10312 ###############################################################################
10313
10314 have_configdir=yes
10315 with_configdir_req=unspecified
10316
10317 # Check whether --with-configdir was given.
10318 if test "${with_configdir+set}" = set; then
10319   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10320 else
10321   with_configdir=yes
10322 fi
10323
10324
10325 if test x"$with_configdir" = xyes; then
10326   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10327 elif test x"$with_configdir" = xno; then
10328   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10329   exit 1
10330 else
10331   # there must be a better way than this...
10332   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10333     # absolute path
10334     HACK_CONF_DIR=$with_configdir
10335   else
10336     # relative path
10337     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10338   fi
10339 fi
10340
10341
10342
10343
10344 ###############################################################################
10345 #
10346 #       Check for the SGI SCREEN_SAVER server extension.
10347 #
10348 ###############################################################################
10349
10350 have_sgi=no
10351 with_sgi_req=unspecified
10352
10353 # Check whether --with-sgi-ext was given.
10354 if test "${with_sgi_ext+set}" = set; then
10355   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10356 else
10357   with_sgi=yes
10358 fi
10359
10360
10361
10362    case "$with_sgi" in
10363     yes) ;;
10364     no)  ;;
10365
10366     /*)
10367      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10368 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10369      d=$with_sgi/include
10370      if test -d $d; then
10371        X_CFLAGS="-I$d $X_CFLAGS"
10372        { echo "$as_me:$LINENO: result: $d" >&5
10373 echo "${ECHO_T}$d" >&6; }
10374      else
10375        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10376 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10377      fi
10378
10379      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10380 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10381      d=$with_sgi/lib
10382      if test -d $d; then
10383        X_LIBS="-L$d $X_LIBS"
10384        { echo "$as_me:$LINENO: result: $d" >&5
10385 echo "${ECHO_T}$d" >&6; }
10386      else
10387        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10388 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10389      fi
10390
10391      # replace the directory string with "yes".
10392      with_sgi_req="yes"
10393      with_sgi=$with_sgi_req
10394      ;;
10395
10396     *)
10397      echo ""
10398      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10399      echo "       If it is a directory, then \`DIR/include' will be added to"
10400      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10401      exit 1
10402      ;;
10403    esac
10404
10405
10406 if test "$with_sgi" = yes; then
10407
10408   ac_save_CPPFLAGS="$CPPFLAGS"
10409   if test \! -z "$includedir" ; then
10410     CPPFLAGS="$CPPFLAGS -I$includedir"
10411   fi
10412   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10413   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10414   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10415 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10416 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10417   echo $ECHO_N "(cached) $ECHO_C" >&6
10418 else
10419   cat >conftest.$ac_ext <<_ACEOF
10420 /* confdefs.h.  */
10421 _ACEOF
10422 cat confdefs.h >>conftest.$ac_ext
10423 cat >>conftest.$ac_ext <<_ACEOF
10424 /* end confdefs.h.  */
10425 #include <X11/Xlib.h>
10426
10427 #include <X11/extensions/XScreenSaver.h>
10428 _ACEOF
10429 rm -rf conftest.$ac_objext
10430 if { (ac_try="$ac_compile"
10431 case "(($ac_try" in
10432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10433   *) ac_try_echo=$ac_try;;
10434 esac
10435 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10436   (eval "$ac_compile") 2>conftest.er1
10437   ac_status=$?
10438   grep -v '^ *+' conftest.er1 >conftest.err
10439   rm -rf conftest.er1
10440   cat conftest.err >&5
10441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10442   (exit $ac_status); } && {
10443          test -z "$ac_c_werror_flag" ||
10444          test ! -s conftest.err
10445        } && test -s conftest.$ac_objext; then
10446   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10447 else
10448   echo "$as_me: failed program was:" >&5
10449 sed 's/^/| /' conftest.$ac_ext >&5
10450
10451         ac_cv_header_X11_extensions_XScreenSaver_h=no
10452 fi
10453
10454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10455 fi
10456 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10457 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10458 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10459   have_sgi=yes
10460                      cat >>confdefs.h <<\_ACEOF
10461 #define HAVE_SGI_SAVER_EXTENSION 1
10462 _ACEOF
10463
10464 fi
10465
10466
10467   CPPFLAGS="$ac_save_CPPFLAGS"
10468
10469 elif test "$with_sgi" != no; then
10470   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10471   exit 1
10472 fi
10473
10474
10475 ###############################################################################
10476 #
10477 #       Check for the XIDLE server extension.
10478 #
10479 ###############################################################################
10480
10481 have_xidle=no
10482 with_xidle_req=unspecified
10483
10484 # Check whether --with-xidle-ext was given.
10485 if test "${with_xidle_ext+set}" = set; then
10486   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10487 else
10488   with_xidle=yes
10489 fi
10490
10491
10492
10493    case "$with_xidle" in
10494     yes) ;;
10495     no)  ;;
10496
10497     /*)
10498      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10499 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10500      d=$with_xidle/include
10501      if test -d $d; then
10502        X_CFLAGS="-I$d $X_CFLAGS"
10503        { echo "$as_me:$LINENO: result: $d" >&5
10504 echo "${ECHO_T}$d" >&6; }
10505      else
10506        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10507 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10508      fi
10509
10510      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10511 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10512      d=$with_xidle/lib
10513      if test -d $d; then
10514        X_LIBS="-L$d $X_LIBS"
10515        { echo "$as_me:$LINENO: result: $d" >&5
10516 echo "${ECHO_T}$d" >&6; }
10517      else
10518        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10519 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10520      fi
10521
10522      # replace the directory string with "yes".
10523      with_xidle_req="yes"
10524      with_xidle=$with_xidle_req
10525      ;;
10526
10527     *)
10528      echo ""
10529      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10530      echo "       If it is a directory, then \`DIR/include' will be added to"
10531      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10532      exit 1
10533      ;;
10534    esac
10535
10536
10537 if test "$with_xidle" = yes; then
10538
10539   ac_save_CPPFLAGS="$CPPFLAGS"
10540   if test \! -z "$includedir" ; then
10541     CPPFLAGS="$CPPFLAGS -I$includedir"
10542   fi
10543   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10544   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10545   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10546 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10547 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10548   echo $ECHO_N "(cached) $ECHO_C" >&6
10549 else
10550   cat >conftest.$ac_ext <<_ACEOF
10551 /* confdefs.h.  */
10552 _ACEOF
10553 cat confdefs.h >>conftest.$ac_ext
10554 cat >>conftest.$ac_ext <<_ACEOF
10555 /* end confdefs.h.  */
10556 #include <X11/Xlib.h>
10557
10558 #include <X11/extensions/xidle.h>
10559 _ACEOF
10560 rm -rf conftest.$ac_objext
10561 if { (ac_try="$ac_compile"
10562 case "(($ac_try" in
10563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10564   *) ac_try_echo=$ac_try;;
10565 esac
10566 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10567   (eval "$ac_compile") 2>conftest.er1
10568   ac_status=$?
10569   grep -v '^ *+' conftest.er1 >conftest.err
10570   rm -rf conftest.er1
10571   cat conftest.err >&5
10572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10573   (exit $ac_status); } && {
10574          test -z "$ac_c_werror_flag" ||
10575          test ! -s conftest.err
10576        } && test -s conftest.$ac_objext; then
10577   ac_cv_header_X11_extensions_xidle_h=yes
10578 else
10579   echo "$as_me: failed program was:" >&5
10580 sed 's/^/| /' conftest.$ac_ext >&5
10581
10582         ac_cv_header_X11_extensions_xidle_h=no
10583 fi
10584
10585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10586 fi
10587 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10588 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10589 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10590   have_xidle=yes
10591                      cat >>confdefs.h <<\_ACEOF
10592 #define HAVE_XIDLE_EXTENSION 1
10593 _ACEOF
10594
10595 fi
10596
10597
10598   CPPFLAGS="$ac_save_CPPFLAGS"
10599 elif test "$with_xidle" != no; then
10600   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10601   exit 1
10602 fi
10603
10604
10605 ###############################################################################
10606 #
10607 #       Check for the SGI-VIDEO-CONTROL server extension.
10608 #
10609 ###############################################################################
10610
10611 have_sgivc=no
10612 with_sgivc_req=unspecified
10613
10614 # Check whether --with-sgivc-ext was given.
10615 if test "${with_sgivc_ext+set}" = set; then
10616   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10617 else
10618   with_sgivc=yes
10619 fi
10620
10621
10622
10623    case "$with_sgivc" in
10624     yes) ;;
10625     no)  ;;
10626
10627     /*)
10628      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10629 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10630      d=$with_sgivc/include
10631      if test -d $d; then
10632        X_CFLAGS="-I$d $X_CFLAGS"
10633        { echo "$as_me:$LINENO: result: $d" >&5
10634 echo "${ECHO_T}$d" >&6; }
10635      else
10636        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10637 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10638      fi
10639
10640      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10641 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10642      d=$with_sgivc/lib
10643      if test -d $d; then
10644        X_LIBS="-L$d $X_LIBS"
10645        { echo "$as_me:$LINENO: result: $d" >&5
10646 echo "${ECHO_T}$d" >&6; }
10647      else
10648        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10649 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10650      fi
10651
10652      # replace the directory string with "yes".
10653      with_sgivc_req="yes"
10654      with_sgivc=$with_sgivc_req
10655      ;;
10656
10657     *)
10658      echo ""
10659      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10660      echo "       If it is a directory, then \`DIR/include' will be added to"
10661      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10662      exit 1
10663      ;;
10664    esac
10665
10666
10667 if test "$with_sgivc" = yes; then
10668
10669   # first check for XSGIvc.h
10670
10671   ac_save_CPPFLAGS="$CPPFLAGS"
10672   if test \! -z "$includedir" ; then
10673     CPPFLAGS="$CPPFLAGS -I$includedir"
10674   fi
10675   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10676   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10677   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10678 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10679 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10680   echo $ECHO_N "(cached) $ECHO_C" >&6
10681 else
10682   cat >conftest.$ac_ext <<_ACEOF
10683 /* confdefs.h.  */
10684 _ACEOF
10685 cat confdefs.h >>conftest.$ac_ext
10686 cat >>conftest.$ac_ext <<_ACEOF
10687 /* end confdefs.h.  */
10688 #include <X11/Xlib.h>
10689
10690 #include <X11/extensions/XSGIvc.h>
10691 _ACEOF
10692 rm -rf conftest.$ac_objext
10693 if { (ac_try="$ac_compile"
10694 case "(($ac_try" in
10695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10696   *) ac_try_echo=$ac_try;;
10697 esac
10698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10699   (eval "$ac_compile") 2>conftest.er1
10700   ac_status=$?
10701   grep -v '^ *+' conftest.er1 >conftest.err
10702   rm -rf conftest.er1
10703   cat conftest.err >&5
10704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10705   (exit $ac_status); } && {
10706          test -z "$ac_c_werror_flag" ||
10707          test ! -s conftest.err
10708        } && test -s conftest.$ac_objext; then
10709   ac_cv_header_X11_extensions_XSGIvc_h=yes
10710 else
10711   echo "$as_me: failed program was:" >&5
10712 sed 's/^/| /' conftest.$ac_ext >&5
10713
10714         ac_cv_header_X11_extensions_XSGIvc_h=no
10715 fi
10716
10717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10718 fi
10719 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10720 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10721 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10722   have_sgivc=yes
10723 fi
10724
10725
10726   CPPFLAGS="$ac_save_CPPFLAGS"
10727
10728   # if that succeeded, then check for the -lXsgivc
10729   if test "$have_sgivc" = yes; then
10730     have_sgivc=no
10731
10732   ac_save_CPPFLAGS="$CPPFLAGS"
10733   ac_save_LDFLAGS="$LDFLAGS"
10734 #  ac_save_LIBS="$LIBS"
10735
10736   if test \! -z "$includedir" ; then
10737     CPPFLAGS="$CPPFLAGS -I$includedir"
10738   fi
10739   # note: $X_CFLAGS includes $x_includes
10740   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10741
10742   if test \! -z "$libdir" ; then
10743     LDFLAGS="$LDFLAGS -L$libdir"
10744   fi
10745   # note: $X_LIBS includes $x_libraries
10746   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10747
10748   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10749   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10750   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10751 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10752 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755   ac_check_lib_save_LIBS=$LIBS
10756 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10757 cat >conftest.$ac_ext <<_ACEOF
10758 /* confdefs.h.  */
10759 _ACEOF
10760 cat confdefs.h >>conftest.$ac_ext
10761 cat >>conftest.$ac_ext <<_ACEOF
10762 /* end confdefs.h.  */
10763
10764 /* Override any GCC internal prototype to avoid an error.
10765    Use char because int might match the return type of a GCC
10766    builtin and then its argument prototype would still apply.  */
10767 #ifdef __cplusplus
10768 extern "C"
10769 #endif
10770 char XSGIvcQueryGammaMap ();
10771 int
10772 main ()
10773 {
10774 return XSGIvcQueryGammaMap ();
10775   ;
10776   return 0;
10777 }
10778 _ACEOF
10779 rm -rf conftest.$ac_objext conftest$ac_exeext
10780 if { (ac_try="$ac_link"
10781 case "(($ac_try" in
10782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10783   *) ac_try_echo=$ac_try;;
10784 esac
10785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10786   (eval "$ac_link") 2>conftest.er1
10787   ac_status=$?
10788   grep -v '^ *+' conftest.er1 >conftest.err
10789   rm -rf conftest.er1
10790   cat conftest.err >&5
10791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10792   (exit $ac_status); } && {
10793          test -z "$ac_c_werror_flag" ||
10794          test ! -s conftest.err
10795        } && test -s conftest$ac_exeext &&
10796        $as_test_x conftest$ac_exeext; then
10797   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 sed 's/^/| /' conftest.$ac_ext >&5
10801
10802         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10803 fi
10804
10805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10806       conftest$ac_exeext conftest.$ac_ext
10807 LIBS=$ac_check_lib_save_LIBS
10808 fi
10809 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10810 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10811 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10812   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10813 else
10814   true
10815 fi
10816
10817   CPPFLAGS="$ac_save_CPPFLAGS"
10818   LDFLAGS="$ac_save_LDFLAGS"
10819 #  LIBS="$ac_save_LIBS"
10820
10821   fi
10822
10823   # if that succeeded, then we've really got it.
10824   if test "$have_sgivc" = yes; then
10825     cat >>confdefs.h <<\_ACEOF
10826 #define HAVE_SGI_VC_EXTENSION 1
10827 _ACEOF
10828
10829   fi
10830
10831 elif test "$with_sgivc" != no; then
10832   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10833   exit 1
10834 fi
10835
10836
10837 ###############################################################################
10838 #
10839 #       Check for the DPMS server extension.
10840 #
10841 ###############################################################################
10842
10843 have_dpms=no
10844 with_dpms_req=unspecified
10845
10846 # Check whether --with-dpms-ext was given.
10847 if test "${with_dpms_ext+set}" = set; then
10848   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10849 else
10850   with_dpms=yes
10851 fi
10852
10853
10854
10855    case "$with_dpms" in
10856     yes) ;;
10857     no)  ;;
10858
10859     /*)
10860      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10861 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10862      d=$with_dpms/include
10863      if test -d $d; then
10864        X_CFLAGS="-I$d $X_CFLAGS"
10865        { echo "$as_me:$LINENO: result: $d" >&5
10866 echo "${ECHO_T}$d" >&6; }
10867      else
10868        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10869 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10870      fi
10871
10872      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10873 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10874      d=$with_dpms/lib
10875      if test -d $d; then
10876        X_LIBS="-L$d $X_LIBS"
10877        { echo "$as_me:$LINENO: result: $d" >&5
10878 echo "${ECHO_T}$d" >&6; }
10879      else
10880        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10881 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10882      fi
10883
10884      # replace the directory string with "yes".
10885      with_dpms_req="yes"
10886      with_dpms=$with_dpms_req
10887      ;;
10888
10889     *)
10890      echo ""
10891      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10892      echo "       If it is a directory, then \`DIR/include' will be added to"
10893      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10894      exit 1
10895      ;;
10896    esac
10897
10898
10899 if test "$with_dpms" = yes; then
10900
10901   # first check for dpms.h
10902
10903   ac_save_CPPFLAGS="$CPPFLAGS"
10904   if test \! -z "$includedir" ; then
10905     CPPFLAGS="$CPPFLAGS -I$includedir"
10906   fi
10907   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10908   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10909   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10910 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10911 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10912   echo $ECHO_N "(cached) $ECHO_C" >&6
10913 else
10914   cat >conftest.$ac_ext <<_ACEOF
10915 /* confdefs.h.  */
10916 _ACEOF
10917 cat confdefs.h >>conftest.$ac_ext
10918 cat >>conftest.$ac_ext <<_ACEOF
10919 /* end confdefs.h.  */
10920 #include <X11/Xlib.h>
10921                      #include <X11/Xmd.h>
10922
10923 #include <X11/extensions/dpms.h>
10924 _ACEOF
10925 rm -rf conftest.$ac_objext
10926 if { (ac_try="$ac_compile"
10927 case "(($ac_try" in
10928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929   *) ac_try_echo=$ac_try;;
10930 esac
10931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10932   (eval "$ac_compile") 2>conftest.er1
10933   ac_status=$?
10934   grep -v '^ *+' conftest.er1 >conftest.err
10935   rm -rf conftest.er1
10936   cat conftest.err >&5
10937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938   (exit $ac_status); } && {
10939          test -z "$ac_c_werror_flag" ||
10940          test ! -s conftest.err
10941        } && test -s conftest.$ac_objext; then
10942   ac_cv_header_X11_extensions_dpms_h=yes
10943 else
10944   echo "$as_me: failed program was:" >&5
10945 sed 's/^/| /' conftest.$ac_ext >&5
10946
10947         ac_cv_header_X11_extensions_dpms_h=no
10948 fi
10949
10950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951 fi
10952 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10953 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10954 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10955   have_dpms=yes
10956 fi
10957
10958
10959   CPPFLAGS="$ac_save_CPPFLAGS"
10960
10961   # if that succeeded, then check for the DPMS code in the libraries
10962   if test "$have_dpms" = yes; then
10963
10964     # first look in -lXext (this is where it is with XFree86 4.0)
10965     have_dpms=no
10966
10967   ac_save_CPPFLAGS="$CPPFLAGS"
10968   ac_save_LDFLAGS="$LDFLAGS"
10969 #  ac_save_LIBS="$LIBS"
10970
10971   if test \! -z "$includedir" ; then
10972     CPPFLAGS="$CPPFLAGS -I$includedir"
10973   fi
10974   # note: $X_CFLAGS includes $x_includes
10975   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10976
10977   if test \! -z "$libdir" ; then
10978     LDFLAGS="$LDFLAGS -L$libdir"
10979   fi
10980   # note: $X_LIBS includes $x_libraries
10981   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10982
10983   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10984   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10985   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10986 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10987 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   ac_check_lib_save_LIBS=$LIBS
10991 LIBS="-lXext -lXext -lX11 $LIBS"
10992 cat >conftest.$ac_ext <<_ACEOF
10993 /* confdefs.h.  */
10994 _ACEOF
10995 cat confdefs.h >>conftest.$ac_ext
10996 cat >>conftest.$ac_ext <<_ACEOF
10997 /* end confdefs.h.  */
10998
10999 /* Override any GCC internal prototype to avoid an error.
11000    Use char because int might match the return type of a GCC
11001    builtin and then its argument prototype would still apply.  */
11002 #ifdef __cplusplus
11003 extern "C"
11004 #endif
11005 char DPMSInfo ();
11006 int
11007 main ()
11008 {
11009 return DPMSInfo ();
11010   ;
11011   return 0;
11012 }
11013 _ACEOF
11014 rm -rf conftest.$ac_objext conftest$ac_exeext
11015 if { (ac_try="$ac_link"
11016 case "(($ac_try" in
11017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11018   *) ac_try_echo=$ac_try;;
11019 esac
11020 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11021   (eval "$ac_link") 2>conftest.er1
11022   ac_status=$?
11023   grep -v '^ *+' conftest.er1 >conftest.err
11024   rm -rf conftest.er1
11025   cat conftest.err >&5
11026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11027   (exit $ac_status); } && {
11028          test -z "$ac_c_werror_flag" ||
11029          test ! -s conftest.err
11030        } && test -s conftest$ac_exeext &&
11031        $as_test_x conftest$ac_exeext; then
11032   ac_cv_lib_Xext_DPMSInfo=yes
11033 else
11034   echo "$as_me: failed program was:" >&5
11035 sed 's/^/| /' conftest.$ac_ext >&5
11036
11037         ac_cv_lib_Xext_DPMSInfo=no
11038 fi
11039
11040 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11041       conftest$ac_exeext conftest.$ac_ext
11042 LIBS=$ac_check_lib_save_LIBS
11043 fi
11044 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11045 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11046 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11047   have_dpms=yes
11048 else
11049   true
11050 fi
11051
11052   CPPFLAGS="$ac_save_CPPFLAGS"
11053   LDFLAGS="$ac_save_LDFLAGS"
11054 #  LIBS="$ac_save_LIBS"
11055
11056
11057     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11058     if test "$have_dpms" = no; then
11059
11060   ac_save_CPPFLAGS="$CPPFLAGS"
11061   ac_save_LDFLAGS="$LDFLAGS"
11062 #  ac_save_LIBS="$LIBS"
11063
11064   if test \! -z "$includedir" ; then
11065     CPPFLAGS="$CPPFLAGS -I$includedir"
11066   fi
11067   # note: $X_CFLAGS includes $x_includes
11068   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11069
11070   if test \! -z "$libdir" ; then
11071     LDFLAGS="$LDFLAGS -L$libdir"
11072   fi
11073   # note: $X_LIBS includes $x_libraries
11074   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11075
11076   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11077   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11078   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11079 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11080 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11081   echo $ECHO_N "(cached) $ECHO_C" >&6
11082 else
11083   ac_check_lib_save_LIBS=$LIBS
11084 LIBS="-lXdpms -lXext -lX11 $LIBS"
11085 cat >conftest.$ac_ext <<_ACEOF
11086 /* confdefs.h.  */
11087 _ACEOF
11088 cat confdefs.h >>conftest.$ac_ext
11089 cat >>conftest.$ac_ext <<_ACEOF
11090 /* end confdefs.h.  */
11091
11092 /* Override any GCC internal prototype to avoid an error.
11093    Use char because int might match the return type of a GCC
11094    builtin and then its argument prototype would still apply.  */
11095 #ifdef __cplusplus
11096 extern "C"
11097 #endif
11098 char DPMSInfo ();
11099 int
11100 main ()
11101 {
11102 return DPMSInfo ();
11103   ;
11104   return 0;
11105 }
11106 _ACEOF
11107 rm -rf conftest.$ac_objext conftest$ac_exeext
11108 if { (ac_try="$ac_link"
11109 case "(($ac_try" in
11110   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11111   *) ac_try_echo=$ac_try;;
11112 esac
11113 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11114   (eval "$ac_link") 2>conftest.er1
11115   ac_status=$?
11116   grep -v '^ *+' conftest.er1 >conftest.err
11117   rm -rf conftest.er1
11118   cat conftest.err >&5
11119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120   (exit $ac_status); } && {
11121          test -z "$ac_c_werror_flag" ||
11122          test ! -s conftest.err
11123        } && test -s conftest$ac_exeext &&
11124        $as_test_x conftest$ac_exeext; then
11125   ac_cv_lib_Xdpms_DPMSInfo=yes
11126 else
11127   echo "$as_me: failed program was:" >&5
11128 sed 's/^/| /' conftest.$ac_ext >&5
11129
11130         ac_cv_lib_Xdpms_DPMSInfo=no
11131 fi
11132
11133 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11134       conftest$ac_exeext conftest.$ac_ext
11135 LIBS=$ac_check_lib_save_LIBS
11136 fi
11137 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11138 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11139 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11140   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11141 else
11142   true
11143 fi
11144
11145   CPPFLAGS="$ac_save_CPPFLAGS"
11146   LDFLAGS="$ac_save_LDFLAGS"
11147 #  LIBS="$ac_save_LIBS"
11148
11149     fi
11150   fi
11151
11152
11153   # if that succeeded, then we've really got it.
11154   if test "$have_dpms" = yes; then
11155     cat >>confdefs.h <<\_ACEOF
11156 #define HAVE_DPMS_EXTENSION 1
11157 _ACEOF
11158
11159   fi
11160
11161 elif test "$with_dpms" != no; then
11162   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11163   exit 1
11164 fi
11165
11166
11167 ###############################################################################
11168 #
11169 #       Check for the XINERAMA server extension.
11170 #
11171 ###############################################################################
11172
11173 have_xinerama=no
11174 with_xinerama_req=unspecified
11175
11176 # Check whether --with-xinerama-ext was given.
11177 if test "${with_xinerama_ext+set}" = set; then
11178   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11179 else
11180   with_xinerama=yes
11181 fi
11182
11183
11184
11185    case "$with_xinerama" in
11186     yes) ;;
11187     no)  ;;
11188
11189     /*)
11190      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11191 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11192      d=$with_xinerama/include
11193      if test -d $d; then
11194        X_CFLAGS="-I$d $X_CFLAGS"
11195        { echo "$as_me:$LINENO: result: $d" >&5
11196 echo "${ECHO_T}$d" >&6; }
11197      else
11198        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11199 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11200      fi
11201
11202      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11203 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11204      d=$with_xinerama/lib
11205      if test -d $d; then
11206        X_LIBS="-L$d $X_LIBS"
11207        { echo "$as_me:$LINENO: result: $d" >&5
11208 echo "${ECHO_T}$d" >&6; }
11209      else
11210        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11211 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11212      fi
11213
11214      # replace the directory string with "yes".
11215      with_xinerama_req="yes"
11216      with_xinerama=$with_xinerama_req
11217      ;;
11218
11219     *)
11220      echo ""
11221      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11222      echo "       If it is a directory, then \`DIR/include' will be added to"
11223      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11224      exit 1
11225      ;;
11226    esac
11227
11228
11229 if test "$with_xinerama" = yes; then
11230
11231   # first check for Xinerama.h
11232
11233   ac_save_CPPFLAGS="$CPPFLAGS"
11234   if test \! -z "$includedir" ; then
11235     CPPFLAGS="$CPPFLAGS -I$includedir"
11236   fi
11237   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11238   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11239   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11240 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11241 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11242   echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244   cat >conftest.$ac_ext <<_ACEOF
11245 /* confdefs.h.  */
11246 _ACEOF
11247 cat confdefs.h >>conftest.$ac_ext
11248 cat >>conftest.$ac_ext <<_ACEOF
11249 /* end confdefs.h.  */
11250 #include <X11/Xlib.h>
11251
11252 #include <X11/extensions/Xinerama.h>
11253 _ACEOF
11254 rm -rf conftest.$ac_objext
11255 if { (ac_try="$ac_compile"
11256 case "(($ac_try" in
11257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11258   *) ac_try_echo=$ac_try;;
11259 esac
11260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11261   (eval "$ac_compile") 2>conftest.er1
11262   ac_status=$?
11263   grep -v '^ *+' conftest.er1 >conftest.err
11264   rm -rf conftest.er1
11265   cat conftest.err >&5
11266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11267   (exit $ac_status); } && {
11268          test -z "$ac_c_werror_flag" ||
11269          test ! -s conftest.err
11270        } && test -s conftest.$ac_objext; then
11271   ac_cv_header_X11_extensions_Xinerama_h=yes
11272 else
11273   echo "$as_me: failed program was:" >&5
11274 sed 's/^/| /' conftest.$ac_ext >&5
11275
11276         ac_cv_header_X11_extensions_Xinerama_h=no
11277 fi
11278
11279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11280 fi
11281 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11282 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11283 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11284   have_xinerama=yes
11285 fi
11286
11287
11288   CPPFLAGS="$ac_save_CPPFLAGS"
11289
11290   # if that succeeded, then check for the XINERAMA code in the libraries
11291   if test "$have_xinerama" = yes; then
11292
11293     # first look in -lXext
11294     have_xinerama=no
11295
11296   ac_save_CPPFLAGS="$CPPFLAGS"
11297   ac_save_LDFLAGS="$LDFLAGS"
11298 #  ac_save_LIBS="$LIBS"
11299
11300   if test \! -z "$includedir" ; then
11301     CPPFLAGS="$CPPFLAGS -I$includedir"
11302   fi
11303   # note: $X_CFLAGS includes $x_includes
11304   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11305
11306   if test \! -z "$libdir" ; then
11307     LDFLAGS="$LDFLAGS -L$libdir"
11308   fi
11309   # note: $X_LIBS includes $x_libraries
11310   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11311
11312   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11313   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11314   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11315 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11316 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11317   echo $ECHO_N "(cached) $ECHO_C" >&6
11318 else
11319   ac_check_lib_save_LIBS=$LIBS
11320 LIBS="-lXext -lXext -lX11 $LIBS"
11321 cat >conftest.$ac_ext <<_ACEOF
11322 /* confdefs.h.  */
11323 _ACEOF
11324 cat confdefs.h >>conftest.$ac_ext
11325 cat >>conftest.$ac_ext <<_ACEOF
11326 /* end confdefs.h.  */
11327
11328 /* Override any GCC internal prototype to avoid an error.
11329    Use char because int might match the return type of a GCC
11330    builtin and then its argument prototype would still apply.  */
11331 #ifdef __cplusplus
11332 extern "C"
11333 #endif
11334 char XineramaQueryScreens ();
11335 int
11336 main ()
11337 {
11338 return XineramaQueryScreens ();
11339   ;
11340   return 0;
11341 }
11342 _ACEOF
11343 rm -rf conftest.$ac_objext conftest$ac_exeext
11344 if { (ac_try="$ac_link"
11345 case "(($ac_try" in
11346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11347   *) ac_try_echo=$ac_try;;
11348 esac
11349 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11350   (eval "$ac_link") 2>conftest.er1
11351   ac_status=$?
11352   grep -v '^ *+' conftest.er1 >conftest.err
11353   rm -rf conftest.er1
11354   cat conftest.err >&5
11355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356   (exit $ac_status); } && {
11357          test -z "$ac_c_werror_flag" ||
11358          test ! -s conftest.err
11359        } && test -s conftest$ac_exeext &&
11360        $as_test_x conftest$ac_exeext; then
11361   ac_cv_lib_Xext_XineramaQueryScreens=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364 sed 's/^/| /' conftest.$ac_ext >&5
11365
11366         ac_cv_lib_Xext_XineramaQueryScreens=no
11367 fi
11368
11369 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11370       conftest$ac_exeext conftest.$ac_ext
11371 LIBS=$ac_check_lib_save_LIBS
11372 fi
11373 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11374 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11375 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11376   have_xinerama=yes
11377 else
11378   true
11379 fi
11380
11381   CPPFLAGS="$ac_save_CPPFLAGS"
11382   LDFLAGS="$ac_save_LDFLAGS"
11383 #  LIBS="$ac_save_LIBS"
11384
11385
11386     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11387     if test "$have_xinerama" = no; then
11388
11389   ac_save_CPPFLAGS="$CPPFLAGS"
11390   ac_save_LDFLAGS="$LDFLAGS"
11391 #  ac_save_LIBS="$LIBS"
11392
11393   if test \! -z "$includedir" ; then
11394     CPPFLAGS="$CPPFLAGS -I$includedir"
11395   fi
11396   # note: $X_CFLAGS includes $x_includes
11397   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11398
11399   if test \! -z "$libdir" ; then
11400     LDFLAGS="$LDFLAGS -L$libdir"
11401   fi
11402   # note: $X_LIBS includes $x_libraries
11403   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11404
11405   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11406   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11407   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11408 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11409 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11410   echo $ECHO_N "(cached) $ECHO_C" >&6
11411 else
11412   ac_check_lib_save_LIBS=$LIBS
11413 LIBS="-lXinerama -lXext -lX11 $LIBS"
11414 cat >conftest.$ac_ext <<_ACEOF
11415 /* confdefs.h.  */
11416 _ACEOF
11417 cat confdefs.h >>conftest.$ac_ext
11418 cat >>conftest.$ac_ext <<_ACEOF
11419 /* end confdefs.h.  */
11420
11421 /* Override any GCC internal prototype to avoid an error.
11422    Use char because int might match the return type of a GCC
11423    builtin and then its argument prototype would still apply.  */
11424 #ifdef __cplusplus
11425 extern "C"
11426 #endif
11427 char XineramaQueryScreens ();
11428 int
11429 main ()
11430 {
11431 return XineramaQueryScreens ();
11432   ;
11433   return 0;
11434 }
11435 _ACEOF
11436 rm -rf conftest.$ac_objext conftest$ac_exeext
11437 if { (ac_try="$ac_link"
11438 case "(($ac_try" in
11439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11440   *) ac_try_echo=$ac_try;;
11441 esac
11442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11443   (eval "$ac_link") 2>conftest.er1
11444   ac_status=$?
11445   grep -v '^ *+' conftest.er1 >conftest.err
11446   rm -rf conftest.er1
11447   cat conftest.err >&5
11448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449   (exit $ac_status); } && {
11450          test -z "$ac_c_werror_flag" ||
11451          test ! -s conftest.err
11452        } && test -s conftest$ac_exeext &&
11453        $as_test_x conftest$ac_exeext; then
11454   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11455 else
11456   echo "$as_me: failed program was:" >&5
11457 sed 's/^/| /' conftest.$ac_ext >&5
11458
11459         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11460 fi
11461
11462 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11463       conftest$ac_exeext conftest.$ac_ext
11464 LIBS=$ac_check_lib_save_LIBS
11465 fi
11466 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11467 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11468 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11469   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11470 else
11471   true
11472 fi
11473
11474   CPPFLAGS="$ac_save_CPPFLAGS"
11475   LDFLAGS="$ac_save_LDFLAGS"
11476 #  LIBS="$ac_save_LIBS"
11477
11478     fi
11479   fi
11480
11481   # if that succeeded, then we've really got it.
11482   if test "$have_xinerama" = yes; then
11483     cat >>confdefs.h <<\_ACEOF
11484 #define HAVE_XINERAMA 1
11485 _ACEOF
11486
11487   fi
11488
11489 elif test "$with_xinerama" != no; then
11490   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11491   exit 1
11492 fi
11493
11494
11495 ###############################################################################
11496 #
11497 #       Check for the XF86VMODE server extension (for virtual screens.)
11498 #
11499 ###############################################################################
11500
11501 have_xf86vmode=no
11502 with_xf86vmode_req=unspecified
11503
11504 # Check whether --with-xf86vmode-ext was given.
11505 if test "${with_xf86vmode_ext+set}" = set; then
11506   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11507 else
11508   with_xf86vmode=yes
11509 fi
11510
11511
11512
11513    case "$with_xf86vmode" in
11514     yes) ;;
11515     no)  ;;
11516
11517     /*)
11518      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11519 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11520      d=$with_xf86vmode/include
11521      if test -d $d; then
11522        X_CFLAGS="-I$d $X_CFLAGS"
11523        { echo "$as_me:$LINENO: result: $d" >&5
11524 echo "${ECHO_T}$d" >&6; }
11525      else
11526        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11527 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11528      fi
11529
11530      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11531 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11532      d=$with_xf86vmode/lib
11533      if test -d $d; then
11534        X_LIBS="-L$d $X_LIBS"
11535        { echo "$as_me:$LINENO: result: $d" >&5
11536 echo "${ECHO_T}$d" >&6; }
11537      else
11538        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11539 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11540      fi
11541
11542      # replace the directory string with "yes".
11543      with_xf86vmode_req="yes"
11544      with_xf86vmode=$with_xf86vmode_req
11545      ;;
11546
11547     *)
11548      echo ""
11549      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11550      echo "       If it is a directory, then \`DIR/include' will be added to"
11551      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11552      exit 1
11553      ;;
11554    esac
11555
11556
11557 VIDMODE_LIBS=""
11558
11559 if test "$with_xf86vmode" = yes; then
11560
11561   # first check for xf86vmode.h
11562
11563   ac_save_CPPFLAGS="$CPPFLAGS"
11564   if test \! -z "$includedir" ; then
11565     CPPFLAGS="$CPPFLAGS -I$includedir"
11566   fi
11567   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11568   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11569   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11570 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11571 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11572   echo $ECHO_N "(cached) $ECHO_C" >&6
11573 else
11574   cat >conftest.$ac_ext <<_ACEOF
11575 /* confdefs.h.  */
11576 _ACEOF
11577 cat confdefs.h >>conftest.$ac_ext
11578 cat >>conftest.$ac_ext <<_ACEOF
11579 /* end confdefs.h.  */
11580 #include <X11/Xlib.h>
11581
11582 #include <X11/extensions/xf86vmode.h>
11583 _ACEOF
11584 rm -rf conftest.$ac_objext
11585 if { (ac_try="$ac_compile"
11586 case "(($ac_try" in
11587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11588   *) ac_try_echo=$ac_try;;
11589 esac
11590 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11591   (eval "$ac_compile") 2>conftest.er1
11592   ac_status=$?
11593   grep -v '^ *+' conftest.er1 >conftest.err
11594   rm -rf conftest.er1
11595   cat conftest.err >&5
11596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597   (exit $ac_status); } && {
11598          test -z "$ac_c_werror_flag" ||
11599          test ! -s conftest.err
11600        } && test -s conftest.$ac_objext; then
11601   ac_cv_header_X11_extensions_xf86vmode_h=yes
11602 else
11603   echo "$as_me: failed program was:" >&5
11604 sed 's/^/| /' conftest.$ac_ext >&5
11605
11606         ac_cv_header_X11_extensions_xf86vmode_h=no
11607 fi
11608
11609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11610 fi
11611 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11612 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11613 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11614   have_xf86vmode=yes
11615 fi
11616
11617
11618   CPPFLAGS="$ac_save_CPPFLAGS"
11619
11620   # if that succeeded, then check for the -lXxf86vm
11621   if test "$have_xf86vmode" = yes; then
11622     have_xf86vmode=no
11623
11624   ac_save_CPPFLAGS="$CPPFLAGS"
11625   ac_save_LDFLAGS="$LDFLAGS"
11626 #  ac_save_LIBS="$LIBS"
11627
11628   if test \! -z "$includedir" ; then
11629     CPPFLAGS="$CPPFLAGS -I$includedir"
11630   fi
11631   # note: $X_CFLAGS includes $x_includes
11632   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11633
11634   if test \! -z "$libdir" ; then
11635     LDFLAGS="$LDFLAGS -L$libdir"
11636   fi
11637   # note: $X_LIBS includes $x_libraries
11638   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11639
11640   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11641   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11642   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11643 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11644 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11645   echo $ECHO_N "(cached) $ECHO_C" >&6
11646 else
11647   ac_check_lib_save_LIBS=$LIBS
11648 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11649 cat >conftest.$ac_ext <<_ACEOF
11650 /* confdefs.h.  */
11651 _ACEOF
11652 cat confdefs.h >>conftest.$ac_ext
11653 cat >>conftest.$ac_ext <<_ACEOF
11654 /* end confdefs.h.  */
11655
11656 /* Override any GCC internal prototype to avoid an error.
11657    Use char because int might match the return type of a GCC
11658    builtin and then its argument prototype would still apply.  */
11659 #ifdef __cplusplus
11660 extern "C"
11661 #endif
11662 char XF86VidModeGetViewPort ();
11663 int
11664 main ()
11665 {
11666 return XF86VidModeGetViewPort ();
11667   ;
11668   return 0;
11669 }
11670 _ACEOF
11671 rm -rf conftest.$ac_objext conftest$ac_exeext
11672 if { (ac_try="$ac_link"
11673 case "(($ac_try" in
11674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11675   *) ac_try_echo=$ac_try;;
11676 esac
11677 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11678   (eval "$ac_link") 2>conftest.er1
11679   ac_status=$?
11680   grep -v '^ *+' conftest.er1 >conftest.err
11681   rm -rf conftest.er1
11682   cat conftest.err >&5
11683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684   (exit $ac_status); } && {
11685          test -z "$ac_c_werror_flag" ||
11686          test ! -s conftest.err
11687        } && test -s conftest$ac_exeext &&
11688        $as_test_x conftest$ac_exeext; then
11689   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11690 else
11691   echo "$as_me: failed program was:" >&5
11692 sed 's/^/| /' conftest.$ac_ext >&5
11693
11694         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11695 fi
11696
11697 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11698       conftest$ac_exeext conftest.$ac_ext
11699 LIBS=$ac_check_lib_save_LIBS
11700 fi
11701 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11702 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11703 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11704   have_xf86vmode=yes;
11705                    VIDMODE_LIBS="-lXxf86vm";
11706                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11707 else
11708   true
11709 fi
11710
11711   CPPFLAGS="$ac_save_CPPFLAGS"
11712   LDFLAGS="$ac_save_LDFLAGS"
11713 #  LIBS="$ac_save_LIBS"
11714
11715   fi
11716
11717   # if that succeeded, then we've really got it.
11718   if test "$have_xf86vmode" = yes; then
11719     cat >>confdefs.h <<\_ACEOF
11720 #define HAVE_XF86VMODE 1
11721 _ACEOF
11722
11723   fi
11724
11725 elif test "$with_xf86vmode" != no; then
11726   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11727   exit 1
11728 fi
11729
11730
11731 ###############################################################################
11732 #
11733 #       Check for the XF86VMODE server extension (for gamma fading.)
11734 #
11735 ###############################################################################
11736
11737 have_xf86gamma=no
11738 have_xf86gamma_ramp=no
11739 with_xf86gamma_req=unspecified
11740
11741 # Check whether --with-xf86gamma-ext was given.
11742 if test "${with_xf86gamma_ext+set}" = set; then
11743   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11744 else
11745   with_xf86gamma=yes
11746 fi
11747
11748
11749
11750    case "$with_xf86gamma" in
11751     yes) ;;
11752     no)  ;;
11753
11754     /*)
11755      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11756 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11757      d=$with_xf86gamma/include
11758      if test -d $d; then
11759        X_CFLAGS="-I$d $X_CFLAGS"
11760        { echo "$as_me:$LINENO: result: $d" >&5
11761 echo "${ECHO_T}$d" >&6; }
11762      else
11763        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11764 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11765      fi
11766
11767      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11768 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11769      d=$with_xf86gamma/lib
11770      if test -d $d; then
11771        X_LIBS="-L$d $X_LIBS"
11772        { echo "$as_me:$LINENO: result: $d" >&5
11773 echo "${ECHO_T}$d" >&6; }
11774      else
11775        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11776 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11777      fi
11778
11779      # replace the directory string with "yes".
11780      with_xf86gamma_req="yes"
11781      with_xf86gamma=$with_xf86gamma_req
11782      ;;
11783
11784     *)
11785      echo ""
11786      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11787      echo "       If it is a directory, then \`DIR/include' will be added to"
11788      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11789      exit 1
11790      ;;
11791    esac
11792
11793
11794 if test "$with_xf86gamma" = yes; then
11795
11796   # first check for xf86vmode.h, if we haven't already
11797   if test "$have_xf86vmode" = yes; then
11798     have_xf86gamma=yes
11799   else
11800
11801   ac_save_CPPFLAGS="$CPPFLAGS"
11802   if test \! -z "$includedir" ; then
11803     CPPFLAGS="$CPPFLAGS -I$includedir"
11804   fi
11805   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11806   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11807   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11808 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11809 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11810   echo $ECHO_N "(cached) $ECHO_C" >&6
11811 else
11812   cat >conftest.$ac_ext <<_ACEOF
11813 /* confdefs.h.  */
11814 _ACEOF
11815 cat confdefs.h >>conftest.$ac_ext
11816 cat >>conftest.$ac_ext <<_ACEOF
11817 /* end confdefs.h.  */
11818 #include <X11/Xlib.h>
11819
11820 #include <X11/extensions/xf86vmode.h>
11821 _ACEOF
11822 rm -rf conftest.$ac_objext
11823 if { (ac_try="$ac_compile"
11824 case "(($ac_try" in
11825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11826   *) ac_try_echo=$ac_try;;
11827 esac
11828 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11829   (eval "$ac_compile") 2>conftest.er1
11830   ac_status=$?
11831   grep -v '^ *+' conftest.er1 >conftest.err
11832   rm -rf conftest.er1
11833   cat conftest.err >&5
11834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835   (exit $ac_status); } && {
11836          test -z "$ac_c_werror_flag" ||
11837          test ! -s conftest.err
11838        } && test -s conftest.$ac_objext; then
11839   ac_cv_header_X11_extensions_xf86vmode_h=yes
11840 else
11841   echo "$as_me: failed program was:" >&5
11842 sed 's/^/| /' conftest.$ac_ext >&5
11843
11844         ac_cv_header_X11_extensions_xf86vmode_h=no
11845 fi
11846
11847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11848 fi
11849 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11850 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11851 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11852   have_xf86gamma=yes
11853 fi
11854
11855
11856   CPPFLAGS="$ac_save_CPPFLAGS"
11857   fi
11858
11859   # if that succeeded, then check for the -lXxf86vm
11860   if test "$have_xf86gamma" = yes; then
11861     have_xf86gamma=no
11862
11863   ac_save_CPPFLAGS="$CPPFLAGS"
11864   ac_save_LDFLAGS="$LDFLAGS"
11865 #  ac_save_LIBS="$LIBS"
11866
11867   if test \! -z "$includedir" ; then
11868     CPPFLAGS="$CPPFLAGS -I$includedir"
11869   fi
11870   # note: $X_CFLAGS includes $x_includes
11871   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11872
11873   if test \! -z "$libdir" ; then
11874     LDFLAGS="$LDFLAGS -L$libdir"
11875   fi
11876   # note: $X_LIBS includes $x_libraries
11877   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11878
11879   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11880   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11881   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11882 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11883 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11884   echo $ECHO_N "(cached) $ECHO_C" >&6
11885 else
11886   ac_check_lib_save_LIBS=$LIBS
11887 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11888 cat >conftest.$ac_ext <<_ACEOF
11889 /* confdefs.h.  */
11890 _ACEOF
11891 cat confdefs.h >>conftest.$ac_ext
11892 cat >>conftest.$ac_ext <<_ACEOF
11893 /* end confdefs.h.  */
11894
11895 /* Override any GCC internal prototype to avoid an error.
11896    Use char because int might match the return type of a GCC
11897    builtin and then its argument prototype would still apply.  */
11898 #ifdef __cplusplus
11899 extern "C"
11900 #endif
11901 char XF86VidModeSetGamma ();
11902 int
11903 main ()
11904 {
11905 return XF86VidModeSetGamma ();
11906   ;
11907   return 0;
11908 }
11909 _ACEOF
11910 rm -rf conftest.$ac_objext conftest$ac_exeext
11911 if { (ac_try="$ac_link"
11912 case "(($ac_try" in
11913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914   *) ac_try_echo=$ac_try;;
11915 esac
11916 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11917   (eval "$ac_link") 2>conftest.er1
11918   ac_status=$?
11919   grep -v '^ *+' conftest.er1 >conftest.err
11920   rm -rf conftest.er1
11921   cat conftest.err >&5
11922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11923   (exit $ac_status); } && {
11924          test -z "$ac_c_werror_flag" ||
11925          test ! -s conftest.err
11926        } && test -s conftest$ac_exeext &&
11927        $as_test_x conftest$ac_exeext; then
11928   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11929 else
11930   echo "$as_me: failed program was:" >&5
11931 sed 's/^/| /' conftest.$ac_ext >&5
11932
11933         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11934 fi
11935
11936 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11937       conftest$ac_exeext conftest.$ac_ext
11938 LIBS=$ac_check_lib_save_LIBS
11939 fi
11940 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11941 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11942 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11943   have_xf86gamma=yes
11944 else
11945   true
11946 fi
11947
11948   CPPFLAGS="$ac_save_CPPFLAGS"
11949   LDFLAGS="$ac_save_LDFLAGS"
11950 #  LIBS="$ac_save_LIBS"
11951
11952   fi
11953
11954   # check for the Ramp versions of the functions too.
11955   if test "$have_xf86gamma" = yes; then
11956     have_xf86gamma_ramp=no
11957
11958   ac_save_CPPFLAGS="$CPPFLAGS"
11959   ac_save_LDFLAGS="$LDFLAGS"
11960 #  ac_save_LIBS="$LIBS"
11961
11962   if test \! -z "$includedir" ; then
11963     CPPFLAGS="$CPPFLAGS -I$includedir"
11964   fi
11965   # note: $X_CFLAGS includes $x_includes
11966   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11967
11968   if test \! -z "$libdir" ; then
11969     LDFLAGS="$LDFLAGS -L$libdir"
11970   fi
11971   # note: $X_LIBS includes $x_libraries
11972   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11973
11974   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11975   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11976   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11977 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11978 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11979   echo $ECHO_N "(cached) $ECHO_C" >&6
11980 else
11981   ac_check_lib_save_LIBS=$LIBS
11982 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11983 cat >conftest.$ac_ext <<_ACEOF
11984 /* confdefs.h.  */
11985 _ACEOF
11986 cat confdefs.h >>conftest.$ac_ext
11987 cat >>conftest.$ac_ext <<_ACEOF
11988 /* end confdefs.h.  */
11989
11990 /* Override any GCC internal prototype to avoid an error.
11991    Use char because int might match the return type of a GCC
11992    builtin and then its argument prototype would still apply.  */
11993 #ifdef __cplusplus
11994 extern "C"
11995 #endif
11996 char XF86VidModeSetGammaRamp ();
11997 int
11998 main ()
11999 {
12000 return XF86VidModeSetGammaRamp ();
12001   ;
12002   return 0;
12003 }
12004 _ACEOF
12005 rm -rf conftest.$ac_objext conftest$ac_exeext
12006 if { (ac_try="$ac_link"
12007 case "(($ac_try" in
12008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12009   *) ac_try_echo=$ac_try;;
12010 esac
12011 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12012   (eval "$ac_link") 2>conftest.er1
12013   ac_status=$?
12014   grep -v '^ *+' conftest.er1 >conftest.err
12015   rm -rf conftest.er1
12016   cat conftest.err >&5
12017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12018   (exit $ac_status); } && {
12019          test -z "$ac_c_werror_flag" ||
12020          test ! -s conftest.err
12021        } && test -s conftest$ac_exeext &&
12022        $as_test_x conftest$ac_exeext; then
12023   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12024 else
12025   echo "$as_me: failed program was:" >&5
12026 sed 's/^/| /' conftest.$ac_ext >&5
12027
12028         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12029 fi
12030
12031 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12032       conftest$ac_exeext conftest.$ac_ext
12033 LIBS=$ac_check_lib_save_LIBS
12034 fi
12035 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12036 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12037 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12038   have_xf86gamma_ramp=yes
12039 else
12040   true
12041 fi
12042
12043   CPPFLAGS="$ac_save_CPPFLAGS"
12044   LDFLAGS="$ac_save_LDFLAGS"
12045 #  LIBS="$ac_save_LIBS"
12046
12047   fi
12048
12049   # if those tests succeeded, then we've really got the functions.
12050   if test "$have_xf86gamma" = yes; then
12051     cat >>confdefs.h <<\_ACEOF
12052 #define HAVE_XF86VMODE_GAMMA 1
12053 _ACEOF
12054
12055   fi
12056
12057   if test "$have_xf86gamma_ramp" = yes; then
12058     cat >>confdefs.h <<\_ACEOF
12059 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12060 _ACEOF
12061
12062   fi
12063
12064   # pull in the lib, if we haven't already
12065   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12066     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12067   fi
12068
12069 elif test "$with_xf86gamma" != no; then
12070   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12071   exit 1
12072 fi
12073
12074
12075 ###############################################################################
12076 #
12077 #       Check for the RANDR (Resize and Rotate) server extension.
12078 #
12079 #       We need this to detect when the resolution of the desktop
12080 #       has changed out from under us (this is a newer, different
12081 #       mechanism than the XF86VMODE virtual viewports.)
12082 #
12083 ###############################################################################
12084
12085 have_randr=no
12086 with_randr_req=unspecified
12087
12088 # Check whether --with-randr-ext was given.
12089 if test "${with_randr_ext+set}" = set; then
12090   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12091 else
12092   with_randr=yes
12093 fi
12094
12095
12096
12097    case "$with_randr" in
12098     yes) ;;
12099     no)  ;;
12100
12101     /*)
12102      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12103 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12104      d=$with_randr/include
12105      if test -d $d; then
12106        X_CFLAGS="-I$d $X_CFLAGS"
12107        { echo "$as_me:$LINENO: result: $d" >&5
12108 echo "${ECHO_T}$d" >&6; }
12109      else
12110        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12111 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12112      fi
12113
12114      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12115 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12116      d=$with_randr/lib
12117      if test -d $d; then
12118        X_LIBS="-L$d $X_LIBS"
12119        { echo "$as_me:$LINENO: result: $d" >&5
12120 echo "${ECHO_T}$d" >&6; }
12121      else
12122        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12123 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12124      fi
12125
12126      # replace the directory string with "yes".
12127      with_randr_req="yes"
12128      with_randr=$with_randr_req
12129      ;;
12130
12131     *)
12132      echo ""
12133      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12134      echo "       If it is a directory, then \`DIR/include' will be added to"
12135      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12136      exit 1
12137      ;;
12138    esac
12139
12140
12141 if test "$with_randr" = yes; then
12142
12143   # first check for Randr.h
12144
12145   ac_save_CPPFLAGS="$CPPFLAGS"
12146   if test \! -z "$includedir" ; then
12147     CPPFLAGS="$CPPFLAGS -I$includedir"
12148   fi
12149   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12150   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12151   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12152 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12153 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12154   echo $ECHO_N "(cached) $ECHO_C" >&6
12155 else
12156   cat >conftest.$ac_ext <<_ACEOF
12157 /* confdefs.h.  */
12158 _ACEOF
12159 cat confdefs.h >>conftest.$ac_ext
12160 cat >>conftest.$ac_ext <<_ACEOF
12161 /* end confdefs.h.  */
12162 #include <X11/Xlib.h>
12163
12164 #include <X11/extensions/Xrandr.h>
12165 _ACEOF
12166 rm -rf conftest.$ac_objext
12167 if { (ac_try="$ac_compile"
12168 case "(($ac_try" in
12169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12170   *) ac_try_echo=$ac_try;;
12171 esac
12172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12173   (eval "$ac_compile") 2>conftest.er1
12174   ac_status=$?
12175   grep -v '^ *+' conftest.er1 >conftest.err
12176   rm -rf conftest.er1
12177   cat conftest.err >&5
12178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179   (exit $ac_status); } && {
12180          test -z "$ac_c_werror_flag" ||
12181          test ! -s conftest.err
12182        } && test -s conftest.$ac_objext; then
12183   ac_cv_header_X11_extensions_Xrandr_h=yes
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 sed 's/^/| /' conftest.$ac_ext >&5
12187
12188         ac_cv_header_X11_extensions_Xrandr_h=no
12189 fi
12190
12191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12192 fi
12193 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12194 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12195 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12196   have_randr=yes
12197 fi
12198
12199
12200   CPPFLAGS="$ac_save_CPPFLAGS"
12201
12202   # if that succeeded, then check for the XRR code in the libraries
12203   if test "$have_randr" = yes; then
12204
12205     # RANDR probably needs -lXrender
12206     xrender_libs=
12207
12208   ac_save_CPPFLAGS="$CPPFLAGS"
12209   ac_save_LDFLAGS="$LDFLAGS"
12210 #  ac_save_LIBS="$LIBS"
12211
12212   if test \! -z "$includedir" ; then
12213     CPPFLAGS="$CPPFLAGS -I$includedir"
12214   fi
12215   # note: $X_CFLAGS includes $x_includes
12216   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12217
12218   if test \! -z "$libdir" ; then
12219     LDFLAGS="$LDFLAGS -L$libdir"
12220   fi
12221   # note: $X_LIBS includes $x_libraries
12222   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12223
12224   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12225   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12226   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12227 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12228 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12229   echo $ECHO_N "(cached) $ECHO_C" >&6
12230 else
12231   ac_check_lib_save_LIBS=$LIBS
12232 LIBS="-lXrender -lXext -lX11 $LIBS"
12233 cat >conftest.$ac_ext <<_ACEOF
12234 /* confdefs.h.  */
12235 _ACEOF
12236 cat confdefs.h >>conftest.$ac_ext
12237 cat >>conftest.$ac_ext <<_ACEOF
12238 /* end confdefs.h.  */
12239
12240 /* Override any GCC internal prototype to avoid an error.
12241    Use char because int might match the return type of a GCC
12242    builtin and then its argument prototype would still apply.  */
12243 #ifdef __cplusplus
12244 extern "C"
12245 #endif
12246 char XRenderSetSubpixelOrder ();
12247 int
12248 main ()
12249 {
12250 return XRenderSetSubpixelOrder ();
12251   ;
12252   return 0;
12253 }
12254 _ACEOF
12255 rm -rf conftest.$ac_objext conftest$ac_exeext
12256 if { (ac_try="$ac_link"
12257 case "(($ac_try" in
12258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12259   *) ac_try_echo=$ac_try;;
12260 esac
12261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12262   (eval "$ac_link") 2>conftest.er1
12263   ac_status=$?
12264   grep -v '^ *+' conftest.er1 >conftest.err
12265   rm -rf conftest.er1
12266   cat conftest.err >&5
12267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12268   (exit $ac_status); } && {
12269          test -z "$ac_c_werror_flag" ||
12270          test ! -s conftest.err
12271        } && test -s conftest$ac_exeext &&
12272        $as_test_x conftest$ac_exeext; then
12273   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 sed 's/^/| /' conftest.$ac_ext >&5
12277
12278         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12279 fi
12280
12281 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12282       conftest$ac_exeext conftest.$ac_ext
12283 LIBS=$ac_check_lib_save_LIBS
12284 fi
12285 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12286 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12287 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12288   xrender_libs="-lXrender"
12289 else
12290   true
12291 fi
12292
12293   CPPFLAGS="$ac_save_CPPFLAGS"
12294   LDFLAGS="$ac_save_LDFLAGS"
12295 #  LIBS="$ac_save_LIBS"
12296
12297
12298     # first look for RANDR in -lXext
12299     have_randr=no
12300
12301   ac_save_CPPFLAGS="$CPPFLAGS"
12302   ac_save_LDFLAGS="$LDFLAGS"
12303 #  ac_save_LIBS="$LIBS"
12304
12305   if test \! -z "$includedir" ; then
12306     CPPFLAGS="$CPPFLAGS -I$includedir"
12307   fi
12308   # note: $X_CFLAGS includes $x_includes
12309   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12310
12311   if test \! -z "$libdir" ; then
12312     LDFLAGS="$LDFLAGS -L$libdir"
12313   fi
12314   # note: $X_LIBS includes $x_libraries
12315   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12316
12317   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12318   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12319   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12320 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12321 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12322   echo $ECHO_N "(cached) $ECHO_C" >&6
12323 else
12324   ac_check_lib_save_LIBS=$LIBS
12325 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12326 cat >conftest.$ac_ext <<_ACEOF
12327 /* confdefs.h.  */
12328 _ACEOF
12329 cat confdefs.h >>conftest.$ac_ext
12330 cat >>conftest.$ac_ext <<_ACEOF
12331 /* end confdefs.h.  */
12332
12333 /* Override any GCC internal prototype to avoid an error.
12334    Use char because int might match the return type of a GCC
12335    builtin and then its argument prototype would still apply.  */
12336 #ifdef __cplusplus
12337 extern "C"
12338 #endif
12339 char XRRGetScreenInfo ();
12340 int
12341 main ()
12342 {
12343 return XRRGetScreenInfo ();
12344   ;
12345   return 0;
12346 }
12347 _ACEOF
12348 rm -rf conftest.$ac_objext conftest$ac_exeext
12349 if { (ac_try="$ac_link"
12350 case "(($ac_try" in
12351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12352   *) ac_try_echo=$ac_try;;
12353 esac
12354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12355   (eval "$ac_link") 2>conftest.er1
12356   ac_status=$?
12357   grep -v '^ *+' conftest.er1 >conftest.err
12358   rm -rf conftest.er1
12359   cat conftest.err >&5
12360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361   (exit $ac_status); } && {
12362          test -z "$ac_c_werror_flag" ||
12363          test ! -s conftest.err
12364        } && test -s conftest$ac_exeext &&
12365        $as_test_x conftest$ac_exeext; then
12366   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 sed 's/^/| /' conftest.$ac_ext >&5
12370
12371         ac_cv_lib_Xext_XRRGetScreenInfo=no
12372 fi
12373
12374 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12375       conftest$ac_exeext conftest.$ac_ext
12376 LIBS=$ac_check_lib_save_LIBS
12377 fi
12378 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12379 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12380 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12381   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12382 else
12383   true
12384 fi
12385
12386   CPPFLAGS="$ac_save_CPPFLAGS"
12387   LDFLAGS="$ac_save_LDFLAGS"
12388 #  LIBS="$ac_save_LIBS"
12389
12390
12391     # if that failed, look in -lXrandr
12392     if test "$have_randr" = no; then
12393
12394   ac_save_CPPFLAGS="$CPPFLAGS"
12395   ac_save_LDFLAGS="$LDFLAGS"
12396 #  ac_save_LIBS="$LIBS"
12397
12398   if test \! -z "$includedir" ; then
12399     CPPFLAGS="$CPPFLAGS -I$includedir"
12400   fi
12401   # note: $X_CFLAGS includes $x_includes
12402   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12403
12404   if test \! -z "$libdir" ; then
12405     LDFLAGS="$LDFLAGS -L$libdir"
12406   fi
12407   # note: $X_LIBS includes $x_libraries
12408   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12409
12410   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12411   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12412   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12413 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12414 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12415   echo $ECHO_N "(cached) $ECHO_C" >&6
12416 else
12417   ac_check_lib_save_LIBS=$LIBS
12418 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12419 cat >conftest.$ac_ext <<_ACEOF
12420 /* confdefs.h.  */
12421 _ACEOF
12422 cat confdefs.h >>conftest.$ac_ext
12423 cat >>conftest.$ac_ext <<_ACEOF
12424 /* end confdefs.h.  */
12425
12426 /* Override any GCC internal prototype to avoid an error.
12427    Use char because int might match the return type of a GCC
12428    builtin and then its argument prototype would still apply.  */
12429 #ifdef __cplusplus
12430 extern "C"
12431 #endif
12432 char XRRGetScreenInfo ();
12433 int
12434 main ()
12435 {
12436 return XRRGetScreenInfo ();
12437   ;
12438   return 0;
12439 }
12440 _ACEOF
12441 rm -rf conftest.$ac_objext conftest$ac_exeext
12442 if { (ac_try="$ac_link"
12443 case "(($ac_try" in
12444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12445   *) ac_try_echo=$ac_try;;
12446 esac
12447 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12448   (eval "$ac_link") 2>conftest.er1
12449   ac_status=$?
12450   grep -v '^ *+' conftest.er1 >conftest.err
12451   rm -rf conftest.er1
12452   cat conftest.err >&5
12453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12454   (exit $ac_status); } && {
12455          test -z "$ac_c_werror_flag" ||
12456          test ! -s conftest.err
12457        } && test -s conftest$ac_exeext &&
12458        $as_test_x conftest$ac_exeext; then
12459   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12460 else
12461   echo "$as_me: failed program was:" >&5
12462 sed 's/^/| /' conftest.$ac_ext >&5
12463
12464         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12465 fi
12466
12467 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12468       conftest$ac_exeext conftest.$ac_ext
12469 LIBS=$ac_check_lib_save_LIBS
12470 fi
12471 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12472 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12473 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12474   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12475 else
12476   true
12477 fi
12478
12479   CPPFLAGS="$ac_save_CPPFLAGS"
12480   LDFLAGS="$ac_save_LDFLAGS"
12481 #  LIBS="$ac_save_LIBS"
12482
12483     fi
12484   fi
12485
12486   # if that succeeded, then we've really got it.
12487   if test "$have_randr" = yes; then
12488     cat >>confdefs.h <<\_ACEOF
12489 #define HAVE_RANDR 1
12490 _ACEOF
12491
12492   fi
12493
12494 elif test "$with_randr" != no; then
12495   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12496   exit 1
12497 fi
12498
12499
12500 ###############################################################################
12501 #
12502 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12503 #       using other XF86 stuff.)
12504 #
12505 ###############################################################################
12506
12507 have_xf86miscsetgrabkeysstate=no
12508 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12509
12510   ac_save_CPPFLAGS="$CPPFLAGS"
12511   ac_save_LDFLAGS="$LDFLAGS"
12512 #  ac_save_LIBS="$LIBS"
12513
12514   if test \! -z "$includedir" ; then
12515     CPPFLAGS="$CPPFLAGS -I$includedir"
12516   fi
12517   # note: $X_CFLAGS includes $x_includes
12518   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12519
12520   if test \! -z "$libdir" ; then
12521     LDFLAGS="$LDFLAGS -L$libdir"
12522   fi
12523   # note: $X_LIBS includes $x_libraries
12524   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12525
12526   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12527   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12528   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12529 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12530 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533   ac_check_lib_save_LIBS=$LIBS
12534 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12535 cat >conftest.$ac_ext <<_ACEOF
12536 /* confdefs.h.  */
12537 _ACEOF
12538 cat confdefs.h >>conftest.$ac_ext
12539 cat >>conftest.$ac_ext <<_ACEOF
12540 /* end confdefs.h.  */
12541
12542 /* Override any GCC internal prototype to avoid an error.
12543    Use char because int might match the return type of a GCC
12544    builtin and then its argument prototype would still apply.  */
12545 #ifdef __cplusplus
12546 extern "C"
12547 #endif
12548 char XF86MiscSetGrabKeysState ();
12549 int
12550 main ()
12551 {
12552 return XF86MiscSetGrabKeysState ();
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557 rm -rf conftest.$ac_objext conftest$ac_exeext
12558 if { (ac_try="$ac_link"
12559 case "(($ac_try" in
12560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12561   *) ac_try_echo=$ac_try;;
12562 esac
12563 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12564   (eval "$ac_link") 2>conftest.er1
12565   ac_status=$?
12566   grep -v '^ *+' conftest.er1 >conftest.err
12567   rm -rf conftest.er1
12568   cat conftest.err >&5
12569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570   (exit $ac_status); } && {
12571          test -z "$ac_c_werror_flag" ||
12572          test ! -s conftest.err
12573        } && test -s conftest$ac_exeext &&
12574        $as_test_x conftest$ac_exeext; then
12575   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12576 else
12577   echo "$as_me: failed program was:" >&5
12578 sed 's/^/| /' conftest.$ac_ext >&5
12579
12580         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12581 fi
12582
12583 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12584       conftest$ac_exeext conftest.$ac_ext
12585 LIBS=$ac_check_lib_save_LIBS
12586 fi
12587 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12588 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12589 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12590   have_xf86miscsetgrabkeysstate=yes
12591 else
12592   true
12593 fi
12594
12595   CPPFLAGS="$ac_save_CPPFLAGS"
12596   LDFLAGS="$ac_save_LDFLAGS"
12597 #  LIBS="$ac_save_LIBS"
12598
12599   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12600     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12601     cat >>confdefs.h <<\_ACEOF
12602 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12603 _ACEOF
12604
12605   fi
12606 fi
12607
12608
12609 ###############################################################################
12610 #
12611 #       Check for HP XHPDisableReset and XHPEnableReset.
12612 #
12613 ###############################################################################
12614
12615 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12616 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12617
12618   ac_save_CPPFLAGS="$CPPFLAGS"
12619   if test \! -z "$includedir" ; then
12620     CPPFLAGS="$CPPFLAGS -I$includedir"
12621   fi
12622   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12623   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12624   cat >conftest.$ac_ext <<_ACEOF
12625 /* confdefs.h.  */
12626 _ACEOF
12627 cat confdefs.h >>conftest.$ac_ext
12628 cat >>conftest.$ac_ext <<_ACEOF
12629 /* end confdefs.h.  */
12630 #include <X11/XHPlib.h>
12631
12632 _ACEOF
12633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12634   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12635   cat >>confdefs.h <<\_ACEOF
12636 #define HAVE_XHPDISABLERESET 1
12637 _ACEOF
12638
12639                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12640                    { echo "$as_me:$LINENO: result: yes" >&5
12641 echo "${ECHO_T}yes" >&6; }
12642 else
12643   { echo "$as_me:$LINENO: result: no" >&5
12644 echo "${ECHO_T}no" >&6; }
12645 fi
12646 rm -rf conftest*
12647
12648   CPPFLAGS="$ac_save_CPPFLAGS"
12649
12650
12651 ###############################################################################
12652 #
12653 #       Check for /proc/interrupts.
12654 #
12655 ###############################################################################
12656
12657 have_proc_interrupts=no
12658 with_proc_interrupts_req=unspecified
12659
12660 # Check whether --with-proc-interrupts was given.
12661 if test "${with_proc_interrupts+set}" = set; then
12662   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12663 else
12664   with_proc_interrupts=yes
12665 fi
12666
12667
12668 if test "$with_proc_interrupts" = yes; then
12669
12670   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12671   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12672   # check that it has the bits we need, but otherwise we'll just go on faith.
12673   #
12674   have_proc_interrupts=yes
12675
12676   if test -f /proc/interrupts; then
12677    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12678 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12679 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12680   echo $ECHO_N "(cached) $ECHO_C" >&6
12681 else
12682   ac_cv_have_proc_interrupts=no
12683      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12684        ac_cv_have_proc_interrupts=yes
12685      fi
12686
12687 fi
12688 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12689 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12690    have_proc_interrupts=$ac_cv_have_proc_interrupts
12691   fi
12692
12693   if test "$have_proc_interrupts" = yes; then
12694     cat >>confdefs.h <<\_ACEOF
12695 #define HAVE_PROC_INTERRUPTS 1
12696 _ACEOF
12697
12698   fi
12699
12700 elif test "$with_proc_interrupts" != no; then
12701   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12702   exit 1
12703 fi
12704
12705
12706 ###############################################################################
12707 #
12708 #       The --enable-locking option
12709 #
12710 ###############################################################################
12711
12712 # Check whether --enable-locking was given.
12713 if test "${enable_locking+set}" = set; then
12714   enableval=$enable_locking; enable_locking="$enableval"
12715 else
12716   if test "$ac_macosx" = yes; then
12717     # We can't lock on MacOS X, so default to not compiling in support for it.
12718     # But allow --enable-locking to override that, so I can debug Linux locking
12719     # under MacOS X11.
12720     enable_locking=no
12721    else
12722     enable_locking=yes
12723    fi
12724 fi
12725
12726 if test "$enable_locking" = yes; then
12727   true
12728 elif test "$enable_locking" = no; then
12729   cat >>confdefs.h <<\_ACEOF
12730 #define NO_LOCKING 1
12731 _ACEOF
12732
12733 else
12734   echo "error: must be yes or no: --enable-locking=$enable_locking"
12735   exit 1
12736 fi
12737
12738
12739 ###############################################################################
12740 #
12741 #       Whether to allow root password to unblank.
12742 #
12743 ###############################################################################
12744 # Check whether --enable-root-passwd was given.
12745 if test "${enable_root_passwd+set}" = set; then
12746   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12747 else
12748   enable_root_passwd=yes
12749 fi
12750
12751 if test "$enable_root_passwd" = yes; then
12752   cat >>confdefs.h <<\_ACEOF
12753 #define ALLOW_ROOT_PASSWD 1
12754 _ACEOF
12755
12756   true
12757 elif test "$enable_root_passwd" != no; then
12758   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12759   exit 1
12760 fi
12761
12762 ###############################################################################
12763 #
12764 #       Check for PAM.
12765 #
12766 ###############################################################################
12767
12768 case "$host" in
12769   *-solaris*)
12770    # Solaris systems tend to come with PAM misconfigured.
12771    #  Don't build it by default, even if the headers exist.
12772    with_pam_default=no
12773    ;;
12774   *)
12775    # Default to building PAM support on all other systems, if it exists.
12776    with_pam_default=yes
12777   ;;
12778 esac
12779
12780 have_pam=no
12781 with_pam_req=unspecified
12782
12783
12784 # Check whether --with-pam was given.
12785 if test "${with_pam+set}" = set; then
12786   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12787 else
12788   with_pam=$with_pam_default
12789 fi
12790
12791
12792
12793 # Check whether --with-pam_service_name was given.
12794 if test "${with_pam_service_name+set}" = set; then
12795   withval=$with_pam_service_name; pam_service_name="$withval"
12796 else
12797   pam_service_name="xscreensaver"
12798 fi
12799
12800
12801
12802    case "$with_pam" in
12803     yes) ;;
12804     no)  ;;
12805
12806     /*)
12807      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12808 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12809      d=$with_pam/include
12810      if test -d $d; then
12811        X_CFLAGS="-I$d $X_CFLAGS"
12812        { echo "$as_me:$LINENO: result: $d" >&5
12813 echo "${ECHO_T}$d" >&6; }
12814      else
12815        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12816 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12817      fi
12818
12819      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12820 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12821      d=$with_pam/lib
12822      if test -d $d; then
12823        X_LIBS="-L$d $X_LIBS"
12824        { echo "$as_me:$LINENO: result: $d" >&5
12825 echo "${ECHO_T}$d" >&6; }
12826      else
12827        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12828 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12829      fi
12830
12831      # replace the directory string with "yes".
12832      with_pam_req="yes"
12833      with_pam=$with_pam_req
12834      ;;
12835
12836     *)
12837      echo ""
12838      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12839      echo "       If it is a directory, then \`DIR/include' will be added to"
12840      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12841      exit 1
12842      ;;
12843    esac
12844
12845
12846 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12847   { echo "$as_me:$LINENO: checking for PAM" >&5
12848 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12849 if test "${ac_cv_pam+set}" = set; then
12850   echo $ECHO_N "(cached) $ECHO_C" >&6
12851 else
12852
12853   ac_save_CPPFLAGS="$CPPFLAGS"
12854   if test \! -z "$includedir" ; then
12855     CPPFLAGS="$CPPFLAGS -I$includedir"
12856   fi
12857   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12858   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12859   cat >conftest.$ac_ext <<_ACEOF
12860 /* confdefs.h.  */
12861 _ACEOF
12862 cat confdefs.h >>conftest.$ac_ext
12863 cat >>conftest.$ac_ext <<_ACEOF
12864 /* end confdefs.h.  */
12865 #include <security/pam_appl.h>
12866 int
12867 main ()
12868 {
12869
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -rf conftest.$ac_objext
12875 if { (ac_try="$ac_compile"
12876 case "(($ac_try" in
12877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12878   *) ac_try_echo=$ac_try;;
12879 esac
12880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12881   (eval "$ac_compile") 2>conftest.er1
12882   ac_status=$?
12883   grep -v '^ *+' conftest.er1 >conftest.err
12884   rm -rf conftest.er1
12885   cat conftest.err >&5
12886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887   (exit $ac_status); } && {
12888          test -z "$ac_c_werror_flag" ||
12889          test ! -s conftest.err
12890        } && test -s conftest.$ac_objext; then
12891   ac_cv_pam=yes
12892 else
12893   echo "$as_me: failed program was:" >&5
12894 sed 's/^/| /' conftest.$ac_ext >&5
12895
12896         ac_cv_pam=no
12897 fi
12898
12899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12900   CPPFLAGS="$ac_save_CPPFLAGS"
12901 fi
12902 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12903 echo "${ECHO_T}$ac_cv_pam" >&6; }
12904   if test "$ac_cv_pam" = yes ; then
12905     have_pam=yes
12906     cat >>confdefs.h <<\_ACEOF
12907 #define HAVE_PAM 1
12908 _ACEOF
12909
12910     cat >>confdefs.h <<_ACEOF
12911 #define PAM_SERVICE_NAME "$pam_service_name"
12912 _ACEOF
12913
12914
12915     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12916
12917     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12918     # those are in libc.  On Linux and Solaris, they're in libdl.
12919     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12920 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
12921 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   ac_check_lib_save_LIBS=$LIBS
12925 LIBS="-ldl  $LIBS"
12926 cat >conftest.$ac_ext <<_ACEOF
12927 /* confdefs.h.  */
12928 _ACEOF
12929 cat confdefs.h >>conftest.$ac_ext
12930 cat >>conftest.$ac_ext <<_ACEOF
12931 /* end confdefs.h.  */
12932
12933 /* Override any GCC internal prototype to avoid an error.
12934    Use char because int might match the return type of a GCC
12935    builtin and then its argument prototype would still apply.  */
12936 #ifdef __cplusplus
12937 extern "C"
12938 #endif
12939 char dlopen ();
12940 int
12941 main ()
12942 {
12943 return dlopen ();
12944   ;
12945   return 0;
12946 }
12947 _ACEOF
12948 rm -rf conftest.$ac_objext conftest$ac_exeext
12949 if { (ac_try="$ac_link"
12950 case "(($ac_try" in
12951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12952   *) ac_try_echo=$ac_try;;
12953 esac
12954 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12955   (eval "$ac_link") 2>conftest.er1
12956   ac_status=$?
12957   grep -v '^ *+' conftest.er1 >conftest.err
12958   rm -rf conftest.er1
12959   cat conftest.err >&5
12960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12961   (exit $ac_status); } && {
12962          test -z "$ac_c_werror_flag" ||
12963          test ! -s conftest.err
12964        } && test -s conftest$ac_exeext &&
12965        $as_test_x conftest$ac_exeext; then
12966   ac_cv_lib_dl_dlopen=yes
12967 else
12968   echo "$as_me: failed program was:" >&5
12969 sed 's/^/| /' conftest.$ac_ext >&5
12970
12971         ac_cv_lib_dl_dlopen=no
12972 fi
12973
12974 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12975       conftest$ac_exeext conftest.$ac_ext
12976 LIBS=$ac_check_lib_save_LIBS
12977 fi
12978 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12979 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
12980 if test $ac_cv_lib_dl_dlopen = yes; then
12981   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12982 fi
12983
12984
12985     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12986     have_timedwait=no
12987     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12988 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
12989 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12990   echo $ECHO_N "(cached) $ECHO_C" >&6
12991 else
12992   ac_check_lib_save_LIBS=$LIBS
12993 LIBS="-lc  $LIBS"
12994 cat >conftest.$ac_ext <<_ACEOF
12995 /* confdefs.h.  */
12996 _ACEOF
12997 cat confdefs.h >>conftest.$ac_ext
12998 cat >>conftest.$ac_ext <<_ACEOF
12999 /* end confdefs.h.  */
13000
13001 /* Override any GCC internal prototype to avoid an error.
13002    Use char because int might match the return type of a GCC
13003    builtin and then its argument prototype would still apply.  */
13004 #ifdef __cplusplus
13005 extern "C"
13006 #endif
13007 char sigtimedwait ();
13008 int
13009 main ()
13010 {
13011 return sigtimedwait ();
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 rm -rf conftest.$ac_objext conftest$ac_exeext
13017 if { (ac_try="$ac_link"
13018 case "(($ac_try" in
13019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13020   *) ac_try_echo=$ac_try;;
13021 esac
13022 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13023   (eval "$ac_link") 2>conftest.er1
13024   ac_status=$?
13025   grep -v '^ *+' conftest.er1 >conftest.err
13026   rm -rf conftest.er1
13027   cat conftest.err >&5
13028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13029   (exit $ac_status); } && {
13030          test -z "$ac_c_werror_flag" ||
13031          test ! -s conftest.err
13032        } && test -s conftest$ac_exeext &&
13033        $as_test_x conftest$ac_exeext; then
13034   ac_cv_lib_c_sigtimedwait=yes
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 sed 's/^/| /' conftest.$ac_ext >&5
13038
13039         ac_cv_lib_c_sigtimedwait=no
13040 fi
13041
13042 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13043       conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13047 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13048 if test $ac_cv_lib_c_sigtimedwait = yes; then
13049   have_timedwait=yes
13050                   cat >>confdefs.h <<\_ACEOF
13051 #define HAVE_SIGTIMEDWAIT 1
13052 _ACEOF
13053
13054 fi
13055
13056     if test "$have_timedwait" = no ; then
13057       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13058 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13059 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13060   echo $ECHO_N "(cached) $ECHO_C" >&6
13061 else
13062   ac_check_lib_save_LIBS=$LIBS
13063 LIBS="-lrt  $LIBS"
13064 cat >conftest.$ac_ext <<_ACEOF
13065 /* confdefs.h.  */
13066 _ACEOF
13067 cat confdefs.h >>conftest.$ac_ext
13068 cat >>conftest.$ac_ext <<_ACEOF
13069 /* end confdefs.h.  */
13070
13071 /* Override any GCC internal prototype to avoid an error.
13072    Use char because int might match the return type of a GCC
13073    builtin and then its argument prototype would still apply.  */
13074 #ifdef __cplusplus
13075 extern "C"
13076 #endif
13077 char sigtimedwait ();
13078 int
13079 main ()
13080 {
13081 return sigtimedwait ();
13082   ;
13083   return 0;
13084 }
13085 _ACEOF
13086 rm -rf conftest.$ac_objext conftest$ac_exeext
13087 if { (ac_try="$ac_link"
13088 case "(($ac_try" in
13089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13090   *) ac_try_echo=$ac_try;;
13091 esac
13092 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13093   (eval "$ac_link") 2>conftest.er1
13094   ac_status=$?
13095   grep -v '^ *+' conftest.er1 >conftest.err
13096   rm -rf conftest.er1
13097   cat conftest.err >&5
13098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099   (exit $ac_status); } && {
13100          test -z "$ac_c_werror_flag" ||
13101          test ! -s conftest.err
13102        } && test -s conftest$ac_exeext &&
13103        $as_test_x conftest$ac_exeext; then
13104   ac_cv_lib_rt_sigtimedwait=yes
13105 else
13106   echo "$as_me: failed program was:" >&5
13107 sed 's/^/| /' conftest.$ac_ext >&5
13108
13109         ac_cv_lib_rt_sigtimedwait=no
13110 fi
13111
13112 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13113       conftest$ac_exeext conftest.$ac_ext
13114 LIBS=$ac_check_lib_save_LIBS
13115 fi
13116 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13117 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13118 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13119   have_timedwait=yes
13120                                       cat >>confdefs.h <<\_ACEOF
13121 #define HAVE_SIGTIMEDWAIT 1
13122 _ACEOF
13123
13124                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13125 fi
13126
13127     fi
13128
13129     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13130 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13131     if test "${ac_cv_pam_strerror_args+set}" = set; then
13132   echo $ECHO_N "(cached) $ECHO_C" >&6
13133 else
13134
13135   ac_save_CPPFLAGS="$CPPFLAGS"
13136   if test \! -z "$includedir" ; then
13137     CPPFLAGS="$CPPFLAGS -I$includedir"
13138   fi
13139   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13140   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13141   cat >conftest.$ac_ext <<_ACEOF
13142 /* confdefs.h.  */
13143 _ACEOF
13144 cat confdefs.h >>conftest.$ac_ext
13145 cat >>conftest.$ac_ext <<_ACEOF
13146 /* end confdefs.h.  */
13147 #include <stdio.h>
13148                         #include <stdlib.h>
13149                         #include <security/pam_appl.h>
13150 int
13151 main ()
13152 {
13153 pam_handle_t *pamh = 0;
13154                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13155   ;
13156   return 0;
13157 }
13158 _ACEOF
13159 rm -rf conftest.$ac_objext
13160 if { (ac_try="$ac_compile"
13161 case "(($ac_try" in
13162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13163   *) ac_try_echo=$ac_try;;
13164 esac
13165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13166   (eval "$ac_compile") 2>conftest.er1
13167   ac_status=$?
13168   grep -v '^ *+' conftest.er1 >conftest.err
13169   rm -rf conftest.er1
13170   cat conftest.err >&5
13171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172   (exit $ac_status); } && {
13173          test -z "$ac_c_werror_flag" ||
13174          test ! -s conftest.err
13175        } && test -s conftest.$ac_objext; then
13176   ac_pam_strerror_args=2
13177 else
13178   echo "$as_me: failed program was:" >&5
13179 sed 's/^/| /' conftest.$ac_ext >&5
13180
13181
13182   ac_save_CPPFLAGS="$CPPFLAGS"
13183   if test \! -z "$includedir" ; then
13184     CPPFLAGS="$CPPFLAGS -I$includedir"
13185   fi
13186   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13187   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13188   cat >conftest.$ac_ext <<_ACEOF
13189 /* confdefs.h.  */
13190 _ACEOF
13191 cat confdefs.h >>conftest.$ac_ext
13192 cat >>conftest.$ac_ext <<_ACEOF
13193 /* end confdefs.h.  */
13194 #include <stdio.h>
13195                                           #include <stdlib.h>
13196                                           #include <security/pam_appl.h>
13197 int
13198 main ()
13199 {
13200 char *s =
13201                                            pam_strerror(PAM_SUCCESS);
13202   ;
13203   return 0;
13204 }
13205 _ACEOF
13206 rm -rf conftest.$ac_objext
13207 if { (ac_try="$ac_compile"
13208 case "(($ac_try" in
13209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13210   *) ac_try_echo=$ac_try;;
13211 esac
13212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13213   (eval "$ac_compile") 2>conftest.er1
13214   ac_status=$?
13215   grep -v '^ *+' conftest.er1 >conftest.err
13216   rm -rf conftest.er1
13217   cat conftest.err >&5
13218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219   (exit $ac_status); } && {
13220          test -z "$ac_c_werror_flag" ||
13221          test ! -s conftest.err
13222        } && test -s conftest.$ac_objext; then
13223   ac_pam_strerror_args=1
13224 else
13225   echo "$as_me: failed program was:" >&5
13226 sed 's/^/| /' conftest.$ac_ext >&5
13227
13228         ac_pam_strerror_args=0
13229 fi
13230
13231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232   CPPFLAGS="$ac_save_CPPFLAGS"
13233 fi
13234
13235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236   CPPFLAGS="$ac_save_CPPFLAGS"
13237       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13238 fi
13239
13240     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13241     if test "$ac_pam_strerror_args" = 1 ; then
13242       { echo "$as_me:$LINENO: result: one argument" >&5
13243 echo "${ECHO_T}one argument" >&6; }
13244     elif test "$ac_pam_strerror_args" = 2 ; then
13245       cat >>confdefs.h <<\_ACEOF
13246 #define PAM_STRERROR_TWO_ARGS 1
13247 _ACEOF
13248
13249       { echo "$as_me:$LINENO: result: two arguments" >&5
13250 echo "${ECHO_T}two arguments" >&6; }
13251     else
13252       { echo "$as_me:$LINENO: result: unknown" >&5
13253 echo "${ECHO_T}unknown" >&6; }
13254     fi
13255
13256 # Check pam_fail_delay
13257     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13258 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13259     if test "${ac_cv_pam_fail_delay+set}" = set; then
13260   echo $ECHO_N "(cached) $ECHO_C" >&6
13261 else
13262   ac_save_LDFLAGS="$LDFLAGS"
13263       LDFLAGS="-lpam"
13264       cat >conftest.$ac_ext <<_ACEOF
13265 /* confdefs.h.  */
13266 _ACEOF
13267 cat confdefs.h >>conftest.$ac_ext
13268 cat >>conftest.$ac_ext <<_ACEOF
13269 /* end confdefs.h.  */
13270 #include <security/pam_appl.h>
13271 int
13272 main ()
13273 {
13274 pam_handle_t *pamh = 0;
13275                    unsigned int usec = 1;
13276                    int status = pam_fail_delay (pamh, usec);
13277   ;
13278   return 0;
13279 }
13280 _ACEOF
13281 rm -rf conftest.$ac_objext conftest$ac_exeext
13282 if { (ac_try="$ac_link"
13283 case "(($ac_try" in
13284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13285   *) ac_try_echo=$ac_try;;
13286 esac
13287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13288   (eval "$ac_link") 2>conftest.er1
13289   ac_status=$?
13290   grep -v '^ *+' conftest.er1 >conftest.err
13291   rm -rf conftest.er1
13292   cat conftest.err >&5
13293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13294   (exit $ac_status); } && {
13295          test -z "$ac_c_werror_flag" ||
13296          test ! -s conftest.err
13297        } && test -s conftest$ac_exeext &&
13298        $as_test_x conftest$ac_exeext; then
13299   ac_pam_fail_delay=yes
13300 else
13301   echo "$as_me: failed program was:" >&5
13302 sed 's/^/| /' conftest.$ac_ext >&5
13303
13304         ac_pam_fail_delay=no
13305 fi
13306
13307 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13308       conftest$ac_exeext conftest.$ac_ext
13309       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13310       LDFLAGS=$ac_save_LDFLAGS
13311 fi
13312
13313
13314       if test "$ac_pam_fail_delay" = yes ; then
13315         { echo "$as_me:$LINENO: result: yes" >&5
13316 echo "${ECHO_T}yes" >&6; }
13317         cat >>confdefs.h <<\_ACEOF
13318 #define HAVE_PAM_FAIL_DELAY 1
13319 _ACEOF
13320
13321       else
13322         { echo "$as_me:$LINENO: result: no" >&5
13323 echo "${ECHO_T}no" >&6; }
13324       fi
13325
13326   fi
13327 fi
13328
13329
13330 ###############################################################################
13331 #
13332 #       Check for Kerberos.
13333 #
13334 ###############################################################################
13335
13336 have_kerberos=no
13337 have_kerberos5=no
13338 with_kerberos_req=unspecified
13339
13340
13341 # Check whether --with-kerberos was given.
13342 if test "${with_kerberos+set}" = set; then
13343   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13344 else
13345   with_kerberos=yes
13346 fi
13347
13348
13349
13350    case "$with_kerberos" in
13351     yes) ;;
13352     no)  ;;
13353
13354     /*)
13355      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13356 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13357      d=$with_kerberos/include
13358      if test -d $d; then
13359        X_CFLAGS="-I$d $X_CFLAGS"
13360        { echo "$as_me:$LINENO: result: $d" >&5
13361 echo "${ECHO_T}$d" >&6; }
13362      else
13363        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13364 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13365      fi
13366
13367      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13368 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13369      d=$with_kerberos/lib
13370      if test -d $d; then
13371        X_LIBS="-L$d $X_LIBS"
13372        { echo "$as_me:$LINENO: result: $d" >&5
13373 echo "${ECHO_T}$d" >&6; }
13374      else
13375        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13376 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13377      fi
13378
13379      # replace the directory string with "yes".
13380      with_kerberos_req="yes"
13381      with_kerberos=$with_kerberos_req
13382      ;;
13383
13384     *)
13385      echo ""
13386      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13387      echo "       If it is a directory, then \`DIR/include' will be added to"
13388      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13389      exit 1
13390      ;;
13391    esac
13392
13393
13394 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13395   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13396 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13397 if test "${ac_cv_kerberos+set}" = set; then
13398   echo $ECHO_N "(cached) $ECHO_C" >&6
13399 else
13400
13401   ac_save_CPPFLAGS="$CPPFLAGS"
13402   if test \! -z "$includedir" ; then
13403     CPPFLAGS="$CPPFLAGS -I$includedir"
13404   fi
13405   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13406   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13407   cat >conftest.$ac_ext <<_ACEOF
13408 /* confdefs.h.  */
13409 _ACEOF
13410 cat confdefs.h >>conftest.$ac_ext
13411 cat >>conftest.$ac_ext <<_ACEOF
13412 /* end confdefs.h.  */
13413 #include <krb.h>
13414 int
13415 main ()
13416 {
13417
13418   ;
13419   return 0;
13420 }
13421 _ACEOF
13422 rm -rf conftest.$ac_objext
13423 if { (ac_try="$ac_compile"
13424 case "(($ac_try" in
13425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13426   *) ac_try_echo=$ac_try;;
13427 esac
13428 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13429   (eval "$ac_compile") 2>conftest.er1
13430   ac_status=$?
13431   grep -v '^ *+' conftest.er1 >conftest.err
13432   rm -rf conftest.er1
13433   cat conftest.err >&5
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); } && {
13436          test -z "$ac_c_werror_flag" ||
13437          test ! -s conftest.err
13438        } && test -s conftest.$ac_objext; then
13439   ac_cv_kerberos=yes
13440 else
13441   echo "$as_me: failed program was:" >&5
13442 sed 's/^/| /' conftest.$ac_ext >&5
13443
13444         ac_cv_kerberos=no
13445 fi
13446
13447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13448   CPPFLAGS="$ac_save_CPPFLAGS"
13449 fi
13450 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13451 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13452   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13453 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13454 if test "${ac_cv_kerberos5+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457
13458   ac_save_CPPFLAGS="$CPPFLAGS"
13459   if test \! -z "$includedir" ; then
13460     CPPFLAGS="$CPPFLAGS -I$includedir"
13461   fi
13462   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13463   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13464   cat >conftest.$ac_ext <<_ACEOF
13465 /* confdefs.h.  */
13466 _ACEOF
13467 cat confdefs.h >>conftest.$ac_ext
13468 cat >>conftest.$ac_ext <<_ACEOF
13469 /* end confdefs.h.  */
13470 #include <kerberosIV/krb.h>
13471 int
13472 main ()
13473 {
13474
13475   ;
13476   return 0;
13477 }
13478 _ACEOF
13479 rm -rf conftest.$ac_objext
13480 if { (ac_try="$ac_compile"
13481 case "(($ac_try" in
13482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13483   *) ac_try_echo=$ac_try;;
13484 esac
13485 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13486   (eval "$ac_compile") 2>conftest.er1
13487   ac_status=$?
13488   grep -v '^ *+' conftest.er1 >conftest.err
13489   rm -rf conftest.er1
13490   cat conftest.err >&5
13491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13492   (exit $ac_status); } && {
13493          test -z "$ac_c_werror_flag" ||
13494          test ! -s conftest.err
13495        } && test -s conftest.$ac_objext; then
13496   ac_cv_kerberos5=yes
13497 else
13498   echo "$as_me: failed program was:" >&5
13499 sed 's/^/| /' conftest.$ac_ext >&5
13500
13501         ac_cv_kerberos5=no
13502 fi
13503
13504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13505   CPPFLAGS="$ac_save_CPPFLAGS"
13506 fi
13507 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13508 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13509
13510   if test "$ac_cv_kerberos" = yes ; then
13511     have_kerberos=yes
13512     cat >>confdefs.h <<\_ACEOF
13513 #define HAVE_KERBEROS 1
13514 _ACEOF
13515
13516   fi
13517
13518   if test "$ac_cv_kerberos5" = yes ; then
13519
13520     # Andrew Snare <ajs@pigpond.com> wrote:
13521     #
13522     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13523     # (krb4) was also available.  This turns out not to be the case with
13524     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13525     # is optional.
13526     #
13527     # So, disable kerberosV support if libkrb4 can't be found.
13528     # This is not the best solution, but it makes the compile not fail.
13529     #
13530
13531   ac_save_CPPFLAGS="$CPPFLAGS"
13532   ac_save_LDFLAGS="$LDFLAGS"
13533 #  ac_save_LIBS="$LIBS"
13534
13535   if test \! -z "$includedir" ; then
13536     CPPFLAGS="$CPPFLAGS -I$includedir"
13537   fi
13538   # note: $X_CFLAGS includes $x_includes
13539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13540
13541   if test \! -z "$libdir" ; then
13542     LDFLAGS="$LDFLAGS -L$libdir"
13543   fi
13544   # note: $X_LIBS includes $x_libraries
13545   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13546
13547   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13548   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13549   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13550 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13551 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13552   echo $ECHO_N "(cached) $ECHO_C" >&6
13553 else
13554   ac_check_lib_save_LIBS=$LIBS
13555 LIBS="-lkrb4  $LIBS"
13556 cat >conftest.$ac_ext <<_ACEOF
13557 /* confdefs.h.  */
13558 _ACEOF
13559 cat confdefs.h >>conftest.$ac_ext
13560 cat >>conftest.$ac_ext <<_ACEOF
13561 /* end confdefs.h.  */
13562
13563 /* Override any GCC internal prototype to avoid an error.
13564    Use char because int might match the return type of a GCC
13565    builtin and then its argument prototype would still apply.  */
13566 #ifdef __cplusplus
13567 extern "C"
13568 #endif
13569 char krb_get_tf_realm ();
13570 int
13571 main ()
13572 {
13573 return krb_get_tf_realm ();
13574   ;
13575   return 0;
13576 }
13577 _ACEOF
13578 rm -rf conftest.$ac_objext conftest$ac_exeext
13579 if { (ac_try="$ac_link"
13580 case "(($ac_try" in
13581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13582   *) ac_try_echo=$ac_try;;
13583 esac
13584 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13585   (eval "$ac_link") 2>conftest.er1
13586   ac_status=$?
13587   grep -v '^ *+' conftest.er1 >conftest.err
13588   rm -rf conftest.er1
13589   cat conftest.err >&5
13590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591   (exit $ac_status); } && {
13592          test -z "$ac_c_werror_flag" ||
13593          test ! -s conftest.err
13594        } && test -s conftest$ac_exeext &&
13595        $as_test_x conftest$ac_exeext; then
13596   ac_cv_lib_krb4_krb_get_tf_realm=yes
13597 else
13598   echo "$as_me: failed program was:" >&5
13599 sed 's/^/| /' conftest.$ac_ext >&5
13600
13601         ac_cv_lib_krb4_krb_get_tf_realm=no
13602 fi
13603
13604 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13605       conftest$ac_exeext conftest.$ac_ext
13606 LIBS=$ac_check_lib_save_LIBS
13607 fi
13608 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13609 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13610 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13611   have_kerberos=yes
13612 else
13613   have_kerberos=no
13614 fi
13615
13616   CPPFLAGS="$ac_save_CPPFLAGS"
13617   LDFLAGS="$ac_save_LDFLAGS"
13618 #  LIBS="$ac_save_LIBS"
13619
13620     if test "$have_kerberos" = yes ; then
13621       have_kerberos5=yes
13622       cat >>confdefs.h <<\_ACEOF
13623 #define HAVE_KERBEROS 1
13624 _ACEOF
13625
13626       cat >>confdefs.h <<\_ACEOF
13627 #define HAVE_KERBEROS5 1
13628 _ACEOF
13629
13630     else
13631       have_kerberos5=no
13632       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13633 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13634     fi
13635
13636   fi
13637
13638   if test "$have_kerberos5" = yes ; then
13639     # from Matt Knopp <mhat@infocalypse.netlag.com>
13640     # (who got it from amu@mit.edu)
13641
13642     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13643
13644     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13645
13646   ac_save_CPPFLAGS="$CPPFLAGS"
13647   ac_save_LDFLAGS="$LDFLAGS"
13648 #  ac_save_LIBS="$LIBS"
13649
13650   if test \! -z "$includedir" ; then
13651     CPPFLAGS="$CPPFLAGS -I$includedir"
13652   fi
13653   # note: $X_CFLAGS includes $x_includes
13654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13655
13656   if test \! -z "$libdir" ; then
13657     LDFLAGS="$LDFLAGS -L$libdir"
13658   fi
13659   # note: $X_LIBS includes $x_libraries
13660   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13661
13662   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13663   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13664   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13665 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13666 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13667   echo $ECHO_N "(cached) $ECHO_C" >&6
13668 else
13669   ac_check_lib_save_LIBS=$LIBS
13670 LIBS="-lcrypt  $LIBS"
13671 cat >conftest.$ac_ext <<_ACEOF
13672 /* confdefs.h.  */
13673 _ACEOF
13674 cat confdefs.h >>conftest.$ac_ext
13675 cat >>conftest.$ac_ext <<_ACEOF
13676 /* end confdefs.h.  */
13677
13678 /* Override any GCC internal prototype to avoid an error.
13679    Use char because int might match the return type of a GCC
13680    builtin and then its argument prototype would still apply.  */
13681 #ifdef __cplusplus
13682 extern "C"
13683 #endif
13684 char crypt ();
13685 int
13686 main ()
13687 {
13688 return crypt ();
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -rf conftest.$ac_objext conftest$ac_exeext
13694 if { (ac_try="$ac_link"
13695 case "(($ac_try" in
13696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697   *) ac_try_echo=$ac_try;;
13698 esac
13699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13700   (eval "$ac_link") 2>conftest.er1
13701   ac_status=$?
13702   grep -v '^ *+' conftest.er1 >conftest.err
13703   rm -rf conftest.er1
13704   cat conftest.err >&5
13705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706   (exit $ac_status); } && {
13707          test -z "$ac_c_werror_flag" ||
13708          test ! -s conftest.err
13709        } && test -s conftest$ac_exeext &&
13710        $as_test_x conftest$ac_exeext; then
13711   ac_cv_lib_crypt_crypt=yes
13712 else
13713   echo "$as_me: failed program was:" >&5
13714 sed 's/^/| /' conftest.$ac_ext >&5
13715
13716         ac_cv_lib_crypt_crypt=no
13717 fi
13718
13719 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13720       conftest$ac_exeext conftest.$ac_ext
13721 LIBS=$ac_check_lib_save_LIBS
13722 fi
13723 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13724 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13725 if test $ac_cv_lib_crypt_crypt = yes; then
13726   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13727 fi
13728
13729   CPPFLAGS="$ac_save_CPPFLAGS"
13730   LDFLAGS="$ac_save_LDFLAGS"
13731 #  LIBS="$ac_save_LIBS"
13732
13733
13734   elif test "$have_kerberos" = yes ; then
13735     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13736     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13737   fi
13738
13739   if test "$have_kerberos" = yes ; then
13740     { echo "$as_me:$LINENO: checking for res_search" >&5
13741 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13742 if test "${ac_cv_func_res_search+set}" = set; then
13743   echo $ECHO_N "(cached) $ECHO_C" >&6
13744 else
13745   cat >conftest.$ac_ext <<_ACEOF
13746 /* confdefs.h.  */
13747 _ACEOF
13748 cat confdefs.h >>conftest.$ac_ext
13749 cat >>conftest.$ac_ext <<_ACEOF
13750 /* end confdefs.h.  */
13751 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13752    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13753 #define res_search innocuous_res_search
13754
13755 /* System header to define __stub macros and hopefully few prototypes,
13756     which can conflict with char res_search (); below.
13757     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13758     <limits.h> exists even on freestanding compilers.  */
13759
13760 #ifdef __STDC__
13761 # include <limits.h>
13762 #else
13763 # include <assert.h>
13764 #endif
13765
13766 #undef res_search
13767
13768 /* Override any GCC internal prototype to avoid an error.
13769    Use char because int might match the return type of a GCC
13770    builtin and then its argument prototype would still apply.  */
13771 #ifdef __cplusplus
13772 extern "C"
13773 #endif
13774 char res_search ();
13775 /* The GNU C library defines this for functions which it implements
13776     to always fail with ENOSYS.  Some functions are actually named
13777     something starting with __ and the normal name is an alias.  */
13778 #if defined __stub_res_search || defined __stub___res_search
13779 choke me
13780 #endif
13781
13782 int
13783 main ()
13784 {
13785 return res_search ();
13786   ;
13787   return 0;
13788 }
13789 _ACEOF
13790 rm -rf conftest.$ac_objext conftest$ac_exeext
13791 if { (ac_try="$ac_link"
13792 case "(($ac_try" in
13793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13794   *) ac_try_echo=$ac_try;;
13795 esac
13796 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13797   (eval "$ac_link") 2>conftest.er1
13798   ac_status=$?
13799   grep -v '^ *+' conftest.er1 >conftest.err
13800   rm -rf conftest.er1
13801   cat conftest.err >&5
13802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13803   (exit $ac_status); } && {
13804          test -z "$ac_c_werror_flag" ||
13805          test ! -s conftest.err
13806        } && test -s conftest$ac_exeext &&
13807        $as_test_x conftest$ac_exeext; then
13808   ac_cv_func_res_search=yes
13809 else
13810   echo "$as_me: failed program was:" >&5
13811 sed 's/^/| /' conftest.$ac_ext >&5
13812
13813         ac_cv_func_res_search=no
13814 fi
13815
13816 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13817       conftest$ac_exeext conftest.$ac_ext
13818 fi
13819 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13820 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13821 if test $ac_cv_func_res_search = yes; then
13822   :
13823 else
13824   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13825 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13826 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13827   echo $ECHO_N "(cached) $ECHO_C" >&6
13828 else
13829   ac_check_lib_save_LIBS=$LIBS
13830 LIBS="-lresolv  $LIBS"
13831 cat >conftest.$ac_ext <<_ACEOF
13832 /* confdefs.h.  */
13833 _ACEOF
13834 cat confdefs.h >>conftest.$ac_ext
13835 cat >>conftest.$ac_ext <<_ACEOF
13836 /* end confdefs.h.  */
13837
13838 /* Override any GCC internal prototype to avoid an error.
13839    Use char because int might match the return type of a GCC
13840    builtin and then its argument prototype would still apply.  */
13841 #ifdef __cplusplus
13842 extern "C"
13843 #endif
13844 char res_search ();
13845 int
13846 main ()
13847 {
13848 return res_search ();
13849   ;
13850   return 0;
13851 }
13852 _ACEOF
13853 rm -rf conftest.$ac_objext conftest$ac_exeext
13854 if { (ac_try="$ac_link"
13855 case "(($ac_try" in
13856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13857   *) ac_try_echo=$ac_try;;
13858 esac
13859 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13860   (eval "$ac_link") 2>conftest.er1
13861   ac_status=$?
13862   grep -v '^ *+' conftest.er1 >conftest.err
13863   rm -rf conftest.er1
13864   cat conftest.err >&5
13865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866   (exit $ac_status); } && {
13867          test -z "$ac_c_werror_flag" ||
13868          test ! -s conftest.err
13869        } && test -s conftest$ac_exeext &&
13870        $as_test_x conftest$ac_exeext; then
13871   ac_cv_lib_resolv_res_search=yes
13872 else
13873   echo "$as_me: failed program was:" >&5
13874 sed 's/^/| /' conftest.$ac_ext >&5
13875
13876         ac_cv_lib_resolv_res_search=no
13877 fi
13878
13879 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13880       conftest$ac_exeext conftest.$ac_ext
13881 LIBS=$ac_check_lib_save_LIBS
13882 fi
13883 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13884 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13885 if test $ac_cv_lib_resolv_res_search = yes; then
13886   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13887 else
13888   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13889 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13890
13891 fi
13892
13893 fi
13894
13895   fi
13896 fi
13897
13898
13899 ###############################################################################
13900 #
13901 #       Check for the nine billion variants of shadow passwords...
13902 #
13903 ###############################################################################
13904
13905 need_setuid=no
13906
13907 have_shadow=no
13908 with_shadow_req=unspecified
13909
13910
13911 # Check whether --with-shadow was given.
13912 if test "${with_shadow+set}" = set; then
13913   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13914 else
13915   with_shadow=yes
13916 fi
13917
13918
13919
13920    case "$with_shadow" in
13921     yes) ;;
13922     no)  ;;
13923
13924     /*)
13925      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
13926 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
13927      d=$with_shadow/include
13928      if test -d $d; then
13929        X_CFLAGS="-I$d $X_CFLAGS"
13930        { echo "$as_me:$LINENO: result: $d" >&5
13931 echo "${ECHO_T}$d" >&6; }
13932      else
13933        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13934 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13935      fi
13936
13937      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
13938 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
13939      d=$with_shadow/lib
13940      if test -d $d; then
13941        X_LIBS="-L$d $X_LIBS"
13942        { echo "$as_me:$LINENO: result: $d" >&5
13943 echo "${ECHO_T}$d" >&6; }
13944      else
13945        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13946 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13947      fi
13948
13949      # replace the directory string with "yes".
13950      with_shadow_req="yes"
13951      with_shadow=$with_shadow_req
13952      ;;
13953
13954     *)
13955      echo ""
13956      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13957      echo "       If it is a directory, then \`DIR/include' will be added to"
13958      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13959      exit 1
13960      ;;
13961    esac
13962
13963
13964 if test "$enable_locking" = no ; then
13965   with_shadow_req=no
13966   with_shadow=no
13967 fi
13968
13969
13970 ###############################################################################
13971 #
13972 #       Check for Sun "adjunct" passwords.
13973 #
13974 ###############################################################################
13975
13976 if test "$with_shadow" = yes ; then
13977   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13978 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
13979 if test "${ac_cv_sun_adjunct+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 <sys/label.h>
13999                                     #include <sys/audit.h>
14000                                     #include <pwdadj.h>
14001 int
14002 main ()
14003 {
14004 struct passwd_adjunct *p = getpwanam("nobody");
14005                        const char *pw = p->pwa_passwd;
14006   ;
14007   return 0;
14008 }
14009 _ACEOF
14010 rm -rf conftest.$ac_objext
14011 if { (ac_try="$ac_compile"
14012 case "(($ac_try" in
14013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14014   *) ac_try_echo=$ac_try;;
14015 esac
14016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14017   (eval "$ac_compile") 2>conftest.er1
14018   ac_status=$?
14019   grep -v '^ *+' conftest.er1 >conftest.err
14020   rm -rf conftest.er1
14021   cat conftest.err >&5
14022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14023   (exit $ac_status); } && {
14024          test -z "$ac_c_werror_flag" ||
14025          test ! -s conftest.err
14026        } && test -s conftest.$ac_objext; then
14027   ac_cv_sun_adjunct=yes
14028 else
14029   echo "$as_me: failed program was:" >&5
14030 sed 's/^/| /' conftest.$ac_ext >&5
14031
14032         ac_cv_sun_adjunct=no
14033 fi
14034
14035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14036   CPPFLAGS="$ac_save_CPPFLAGS"
14037 fi
14038 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14039 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14040   if test "$ac_cv_sun_adjunct" = yes; then
14041     have_shadow_adjunct=yes
14042     have_shadow=yes
14043     need_setuid=yes
14044   fi
14045 fi
14046
14047
14048 ###############################################################################
14049 #
14050 #       Check for DEC and SCO so-called "enhanced" security.
14051 #
14052 ###############################################################################
14053
14054 if test "$with_shadow" = yes ; then
14055   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14056 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14057 if test "${ac_cv_enhanced_passwd+set}" = set; then
14058   echo $ECHO_N "(cached) $ECHO_C" >&6
14059 else
14060
14061   ac_save_CPPFLAGS="$CPPFLAGS"
14062   if test \! -z "$includedir" ; then
14063     CPPFLAGS="$CPPFLAGS -I$includedir"
14064   fi
14065   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14066   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14067   cat >conftest.$ac_ext <<_ACEOF
14068 /* confdefs.h.  */
14069 _ACEOF
14070 cat confdefs.h >>conftest.$ac_ext
14071 cat >>conftest.$ac_ext <<_ACEOF
14072 /* end confdefs.h.  */
14073 #include <stdlib.h>
14074                                     #include <unistd.h>
14075                                     #include <sys/types.h>
14076                                     #include <pwd.h>
14077                                     #include <sys/security.h>
14078                                     #include <prot.h>
14079 int
14080 main ()
14081 {
14082 struct pr_passwd *p;
14083                        const char *pw;
14084                        set_auth_parameters(0, 0);
14085                        check_auth_parameters();
14086                        p = getprpwnam("nobody");
14087                        pw = p->ufld.fd_encrypt;
14088   ;
14089   return 0;
14090 }
14091 _ACEOF
14092 rm -rf conftest.$ac_objext
14093 if { (ac_try="$ac_compile"
14094 case "(($ac_try" in
14095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096   *) ac_try_echo=$ac_try;;
14097 esac
14098 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14099   (eval "$ac_compile") 2>conftest.er1
14100   ac_status=$?
14101   grep -v '^ *+' conftest.er1 >conftest.err
14102   rm -rf conftest.er1
14103   cat conftest.err >&5
14104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105   (exit $ac_status); } && {
14106          test -z "$ac_c_werror_flag" ||
14107          test ! -s conftest.err
14108        } && test -s conftest.$ac_objext; then
14109   ac_cv_enhanced_passwd=yes
14110 else
14111   echo "$as_me: failed program was:" >&5
14112 sed 's/^/| /' conftest.$ac_ext >&5
14113
14114         ac_cv_enhanced_passwd=no
14115 fi
14116
14117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14118   CPPFLAGS="$ac_save_CPPFLAGS"
14119 fi
14120 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14121 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14122   if test $ac_cv_enhanced_passwd = yes; then
14123     have_shadow_enhanced=yes
14124     have_shadow=yes
14125     need_setuid=yes
14126
14127     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14128     # (I'm told it needs -lcurses too, but I don't understand why.)
14129     # But on DEC, it's in -lsecurity.
14130     #
14131     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14132 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14133 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136   ac_check_lib_save_LIBS=$LIBS
14137 LIBS="-lprot -lx $LIBS"
14138 cat >conftest.$ac_ext <<_ACEOF
14139 /* confdefs.h.  */
14140 _ACEOF
14141 cat confdefs.h >>conftest.$ac_ext
14142 cat >>conftest.$ac_ext <<_ACEOF
14143 /* end confdefs.h.  */
14144
14145 /* Override any GCC internal prototype to avoid an error.
14146    Use char because int might match the return type of a GCC
14147    builtin and then its argument prototype would still apply.  */
14148 #ifdef __cplusplus
14149 extern "C"
14150 #endif
14151 char getprpwnam ();
14152 int
14153 main ()
14154 {
14155 return getprpwnam ();
14156   ;
14157   return 0;
14158 }
14159 _ACEOF
14160 rm -rf conftest.$ac_objext conftest$ac_exeext
14161 if { (ac_try="$ac_link"
14162 case "(($ac_try" in
14163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14164   *) ac_try_echo=$ac_try;;
14165 esac
14166 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14167   (eval "$ac_link") 2>conftest.er1
14168   ac_status=$?
14169   grep -v '^ *+' conftest.er1 >conftest.err
14170   rm -rf conftest.er1
14171   cat conftest.err >&5
14172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14173   (exit $ac_status); } && {
14174          test -z "$ac_c_werror_flag" ||
14175          test ! -s conftest.err
14176        } && test -s conftest$ac_exeext &&
14177        $as_test_x conftest$ac_exeext; then
14178   ac_cv_lib_prot_getprpwnam=yes
14179 else
14180   echo "$as_me: failed program was:" >&5
14181 sed 's/^/| /' conftest.$ac_ext >&5
14182
14183         ac_cv_lib_prot_getprpwnam=no
14184 fi
14185
14186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14187       conftest$ac_exeext conftest.$ac_ext
14188 LIBS=$ac_check_lib_save_LIBS
14189 fi
14190 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14191 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14192 if test $ac_cv_lib_prot_getprpwnam = yes; then
14193   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14194 else
14195   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14196 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14197 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14198   echo $ECHO_N "(cached) $ECHO_C" >&6
14199 else
14200   ac_check_lib_save_LIBS=$LIBS
14201 LIBS="-lsecurity  $LIBS"
14202 cat >conftest.$ac_ext <<_ACEOF
14203 /* confdefs.h.  */
14204 _ACEOF
14205 cat confdefs.h >>conftest.$ac_ext
14206 cat >>conftest.$ac_ext <<_ACEOF
14207 /* end confdefs.h.  */
14208
14209 /* Override any GCC internal prototype to avoid an error.
14210    Use char because int might match the return type of a GCC
14211    builtin and then its argument prototype would still apply.  */
14212 #ifdef __cplusplus
14213 extern "C"
14214 #endif
14215 char getprpwnam ();
14216 int
14217 main ()
14218 {
14219 return getprpwnam ();
14220   ;
14221   return 0;
14222 }
14223 _ACEOF
14224 rm -rf conftest.$ac_objext conftest$ac_exeext
14225 if { (ac_try="$ac_link"
14226 case "(($ac_try" in
14227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14228   *) ac_try_echo=$ac_try;;
14229 esac
14230 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14231   (eval "$ac_link") 2>conftest.er1
14232   ac_status=$?
14233   grep -v '^ *+' conftest.er1 >conftest.err
14234   rm -rf conftest.er1
14235   cat conftest.err >&5
14236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237   (exit $ac_status); } && {
14238          test -z "$ac_c_werror_flag" ||
14239          test ! -s conftest.err
14240        } && test -s conftest$ac_exeext &&
14241        $as_test_x conftest$ac_exeext; then
14242   ac_cv_lib_security_getprpwnam=yes
14243 else
14244   echo "$as_me: failed program was:" >&5
14245 sed 's/^/| /' conftest.$ac_ext >&5
14246
14247         ac_cv_lib_security_getprpwnam=no
14248 fi
14249
14250 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14251       conftest$ac_exeext conftest.$ac_ext
14252 LIBS=$ac_check_lib_save_LIBS
14253 fi
14254 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14255 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14256 if test $ac_cv_lib_security_getprpwnam = yes; then
14257   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14258 fi
14259
14260 fi
14261
14262   fi
14263 fi
14264
14265 ###############################################################################
14266 #
14267 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14268 #
14269 ###############################################################################
14270
14271 if test "$with_shadow" = yes ; then
14272   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14273 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14274 if test "${ac_cv_hpux_passwd+set}" = set; then
14275   echo $ECHO_N "(cached) $ECHO_C" >&6
14276 else
14277
14278   ac_save_CPPFLAGS="$CPPFLAGS"
14279   if test \! -z "$includedir" ; then
14280     CPPFLAGS="$CPPFLAGS -I$includedir"
14281   fi
14282   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14283   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14284   cat >conftest.$ac_ext <<_ACEOF
14285 /* confdefs.h.  */
14286 _ACEOF
14287 cat confdefs.h >>conftest.$ac_ext
14288 cat >>conftest.$ac_ext <<_ACEOF
14289 /* end confdefs.h.  */
14290 #include <stdlib.h>
14291                                     #include <unistd.h>
14292                                     #include <sys/types.h>
14293                                     #include <pwd.h>
14294                                     #include <hpsecurity.h>
14295                                     #include <prot.h>
14296 int
14297 main ()
14298 {
14299 struct s_passwd *p = getspwnam("nobody");
14300                        const char *pw = p->pw_passwd;
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -rf conftest.$ac_objext
14306 if { (ac_try="$ac_compile"
14307 case "(($ac_try" in
14308   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14309   *) ac_try_echo=$ac_try;;
14310 esac
14311 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14312   (eval "$ac_compile") 2>conftest.er1
14313   ac_status=$?
14314   grep -v '^ *+' conftest.er1 >conftest.err
14315   rm -rf conftest.er1
14316   cat conftest.err >&5
14317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14318   (exit $ac_status); } && {
14319          test -z "$ac_c_werror_flag" ||
14320          test ! -s conftest.err
14321        } && test -s conftest.$ac_objext; then
14322   ac_cv_hpux_passwd=yes
14323 else
14324   echo "$as_me: failed program was:" >&5
14325 sed 's/^/| /' conftest.$ac_ext >&5
14326
14327         ac_cv_hpux_passwd=no
14328 fi
14329
14330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14331   CPPFLAGS="$ac_save_CPPFLAGS"
14332 fi
14333 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14334 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14335   if test "$ac_cv_hpux_passwd" = yes; then
14336     have_shadow_hpux=yes
14337     have_shadow=yes
14338     need_setuid=yes
14339
14340     # on HPUX, bigcrypt is in -lsec
14341     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14342 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14343 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14344   echo $ECHO_N "(cached) $ECHO_C" >&6
14345 else
14346   ac_check_lib_save_LIBS=$LIBS
14347 LIBS="-lsec  $LIBS"
14348 cat >conftest.$ac_ext <<_ACEOF
14349 /* confdefs.h.  */
14350 _ACEOF
14351 cat confdefs.h >>conftest.$ac_ext
14352 cat >>conftest.$ac_ext <<_ACEOF
14353 /* end confdefs.h.  */
14354
14355 /* Override any GCC internal prototype to avoid an error.
14356    Use char because int might match the return type of a GCC
14357    builtin and then its argument prototype would still apply.  */
14358 #ifdef __cplusplus
14359 extern "C"
14360 #endif
14361 char bigcrypt ();
14362 int
14363 main ()
14364 {
14365 return bigcrypt ();
14366   ;
14367   return 0;
14368 }
14369 _ACEOF
14370 rm -rf conftest.$ac_objext conftest$ac_exeext
14371 if { (ac_try="$ac_link"
14372 case "(($ac_try" in
14373   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14374   *) ac_try_echo=$ac_try;;
14375 esac
14376 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14377   (eval "$ac_link") 2>conftest.er1
14378   ac_status=$?
14379   grep -v '^ *+' conftest.er1 >conftest.err
14380   rm -rf conftest.er1
14381   cat conftest.err >&5
14382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383   (exit $ac_status); } && {
14384          test -z "$ac_c_werror_flag" ||
14385          test ! -s conftest.err
14386        } && test -s conftest$ac_exeext &&
14387        $as_test_x conftest$ac_exeext; then
14388   ac_cv_lib_sec_bigcrypt=yes
14389 else
14390   echo "$as_me: failed program was:" >&5
14391 sed 's/^/| /' conftest.$ac_ext >&5
14392
14393         ac_cv_lib_sec_bigcrypt=no
14394 fi
14395
14396 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14397       conftest$ac_exeext conftest.$ac_ext
14398 LIBS=$ac_check_lib_save_LIBS
14399 fi
14400 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14401 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14402 if test $ac_cv_lib_sec_bigcrypt = yes; then
14403   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14404 fi
14405
14406   fi
14407 fi
14408
14409
14410 ###############################################################################
14411 #
14412 #       Check for FreeBSD-style shadow passwords.
14413 #
14414 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14415 #       password systems -- except you only get stuff in the pw_passwd field
14416 #       if the running program is setuid.  So, guess that we've got this
14417 #       lossage to contend with if /etc/master.passwd exists, and default to
14418 #       a setuid installation.
14419 #
14420 ###############################################################################
14421
14422 if test "$with_shadow" = yes ; then
14423   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14424 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14425 if test "${ac_cv_master_passwd+set}" = set; then
14426   echo $ECHO_N "(cached) $ECHO_C" >&6
14427 else
14428   if test -f /etc/master.passwd ; then
14429                     ac_cv_master_passwd=yes
14430                   else
14431                     ac_cv_master_passwd=no
14432                   fi
14433 fi
14434 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14435 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14436   if test "$ac_cv_master_passwd" = yes; then
14437     need_setuid=yes
14438   fi
14439 fi
14440
14441
14442 ###############################################################################
14443 #
14444 #       Check for traditional (ha!) shadow passwords.
14445 #
14446 ###############################################################################
14447
14448 if test "$with_shadow" = yes ; then
14449   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14450 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14451 if test "${ac_cv_shadow+set}" = set; then
14452   echo $ECHO_N "(cached) $ECHO_C" >&6
14453 else
14454
14455   ac_save_CPPFLAGS="$CPPFLAGS"
14456   if test \! -z "$includedir" ; then
14457     CPPFLAGS="$CPPFLAGS -I$includedir"
14458   fi
14459   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14460   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14461   cat >conftest.$ac_ext <<_ACEOF
14462 /* confdefs.h.  */
14463 _ACEOF
14464 cat confdefs.h >>conftest.$ac_ext
14465 cat >>conftest.$ac_ext <<_ACEOF
14466 /* end confdefs.h.  */
14467 #include <stdlib.h>
14468                                     #include <unistd.h>
14469                                     #include <sys/types.h>
14470                                     #include <pwd.h>
14471                                     #include <shadow.h>
14472 int
14473 main ()
14474 {
14475 struct spwd *p = getspnam("nobody");
14476                        const char *pw = p->sp_pwdp;
14477   ;
14478   return 0;
14479 }
14480 _ACEOF
14481 rm -rf conftest.$ac_objext
14482 if { (ac_try="$ac_compile"
14483 case "(($ac_try" in
14484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14485   *) ac_try_echo=$ac_try;;
14486 esac
14487 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14488   (eval "$ac_compile") 2>conftest.er1
14489   ac_status=$?
14490   grep -v '^ *+' conftest.er1 >conftest.err
14491   rm -rf conftest.er1
14492   cat conftest.err >&5
14493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494   (exit $ac_status); } && {
14495          test -z "$ac_c_werror_flag" ||
14496          test ! -s conftest.err
14497        } && test -s conftest.$ac_objext; then
14498   ac_cv_shadow=yes
14499 else
14500   echo "$as_me: failed program was:" >&5
14501 sed 's/^/| /' conftest.$ac_ext >&5
14502
14503         ac_cv_shadow=no
14504 fi
14505
14506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14507   CPPFLAGS="$ac_save_CPPFLAGS"
14508 fi
14509 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14510 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14511   if test "$ac_cv_shadow" = yes; then
14512     have_shadow=yes
14513     need_setuid=yes
14514
14515     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14516     have_getspnam=no
14517     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14518 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14519 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14520   echo $ECHO_N "(cached) $ECHO_C" >&6
14521 else
14522   ac_check_lib_save_LIBS=$LIBS
14523 LIBS="-lc  $LIBS"
14524 cat >conftest.$ac_ext <<_ACEOF
14525 /* confdefs.h.  */
14526 _ACEOF
14527 cat confdefs.h >>conftest.$ac_ext
14528 cat >>conftest.$ac_ext <<_ACEOF
14529 /* end confdefs.h.  */
14530
14531 /* Override any GCC internal prototype to avoid an error.
14532    Use char because int might match the return type of a GCC
14533    builtin and then its argument prototype would still apply.  */
14534 #ifdef __cplusplus
14535 extern "C"
14536 #endif
14537 char getspnam ();
14538 int
14539 main ()
14540 {
14541 return getspnam ();
14542   ;
14543   return 0;
14544 }
14545 _ACEOF
14546 rm -rf conftest.$ac_objext conftest$ac_exeext
14547 if { (ac_try="$ac_link"
14548 case "(($ac_try" in
14549   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14550   *) ac_try_echo=$ac_try;;
14551 esac
14552 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14553   (eval "$ac_link") 2>conftest.er1
14554   ac_status=$?
14555   grep -v '^ *+' conftest.er1 >conftest.err
14556   rm -rf conftest.er1
14557   cat conftest.err >&5
14558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559   (exit $ac_status); } && {
14560          test -z "$ac_c_werror_flag" ||
14561          test ! -s conftest.err
14562        } && test -s conftest$ac_exeext &&
14563        $as_test_x conftest$ac_exeext; then
14564   ac_cv_lib_c_getspnam=yes
14565 else
14566   echo "$as_me: failed program was:" >&5
14567 sed 's/^/| /' conftest.$ac_ext >&5
14568
14569         ac_cv_lib_c_getspnam=no
14570 fi
14571
14572 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14573       conftest$ac_exeext conftest.$ac_ext
14574 LIBS=$ac_check_lib_save_LIBS
14575 fi
14576 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14577 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14578 if test $ac_cv_lib_c_getspnam = yes; then
14579   have_getspnam=yes
14580 fi
14581
14582     if test "$have_getspnam" = no ; then
14583       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14584 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14585 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14586   echo $ECHO_N "(cached) $ECHO_C" >&6
14587 else
14588   ac_check_lib_save_LIBS=$LIBS
14589 LIBS="-lgen  $LIBS"
14590 cat >conftest.$ac_ext <<_ACEOF
14591 /* confdefs.h.  */
14592 _ACEOF
14593 cat confdefs.h >>conftest.$ac_ext
14594 cat >>conftest.$ac_ext <<_ACEOF
14595 /* end confdefs.h.  */
14596
14597 /* Override any GCC internal prototype to avoid an error.
14598    Use char because int might match the return type of a GCC
14599    builtin and then its argument prototype would still apply.  */
14600 #ifdef __cplusplus
14601 extern "C"
14602 #endif
14603 char getspnam ();
14604 int
14605 main ()
14606 {
14607 return getspnam ();
14608   ;
14609   return 0;
14610 }
14611 _ACEOF
14612 rm -rf conftest.$ac_objext conftest$ac_exeext
14613 if { (ac_try="$ac_link"
14614 case "(($ac_try" in
14615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14616   *) ac_try_echo=$ac_try;;
14617 esac
14618 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14619   (eval "$ac_link") 2>conftest.er1
14620   ac_status=$?
14621   grep -v '^ *+' conftest.er1 >conftest.err
14622   rm -rf conftest.er1
14623   cat conftest.err >&5
14624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625   (exit $ac_status); } && {
14626          test -z "$ac_c_werror_flag" ||
14627          test ! -s conftest.err
14628        } && test -s conftest$ac_exeext &&
14629        $as_test_x conftest$ac_exeext; then
14630   ac_cv_lib_gen_getspnam=yes
14631 else
14632   echo "$as_me: failed program was:" >&5
14633 sed 's/^/| /' conftest.$ac_ext >&5
14634
14635         ac_cv_lib_gen_getspnam=no
14636 fi
14637
14638 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14639       conftest$ac_exeext conftest.$ac_ext
14640 LIBS=$ac_check_lib_save_LIBS
14641 fi
14642 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14643 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14644 if test $ac_cv_lib_gen_getspnam = yes; then
14645   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14646 fi
14647
14648     fi
14649   fi
14650 fi
14651
14652
14653 ###############################################################################
14654 #
14655 #       Check for other libraries needed for non-shadow passwords.
14656 #
14657 ###############################################################################
14658
14659 if test "$enable_locking" = yes ; then
14660
14661   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14662   have_crypt=no
14663   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14664 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14665 if test "${ac_cv_lib_c_crypt+set}" = set; then
14666   echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668   ac_check_lib_save_LIBS=$LIBS
14669 LIBS="-lc  $LIBS"
14670 cat >conftest.$ac_ext <<_ACEOF
14671 /* confdefs.h.  */
14672 _ACEOF
14673 cat confdefs.h >>conftest.$ac_ext
14674 cat >>conftest.$ac_ext <<_ACEOF
14675 /* end confdefs.h.  */
14676
14677 /* Override any GCC internal prototype to avoid an error.
14678    Use char because int might match the return type of a GCC
14679    builtin and then its argument prototype would still apply.  */
14680 #ifdef __cplusplus
14681 extern "C"
14682 #endif
14683 char crypt ();
14684 int
14685 main ()
14686 {
14687 return crypt ();
14688   ;
14689   return 0;
14690 }
14691 _ACEOF
14692 rm -rf conftest.$ac_objext conftest$ac_exeext
14693 if { (ac_try="$ac_link"
14694 case "(($ac_try" in
14695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14696   *) ac_try_echo=$ac_try;;
14697 esac
14698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14699   (eval "$ac_link") 2>conftest.er1
14700   ac_status=$?
14701   grep -v '^ *+' conftest.er1 >conftest.err
14702   rm -rf conftest.er1
14703   cat conftest.err >&5
14704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705   (exit $ac_status); } && {
14706          test -z "$ac_c_werror_flag" ||
14707          test ! -s conftest.err
14708        } && test -s conftest$ac_exeext &&
14709        $as_test_x conftest$ac_exeext; then
14710   ac_cv_lib_c_crypt=yes
14711 else
14712   echo "$as_me: failed program was:" >&5
14713 sed 's/^/| /' conftest.$ac_ext >&5
14714
14715         ac_cv_lib_c_crypt=no
14716 fi
14717
14718 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14719       conftest$ac_exeext conftest.$ac_ext
14720 LIBS=$ac_check_lib_save_LIBS
14721 fi
14722 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14723 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14724 if test $ac_cv_lib_c_crypt = yes; then
14725   have_crypt=yes
14726 fi
14727
14728   if test "$have_crypt" = no ; then
14729     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14730 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14731 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14732   echo $ECHO_N "(cached) $ECHO_C" >&6
14733 else
14734   ac_check_lib_save_LIBS=$LIBS
14735 LIBS="-lcrypt  $LIBS"
14736 cat >conftest.$ac_ext <<_ACEOF
14737 /* confdefs.h.  */
14738 _ACEOF
14739 cat confdefs.h >>conftest.$ac_ext
14740 cat >>conftest.$ac_ext <<_ACEOF
14741 /* end confdefs.h.  */
14742
14743 /* Override any GCC internal prototype to avoid an error.
14744    Use char because int might match the return type of a GCC
14745    builtin and then its argument prototype would still apply.  */
14746 #ifdef __cplusplus
14747 extern "C"
14748 #endif
14749 char crypt ();
14750 int
14751 main ()
14752 {
14753 return crypt ();
14754   ;
14755   return 0;
14756 }
14757 _ACEOF
14758 rm -rf conftest.$ac_objext conftest$ac_exeext
14759 if { (ac_try="$ac_link"
14760 case "(($ac_try" in
14761   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14762   *) ac_try_echo=$ac_try;;
14763 esac
14764 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14765   (eval "$ac_link") 2>conftest.er1
14766   ac_status=$?
14767   grep -v '^ *+' conftest.er1 >conftest.err
14768   rm -rf conftest.er1
14769   cat conftest.err >&5
14770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771   (exit $ac_status); } && {
14772          test -z "$ac_c_werror_flag" ||
14773          test ! -s conftest.err
14774        } && test -s conftest$ac_exeext &&
14775        $as_test_x conftest$ac_exeext; then
14776   ac_cv_lib_crypt_crypt=yes
14777 else
14778   echo "$as_me: failed program was:" >&5
14779 sed 's/^/| /' conftest.$ac_ext >&5
14780
14781         ac_cv_lib_crypt_crypt=no
14782 fi
14783
14784 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14785       conftest$ac_exeext conftest.$ac_ext
14786 LIBS=$ac_check_lib_save_LIBS
14787 fi
14788 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14789 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14790 if test $ac_cv_lib_crypt_crypt = yes; then
14791   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14792 fi
14793
14794   fi
14795 fi
14796
14797
14798 # Most of the above shadow mechanisms will have set need_setuid to yes,
14799 # if they were found.  But, on some systems, we need setuid even when
14800 # using plain old vanilla passwords.
14801 #
14802 if test "$enable_locking" = yes ; then
14803   case "$host" in
14804     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14805       need_setuid=yes
14806     ;;
14807   esac
14808 fi
14809
14810
14811 if test "$have_shadow_adjunct" = yes ; then
14812   cat >>confdefs.h <<\_ACEOF
14813 #define HAVE_ADJUNCT_PASSWD 1
14814 _ACEOF
14815
14816 elif test "$have_shadow_enhanced" = yes ; then
14817   cat >>confdefs.h <<\_ACEOF
14818 #define HAVE_ENHANCED_PASSWD 1
14819 _ACEOF
14820
14821 elif test "$have_shadow_hpux" = yes ; then
14822   cat >>confdefs.h <<\_ACEOF
14823 #define HAVE_HPUX_PASSWD 1
14824 _ACEOF
14825
14826 elif test "$have_shadow" = yes ; then
14827   cat >>confdefs.h <<\_ACEOF
14828 #define HAVE_SHADOW_PASSWD 1
14829 _ACEOF
14830
14831 fi
14832
14833
14834 ###############################################################################
14835 #
14836 #       Check for external password helper
14837 #       On SuSE, instead of having xscreensaver be a setuid program, they
14838 #       fork an external program that takes the password on stdin, and
14839 #       returns true if that password is a valid one.  Then only that
14840 #       smaller program needs to be setuid.
14841 #
14842 #       (Note that this external program is not a GUI: the GUI is still
14843 #       all in xscreensaver itself; the external program just does auth.)
14844 #
14845 ###############################################################################
14846
14847 have_passwd_helper=no
14848 with_passwd_helper_req=unspecified
14849
14850
14851 # Check whether --with-passwd-helper was given.
14852 if test "${with_passwd_helper+set}" = set; then
14853   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14854 else
14855   with_passwd_helper=no
14856 fi
14857
14858 # no HANDLE_X_PATH_ARG for this one
14859
14860 if test "$enable_locking" = no ; then
14861   with_passwd_helper_req=no
14862   with_passwd_helper=no
14863 fi
14864
14865 case "$with_passwd_helper" in
14866   ""|no) : ;;
14867   /*)
14868     cat >>confdefs.h <<_ACEOF
14869 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14870 _ACEOF
14871
14872     have_passwd_helper=yes;;
14873   *)
14874     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14875     exit 1
14876 esac
14877
14878
14879 ###############################################################################
14880 #
14881 #       Check for a login manager for a "New Login" button on the lock dialog.
14882 #       Usually this will be "/usr/bin/gdmflexiserver".
14883 #
14884 ###############################################################################
14885
14886 have_login_manager=no
14887 with_login_manager_req=unspecified
14888 default_login_manager='gdmflexiserver -ls'
14889
14890
14891 # Check whether --with-login-manager was given.
14892 if test "${with_login_manager+set}" = set; then
14893   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14894 else
14895   with_login_manager=no
14896 fi
14897
14898 # no HANDLE_X_PATH_ARG for this one
14899
14900 if test "$enable_locking" = no ; then
14901   with_login_manager_req=no
14902   with_login_manager=no
14903 fi
14904
14905 if test -n "$with_login_manager_req" ; then
14906   ac_cv_login_manager_program=""
14907
14908  if test "$with_login_manager_req" = "yes" ; then
14909    with_login_manager_req=$default_login_manager
14910  fi
14911
14912   case "$with_login_manager_req" in
14913     no)
14914       with_login_manager=""
14915     ;;
14916     /*)
14917       # absolute path
14918       set dummy $with_login_manager_req ; login_manager_tmp=$2
14919       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
14920 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
14921       if test -x "$login_manager_tmp" ; then
14922         { echo "$as_me:$LINENO: result: yes" >&5
14923 echo "${ECHO_T}yes" >&6; }
14924       else
14925         { echo "$as_me:$LINENO: result: no" >&5
14926 echo "${ECHO_T}no" >&6; }
14927         with_login_manager=""
14928       fi
14929     ;;
14930     *)
14931       # relative path
14932       set dummy $with_login_manager_req ; login_manager_tmp=$2
14933       # don't cache
14934       unset ac_cv_path_login_manager_tmp
14935       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
14936 set dummy $login_manager_tmp; ac_word=$2
14937 { echo "$as_me:$LINENO: checking for $ac_word" >&5
14938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
14939 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
14940   echo $ECHO_N "(cached) $ECHO_C" >&6
14941 else
14942   case $login_manager_tmp in
14943   [\\/]* | ?:[\\/]*)
14944   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
14945   ;;
14946   *)
14947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14948 for as_dir in $PATH
14949 do
14950   IFS=$as_save_IFS
14951   test -z "$as_dir" && as_dir=.
14952   for ac_exec_ext in '' $ac_executable_extensions; do
14953   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14954     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
14955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14956     break 2
14957   fi
14958 done
14959 done
14960 IFS=$as_save_IFS
14961
14962   ;;
14963 esac
14964 fi
14965 login_manager_tmp=$ac_cv_path_login_manager_tmp
14966 if test -n "$login_manager_tmp"; then
14967   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
14968 echo "${ECHO_T}$login_manager_tmp" >&6; }
14969 else
14970   { echo "$as_me:$LINENO: result: no" >&5
14971 echo "${ECHO_T}no" >&6; }
14972 fi
14973
14974
14975       if test -z "$login_manager_tmp" ; then
14976         with_login_manager=""
14977       else
14978         with_login_manager="$login_manager_tmp"
14979       fi
14980     ;;
14981   esac
14982   ac_cv_login_manager_program="$with_login_manager"
14983
14984 elif test -n "$ac_cv_login_manager_program"; then
14985   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
14986 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
14987 fi
14988
14989 NEW_LOGIN_COMMAND_P=''
14990 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
14991
14992 if test -z "$NEW_LOGIN_COMMAND" ; then
14993   NEW_LOGIN_COMMAND="$default_login_manager"
14994   NEW_LOGIN_COMMAND_P='! '
14995 fi
14996
14997
14998
14999 ###############################################################################
15000 #
15001 #       Check for -lgtk (and Gnome stuff)
15002 #
15003 ###############################################################################
15004
15005 have_gtk=no
15006 with_gtk_req=unspecified
15007
15008 # Check whether --with-gtk was given.
15009 if test "${with_gtk+set}" = set; then
15010   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15011 else
15012   with_gtk=yes
15013 fi
15014
15015
15016 # if --with-gtk=/directory/ was specified, remember that directory so that
15017 # we can also look for the `gtk-config' program in that directory.
15018 case "$with_gtk" in
15019   /*)
15020     gtk_dir="$with_gtk"
15021     ;;
15022   *)
15023     gtk_dir=""
15024     ;;
15025 esac
15026
15027
15028    case "$with_gtk" in
15029     yes) ;;
15030     no)  ;;
15031
15032     /*)
15033      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15034 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15035      d=$with_gtk/include
15036      if test -d $d; then
15037        X_CFLAGS="-I$d $X_CFLAGS"
15038        { echo "$as_me:$LINENO: result: $d" >&5
15039 echo "${ECHO_T}$d" >&6; }
15040      else
15041        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15042 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15043      fi
15044
15045      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15046 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15047      d=$with_gtk/lib
15048      if test -d $d; then
15049        X_LIBS="-L$d $X_LIBS"
15050        { echo "$as_me:$LINENO: result: $d" >&5
15051 echo "${ECHO_T}$d" >&6; }
15052      else
15053        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15054 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15055      fi
15056
15057      # replace the directory string with "yes".
15058      with_gtk_req="yes"
15059      with_gtk=$with_gtk_req
15060      ;;
15061
15062     *)
15063      echo ""
15064      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15065      echo "       If it is a directory, then \`DIR/include' will be added to"
15066      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15067      exit 1
15068      ;;
15069    esac
15070
15071
15072 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15073   echo "error: must be yes or no: --with-gtk=$with_gtk"
15074   exit 1
15075 fi
15076
15077
15078 parse_gtk_version_string() {
15079   # M4 sucks!!
15080
15081   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15082   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15083
15084   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15085   if test -z "$ac_gtk_version"; then
15086     ac_gtk_version=unknown
15087     ac_gtk_version_string=unknown
15088   fi
15089 }
15090
15091 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15092 # if the user specified --with-gtk=/foo/ then look there.
15093 #
15094 gtk_path="$PATH"
15095 if test ! -z "$gtk_dir"; then
15096   # canonicalize slashes.
15097   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15098   gtk_path="$foo:$gtk_path"
15099 fi
15100
15101 for ac_prog in pkg-config
15102 do
15103   # Extract the first word of "$ac_prog", so it can be a program name with args.
15104 set dummy $ac_prog; ac_word=$2
15105 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15107 if test "${ac_cv_path_pkg_config+set}" = set; then
15108   echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110   case $pkg_config in
15111   [\\/]* | ?:[\\/]*)
15112   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15113   ;;
15114   *)
15115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15116 for as_dir in $gtk_path
15117 do
15118   IFS=$as_save_IFS
15119   test -z "$as_dir" && as_dir=.
15120   for ac_exec_ext in '' $ac_executable_extensions; do
15121   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15122     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15123     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15124     break 2
15125   fi
15126 done
15127 done
15128 IFS=$as_save_IFS
15129
15130   ;;
15131 esac
15132 fi
15133 pkg_config=$ac_cv_path_pkg_config
15134 if test -n "$pkg_config"; then
15135   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15136 echo "${ECHO_T}$pkg_config" >&6; }
15137 else
15138   { echo "$as_me:$LINENO: result: no" >&5
15139 echo "${ECHO_T}no" >&6; }
15140 fi
15141
15142
15143   test -n "$pkg_config" && break
15144 done
15145
15146
15147 if test -z "$pkg_config" ; then
15148   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15149 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15150   pkg_config="false"
15151 fi
15152
15153
15154 # Utility function for running pkg-config-based tests...
15155 #
15156 pkgs=''
15157 pkg_check_version() {
15158   if test "$ok" = yes ; then
15159     req="$1"
15160     min="$2"
15161     { echo "$as_me:$LINENO: checking for $req" >&5
15162 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15163     if $pkg_config --exists "$req" ; then
15164       vers=`$pkg_config --modversion "$req"`
15165       if $pkg_config --exists "$req >= $min" ; then
15166         { echo "$as_me:$LINENO: result: $vers" >&5
15167 echo "${ECHO_T}$vers" >&6; }
15168         pkgs="$pkgs $req"
15169         return 1
15170       else
15171         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15172 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15173         ok=no
15174         return 0
15175       fi
15176     else
15177       { echo "$as_me:$LINENO: result: no" >&5
15178 echo "${ECHO_T}no" >&6; }
15179       ok=no
15180       return 0
15181     fi
15182   fi
15183 }
15184
15185
15186 jurassic_gtk=no
15187 gtk_halfassed=no
15188
15189 if test "$with_gtk" = yes; then
15190   have_gtk=no
15191
15192   ok="yes"
15193   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15194   pkg_check_version         gmodule-2.0  2.0.0
15195   pkg_check_version          libxml-2.0  2.4.6
15196   pkg_check_version        libglade-2.0  1.99.0
15197   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15198   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15199   have_gtk="$ok"
15200
15201   if test "$have_gtk" = no; then
15202     if test -n "$ac_gtk_version_string" ; then
15203       gtk_halfassed="$ac_gtk_version_string"
15204       gtk_halfassed_lib="$req"
15205     fi
15206   fi
15207
15208   if test "$have_gtk" = yes; then
15209     parse_gtk_version_string
15210     jurassic_gtk=no
15211   fi
15212
15213   if test "$have_gtk" = yes; then
15214     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15215 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15216 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15217   echo $ECHO_N "(cached) $ECHO_C" >&6
15218 else
15219   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15220 fi
15221 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15222 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15223     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15224 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15225 if test "${ac_cv_gtk_config_libs+set}" = set; then
15226   echo $ECHO_N "(cached) $ECHO_C" >&6
15227 else
15228   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15229 fi
15230 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15231 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15232   fi
15233
15234   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15235   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15236
15237   GTK_EXTRA_OBJS=""
15238   GTK_DATADIR=""
15239   if test "$have_gtk" = yes; then
15240     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15241     GTK_DATADIR="$GTK_DATADIR/share"
15242   fi
15243
15244   if test "$have_gtk" = yes; then
15245     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15246     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15247     cat >>confdefs.h <<\_ACEOF
15248 #define HAVE_GTK 1
15249 _ACEOF
15250
15251     cat >>confdefs.h <<\_ACEOF
15252 #define HAVE_GTK2 1
15253 _ACEOF
15254
15255     cat >>confdefs.h <<\_ACEOF
15256 #define HAVE_XML 1
15257 _ACEOF
15258
15259   fi
15260
15261 fi
15262
15263
15264 # Check for the various Gnome help and URL loading programs.
15265 #
15266 WITH_BROWSER=gnome-open
15267 if test "$have_gtk" = yes; then
15268   for ac_prog in gnome-open
15269 do
15270   # Extract the first word of "$ac_prog", so it can be a program name with args.
15271 set dummy $ac_prog; ac_word=$2
15272 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15274 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15275   echo $ECHO_N "(cached) $ECHO_C" >&6
15276 else
15277   if test -n "$gnome_open_program"; then
15278   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15279 else
15280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15281 for as_dir in $PATH
15282 do
15283   IFS=$as_save_IFS
15284   test -z "$as_dir" && as_dir=.
15285   for ac_exec_ext in '' $ac_executable_extensions; do
15286   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15287     ac_cv_prog_gnome_open_program="$ac_prog"
15288     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15289     break 2
15290   fi
15291 done
15292 done
15293 IFS=$as_save_IFS
15294
15295 fi
15296 fi
15297 gnome_open_program=$ac_cv_prog_gnome_open_program
15298 if test -n "$gnome_open_program"; then
15299   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15300 echo "${ECHO_T}$gnome_open_program" >&6; }
15301 else
15302   { echo "$as_me:$LINENO: result: no" >&5
15303 echo "${ECHO_T}no" >&6; }
15304 fi
15305
15306
15307   test -n "$gnome_open_program" && break
15308 done
15309
15310   for ac_prog in gnome-url-show
15311 do
15312   # Extract the first word of "$ac_prog", so it can be a program name with args.
15313 set dummy $ac_prog; ac_word=$2
15314 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15316 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15317   echo $ECHO_N "(cached) $ECHO_C" >&6
15318 else
15319   if test -n "$gnome_url_show_program"; then
15320   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15321 else
15322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15323 for as_dir in $PATH
15324 do
15325   IFS=$as_save_IFS
15326   test -z "$as_dir" && as_dir=.
15327   for ac_exec_ext in '' $ac_executable_extensions; do
15328   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15329     ac_cv_prog_gnome_url_show_program="$ac_prog"
15330     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15331     break 2
15332   fi
15333 done
15334 done
15335 IFS=$as_save_IFS
15336
15337 fi
15338 fi
15339 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15340 if test -n "$gnome_url_show_program"; then
15341   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15342 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15343 else
15344   { echo "$as_me:$LINENO: result: no" >&5
15345 echo "${ECHO_T}no" >&6; }
15346 fi
15347
15348
15349   test -n "$gnome_url_show_program" && break
15350 done
15351
15352 fi
15353
15354
15355 ###############################################################################
15356 #
15357 #       Check for -lXm.
15358 #
15359 ###############################################################################
15360
15361 have_motif=no
15362 with_motif_req=unspecified
15363
15364 # Check whether --with-motif was given.
15365 if test "${with_motif+set}" = set; then
15366   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15367 else
15368   with_motif=no
15369 fi
15370
15371
15372
15373    case "$with_motif" in
15374     yes) ;;
15375     no)  ;;
15376
15377     /*)
15378      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15379 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15380      d=$with_motif/include
15381      if test -d $d; then
15382        X_CFLAGS="-I$d $X_CFLAGS"
15383        { echo "$as_me:$LINENO: result: $d" >&5
15384 echo "${ECHO_T}$d" >&6; }
15385      else
15386        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15387 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15388      fi
15389
15390      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15391 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15392      d=$with_motif/lib
15393      if test -d $d; then
15394        X_LIBS="-L$d $X_LIBS"
15395        { echo "$as_me:$LINENO: result: $d" >&5
15396 echo "${ECHO_T}$d" >&6; }
15397      else
15398        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15399 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15400      fi
15401
15402      # replace the directory string with "yes".
15403      with_motif_req="yes"
15404      with_motif=$with_motif_req
15405      ;;
15406
15407     *)
15408      echo ""
15409      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15410      echo "       If it is a directory, then \`DIR/include' will be added to"
15411      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15412      exit 1
15413      ;;
15414    esac
15415
15416
15417 if test "$with_motif" != yes -a "$with_motif" != no ; then
15418   echo "error: must be yes or no: --with-motif=$with_motif"
15419   exit 1
15420 fi
15421
15422 if test "$with_motif" = yes; then
15423   have_motif=no
15424
15425   ac_save_CPPFLAGS="$CPPFLAGS"
15426   if test \! -z "$includedir" ; then
15427     CPPFLAGS="$CPPFLAGS -I$includedir"
15428   fi
15429   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15430   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15431   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15432 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15433 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15434   echo $ECHO_N "(cached) $ECHO_C" >&6
15435 else
15436   cat >conftest.$ac_ext <<_ACEOF
15437 /* confdefs.h.  */
15438 _ACEOF
15439 cat confdefs.h >>conftest.$ac_ext
15440 cat >>conftest.$ac_ext <<_ACEOF
15441 /* end confdefs.h.  */
15442 #include <stdlib.h>
15443                      #include <stdio.h>
15444                      #include <X11/Intrinsic.h>
15445
15446 #include <Xm/Xm.h>
15447 _ACEOF
15448 rm -rf conftest.$ac_objext
15449 if { (ac_try="$ac_compile"
15450 case "(($ac_try" in
15451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15452   *) ac_try_echo=$ac_try;;
15453 esac
15454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15455   (eval "$ac_compile") 2>conftest.er1
15456   ac_status=$?
15457   grep -v '^ *+' conftest.er1 >conftest.err
15458   rm -rf conftest.er1
15459   cat conftest.err >&5
15460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15461   (exit $ac_status); } && {
15462          test -z "$ac_c_werror_flag" ||
15463          test ! -s conftest.err
15464        } && test -s conftest.$ac_objext; then
15465   ac_cv_header_Xm_Xm_h=yes
15466 else
15467   echo "$as_me: failed program was:" >&5
15468 sed 's/^/| /' conftest.$ac_ext >&5
15469
15470         ac_cv_header_Xm_Xm_h=no
15471 fi
15472
15473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15474 fi
15475 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15476 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15477 if test $ac_cv_header_Xm_Xm_h = yes; then
15478   have_motif=yes
15479                      cat >>confdefs.h <<\_ACEOF
15480 #define HAVE_MOTIF 1
15481 _ACEOF
15482
15483                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15484 fi
15485
15486
15487   CPPFLAGS="$ac_save_CPPFLAGS"
15488 fi
15489
15490
15491 if test "$have_motif" = yes; then
15492
15493   ac_save_CPPFLAGS="$CPPFLAGS"
15494   if test \! -z "$includedir" ; then
15495     CPPFLAGS="$CPPFLAGS -I$includedir"
15496   fi
15497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15498   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15499   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15500 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15501 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15502   echo $ECHO_N "(cached) $ECHO_C" >&6
15503 else
15504   cat >conftest.$ac_ext <<_ACEOF
15505 /* confdefs.h.  */
15506 _ACEOF
15507 cat confdefs.h >>conftest.$ac_ext
15508 cat >>conftest.$ac_ext <<_ACEOF
15509 /* end confdefs.h.  */
15510 #include <stdlib.h>
15511                      #include <stdio.h>
15512                      #include <X11/Intrinsic.h>
15513
15514 #include <Xm/ComboBox.h>
15515 _ACEOF
15516 rm -rf conftest.$ac_objext
15517 if { (ac_try="$ac_compile"
15518 case "(($ac_try" in
15519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15520   *) ac_try_echo=$ac_try;;
15521 esac
15522 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15523   (eval "$ac_compile") 2>conftest.er1
15524   ac_status=$?
15525   grep -v '^ *+' conftest.er1 >conftest.err
15526   rm -rf conftest.er1
15527   cat conftest.err >&5
15528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529   (exit $ac_status); } && {
15530          test -z "$ac_c_werror_flag" ||
15531          test ! -s conftest.err
15532        } && test -s conftest.$ac_objext; then
15533   ac_cv_header_Xm_ComboBox_h=yes
15534 else
15535   echo "$as_me: failed program was:" >&5
15536 sed 's/^/| /' conftest.$ac_ext >&5
15537
15538         ac_cv_header_Xm_ComboBox_h=no
15539 fi
15540
15541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15542 fi
15543 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15544 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15545 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15546   cat >>confdefs.h <<\_ACEOF
15547 #define HAVE_XMCOMBOBOX 1
15548 _ACEOF
15549
15550 fi
15551
15552
15553   CPPFLAGS="$ac_save_CPPFLAGS"
15554 fi
15555
15556
15557 ###############################################################################
15558 #
15559 #       Checking whether Motif is really Lesstif.
15560 #
15561 ###############################################################################
15562
15563 have_lesstif=no
15564 if test "$have_motif" = yes ; then
15565   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15566 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15567 if test "${ac_cv_have_lesstif+set}" = set; then
15568   echo $ECHO_N "(cached) $ECHO_C" >&6
15569 else
15570
15571   ac_save_CPPFLAGS="$CPPFLAGS"
15572   if test \! -z "$includedir" ; then
15573     CPPFLAGS="$CPPFLAGS -I$includedir"
15574   fi
15575   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15576   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15577   cat >conftest.$ac_ext <<_ACEOF
15578 /* confdefs.h.  */
15579 _ACEOF
15580 cat confdefs.h >>conftest.$ac_ext
15581 cat >>conftest.$ac_ext <<_ACEOF
15582 /* end confdefs.h.  */
15583 #include <Xm/Xm.h>
15584 int
15585 main ()
15586 {
15587 long vers = LesstifVersion;
15588   ;
15589   return 0;
15590 }
15591 _ACEOF
15592 rm -rf conftest.$ac_objext
15593 if { (ac_try="$ac_compile"
15594 case "(($ac_try" in
15595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15596   *) ac_try_echo=$ac_try;;
15597 esac
15598 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15599   (eval "$ac_compile") 2>conftest.er1
15600   ac_status=$?
15601   grep -v '^ *+' conftest.er1 >conftest.err
15602   rm -rf conftest.er1
15603   cat conftest.err >&5
15604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15605   (exit $ac_status); } && {
15606          test -z "$ac_c_werror_flag" ||
15607          test ! -s conftest.err
15608        } && test -s conftest.$ac_objext; then
15609   ac_cv_have_lesstif=yes
15610 else
15611   echo "$as_me: failed program was:" >&5
15612 sed 's/^/| /' conftest.$ac_ext >&5
15613
15614         ac_cv_have_lesstif=no
15615 fi
15616
15617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15618   CPPFLAGS="$ac_save_CPPFLAGS"
15619 fi
15620 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15621 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15622   have_lesstif=$ac_cv_have_lesstif
15623 fi
15624
15625
15626 lesstif_version=unknown
15627 lesstif_version_string=unknown
15628
15629 if test "$have_lesstif" = yes ; then
15630   ltv=unknown
15631   echo unknown > conftest-lt
15632   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15633 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15634 if test "${ac_cv_lesstif_version_string+set}" = set; then
15635   echo $ECHO_N "(cached) $ECHO_C" >&6
15636 else
15637
15638   ac_save_CPPFLAGS="$CPPFLAGS"
15639   if test \! -z "$includedir" ; then
15640     CPPFLAGS="$CPPFLAGS -I$includedir"
15641   fi
15642   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15643   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15644   if test "$cross_compiling" = yes; then
15645   ac_cv_lesstif_version=unknown
15646                      ac_cv_lesstif_version_string=unknown
15647 else
15648   cat >conftest.$ac_ext <<_ACEOF
15649 /* confdefs.h.  */
15650 _ACEOF
15651 cat confdefs.h >>conftest.$ac_ext
15652 cat >>conftest.$ac_ext <<_ACEOF
15653 /* end confdefs.h.  */
15654 #include <stdio.h>
15655                      #include <Xm/Xm.h>
15656                      int main() {
15657                        FILE *f = fopen("conftest-lt", "w");
15658                        if (!f) exit(1);
15659                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15660                           LESSTIF_VERSION, LESSTIF_REVISION);
15661                        fclose(f);
15662                        exit(0);
15663                      }
15664 _ACEOF
15665 rm -rf conftest$ac_exeext
15666 if { (ac_try="$ac_link"
15667 case "(($ac_try" in
15668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15669   *) ac_try_echo=$ac_try;;
15670 esac
15671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15672   (eval "$ac_link") 2>&5
15673   ac_status=$?
15674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15676   { (case "(($ac_try" in
15677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15678   *) ac_try_echo=$ac_try;;
15679 esac
15680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15681   (eval "$ac_try") 2>&5
15682   ac_status=$?
15683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684   (exit $ac_status); }; }; then
15685   ltv=`cat conftest-lt`
15686                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15687                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15688 else
15689   echo "$as_me: program exited with status $ac_status" >&5
15690 echo "$as_me: failed program was:" >&5
15691 sed 's/^/| /' conftest.$ac_ext >&5
15692
15693 ( exit $ac_status )
15694 ac_cv_lesstif_version=unknown
15695                      ac_cv_lesstif_version_string=unknown
15696 fi
15697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15698 fi
15699
15700
15701   CPPFLAGS="$ac_save_CPPFLAGS"
15702 fi
15703 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15704 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15705   rm -rf conftest-lt
15706   lesstif_version=$ac_cv_lesstif_version
15707   lesstif_version_string=$ac_cv_lesstif_version_string
15708
15709 fi
15710
15711
15712 if test "$have_motif" = yes ; then
15713   mtv=unknown
15714   echo unknown > conftest-mt
15715   { echo "$as_me:$LINENO: checking Motif version number" >&5
15716 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15717 if test "${ac_cv_motif_version_string+set}" = set; then
15718   echo $ECHO_N "(cached) $ECHO_C" >&6
15719 else
15720
15721   ac_save_CPPFLAGS="$CPPFLAGS"
15722   if test \! -z "$includedir" ; then
15723     CPPFLAGS="$CPPFLAGS -I$includedir"
15724   fi
15725   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15726   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15727   if test "$cross_compiling" = yes; then
15728   ac_cv_motif_version=unknown
15729                      ac_cv_motif_version_string=unknown
15730 else
15731   cat >conftest.$ac_ext <<_ACEOF
15732 /* confdefs.h.  */
15733 _ACEOF
15734 cat confdefs.h >>conftest.$ac_ext
15735 cat >>conftest.$ac_ext <<_ACEOF
15736 /* end confdefs.h.  */
15737 #include <stdio.h>
15738                      #include <Xm/Xm.h>
15739                      int main() {
15740                        FILE *f = fopen("conftest-mt", "w");
15741                        if (!f) exit(1);
15742                        fprintf(f, "%d %d.%d\n", XmVersion,
15743                           XmVERSION, XmREVISION);
15744                        fclose(f);
15745                        exit(0);
15746                      }
15747 _ACEOF
15748 rm -rf conftest$ac_exeext
15749 if { (ac_try="$ac_link"
15750 case "(($ac_try" in
15751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15752   *) ac_try_echo=$ac_try;;
15753 esac
15754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15755   (eval "$ac_link") 2>&5
15756   ac_status=$?
15757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15759   { (case "(($ac_try" in
15760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15761   *) ac_try_echo=$ac_try;;
15762 esac
15763 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15764   (eval "$ac_try") 2>&5
15765   ac_status=$?
15766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767   (exit $ac_status); }; }; then
15768   mtv=`cat conftest-mt`
15769                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15770                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15771 else
15772   echo "$as_me: program exited with status $ac_status" >&5
15773 echo "$as_me: failed program was:" >&5
15774 sed 's/^/| /' conftest.$ac_ext >&5
15775
15776 ( exit $ac_status )
15777 ac_cv_motif_version=unknown
15778                      ac_cv_motif_version_string=unknown
15779 fi
15780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15781 fi
15782
15783
15784   CPPFLAGS="$ac_save_CPPFLAGS"
15785 fi
15786 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15787 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15788   rm -rf conftest-mt
15789   motif_version=$ac_cv_motif_version
15790   motif_version_string=$ac_cv_motif_version_string
15791
15792 fi
15793
15794
15795 ###############################################################################
15796 #
15797 #       Checking whether Motif requires -lXpm.
15798 #
15799 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15800 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15801 #       of the library whether to build the XPM code into libXm, or whether
15802 #       to rely on an external libXm.  So the only way to tell whether XPM is
15803 #       a link-time requirement is to examine libXm.a, which is very
15804 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15805 #       always link against XPM if the XPM lib exists (and this will be a
15806 #       no-op if libXm happens to already have the XPM code in it.)
15807 #
15808 ###############################################################################
15809
15810 motif_requires_xpm=no
15811 if test "$have_motif" = yes ; then
15812    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15813 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15814    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15815    then
15816      motif_requires_xpm=yes
15817      { echo "$as_me:$LINENO: result: maybe" >&5
15818 echo "${ECHO_T}maybe" >&6; }
15819    else
15820      { echo "$as_me:$LINENO: result: no" >&5
15821 echo "${ECHO_T}no" >&6; }
15822    fi
15823 fi
15824
15825
15826 ###############################################################################
15827 #
15828 #       Checking whether Motif requires -lXp.
15829 #
15830 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15831 #       Extension".   Why this extension isn't in -lXext with all the others,
15832 #       I have no idea.
15833 #
15834 ###############################################################################
15835
15836 have_xp_ext=no
15837 if test "$have_motif" = yes ; then
15838    have_xp_ext=no
15839
15840   ac_save_CPPFLAGS="$CPPFLAGS"
15841   ac_save_LDFLAGS="$LDFLAGS"
15842 #  ac_save_LIBS="$LIBS"
15843
15844   if test \! -z "$includedir" ; then
15845     CPPFLAGS="$CPPFLAGS -I$includedir"
15846   fi
15847   # note: $X_CFLAGS includes $x_includes
15848   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15849
15850   if test \! -z "$libdir" ; then
15851     LDFLAGS="$LDFLAGS -L$libdir"
15852   fi
15853   # note: $X_LIBS includes $x_libraries
15854   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15855
15856   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15857   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15858   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15859 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15860 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15861   echo $ECHO_N "(cached) $ECHO_C" >&6
15862 else
15863   ac_check_lib_save_LIBS=$LIBS
15864 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15865 cat >conftest.$ac_ext <<_ACEOF
15866 /* confdefs.h.  */
15867 _ACEOF
15868 cat confdefs.h >>conftest.$ac_ext
15869 cat >>conftest.$ac_ext <<_ACEOF
15870 /* end confdefs.h.  */
15871
15872 /* Override any GCC internal prototype to avoid an error.
15873    Use char because int might match the return type of a GCC
15874    builtin and then its argument prototype would still apply.  */
15875 #ifdef __cplusplus
15876 extern "C"
15877 #endif
15878 char XpQueryExtension ();
15879 int
15880 main ()
15881 {
15882 return XpQueryExtension ();
15883   ;
15884   return 0;
15885 }
15886 _ACEOF
15887 rm -rf conftest.$ac_objext conftest$ac_exeext
15888 if { (ac_try="$ac_link"
15889 case "(($ac_try" in
15890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15891   *) ac_try_echo=$ac_try;;
15892 esac
15893 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15894   (eval "$ac_link") 2>conftest.er1
15895   ac_status=$?
15896   grep -v '^ *+' conftest.er1 >conftest.err
15897   rm -rf conftest.er1
15898   cat conftest.err >&5
15899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900   (exit $ac_status); } && {
15901          test -z "$ac_c_werror_flag" ||
15902          test ! -s conftest.err
15903        } && test -s conftest$ac_exeext &&
15904        $as_test_x conftest$ac_exeext; then
15905   ac_cv_lib_Xp_XpQueryExtension=yes
15906 else
15907   echo "$as_me: failed program was:" >&5
15908 sed 's/^/| /' conftest.$ac_ext >&5
15909
15910         ac_cv_lib_Xp_XpQueryExtension=no
15911 fi
15912
15913 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15914       conftest$ac_exeext conftest.$ac_ext
15915 LIBS=$ac_check_lib_save_LIBS
15916 fi
15917 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15918 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
15919 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15920   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15921 else
15922   true
15923 fi
15924
15925   CPPFLAGS="$ac_save_CPPFLAGS"
15926   LDFLAGS="$ac_save_LDFLAGS"
15927 #  LIBS="$ac_save_LIBS"
15928
15929 fi
15930
15931
15932 ###############################################################################
15933 #
15934 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15935 #
15936 ###############################################################################
15937
15938 have_xintl=no
15939 if test "$have_motif" = yes ; then
15940
15941   ac_save_CPPFLAGS="$CPPFLAGS"
15942   ac_save_LDFLAGS="$LDFLAGS"
15943 #  ac_save_LIBS="$LIBS"
15944
15945   if test \! -z "$includedir" ; then
15946     CPPFLAGS="$CPPFLAGS -I$includedir"
15947   fi
15948   # note: $X_CFLAGS includes $x_includes
15949   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15950
15951   if test \! -z "$libdir" ; then
15952     LDFLAGS="$LDFLAGS -L$libdir"
15953   fi
15954   # note: $X_LIBS includes $x_libraries
15955   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15956
15957   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15958   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15959   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15960 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
15961 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15962   echo $ECHO_N "(cached) $ECHO_C" >&6
15963 else
15964   ac_check_lib_save_LIBS=$LIBS
15965 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15966 cat >conftest.$ac_ext <<_ACEOF
15967 /* confdefs.h.  */
15968 _ACEOF
15969 cat confdefs.h >>conftest.$ac_ext
15970 cat >>conftest.$ac_ext <<_ACEOF
15971 /* end confdefs.h.  */
15972
15973 /* Override any GCC internal prototype to avoid an error.
15974    Use char because int might match the return type of a GCC
15975    builtin and then its argument prototype would still apply.  */
15976 #ifdef __cplusplus
15977 extern "C"
15978 #endif
15979 char _Xsetlocale ();
15980 int
15981 main ()
15982 {
15983 return _Xsetlocale ();
15984   ;
15985   return 0;
15986 }
15987 _ACEOF
15988 rm -rf conftest.$ac_objext conftest$ac_exeext
15989 if { (ac_try="$ac_link"
15990 case "(($ac_try" in
15991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15992   *) ac_try_echo=$ac_try;;
15993 esac
15994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15995   (eval "$ac_link") 2>conftest.er1
15996   ac_status=$?
15997   grep -v '^ *+' conftest.er1 >conftest.err
15998   rm -rf conftest.er1
15999   cat conftest.err >&5
16000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); } && {
16002          test -z "$ac_c_werror_flag" ||
16003          test ! -s conftest.err
16004        } && test -s conftest$ac_exeext &&
16005        $as_test_x conftest$ac_exeext; then
16006   ac_cv_lib_Xintl__Xsetlocale=yes
16007 else
16008   echo "$as_me: failed program was:" >&5
16009 sed 's/^/| /' conftest.$ac_ext >&5
16010
16011         ac_cv_lib_Xintl__Xsetlocale=no
16012 fi
16013
16014 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16015       conftest$ac_exeext conftest.$ac_ext
16016 LIBS=$ac_check_lib_save_LIBS
16017 fi
16018 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16019 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16020 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16021   have_xintl=yes
16022 else
16023   have_xintl=no
16024 fi
16025
16026   CPPFLAGS="$ac_save_CPPFLAGS"
16027   LDFLAGS="$ac_save_LDFLAGS"
16028 #  LIBS="$ac_save_LIBS"
16029
16030   if test "$have_xintl" = yes; then
16031     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16032   fi
16033 fi
16034
16035
16036 ###############################################################################
16037 #
16038 #       Check for -lGL or -lMesaGL.
16039 #
16040 ###############################################################################
16041
16042 have_gl=no
16043 ac_have_mesa_gl=no
16044 with_gl_req=unspecified
16045 gl_halfassed=no
16046
16047 # Check whether --with-gl was given.
16048 if test "${with_gl+set}" = set; then
16049   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16050 else
16051   with_gl=yes
16052 fi
16053
16054
16055
16056    case "$with_gl" in
16057     yes) ;;
16058     no)  ;;
16059
16060     /*)
16061      { echo "$as_me:$LINENO: checking for GL headers" >&5
16062 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16063      d=$with_gl/include
16064      if test -d $d; then
16065        X_CFLAGS="-I$d $X_CFLAGS"
16066        { echo "$as_me:$LINENO: result: $d" >&5
16067 echo "${ECHO_T}$d" >&6; }
16068      else
16069        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16070 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16071      fi
16072
16073      { echo "$as_me:$LINENO: checking for GL libs" >&5
16074 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16075      d=$with_gl/lib
16076      if test -d $d; then
16077        X_LIBS="-L$d $X_LIBS"
16078        { echo "$as_me:$LINENO: result: $d" >&5
16079 echo "${ECHO_T}$d" >&6; }
16080      else
16081        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16082 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16083      fi
16084
16085      # replace the directory string with "yes".
16086      with_gl_req="yes"
16087      with_gl=$with_gl_req
16088      ;;
16089
16090     *)
16091      echo ""
16092      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16093      echo "       If it is a directory, then \`DIR/include' will be added to"
16094      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16095      exit 1
16096      ;;
16097    esac
16098
16099
16100 ac_mesagl_version=unknown
16101 ac_mesagl_version_string=unknown
16102
16103 if test "$with_gl" = yes; then
16104
16105   ac_save_CPPFLAGS="$CPPFLAGS"
16106   if test \! -z "$includedir" ; then
16107     CPPFLAGS="$CPPFLAGS -I$includedir"
16108   fi
16109   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16110   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16111   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16112   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16113 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16114 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16115   echo $ECHO_N "(cached) $ECHO_C" >&6
16116 fi
16117 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16118 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16119 else
16120   # Is the header compilable?
16121 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16122 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16123 cat >conftest.$ac_ext <<_ACEOF
16124 /* confdefs.h.  */
16125 _ACEOF
16126 cat confdefs.h >>conftest.$ac_ext
16127 cat >>conftest.$ac_ext <<_ACEOF
16128 /* end confdefs.h.  */
16129 $ac_includes_default
16130 #include <GL/gl.h>
16131 _ACEOF
16132 rm -rf conftest.$ac_objext
16133 if { (ac_try="$ac_compile"
16134 case "(($ac_try" in
16135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16136   *) ac_try_echo=$ac_try;;
16137 esac
16138 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16139   (eval "$ac_compile") 2>conftest.er1
16140   ac_status=$?
16141   grep -v '^ *+' conftest.er1 >conftest.err
16142   rm -rf conftest.er1
16143   cat conftest.err >&5
16144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145   (exit $ac_status); } && {
16146          test -z "$ac_c_werror_flag" ||
16147          test ! -s conftest.err
16148        } && test -s conftest.$ac_objext; then
16149   ac_header_compiler=yes
16150 else
16151   echo "$as_me: failed program was:" >&5
16152 sed 's/^/| /' conftest.$ac_ext >&5
16153
16154         ac_header_compiler=no
16155 fi
16156
16157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16159 echo "${ECHO_T}$ac_header_compiler" >&6; }
16160
16161 # Is the header present?
16162 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16163 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16164 cat >conftest.$ac_ext <<_ACEOF
16165 /* confdefs.h.  */
16166 _ACEOF
16167 cat confdefs.h >>conftest.$ac_ext
16168 cat >>conftest.$ac_ext <<_ACEOF
16169 /* end confdefs.h.  */
16170 #include <GL/gl.h>
16171 _ACEOF
16172 if { (ac_try="$ac_cpp conftest.$ac_ext"
16173 case "(($ac_try" in
16174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16175   *) ac_try_echo=$ac_try;;
16176 esac
16177 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16178   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16179   ac_status=$?
16180   grep -v '^ *+' conftest.er1 >conftest.err
16181   rm -rf conftest.er1
16182   cat conftest.err >&5
16183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16184   (exit $ac_status); } >/dev/null && {
16185          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16186          test ! -s conftest.err
16187        }; then
16188   ac_header_preproc=yes
16189 else
16190   echo "$as_me: failed program was:" >&5
16191 sed 's/^/| /' conftest.$ac_ext >&5
16192
16193   ac_header_preproc=no
16194 fi
16195
16196 rm -rf conftest.err conftest.$ac_ext
16197 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16198 echo "${ECHO_T}$ac_header_preproc" >&6; }
16199
16200 # So?  What about this header?
16201 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16202   yes:no: )
16203     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16204 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16205     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16206 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16207     ac_header_preproc=yes
16208     ;;
16209   no:yes:* )
16210     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16211 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16212     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16213 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16214     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16215 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16216     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16217 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16218     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16219 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16220     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16221 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16222
16223     ;;
16224 esac
16225 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16226 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16227 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16228   echo $ECHO_N "(cached) $ECHO_C" >&6
16229 else
16230   ac_cv_header_GL_gl_h=$ac_header_preproc
16231 fi
16232 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16233 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16234
16235 fi
16236 if test $ac_cv_header_GL_gl_h = yes; then
16237   have_gl=yes
16238 else
16239   have_gl=no
16240 fi
16241
16242
16243   CPPFLAGS="$ac_save_CPPFLAGS"
16244   if test "$have_gl" = yes ; then
16245
16246   ac_save_CPPFLAGS="$CPPFLAGS"
16247   if test \! -z "$includedir" ; then
16248     CPPFLAGS="$CPPFLAGS -I$includedir"
16249   fi
16250   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16251   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16252   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16253 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16254 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16255   echo $ECHO_N "(cached) $ECHO_C" >&6
16256 else
16257   cat >conftest.$ac_ext <<_ACEOF
16258 /* confdefs.h.  */
16259 _ACEOF
16260 cat confdefs.h >>conftest.$ac_ext
16261 cat >>conftest.$ac_ext <<_ACEOF
16262 /* end confdefs.h.  */
16263 #include <GL/gl.h>
16264
16265 #include <GL/glx.h>
16266 _ACEOF
16267 rm -rf conftest.$ac_objext
16268 if { (ac_try="$ac_compile"
16269 case "(($ac_try" in
16270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16271   *) ac_try_echo=$ac_try;;
16272 esac
16273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16274   (eval "$ac_compile") 2>conftest.er1
16275   ac_status=$?
16276   grep -v '^ *+' conftest.er1 >conftest.err
16277   rm -rf conftest.er1
16278   cat conftest.err >&5
16279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280   (exit $ac_status); } && {
16281          test -z "$ac_c_werror_flag" ||
16282          test ! -s conftest.err
16283        } && test -s conftest.$ac_objext; then
16284   ac_cv_header_GL_glx_h=yes
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 sed 's/^/| /' conftest.$ac_ext >&5
16288
16289         ac_cv_header_GL_glx_h=no
16290 fi
16291
16292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16293 fi
16294 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16295 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16296 if test $ac_cv_header_GL_glx_h = yes; then
16297   have_gl=yes
16298 else
16299   have_gl=no
16300 fi
16301
16302
16303   CPPFLAGS="$ac_save_CPPFLAGS"
16304   fi
16305
16306   # If we have the headers, try and figure out which vendor it's from.
16307   #
16308   if test "$have_gl" = yes ; then
16309
16310     # We need to know whether it's MesaGL so that we know which libraries
16311     # to link against.
16312     #
16313     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16314 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16315 if test "${ac_cv_have_mesa_gl+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   ac_cv_have_mesa_gl=no
16319        if test "$ac_macosx" = no; then
16320          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16321          # It's not really Mesa, is it?
16322
16323   ac_save_CPPFLAGS="$CPPFLAGS"
16324   if test \! -z "$includedir" ; then
16325     CPPFLAGS="$CPPFLAGS -I$includedir"
16326   fi
16327   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16328   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16329   cat >conftest.$ac_ext <<_ACEOF
16330 /* confdefs.h.  */
16331 _ACEOF
16332 cat confdefs.h >>conftest.$ac_ext
16333 cat >>conftest.$ac_ext <<_ACEOF
16334 /* end confdefs.h.  */
16335 #include <GL/glx.h>
16336
16337 _ACEOF
16338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16339   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16340   ac_cv_have_mesa_gl=yes
16341 fi
16342 rm -rf conftest*
16343
16344   CPPFLAGS="$ac_save_CPPFLAGS"
16345        fi
16346 fi
16347 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16348 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16349     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16350
16351     gl_lib_1=""
16352     GL_LIBS=""
16353
16354     if test "$ac_macosx" = yes; then
16355
16356       # Without these, every link against libGL gets a bunch of useless
16357       # warnings.
16358       #
16359       osx_crud="-bind_at_load -multiply_defined suppress"
16360       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16361 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16362       GL_LIBS="$GL_LIBS $osx_crud"
16363       unset osx_crud
16364
16365       # New lossage in 10.5.0: without this, we get:
16366       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16367       #
16368       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16369       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16370
16371       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16372 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16373       GL_LIBS="$GL_LIBS $osx_crud"
16374       unset osx_crud
16375     fi
16376
16377
16378     # Some versions of MesaGL are compiled to require -lpthread.
16379     # So if the Mesa headers exist, and -lpthread exists, then always
16380     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16381     #
16382     if test "$ac_have_mesa_gl" = yes; then
16383       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16384 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16385 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16386   echo $ECHO_N "(cached) $ECHO_C" >&6
16387 else
16388   ac_check_lib_save_LIBS=$LIBS
16389 LIBS="-lpthread  $LIBS"
16390 cat >conftest.$ac_ext <<_ACEOF
16391 /* confdefs.h.  */
16392 _ACEOF
16393 cat confdefs.h >>conftest.$ac_ext
16394 cat >>conftest.$ac_ext <<_ACEOF
16395 /* end confdefs.h.  */
16396
16397 /* Override any GCC internal prototype to avoid an error.
16398    Use char because int might match the return type of a GCC
16399    builtin and then its argument prototype would still apply.  */
16400 #ifdef __cplusplus
16401 extern "C"
16402 #endif
16403 char pthread_create ();
16404 int
16405 main ()
16406 {
16407 return pthread_create ();
16408   ;
16409   return 0;
16410 }
16411 _ACEOF
16412 rm -rf conftest.$ac_objext conftest$ac_exeext
16413 if { (ac_try="$ac_link"
16414 case "(($ac_try" in
16415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16416   *) ac_try_echo=$ac_try;;
16417 esac
16418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16419   (eval "$ac_link") 2>conftest.er1
16420   ac_status=$?
16421   grep -v '^ *+' conftest.er1 >conftest.err
16422   rm -rf conftest.er1
16423   cat conftest.err >&5
16424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16425   (exit $ac_status); } && {
16426          test -z "$ac_c_werror_flag" ||
16427          test ! -s conftest.err
16428        } && test -s conftest$ac_exeext &&
16429        $as_test_x conftest$ac_exeext; then
16430   ac_cv_lib_pthread_pthread_create=yes
16431 else
16432   echo "$as_me: failed program was:" >&5
16433 sed 's/^/| /' conftest.$ac_ext >&5
16434
16435         ac_cv_lib_pthread_pthread_create=no
16436 fi
16437
16438 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16439       conftest$ac_exeext conftest.$ac_ext
16440 LIBS=$ac_check_lib_save_LIBS
16441 fi
16442 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16443 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16444 if test $ac_cv_lib_pthread_pthread_create = yes; then
16445   GL_LIBS="-lpthread"
16446 fi
16447
16448     fi
16449
16450
16451     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16452     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16453     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16454     #
16455
16456     if test "$ac_have_mesa_gl" = yes ; then
16457
16458   ac_save_CPPFLAGS="$CPPFLAGS"
16459   ac_save_LDFLAGS="$LDFLAGS"
16460 #  ac_save_LIBS="$LIBS"
16461
16462   if test \! -z "$includedir" ; then
16463     CPPFLAGS="$CPPFLAGS -I$includedir"
16464   fi
16465   # note: $X_CFLAGS includes $x_includes
16466   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16467
16468   if test \! -z "$libdir" ; then
16469     LDFLAGS="$LDFLAGS -L$libdir"
16470   fi
16471   # note: $X_LIBS includes $x_libraries
16472   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16473
16474   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16475   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16476   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16477 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16478 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16479   echo $ECHO_N "(cached) $ECHO_C" >&6
16480 else
16481   ac_check_lib_save_LIBS=$LIBS
16482 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16483 cat >conftest.$ac_ext <<_ACEOF
16484 /* confdefs.h.  */
16485 _ACEOF
16486 cat confdefs.h >>conftest.$ac_ext
16487 cat >>conftest.$ac_ext <<_ACEOF
16488 /* end confdefs.h.  */
16489
16490 /* Override any GCC internal prototype to avoid an error.
16491    Use char because int might match the return type of a GCC
16492    builtin and then its argument prototype would still apply.  */
16493 #ifdef __cplusplus
16494 extern "C"
16495 #endif
16496 char glXCreateContext ();
16497 int
16498 main ()
16499 {
16500 return glXCreateContext ();
16501   ;
16502   return 0;
16503 }
16504 _ACEOF
16505 rm -rf conftest.$ac_objext conftest$ac_exeext
16506 if { (ac_try="$ac_link"
16507 case "(($ac_try" in
16508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509   *) ac_try_echo=$ac_try;;
16510 esac
16511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16512   (eval "$ac_link") 2>conftest.er1
16513   ac_status=$?
16514   grep -v '^ *+' conftest.er1 >conftest.err
16515   rm -rf conftest.er1
16516   cat conftest.err >&5
16517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518   (exit $ac_status); } && {
16519          test -z "$ac_c_werror_flag" ||
16520          test ! -s conftest.err
16521        } && test -s conftest$ac_exeext &&
16522        $as_test_x conftest$ac_exeext; then
16523   ac_cv_lib_MesaGL_glXCreateContext=yes
16524 else
16525   echo "$as_me: failed program was:" >&5
16526 sed 's/^/| /' conftest.$ac_ext >&5
16527
16528         ac_cv_lib_MesaGL_glXCreateContext=no
16529 fi
16530
16531 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16532       conftest$ac_exeext conftest.$ac_ext
16533 LIBS=$ac_check_lib_save_LIBS
16534 fi
16535 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16536 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16537 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16538   gl_lib_1="MesaGL"
16539                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16540 fi
16541
16542   CPPFLAGS="$ac_save_CPPFLAGS"
16543   LDFLAGS="$ac_save_LDFLAGS"
16544 #  LIBS="$ac_save_LIBS"
16545
16546     fi
16547
16548     if test "$gl_lib_1" = "" ; then
16549
16550   ac_save_CPPFLAGS="$CPPFLAGS"
16551   ac_save_LDFLAGS="$LDFLAGS"
16552 #  ac_save_LIBS="$LIBS"
16553
16554   if test \! -z "$includedir" ; then
16555     CPPFLAGS="$CPPFLAGS -I$includedir"
16556   fi
16557   # note: $X_CFLAGS includes $x_includes
16558   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16559
16560   if test \! -z "$libdir" ; then
16561     LDFLAGS="$LDFLAGS -L$libdir"
16562   fi
16563   # note: $X_LIBS includes $x_libraries
16564   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16565
16566   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16567   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16568   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16569 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16570 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16571   echo $ECHO_N "(cached) $ECHO_C" >&6
16572 else
16573   ac_check_lib_save_LIBS=$LIBS
16574 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16575 cat >conftest.$ac_ext <<_ACEOF
16576 /* confdefs.h.  */
16577 _ACEOF
16578 cat confdefs.h >>conftest.$ac_ext
16579 cat >>conftest.$ac_ext <<_ACEOF
16580 /* end confdefs.h.  */
16581
16582 /* Override any GCC internal prototype to avoid an error.
16583    Use char because int might match the return type of a GCC
16584    builtin and then its argument prototype would still apply.  */
16585 #ifdef __cplusplus
16586 extern "C"
16587 #endif
16588 char glXCreateContext ();
16589 int
16590 main ()
16591 {
16592 return glXCreateContext ();
16593   ;
16594   return 0;
16595 }
16596 _ACEOF
16597 rm -rf conftest.$ac_objext conftest$ac_exeext
16598 if { (ac_try="$ac_link"
16599 case "(($ac_try" in
16600   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16601   *) ac_try_echo=$ac_try;;
16602 esac
16603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16604   (eval "$ac_link") 2>conftest.er1
16605   ac_status=$?
16606   grep -v '^ *+' conftest.er1 >conftest.err
16607   rm -rf conftest.er1
16608   cat conftest.err >&5
16609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610   (exit $ac_status); } && {
16611          test -z "$ac_c_werror_flag" ||
16612          test ! -s conftest.err
16613        } && test -s conftest$ac_exeext &&
16614        $as_test_x conftest$ac_exeext; then
16615   ac_cv_lib_GL_glXCreateContext=yes
16616 else
16617   echo "$as_me: failed program was:" >&5
16618 sed 's/^/| /' conftest.$ac_ext >&5
16619
16620         ac_cv_lib_GL_glXCreateContext=no
16621 fi
16622
16623 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16624       conftest$ac_exeext conftest.$ac_ext
16625 LIBS=$ac_check_lib_save_LIBS
16626 fi
16627 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16628 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16629 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16630   gl_lib_1="GL"
16631                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16632 fi
16633
16634   CPPFLAGS="$ac_save_CPPFLAGS"
16635   LDFLAGS="$ac_save_LDFLAGS"
16636 #  LIBS="$ac_save_LIBS"
16637
16638     fi
16639
16640     if test "$gl_lib_1" = "" ; then
16641       # we have headers, but no libs -- bail.
16642       have_gl=no
16643       ac_have_mesa_gl=no
16644       gl_halfassed=yes
16645     else
16646       # linking works -- we can build the GL hacks.
16647       cat >>confdefs.h <<\_ACEOF
16648 #define HAVE_GL 1
16649 _ACEOF
16650
16651       if test "$ac_have_mesa_gl" = yes ; then
16652         cat >>confdefs.h <<\_ACEOF
16653 #define HAVE_MESA_GL 1
16654 _ACEOF
16655
16656       fi
16657     fi
16658   fi
16659
16660
16661   # Now that we know we have GL headers and libs, do some more GL testing.
16662   #
16663
16664   if test "$have_gl" = yes ; then
16665     # If it's MesaGL, we'd like to issue a warning if the version number
16666     # is less than or equal to 2.6, because that version had a security bug.
16667     #
16668     if test "$ac_have_mesa_gl" = yes; then
16669
16670       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16671 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16672 if test "${ac_cv_mesagl_version_string+set}" = set; then
16673   echo $ECHO_N "(cached) $ECHO_C" >&6
16674 else
16675   cat > conftest.$ac_ext <<EOF
16676 #line 16680 "configure"
16677 #include "confdefs.h"
16678 #include <GL/gl.h>
16679 #ifndef MESA_MAJOR_VERSION
16680 # include <GL/xmesa.h>
16681 # ifdef XMESA_MAJOR_VERSION
16682    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16683       we have to check the XMesa version number (the number of the X protocol
16684       support, which seems to be the same as the Mesa version number.)
16685     */
16686 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16687 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16688 # else
16689    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16690       so we have no way of telling what version of Mesa this is at all.
16691       So, we'll guess that the osmesa version (the "offscreen protocol")
16692       is less than or equal to the real mesa version number.  Except that
16693       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16694       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16695     */
16696 # include <GL/osmesa.h>
16697 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16698 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16699 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16700 #   undef MESA_MINOR_VERSION
16701 #   define MESA_MINOR_VERSION 4 or newer, probably?
16702 #  endif
16703 # endif
16704 #endif
16705 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16706 EOF
16707
16708          ac_save_CPPFLAGS="$CPPFLAGS"
16709          if test \! -z "$includedir" ; then
16710            CPPFLAGS="$CPPFLAGS -I$includedir"
16711          fi
16712          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16713
16714          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16715
16716          # M4 sucks!!
16717
16718           mglv=`echo "$mglv" | sed -n \
16719              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16720
16721
16722          rm -rf conftest.$ac_ext
16723
16724          CPPFLAGS="$ac_save_CPPFLAGS"
16725
16726          if test "$mglv" = ""; then
16727            ac_mesagl_version=unknown
16728            ac_mesagl_version_string=unknown
16729          else
16730            ac_mesagl_version_string="$mglv"
16731            # M4 sucks!!
16732
16733            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16734            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16735
16736            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16737            if test -z "$ac_mesagl_version"; then
16738              ac_mesagl_version=unknown
16739              ac_mesagl_version_string=unknown
16740            fi
16741          fi
16742          ac_cv_mesagl_version=$ac_mesagl_version
16743          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16744
16745 fi
16746 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16747 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16748       ac_mesagl_version=$ac_cv_mesagl_version
16749       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16750     fi
16751
16752
16753     # Check for OpenGL 1.1 features.
16754     #
16755
16756   ac_save_CPPFLAGS="$CPPFLAGS"
16757   ac_save_LDFLAGS="$LDFLAGS"
16758 #  ac_save_LIBS="$LIBS"
16759
16760   if test \! -z "$includedir" ; then
16761     CPPFLAGS="$CPPFLAGS -I$includedir"
16762   fi
16763   # note: $X_CFLAGS includes $x_includes
16764   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16765
16766   if test \! -z "$libdir" ; then
16767     LDFLAGS="$LDFLAGS -L$libdir"
16768   fi
16769   # note: $X_LIBS includes $x_libraries
16770   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16771
16772   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16773   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16774   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16775 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16776 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16777 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16778   echo $ECHO_N "(cached) $ECHO_C" >&6
16779 else
16780   ac_check_lib_save_LIBS=$LIBS
16781 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16782 cat >conftest.$ac_ext <<_ACEOF
16783 /* confdefs.h.  */
16784 _ACEOF
16785 cat confdefs.h >>conftest.$ac_ext
16786 cat >>conftest.$ac_ext <<_ACEOF
16787 /* end confdefs.h.  */
16788
16789 /* Override any GCC internal prototype to avoid an error.
16790    Use char because int might match the return type of a GCC
16791    builtin and then its argument prototype would still apply.  */
16792 #ifdef __cplusplus
16793 extern "C"
16794 #endif
16795 char glBindTexture ();
16796 int
16797 main ()
16798 {
16799 return glBindTexture ();
16800   ;
16801   return 0;
16802 }
16803 _ACEOF
16804 rm -rf conftest.$ac_objext conftest$ac_exeext
16805 if { (ac_try="$ac_link"
16806 case "(($ac_try" in
16807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808   *) ac_try_echo=$ac_try;;
16809 esac
16810 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16811   (eval "$ac_link") 2>conftest.er1
16812   ac_status=$?
16813   grep -v '^ *+' conftest.er1 >conftest.err
16814   rm -rf conftest.er1
16815   cat conftest.err >&5
16816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817   (exit $ac_status); } && {
16818          test -z "$ac_c_werror_flag" ||
16819          test ! -s conftest.err
16820        } && test -s conftest$ac_exeext &&
16821        $as_test_x conftest$ac_exeext; then
16822   eval "$as_ac_Lib=yes"
16823 else
16824   echo "$as_me: failed program was:" >&5
16825 sed 's/^/| /' conftest.$ac_ext >&5
16826
16827         eval "$as_ac_Lib=no"
16828 fi
16829
16830 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16831       conftest$ac_exeext conftest.$ac_ext
16832 LIBS=$ac_check_lib_save_LIBS
16833 fi
16834 ac_res=`eval echo '${'$as_ac_Lib'}'`
16835                { echo "$as_me:$LINENO: result: $ac_res" >&5
16836 echo "${ECHO_T}$ac_res" >&6; }
16837 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16838   cat >>confdefs.h <<\_ACEOF
16839 #define HAVE_GLBINDTEXTURE 1
16840 _ACEOF
16841
16842 else
16843   true
16844 fi
16845
16846   CPPFLAGS="$ac_save_CPPFLAGS"
16847   LDFLAGS="$ac_save_LDFLAGS"
16848 #  LIBS="$ac_save_LIBS"
16849
16850   fi
16851
16852 elif test "$with_gl" != no; then
16853   echo "error: must be yes or no: --with-gl=$with_gl"
16854   exit 1
16855 fi
16856
16857
16858 ###############################################################################
16859 #
16860 #       Check for -lgle.
16861 #
16862 ###############################################################################
16863
16864 have_gle=no
16865 with_gle_req=unspecified
16866 gle_halfassed=no
16867
16868 # Check whether --with-gle was given.
16869 if test "${with_gle+set}" = set; then
16870   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16871 else
16872   with_gle=yes
16873 fi
16874
16875
16876
16877    case "$with_gle" in
16878     yes) ;;
16879     no)  ;;
16880
16881     /*)
16882      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16883 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16884      d=$with_gle/include
16885      if test -d $d; then
16886        X_CFLAGS="-I$d $X_CFLAGS"
16887        { echo "$as_me:$LINENO: result: $d" >&5
16888 echo "${ECHO_T}$d" >&6; }
16889      else
16890        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16891 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16892      fi
16893
16894      { echo "$as_me:$LINENO: checking for GLE libs" >&5
16895 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
16896      d=$with_gle/lib
16897      if test -d $d; then
16898        X_LIBS="-L$d $X_LIBS"
16899        { echo "$as_me:$LINENO: result: $d" >&5
16900 echo "${ECHO_T}$d" >&6; }
16901      else
16902        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16903 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16904      fi
16905
16906      # replace the directory string with "yes".
16907      with_gle_req="yes"
16908      with_gle=$with_gle_req
16909      ;;
16910
16911     *)
16912      echo ""
16913      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16914      echo "       If it is a directory, then \`DIR/include' will be added to"
16915      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16916      exit 1
16917      ;;
16918    esac
16919
16920
16921 GLE_LIBS=""
16922
16923 if test "$have_gl" = no ; then
16924  true
16925 elif test "$with_gle" = yes; then
16926
16927
16928   ac_save_CPPFLAGS="$CPPFLAGS"
16929   if test \! -z "$includedir" ; then
16930     CPPFLAGS="$CPPFLAGS -I$includedir"
16931   fi
16932   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16933   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16934   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16935 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
16936 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16937   echo $ECHO_N "(cached) $ECHO_C" >&6
16938 else
16939   cat >conftest.$ac_ext <<_ACEOF
16940 /* confdefs.h.  */
16941 _ACEOF
16942 cat confdefs.h >>conftest.$ac_ext
16943 cat >>conftest.$ac_ext <<_ACEOF
16944 /* end confdefs.h.  */
16945 #include <GL/gl.h>
16946
16947 #include <GL/gle.h>
16948 _ACEOF
16949 rm -rf conftest.$ac_objext
16950 if { (ac_try="$ac_compile"
16951 case "(($ac_try" in
16952   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16953   *) ac_try_echo=$ac_try;;
16954 esac
16955 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16956   (eval "$ac_compile") 2>conftest.er1
16957   ac_status=$?
16958   grep -v '^ *+' conftest.er1 >conftest.err
16959   rm -rf conftest.er1
16960   cat conftest.err >&5
16961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16962   (exit $ac_status); } && {
16963          test -z "$ac_c_werror_flag" ||
16964          test ! -s conftest.err
16965        } && test -s conftest.$ac_objext; then
16966   ac_cv_header_GL_gle_h=yes
16967 else
16968   echo "$as_me: failed program was:" >&5
16969 sed 's/^/| /' conftest.$ac_ext >&5
16970
16971         ac_cv_header_GL_gle_h=no
16972 fi
16973
16974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16975 fi
16976 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16977 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
16978 if test $ac_cv_header_GL_gle_h = yes; then
16979   have_gle3=yes
16980 else
16981   have_gle3=no
16982 fi
16983
16984
16985   CPPFLAGS="$ac_save_CPPFLAGS"
16986   if test "$have_gle3" = yes ; then
16987     have_gle=yes;
16988   else
16989
16990   ac_save_CPPFLAGS="$CPPFLAGS"
16991   if test \! -z "$includedir" ; then
16992     CPPFLAGS="$CPPFLAGS -I$includedir"
16993   fi
16994   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16995   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16996   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16997 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
16998 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16999   echo $ECHO_N "(cached) $ECHO_C" >&6
17000 else
17001   cat >conftest.$ac_ext <<_ACEOF
17002 /* confdefs.h.  */
17003 _ACEOF
17004 cat confdefs.h >>conftest.$ac_ext
17005 cat >>conftest.$ac_ext <<_ACEOF
17006 /* end confdefs.h.  */
17007 #include <GL/gl.h>
17008
17009 #include <GL/gutil.h>
17010 _ACEOF
17011 rm -rf conftest.$ac_objext
17012 if { (ac_try="$ac_compile"
17013 case "(($ac_try" in
17014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015   *) ac_try_echo=$ac_try;;
17016 esac
17017 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17018   (eval "$ac_compile") 2>conftest.er1
17019   ac_status=$?
17020   grep -v '^ *+' conftest.er1 >conftest.err
17021   rm -rf conftest.er1
17022   cat conftest.err >&5
17023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17024   (exit $ac_status); } && {
17025          test -z "$ac_c_werror_flag" ||
17026          test ! -s conftest.err
17027        } && test -s conftest.$ac_objext; then
17028   ac_cv_header_GL_gutil_h=yes
17029 else
17030   echo "$as_me: failed program was:" >&5
17031 sed 's/^/| /' conftest.$ac_ext >&5
17032
17033         ac_cv_header_GL_gutil_h=no
17034 fi
17035
17036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17037 fi
17038 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17039 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17040 if test $ac_cv_header_GL_gutil_h = yes; then
17041   have_gle=yes
17042 else
17043   have_gle=no
17044 fi
17045
17046
17047   CPPFLAGS="$ac_save_CPPFLAGS"
17048     if test "$have_gle" = yes ; then
17049
17050   ac_save_CPPFLAGS="$CPPFLAGS"
17051   if test \! -z "$includedir" ; then
17052     CPPFLAGS="$CPPFLAGS -I$includedir"
17053   fi
17054   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17055   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17056   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17057 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17058 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17059   echo $ECHO_N "(cached) $ECHO_C" >&6
17060 else
17061   cat >conftest.$ac_ext <<_ACEOF
17062 /* confdefs.h.  */
17063 _ACEOF
17064 cat confdefs.h >>conftest.$ac_ext
17065 cat >>conftest.$ac_ext <<_ACEOF
17066 /* end confdefs.h.  */
17067 #include <GL/gl.h>
17068
17069 #include <GL/tube.h>
17070 _ACEOF
17071 rm -rf conftest.$ac_objext
17072 if { (ac_try="$ac_compile"
17073 case "(($ac_try" in
17074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17075   *) ac_try_echo=$ac_try;;
17076 esac
17077 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17078   (eval "$ac_compile") 2>conftest.er1
17079   ac_status=$?
17080   grep -v '^ *+' conftest.er1 >conftest.err
17081   rm -rf conftest.er1
17082   cat conftest.err >&5
17083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084   (exit $ac_status); } && {
17085          test -z "$ac_c_werror_flag" ||
17086          test ! -s conftest.err
17087        } && test -s conftest.$ac_objext; then
17088   ac_cv_header_GL_tube_h=yes
17089 else
17090   echo "$as_me: failed program was:" >&5
17091 sed 's/^/| /' conftest.$ac_ext >&5
17092
17093         ac_cv_header_GL_tube_h=no
17094 fi
17095
17096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17097 fi
17098 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17099 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17100 if test $ac_cv_header_GL_tube_h = yes; then
17101   have_gle=yes
17102 else
17103   have_gle=no
17104 fi
17105
17106
17107   CPPFLAGS="$ac_save_CPPFLAGS"
17108     fi
17109   fi
17110
17111   if test "$have_gle" = yes ; then
17112     have_gle=no
17113     gle_halfassed=yes
17114
17115   ac_save_CPPFLAGS="$CPPFLAGS"
17116   ac_save_LDFLAGS="$LDFLAGS"
17117 #  ac_save_LIBS="$LIBS"
17118
17119   if test \! -z "$includedir" ; then
17120     CPPFLAGS="$CPPFLAGS -I$includedir"
17121   fi
17122   # note: $X_CFLAGS includes $x_includes
17123   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17124
17125   if test \! -z "$libdir" ; then
17126     LDFLAGS="$LDFLAGS -L$libdir"
17127   fi
17128   # note: $X_LIBS includes $x_libraries
17129   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17130
17131   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17132   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17133   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17134 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17135 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17136   echo $ECHO_N "(cached) $ECHO_C" >&6
17137 else
17138   ac_check_lib_save_LIBS=$LIBS
17139 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17140 cat >conftest.$ac_ext <<_ACEOF
17141 /* confdefs.h.  */
17142 _ACEOF
17143 cat confdefs.h >>conftest.$ac_ext
17144 cat >>conftest.$ac_ext <<_ACEOF
17145 /* end confdefs.h.  */
17146
17147 /* Override any GCC internal prototype to avoid an error.
17148    Use char because int might match the return type of a GCC
17149    builtin and then its argument prototype would still apply.  */
17150 #ifdef __cplusplus
17151 extern "C"
17152 #endif
17153 char gleCreateGC ();
17154 int
17155 main ()
17156 {
17157 return gleCreateGC ();
17158   ;
17159   return 0;
17160 }
17161 _ACEOF
17162 rm -rf conftest.$ac_objext conftest$ac_exeext
17163 if { (ac_try="$ac_link"
17164 case "(($ac_try" in
17165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17166   *) ac_try_echo=$ac_try;;
17167 esac
17168 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17169   (eval "$ac_link") 2>conftest.er1
17170   ac_status=$?
17171   grep -v '^ *+' conftest.er1 >conftest.err
17172   rm -rf conftest.er1
17173   cat conftest.err >&5
17174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175   (exit $ac_status); } && {
17176          test -z "$ac_c_werror_flag" ||
17177          test ! -s conftest.err
17178        } && test -s conftest$ac_exeext &&
17179        $as_test_x conftest$ac_exeext; then
17180   ac_cv_lib_gle_gleCreateGC=yes
17181 else
17182   echo "$as_me: failed program was:" >&5
17183 sed 's/^/| /' conftest.$ac_ext >&5
17184
17185         ac_cv_lib_gle_gleCreateGC=no
17186 fi
17187
17188 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17189       conftest$ac_exeext conftest.$ac_ext
17190 LIBS=$ac_check_lib_save_LIBS
17191 fi
17192 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17193 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17194 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17195   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17196 fi
17197
17198   CPPFLAGS="$ac_save_CPPFLAGS"
17199   LDFLAGS="$ac_save_LDFLAGS"
17200 #  LIBS="$ac_save_LIBS"
17201
17202   fi
17203   if test "$have_gle" = yes ; then
17204     have_gle=no
17205     gle_halfassed=yes
17206
17207     # sometimes the libmatrix stuff is included in libgle.  look there first.
17208 #
17209 # I don't get it.  For some reason, this test passes on SGI, as if
17210 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17211 # Yet the link is succeeding.  Why???
17212 #
17213 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17214 #                   [have_gle=yes; gle_halfassed=no],
17215 #                   [], $GL_LIBS -lX11 -lXext -lm)
17216
17217     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17218     # *sigh*
17219     if test "$have_gle3" = yes ; then
17220
17221   ac_save_CPPFLAGS="$CPPFLAGS"
17222   ac_save_LDFLAGS="$LDFLAGS"
17223 #  ac_save_LIBS="$LIBS"
17224
17225   if test \! -z "$includedir" ; then
17226     CPPFLAGS="$CPPFLAGS -I$includedir"
17227   fi
17228   # note: $X_CFLAGS includes $x_includes
17229   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17230
17231   if test \! -z "$libdir" ; then
17232     LDFLAGS="$LDFLAGS -L$libdir"
17233   fi
17234   # note: $X_LIBS includes $x_libraries
17235   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17236
17237   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17238   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17239   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17240 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17241 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17242   echo $ECHO_N "(cached) $ECHO_C" >&6
17243 else
17244   ac_check_lib_save_LIBS=$LIBS
17245 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17246 cat >conftest.$ac_ext <<_ACEOF
17247 /* confdefs.h.  */
17248 _ACEOF
17249 cat confdefs.h >>conftest.$ac_ext
17250 cat >>conftest.$ac_ext <<_ACEOF
17251 /* end confdefs.h.  */
17252
17253 /* Override any GCC internal prototype to avoid an error.
17254    Use char because int might match the return type of a GCC
17255    builtin and then its argument prototype would still apply.  */
17256 #ifdef __cplusplus
17257 extern "C"
17258 #endif
17259 char uview_direction ();
17260 int
17261 main ()
17262 {
17263 return uview_direction ();
17264   ;
17265   return 0;
17266 }
17267 _ACEOF
17268 rm -rf conftest.$ac_objext conftest$ac_exeext
17269 if { (ac_try="$ac_link"
17270 case "(($ac_try" in
17271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17272   *) ac_try_echo=$ac_try;;
17273 esac
17274 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17275   (eval "$ac_link") 2>conftest.er1
17276   ac_status=$?
17277   grep -v '^ *+' conftest.er1 >conftest.err
17278   rm -rf conftest.er1
17279   cat conftest.err >&5
17280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281   (exit $ac_status); } && {
17282          test -z "$ac_c_werror_flag" ||
17283          test ! -s conftest.err
17284        } && test -s conftest$ac_exeext &&
17285        $as_test_x conftest$ac_exeext; then
17286   ac_cv_lib_gle_uview_direction=yes
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 sed 's/^/| /' conftest.$ac_ext >&5
17290
17291         ac_cv_lib_gle_uview_direction=no
17292 fi
17293
17294 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17295       conftest$ac_exeext conftest.$ac_ext
17296 LIBS=$ac_check_lib_save_LIBS
17297 fi
17298 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17299 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17300 if test $ac_cv_lib_gle_uview_direction = yes; then
17301   have_gle=yes; gle_halfassed=no
17302 fi
17303
17304   CPPFLAGS="$ac_save_CPPFLAGS"
17305   LDFLAGS="$ac_save_LDFLAGS"
17306 #  LIBS="$ac_save_LIBS"
17307
17308     fi
17309     # if it wasn't in libgle, then look in libmatrix.
17310     if test "$have_gle" = no ; then
17311
17312   ac_save_CPPFLAGS="$CPPFLAGS"
17313   ac_save_LDFLAGS="$LDFLAGS"
17314 #  ac_save_LIBS="$LIBS"
17315
17316   if test \! -z "$includedir" ; then
17317     CPPFLAGS="$CPPFLAGS -I$includedir"
17318   fi
17319   # note: $X_CFLAGS includes $x_includes
17320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17321
17322   if test \! -z "$libdir" ; then
17323     LDFLAGS="$LDFLAGS -L$libdir"
17324   fi
17325   # note: $X_LIBS includes $x_libraries
17326   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17327
17328   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17329   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17330   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17331 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17332 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335   ac_check_lib_save_LIBS=$LIBS
17336 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17337 cat >conftest.$ac_ext <<_ACEOF
17338 /* confdefs.h.  */
17339 _ACEOF
17340 cat confdefs.h >>conftest.$ac_ext
17341 cat >>conftest.$ac_ext <<_ACEOF
17342 /* end confdefs.h.  */
17343
17344 /* Override any GCC internal prototype to avoid an error.
17345    Use char because int might match the return type of a GCC
17346    builtin and then its argument prototype would still apply.  */
17347 #ifdef __cplusplus
17348 extern "C"
17349 #endif
17350 char uview_direction_d ();
17351 int
17352 main ()
17353 {
17354 return uview_direction_d ();
17355   ;
17356   return 0;
17357 }
17358 _ACEOF
17359 rm -rf conftest.$ac_objext conftest$ac_exeext
17360 if { (ac_try="$ac_link"
17361 case "(($ac_try" in
17362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17363   *) ac_try_echo=$ac_try;;
17364 esac
17365 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17366   (eval "$ac_link") 2>conftest.er1
17367   ac_status=$?
17368   grep -v '^ *+' conftest.er1 >conftest.err
17369   rm -rf conftest.er1
17370   cat conftest.err >&5
17371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17372   (exit $ac_status); } && {
17373          test -z "$ac_c_werror_flag" ||
17374          test ! -s conftest.err
17375        } && test -s conftest$ac_exeext &&
17376        $as_test_x conftest$ac_exeext; then
17377   ac_cv_lib_matrix_uview_direction_d=yes
17378 else
17379   echo "$as_me: failed program was:" >&5
17380 sed 's/^/| /' conftest.$ac_ext >&5
17381
17382         ac_cv_lib_matrix_uview_direction_d=no
17383 fi
17384
17385 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17386       conftest$ac_exeext conftest.$ac_ext
17387 LIBS=$ac_check_lib_save_LIBS
17388 fi
17389 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17390 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17391 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17392   have_gle=yes; gle_halfassed=no;
17393                       GLE_LIBS="$GLE_LIBS -lmatrix"
17394 fi
17395
17396   CPPFLAGS="$ac_save_CPPFLAGS"
17397   LDFLAGS="$ac_save_LDFLAGS"
17398 #  LIBS="$ac_save_LIBS"
17399
17400     fi
17401   fi
17402
17403   if test "$have_gle" = yes ; then
17404     cat >>confdefs.h <<\_ACEOF
17405 #define HAVE_GLE 1
17406 _ACEOF
17407
17408     if test "$have_gle3" = yes ; then
17409       cat >>confdefs.h <<\_ACEOF
17410 #define HAVE_GLE3 1
17411 _ACEOF
17412
17413     fi
17414   fi
17415
17416 elif test "$with_gle" != no; then
17417   echo "error: must be yes or no: --with-gle=$with_gle"
17418   exit 1
17419
17420 fi
17421
17422
17423 ###############################################################################
17424 #
17425 #       Check for -lgdk_pixbuf.
17426 #       These tests are for gdk_pixbuf usage of the hacks,
17427 #       not xscreensaver-demo (thus we have to test again to get
17428 #       the libraries right: don't want to pull in all of GTK
17429 #       for the hacks.)
17430 #
17431 ###############################################################################
17432
17433 have_gdk_pixbuf=no
17434 with_gdk_pixbuf_req=unspecified
17435
17436 # Check whether --with-pixbuf was given.
17437 if test "${with_pixbuf+set}" = set; then
17438   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17439 else
17440   with_gdk_pixbuf=yes
17441 fi
17442
17443
17444 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17445 # we can also look for the `gdk-pixbuf-config' program in that directory.
17446 case "$with_gdk_pixbuf" in
17447   /*)
17448     gdk_pixbuf_dir="$with_gdk_pixbuf"
17449     ;;
17450   *)
17451     gdk_pixbuf_dir=""
17452     ;;
17453 esac
17454
17455
17456    case "$with_gdk_pixbuf" in
17457     yes) ;;
17458     no)  ;;
17459
17460     /*)
17461      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17462 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17463      d=$with_gdk_pixbuf/include
17464      if test -d $d; then
17465        X_CFLAGS="-I$d $X_CFLAGS"
17466        { echo "$as_me:$LINENO: result: $d" >&5
17467 echo "${ECHO_T}$d" >&6; }
17468      else
17469        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17470 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17471      fi
17472
17473      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17474 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17475      d=$with_gdk_pixbuf/lib
17476      if test -d $d; then
17477        X_LIBS="-L$d $X_LIBS"
17478        { echo "$as_me:$LINENO: result: $d" >&5
17479 echo "${ECHO_T}$d" >&6; }
17480      else
17481        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17482 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17483      fi
17484
17485      # replace the directory string with "yes".
17486      with_gdk_pixbuf_req="yes"
17487      with_gdk_pixbuf=$with_gdk_pixbuf_req
17488      ;;
17489
17490     *)
17491      echo ""
17492      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17493      echo "       If it is a directory, then \`DIR/include' will be added to"
17494      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17495      exit 1
17496      ;;
17497    esac
17498
17499
17500 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17501   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17502   exit 1
17503 fi
17504
17505 if test "$with_gdk_pixbuf" = yes; then
17506   have_gdk_pixbuf=no
17507
17508   pkgs=''
17509   ok="yes"
17510
17511   pkg_check_version gdk-pixbuf-2.0      2.0.0
17512   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17513   have_gdk_pixbuf="$ok"
17514
17515   if test "$have_gdk_pixbuf" = yes; then
17516     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17517 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17518 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17519   echo $ECHO_N "(cached) $ECHO_C" >&6
17520 else
17521   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17522 fi
17523 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17524 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17525     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17526 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17527 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17528   echo $ECHO_N "(cached) $ECHO_C" >&6
17529 else
17530   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17531 fi
17532 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17533 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17534   fi
17535
17536   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17537   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17538
17539
17540   if test "$have_gdk_pixbuf" = yes; then
17541     #
17542     # we appear to have pixbuf; check for headers/libs to be sure.
17543     #
17544     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17545     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17546
17547     have_gdk_pixbuf=no
17548
17549     # check for header A...
17550
17551   ac_save_CPPFLAGS="$CPPFLAGS"
17552   if test \! -z "$includedir" ; then
17553     CPPFLAGS="$CPPFLAGS -I$includedir"
17554   fi
17555   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17557   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17558   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17559 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17560 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17561   echo $ECHO_N "(cached) $ECHO_C" >&6
17562 fi
17563 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17564 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17565 else
17566   # Is the header compilable?
17567 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17568 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17569 cat >conftest.$ac_ext <<_ACEOF
17570 /* confdefs.h.  */
17571 _ACEOF
17572 cat confdefs.h >>conftest.$ac_ext
17573 cat >>conftest.$ac_ext <<_ACEOF
17574 /* end confdefs.h.  */
17575 $ac_includes_default
17576 #include <gdk-pixbuf/gdk-pixbuf.h>
17577 _ACEOF
17578 rm -rf conftest.$ac_objext
17579 if { (ac_try="$ac_compile"
17580 case "(($ac_try" in
17581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17582   *) ac_try_echo=$ac_try;;
17583 esac
17584 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17585   (eval "$ac_compile") 2>conftest.er1
17586   ac_status=$?
17587   grep -v '^ *+' conftest.er1 >conftest.err
17588   rm -rf conftest.er1
17589   cat conftest.err >&5
17590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591   (exit $ac_status); } && {
17592          test -z "$ac_c_werror_flag" ||
17593          test ! -s conftest.err
17594        } && test -s conftest.$ac_objext; then
17595   ac_header_compiler=yes
17596 else
17597   echo "$as_me: failed program was:" >&5
17598 sed 's/^/| /' conftest.$ac_ext >&5
17599
17600         ac_header_compiler=no
17601 fi
17602
17603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17604 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17605 echo "${ECHO_T}$ac_header_compiler" >&6; }
17606
17607 # Is the header present?
17608 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17609 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17610 cat >conftest.$ac_ext <<_ACEOF
17611 /* confdefs.h.  */
17612 _ACEOF
17613 cat confdefs.h >>conftest.$ac_ext
17614 cat >>conftest.$ac_ext <<_ACEOF
17615 /* end confdefs.h.  */
17616 #include <gdk-pixbuf/gdk-pixbuf.h>
17617 _ACEOF
17618 if { (ac_try="$ac_cpp conftest.$ac_ext"
17619 case "(($ac_try" in
17620   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17621   *) ac_try_echo=$ac_try;;
17622 esac
17623 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17624   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17625   ac_status=$?
17626   grep -v '^ *+' conftest.er1 >conftest.err
17627   rm -rf conftest.er1
17628   cat conftest.err >&5
17629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630   (exit $ac_status); } >/dev/null && {
17631          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17632          test ! -s conftest.err
17633        }; then
17634   ac_header_preproc=yes
17635 else
17636   echo "$as_me: failed program was:" >&5
17637 sed 's/^/| /' conftest.$ac_ext >&5
17638
17639   ac_header_preproc=no
17640 fi
17641
17642 rm -rf conftest.err conftest.$ac_ext
17643 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17644 echo "${ECHO_T}$ac_header_preproc" >&6; }
17645
17646 # So?  What about this header?
17647 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17648   yes:no: )
17649     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17650 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17651     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17652 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17653     ac_header_preproc=yes
17654     ;;
17655   no:yes:* )
17656     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17657 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17658     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17659 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17660     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17661 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17662     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17663 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17664     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17665 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17666     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17667 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17668
17669     ;;
17670 esac
17671 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17672 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17673 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17674   echo $ECHO_N "(cached) $ECHO_C" >&6
17675 else
17676   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17677 fi
17678 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17679 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17680
17681 fi
17682 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17683   have_gdk_pixbuf=yes
17684 fi
17685
17686
17687   CPPFLAGS="$ac_save_CPPFLAGS"
17688
17689     # if that worked, check for header B...
17690     if test "$have_gdk_pixbuf" = yes; then
17691       have_gdk_pixbuf=no
17692       gdk_pixbuf_halfassed=yes
17693
17694   ac_save_CPPFLAGS="$CPPFLAGS"
17695   if test \! -z "$includedir" ; then
17696     CPPFLAGS="$CPPFLAGS -I$includedir"
17697   fi
17698   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17699   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17700   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17701   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17702 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17703 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17704   echo $ECHO_N "(cached) $ECHO_C" >&6
17705 fi
17706 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17707 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17708 else
17709   # Is the header compilable?
17710 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17711 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17712 cat >conftest.$ac_ext <<_ACEOF
17713 /* confdefs.h.  */
17714 _ACEOF
17715 cat confdefs.h >>conftest.$ac_ext
17716 cat >>conftest.$ac_ext <<_ACEOF
17717 /* end confdefs.h.  */
17718 $ac_includes_default
17719 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17720 _ACEOF
17721 rm -rf conftest.$ac_objext
17722 if { (ac_try="$ac_compile"
17723 case "(($ac_try" in
17724   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17725   *) ac_try_echo=$ac_try;;
17726 esac
17727 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17728   (eval "$ac_compile") 2>conftest.er1
17729   ac_status=$?
17730   grep -v '^ *+' conftest.er1 >conftest.err
17731   rm -rf conftest.er1
17732   cat conftest.err >&5
17733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17734   (exit $ac_status); } && {
17735          test -z "$ac_c_werror_flag" ||
17736          test ! -s conftest.err
17737        } && test -s conftest.$ac_objext; then
17738   ac_header_compiler=yes
17739 else
17740   echo "$as_me: failed program was:" >&5
17741 sed 's/^/| /' conftest.$ac_ext >&5
17742
17743         ac_header_compiler=no
17744 fi
17745
17746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17747 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17748 echo "${ECHO_T}$ac_header_compiler" >&6; }
17749
17750 # Is the header present?
17751 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17752 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17753 cat >conftest.$ac_ext <<_ACEOF
17754 /* confdefs.h.  */
17755 _ACEOF
17756 cat confdefs.h >>conftest.$ac_ext
17757 cat >>conftest.$ac_ext <<_ACEOF
17758 /* end confdefs.h.  */
17759 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17760 _ACEOF
17761 if { (ac_try="$ac_cpp conftest.$ac_ext"
17762 case "(($ac_try" in
17763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17764   *) ac_try_echo=$ac_try;;
17765 esac
17766 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17767   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17768   ac_status=$?
17769   grep -v '^ *+' conftest.er1 >conftest.err
17770   rm -rf conftest.er1
17771   cat conftest.err >&5
17772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17773   (exit $ac_status); } >/dev/null && {
17774          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17775          test ! -s conftest.err
17776        }; then
17777   ac_header_preproc=yes
17778 else
17779   echo "$as_me: failed program was:" >&5
17780 sed 's/^/| /' conftest.$ac_ext >&5
17781
17782   ac_header_preproc=no
17783 fi
17784
17785 rm -rf conftest.err conftest.$ac_ext
17786 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17787 echo "${ECHO_T}$ac_header_preproc" >&6; }
17788
17789 # So?  What about this header?
17790 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17791   yes:no: )
17792     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17793 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17794     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17795 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17796     ac_header_preproc=yes
17797     ;;
17798   no:yes:* )
17799     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17800 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17801     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17802 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17803     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17804 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17805     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17806 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17807     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17808 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17809     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17810 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17811
17812     ;;
17813 esac
17814 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17815 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17816 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17817   echo $ECHO_N "(cached) $ECHO_C" >&6
17818 else
17819   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17820 fi
17821 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17822 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17823
17824 fi
17825 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17826   have_gdk_pixbuf=yes
17827                          gdk_pixbuf_halfassed=no
17828 fi
17829
17830
17831   CPPFLAGS="$ac_save_CPPFLAGS"
17832
17833       # yay, it has a new name in Gtk 2.x...
17834       if test "$have_gdk_pixbuf" = no; then
17835         have_gdk_pixbuf=no
17836         gdk_pixbuf_halfassed=yes
17837
17838   ac_save_CPPFLAGS="$CPPFLAGS"
17839   if test \! -z "$includedir" ; then
17840     CPPFLAGS="$CPPFLAGS -I$includedir"
17841   fi
17842   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17843   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17844   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17845   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17846 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17847 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17848   echo $ECHO_N "(cached) $ECHO_C" >&6
17849 fi
17850 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17851 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17852 else
17853   # Is the header compilable?
17854 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17855 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17856 cat >conftest.$ac_ext <<_ACEOF
17857 /* confdefs.h.  */
17858 _ACEOF
17859 cat confdefs.h >>conftest.$ac_ext
17860 cat >>conftest.$ac_ext <<_ACEOF
17861 /* end confdefs.h.  */
17862 $ac_includes_default
17863 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17864 _ACEOF
17865 rm -rf conftest.$ac_objext
17866 if { (ac_try="$ac_compile"
17867 case "(($ac_try" in
17868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17869   *) ac_try_echo=$ac_try;;
17870 esac
17871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17872   (eval "$ac_compile") 2>conftest.er1
17873   ac_status=$?
17874   grep -v '^ *+' conftest.er1 >conftest.err
17875   rm -rf conftest.er1
17876   cat conftest.err >&5
17877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17878   (exit $ac_status); } && {
17879          test -z "$ac_c_werror_flag" ||
17880          test ! -s conftest.err
17881        } && test -s conftest.$ac_objext; then
17882   ac_header_compiler=yes
17883 else
17884   echo "$as_me: failed program was:" >&5
17885 sed 's/^/| /' conftest.$ac_ext >&5
17886
17887         ac_header_compiler=no
17888 fi
17889
17890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17891 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17892 echo "${ECHO_T}$ac_header_compiler" >&6; }
17893
17894 # Is the header present?
17895 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17896 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17897 cat >conftest.$ac_ext <<_ACEOF
17898 /* confdefs.h.  */
17899 _ACEOF
17900 cat confdefs.h >>conftest.$ac_ext
17901 cat >>conftest.$ac_ext <<_ACEOF
17902 /* end confdefs.h.  */
17903 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17904 _ACEOF
17905 if { (ac_try="$ac_cpp conftest.$ac_ext"
17906 case "(($ac_try" in
17907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17908   *) ac_try_echo=$ac_try;;
17909 esac
17910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17911   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17912   ac_status=$?
17913   grep -v '^ *+' conftest.er1 >conftest.err
17914   rm -rf conftest.er1
17915   cat conftest.err >&5
17916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17917   (exit $ac_status); } >/dev/null && {
17918          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17919          test ! -s conftest.err
17920        }; then
17921   ac_header_preproc=yes
17922 else
17923   echo "$as_me: failed program was:" >&5
17924 sed 's/^/| /' conftest.$ac_ext >&5
17925
17926   ac_header_preproc=no
17927 fi
17928
17929 rm -rf conftest.err conftest.$ac_ext
17930 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17931 echo "${ECHO_T}$ac_header_preproc" >&6; }
17932
17933 # So?  What about this header?
17934 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17935   yes:no: )
17936     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17937 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17938     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17939 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17940     ac_header_preproc=yes
17941     ;;
17942   no:yes:* )
17943     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17944 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17945     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17946 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17947     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17948 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17949     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17950 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17951     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17952 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17953     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17954 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17955
17956     ;;
17957 esac
17958 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17959 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17960 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17961   echo $ECHO_N "(cached) $ECHO_C" >&6
17962 else
17963   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17964 fi
17965 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17966 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17967
17968 fi
17969 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17970   have_gdk_pixbuf=yes
17971                            gdk_pixbuf_halfassed=no
17972 fi
17973
17974
17975   CPPFLAGS="$ac_save_CPPFLAGS"
17976       fi
17977     fi
17978     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17979   fi
17980
17981   if test "$have_gdk_pixbuf" = yes; then
17982     # we have the headers, now check for the libraries
17983     have_gdk_pixbuf=no
17984     gdk_pixbuf_halfassed=yes
17985
17986     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17987 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
17988
17989     # library A...
17990
17991   ac_save_CPPFLAGS="$CPPFLAGS"
17992   ac_save_LDFLAGS="$LDFLAGS"
17993 #  ac_save_LIBS="$LIBS"
17994
17995   if test \! -z "$includedir" ; then
17996     CPPFLAGS="$CPPFLAGS -I$includedir"
17997   fi
17998   # note: $X_CFLAGS includes $x_includes
17999   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18000
18001   if test \! -z "$libdir" ; then
18002     LDFLAGS="$LDFLAGS -L$libdir"
18003   fi
18004   # note: $X_LIBS includes $x_libraries
18005   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18006
18007   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18008   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18009   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18010 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18011 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014   ac_check_lib_save_LIBS=$LIBS
18015 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18016 cat >conftest.$ac_ext <<_ACEOF
18017 /* confdefs.h.  */
18018 _ACEOF
18019 cat confdefs.h >>conftest.$ac_ext
18020 cat >>conftest.$ac_ext <<_ACEOF
18021 /* end confdefs.h.  */
18022
18023 /* Override any GCC internal prototype to avoid an error.
18024    Use char because int might match the return type of a GCC
18025    builtin and then its argument prototype would still apply.  */
18026 #ifdef __cplusplus
18027 extern "C"
18028 #endif
18029 char gdk_pixbuf_new_from_file ();
18030 int
18031 main ()
18032 {
18033 return gdk_pixbuf_new_from_file ();
18034   ;
18035   return 0;
18036 }
18037 _ACEOF
18038 rm -rf conftest.$ac_objext conftest$ac_exeext
18039 if { (ac_try="$ac_link"
18040 case "(($ac_try" in
18041   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18042   *) ac_try_echo=$ac_try;;
18043 esac
18044 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18045   (eval "$ac_link") 2>conftest.er1
18046   ac_status=$?
18047   grep -v '^ *+' conftest.er1 >conftest.err
18048   rm -rf conftest.er1
18049   cat conftest.err >&5
18050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18051   (exit $ac_status); } && {
18052          test -z "$ac_c_werror_flag" ||
18053          test ! -s conftest.err
18054        } && test -s conftest$ac_exeext &&
18055        $as_test_x conftest$ac_exeext; then
18056   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18057 else
18058   echo "$as_me: failed program was:" >&5
18059 sed 's/^/| /' conftest.$ac_ext >&5
18060
18061         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18062 fi
18063
18064 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18065       conftest$ac_exeext conftest.$ac_ext
18066 LIBS=$ac_check_lib_save_LIBS
18067 fi
18068 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18069 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18070 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18071   have_gdk_pixbuf=yes
18072 fi
18073
18074   CPPFLAGS="$ac_save_CPPFLAGS"
18075   LDFLAGS="$ac_save_LDFLAGS"
18076 #  LIBS="$ac_save_LIBS"
18077
18078     # library B...
18079     if test "$have_gdk_pixbuf" = yes; then
18080       have_gdk_pixbuf=no
18081
18082   ac_save_CPPFLAGS="$CPPFLAGS"
18083   ac_save_LDFLAGS="$LDFLAGS"
18084 #  ac_save_LIBS="$LIBS"
18085
18086   if test \! -z "$includedir" ; then
18087     CPPFLAGS="$CPPFLAGS -I$includedir"
18088   fi
18089   # note: $X_CFLAGS includes $x_includes
18090   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18091
18092   if test \! -z "$libdir" ; then
18093     LDFLAGS="$LDFLAGS -L$libdir"
18094   fi
18095   # note: $X_LIBS includes $x_libraries
18096   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18097
18098   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18099   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18100   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18101 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18102 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18103   echo $ECHO_N "(cached) $ECHO_C" >&6
18104 else
18105   ac_check_lib_save_LIBS=$LIBS
18106 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18107 cat >conftest.$ac_ext <<_ACEOF
18108 /* confdefs.h.  */
18109 _ACEOF
18110 cat confdefs.h >>conftest.$ac_ext
18111 cat >>conftest.$ac_ext <<_ACEOF
18112 /* end confdefs.h.  */
18113
18114 /* Override any GCC internal prototype to avoid an error.
18115    Use char because int might match the return type of a GCC
18116    builtin and then its argument prototype would still apply.  */
18117 #ifdef __cplusplus
18118 extern "C"
18119 #endif
18120 char gdk_pixbuf_xlib_init ();
18121 int
18122 main ()
18123 {
18124 return gdk_pixbuf_xlib_init ();
18125   ;
18126   return 0;
18127 }
18128 _ACEOF
18129 rm -rf conftest.$ac_objext conftest$ac_exeext
18130 if { (ac_try="$ac_link"
18131 case "(($ac_try" in
18132   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18133   *) ac_try_echo=$ac_try;;
18134 esac
18135 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18136   (eval "$ac_link") 2>conftest.er1
18137   ac_status=$?
18138   grep -v '^ *+' conftest.er1 >conftest.err
18139   rm -rf conftest.er1
18140   cat conftest.err >&5
18141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18142   (exit $ac_status); } && {
18143          test -z "$ac_c_werror_flag" ||
18144          test ! -s conftest.err
18145        } && test -s conftest$ac_exeext &&
18146        $as_test_x conftest$ac_exeext; then
18147   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 sed 's/^/| /' conftest.$ac_ext >&5
18151
18152         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18153 fi
18154
18155 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18156       conftest$ac_exeext conftest.$ac_ext
18157 LIBS=$ac_check_lib_save_LIBS
18158 fi
18159 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18160 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18161 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18162   have_gdk_pixbuf=yes
18163                       gdk_pixbuf_halfassed=no
18164 fi
18165
18166   CPPFLAGS="$ac_save_CPPFLAGS"
18167   LDFLAGS="$ac_save_LDFLAGS"
18168 #  LIBS="$ac_save_LIBS"
18169
18170     fi
18171   fi
18172
18173   if test "$have_gdk_pixbuf" = yes; then
18174     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18175     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18176     cat >>confdefs.h <<\_ACEOF
18177 #define HAVE_GDK_PIXBUF 1
18178 _ACEOF
18179
18180   else
18181     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18182 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18183   fi
18184 fi
18185
18186
18187 ###############################################################################
18188 #
18189 #       Check for -lXpm.
18190 #
18191 ###############################################################################
18192
18193 have_xpm=no
18194 with_xpm_req=unspecified
18195
18196 # Check whether --with-xpm was given.
18197 if test "${with_xpm+set}" = set; then
18198   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18199 else
18200   with_xpm=yes
18201 fi
18202
18203
18204
18205    case "$with_xpm" in
18206     yes) ;;
18207     no)  ;;
18208
18209     /*)
18210      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18211 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18212      d=$with_xpm/include
18213      if test -d $d; then
18214        X_CFLAGS="-I$d $X_CFLAGS"
18215        { echo "$as_me:$LINENO: result: $d" >&5
18216 echo "${ECHO_T}$d" >&6; }
18217      else
18218        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18219 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18220      fi
18221
18222      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18223 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18224      d=$with_xpm/lib
18225      if test -d $d; then
18226        X_LIBS="-L$d $X_LIBS"
18227        { echo "$as_me:$LINENO: result: $d" >&5
18228 echo "${ECHO_T}$d" >&6; }
18229      else
18230        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18231 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18232      fi
18233
18234      # replace the directory string with "yes".
18235      with_xpm_req="yes"
18236      with_xpm=$with_xpm_req
18237      ;;
18238
18239     *)
18240      echo ""
18241      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18242      echo "       If it is a directory, then \`DIR/include' will be added to"
18243      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18244      exit 1
18245      ;;
18246    esac
18247
18248
18249 if test "$with_xpm" = yes; then
18250
18251   ac_save_CPPFLAGS="$CPPFLAGS"
18252   if test \! -z "$includedir" ; then
18253     CPPFLAGS="$CPPFLAGS -I$includedir"
18254   fi
18255   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18256   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18257   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18258 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18259 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18260   echo $ECHO_N "(cached) $ECHO_C" >&6
18261 else
18262   cat >conftest.$ac_ext <<_ACEOF
18263 /* confdefs.h.  */
18264 _ACEOF
18265 cat confdefs.h >>conftest.$ac_ext
18266 cat >>conftest.$ac_ext <<_ACEOF
18267 /* end confdefs.h.  */
18268 #include <X11/Xlib.h>
18269
18270 #include <X11/xpm.h>
18271 _ACEOF
18272 rm -rf conftest.$ac_objext
18273 if { (ac_try="$ac_compile"
18274 case "(($ac_try" in
18275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276   *) ac_try_echo=$ac_try;;
18277 esac
18278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18279   (eval "$ac_compile") 2>conftest.er1
18280   ac_status=$?
18281   grep -v '^ *+' conftest.er1 >conftest.err
18282   rm -rf conftest.er1
18283   cat conftest.err >&5
18284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18285   (exit $ac_status); } && {
18286          test -z "$ac_c_werror_flag" ||
18287          test ! -s conftest.err
18288        } && test -s conftest.$ac_objext; then
18289   ac_cv_header_X11_xpm_h=yes
18290 else
18291   echo "$as_me: failed program was:" >&5
18292 sed 's/^/| /' conftest.$ac_ext >&5
18293
18294         ac_cv_header_X11_xpm_h=no
18295 fi
18296
18297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18298 fi
18299 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18300 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18301 if test $ac_cv_header_X11_xpm_h = yes; then
18302   have_xpm=yes
18303                     cat >>confdefs.h <<\_ACEOF
18304 #define HAVE_XPM 1
18305 _ACEOF
18306
18307                     XPM_LIBS="-lXpm $XPM_LIBS"
18308 fi
18309
18310
18311   CPPFLAGS="$ac_save_CPPFLAGS"
18312 elif test "$with_xpm" != no; then
18313   echo "error: must be yes or no: --with-xpm=$with_xpm"
18314   exit 1
18315 fi
18316
18317 # See comment near $motif_requires_xpm, above.
18318 # Need to do this here, after both Motif and XPM have been checked for.
18319 #
18320 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18321   if test "$motif_requires_xpm" = yes ; then
18322     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18323   fi
18324 fi
18325
18326 if test "$XPM_LIBS" = "" ; then
18327   XPM_LIBS=$(MINIXPM)
18328 fi
18329
18330
18331 ###############################################################################
18332 #
18333 #       Check for -ljpeg
18334 #
18335 ###############################################################################
18336
18337 have_jpeg=no
18338 with_jpeg_req=unspecified
18339 jpeg_halfassed=no
18340
18341 # Check whether --with-jpeg was given.
18342 if test "${with_jpeg+set}" = set; then
18343   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18344 else
18345   with_jpeg=yes
18346 fi
18347
18348
18349
18350    case "$with_jpeg" in
18351     yes) ;;
18352     no)  ;;
18353
18354     /*)
18355      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18356 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18357      d=$with_jpeg/include
18358      if test -d $d; then
18359        X_CFLAGS="-I$d $X_CFLAGS"
18360        { echo "$as_me:$LINENO: result: $d" >&5
18361 echo "${ECHO_T}$d" >&6; }
18362      else
18363        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18364 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18365      fi
18366
18367      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18368 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18369      d=$with_jpeg/lib
18370      if test -d $d; then
18371        X_LIBS="-L$d $X_LIBS"
18372        { echo "$as_me:$LINENO: result: $d" >&5
18373 echo "${ECHO_T}$d" >&6; }
18374      else
18375        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18376 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18377      fi
18378
18379      # replace the directory string with "yes".
18380      with_jpeg_req="yes"
18381      with_jpeg=$with_jpeg_req
18382      ;;
18383
18384     *)
18385      echo ""
18386      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18387      echo "       If it is a directory, then \`DIR/include' will be added to"
18388      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18389      exit 1
18390      ;;
18391    esac
18392
18393
18394 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18395   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18396   exit 1
18397 fi
18398
18399 if test "$with_jpeg" = yes; then
18400
18401   have_jpeg=no
18402
18403   ac_save_CPPFLAGS="$CPPFLAGS"
18404   if test \! -z "$includedir" ; then
18405     CPPFLAGS="$CPPFLAGS -I$includedir"
18406   fi
18407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18408   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18409   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18410   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18411 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18412 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18413   echo $ECHO_N "(cached) $ECHO_C" >&6
18414 fi
18415 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18416 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18417 else
18418   # Is the header compilable?
18419 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18420 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18421 cat >conftest.$ac_ext <<_ACEOF
18422 /* confdefs.h.  */
18423 _ACEOF
18424 cat confdefs.h >>conftest.$ac_ext
18425 cat >>conftest.$ac_ext <<_ACEOF
18426 /* end confdefs.h.  */
18427 $ac_includes_default
18428 #include <jpeglib.h>
18429 _ACEOF
18430 rm -rf conftest.$ac_objext
18431 if { (ac_try="$ac_compile"
18432 case "(($ac_try" in
18433   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18434   *) ac_try_echo=$ac_try;;
18435 esac
18436 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18437   (eval "$ac_compile") 2>conftest.er1
18438   ac_status=$?
18439   grep -v '^ *+' conftest.er1 >conftest.err
18440   rm -rf conftest.er1
18441   cat conftest.err >&5
18442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18443   (exit $ac_status); } && {
18444          test -z "$ac_c_werror_flag" ||
18445          test ! -s conftest.err
18446        } && test -s conftest.$ac_objext; then
18447   ac_header_compiler=yes
18448 else
18449   echo "$as_me: failed program was:" >&5
18450 sed 's/^/| /' conftest.$ac_ext >&5
18451
18452         ac_header_compiler=no
18453 fi
18454
18455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18456 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18457 echo "${ECHO_T}$ac_header_compiler" >&6; }
18458
18459 # Is the header present?
18460 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18461 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18462 cat >conftest.$ac_ext <<_ACEOF
18463 /* confdefs.h.  */
18464 _ACEOF
18465 cat confdefs.h >>conftest.$ac_ext
18466 cat >>conftest.$ac_ext <<_ACEOF
18467 /* end confdefs.h.  */
18468 #include <jpeglib.h>
18469 _ACEOF
18470 if { (ac_try="$ac_cpp conftest.$ac_ext"
18471 case "(($ac_try" in
18472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18473   *) ac_try_echo=$ac_try;;
18474 esac
18475 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18476   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18477   ac_status=$?
18478   grep -v '^ *+' conftest.er1 >conftest.err
18479   rm -rf conftest.er1
18480   cat conftest.err >&5
18481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18482   (exit $ac_status); } >/dev/null && {
18483          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18484          test ! -s conftest.err
18485        }; then
18486   ac_header_preproc=yes
18487 else
18488   echo "$as_me: failed program was:" >&5
18489 sed 's/^/| /' conftest.$ac_ext >&5
18490
18491   ac_header_preproc=no
18492 fi
18493
18494 rm -rf conftest.err conftest.$ac_ext
18495 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18496 echo "${ECHO_T}$ac_header_preproc" >&6; }
18497
18498 # So?  What about this header?
18499 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18500   yes:no: )
18501     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18502 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18503     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18504 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18505     ac_header_preproc=yes
18506     ;;
18507   no:yes:* )
18508     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18509 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18510     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18511 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18512     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18513 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18514     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18515 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18516     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18517 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18518     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18519 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18520
18521     ;;
18522 esac
18523 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18524 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18525 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18526   echo $ECHO_N "(cached) $ECHO_C" >&6
18527 else
18528   ac_cv_header_jpeglib_h=$ac_header_preproc
18529 fi
18530 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18531 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18532
18533 fi
18534 if test $ac_cv_header_jpeglib_h = yes; then
18535   have_jpeg=yes
18536 fi
18537
18538
18539   CPPFLAGS="$ac_save_CPPFLAGS"
18540
18541   if test "$have_jpeg" = yes; then
18542     # we have the header, now check for the library
18543     have_jpeg=no
18544     jpeg_halfassed=yes
18545
18546   ac_save_CPPFLAGS="$CPPFLAGS"
18547   ac_save_LDFLAGS="$LDFLAGS"
18548 #  ac_save_LIBS="$LIBS"
18549
18550   if test \! -z "$includedir" ; then
18551     CPPFLAGS="$CPPFLAGS -I$includedir"
18552   fi
18553   # note: $X_CFLAGS includes $x_includes
18554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18555
18556   if test \! -z "$libdir" ; then
18557     LDFLAGS="$LDFLAGS -L$libdir"
18558   fi
18559   # note: $X_LIBS includes $x_libraries
18560   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18561
18562   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18563   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18564   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18565 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18566 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18567   echo $ECHO_N "(cached) $ECHO_C" >&6
18568 else
18569   ac_check_lib_save_LIBS=$LIBS
18570 LIBS="-ljpeg  $LIBS"
18571 cat >conftest.$ac_ext <<_ACEOF
18572 /* confdefs.h.  */
18573 _ACEOF
18574 cat confdefs.h >>conftest.$ac_ext
18575 cat >>conftest.$ac_ext <<_ACEOF
18576 /* end confdefs.h.  */
18577
18578 /* Override any GCC internal prototype to avoid an error.
18579    Use char because int might match the return type of a GCC
18580    builtin and then its argument prototype would still apply.  */
18581 #ifdef __cplusplus
18582 extern "C"
18583 #endif
18584 char jpeg_start_compress ();
18585 int
18586 main ()
18587 {
18588 return jpeg_start_compress ();
18589   ;
18590   return 0;
18591 }
18592 _ACEOF
18593 rm -rf conftest.$ac_objext conftest$ac_exeext
18594 if { (ac_try="$ac_link"
18595 case "(($ac_try" in
18596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18597   *) ac_try_echo=$ac_try;;
18598 esac
18599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18600   (eval "$ac_link") 2>conftest.er1
18601   ac_status=$?
18602   grep -v '^ *+' conftest.er1 >conftest.err
18603   rm -rf conftest.er1
18604   cat conftest.err >&5
18605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18606   (exit $ac_status); } && {
18607          test -z "$ac_c_werror_flag" ||
18608          test ! -s conftest.err
18609        } && test -s conftest$ac_exeext &&
18610        $as_test_x conftest$ac_exeext; then
18611   ac_cv_lib_jpeg_jpeg_start_compress=yes
18612 else
18613   echo "$as_me: failed program was:" >&5
18614 sed 's/^/| /' conftest.$ac_ext >&5
18615
18616         ac_cv_lib_jpeg_jpeg_start_compress=no
18617 fi
18618
18619 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18620       conftest$ac_exeext conftest.$ac_ext
18621 LIBS=$ac_check_lib_save_LIBS
18622 fi
18623 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18624 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18625 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18626   have_jpeg=yes
18627                     jpeg_halfassed=no
18628                     JPEG_LIBS="-ljpeg"
18629                     cat >>confdefs.h <<\_ACEOF
18630 #define HAVE_JPEGLIB 1
18631 _ACEOF
18632
18633 fi
18634
18635   CPPFLAGS="$ac_save_CPPFLAGS"
18636   LDFLAGS="$ac_save_LDFLAGS"
18637 #  LIBS="$ac_save_LIBS"
18638
18639   fi
18640 fi
18641
18642
18643 ###############################################################################
18644 #
18645 #       Check for pty support: this allows 'phosphor' and 'apple2'
18646 #       to run curses-based programs, or be used as terminal windows.
18647 #
18648 ###############################################################################
18649
18650 PTY_LIBS=
18651
18652
18653 for ac_header in pty.h util.h
18654 do
18655 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18656 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18657   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18658 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18659 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18660   echo $ECHO_N "(cached) $ECHO_C" >&6
18661 fi
18662 ac_res=`eval echo '${'$as_ac_Header'}'`
18663                { echo "$as_me:$LINENO: result: $ac_res" >&5
18664 echo "${ECHO_T}$ac_res" >&6; }
18665 else
18666   # Is the header compilable?
18667 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18668 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18669 cat >conftest.$ac_ext <<_ACEOF
18670 /* confdefs.h.  */
18671 _ACEOF
18672 cat confdefs.h >>conftest.$ac_ext
18673 cat >>conftest.$ac_ext <<_ACEOF
18674 /* end confdefs.h.  */
18675 $ac_includes_default
18676 #include <$ac_header>
18677 _ACEOF
18678 rm -rf conftest.$ac_objext
18679 if { (ac_try="$ac_compile"
18680 case "(($ac_try" in
18681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18682   *) ac_try_echo=$ac_try;;
18683 esac
18684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18685   (eval "$ac_compile") 2>conftest.er1
18686   ac_status=$?
18687   grep -v '^ *+' conftest.er1 >conftest.err
18688   rm -rf conftest.er1
18689   cat conftest.err >&5
18690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18691   (exit $ac_status); } && {
18692          test -z "$ac_c_werror_flag" ||
18693          test ! -s conftest.err
18694        } && test -s conftest.$ac_objext; then
18695   ac_header_compiler=yes
18696 else
18697   echo "$as_me: failed program was:" >&5
18698 sed 's/^/| /' conftest.$ac_ext >&5
18699
18700         ac_header_compiler=no
18701 fi
18702
18703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18704 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18705 echo "${ECHO_T}$ac_header_compiler" >&6; }
18706
18707 # Is the header present?
18708 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18709 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18710 cat >conftest.$ac_ext <<_ACEOF
18711 /* confdefs.h.  */
18712 _ACEOF
18713 cat confdefs.h >>conftest.$ac_ext
18714 cat >>conftest.$ac_ext <<_ACEOF
18715 /* end confdefs.h.  */
18716 #include <$ac_header>
18717 _ACEOF
18718 if { (ac_try="$ac_cpp conftest.$ac_ext"
18719 case "(($ac_try" in
18720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18721   *) ac_try_echo=$ac_try;;
18722 esac
18723 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18724   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18725   ac_status=$?
18726   grep -v '^ *+' conftest.er1 >conftest.err
18727   rm -rf conftest.er1
18728   cat conftest.err >&5
18729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18730   (exit $ac_status); } >/dev/null && {
18731          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18732          test ! -s conftest.err
18733        }; then
18734   ac_header_preproc=yes
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 sed 's/^/| /' conftest.$ac_ext >&5
18738
18739   ac_header_preproc=no
18740 fi
18741
18742 rm -rf conftest.err conftest.$ac_ext
18743 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18744 echo "${ECHO_T}$ac_header_preproc" >&6; }
18745
18746 # So?  What about this header?
18747 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18748   yes:no: )
18749     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18750 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18752 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18753     ac_header_preproc=yes
18754     ;;
18755   no:yes:* )
18756     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18757 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18758     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18759 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18760     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18761 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18762     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18763 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18764     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18765 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18766     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18767 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18768
18769     ;;
18770 esac
18771 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18773 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18774   echo $ECHO_N "(cached) $ECHO_C" >&6
18775 else
18776   eval "$as_ac_Header=\$ac_header_preproc"
18777 fi
18778 ac_res=`eval echo '${'$as_ac_Header'}'`
18779                { echo "$as_me:$LINENO: result: $ac_res" >&5
18780 echo "${ECHO_T}$ac_res" >&6; }
18781
18782 fi
18783 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18784   cat >>confdefs.h <<_ACEOF
18785 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18786 _ACEOF
18787
18788 fi
18789
18790 done
18791
18792
18793   ac_save_CPPFLAGS="$CPPFLAGS"
18794   ac_save_LDFLAGS="$LDFLAGS"
18795 #  ac_save_LIBS="$LIBS"
18796
18797   if test \! -z "$includedir" ; then
18798     CPPFLAGS="$CPPFLAGS -I$includedir"
18799   fi
18800   # note: $X_CFLAGS includes $x_includes
18801   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18802
18803   if test \! -z "$libdir" ; then
18804     LDFLAGS="$LDFLAGS -L$libdir"
18805   fi
18806   # note: $X_LIBS includes $x_libraries
18807   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18808
18809   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18810   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18811   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18812 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
18813 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18814   echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816   ac_check_lib_save_LIBS=$LIBS
18817 LIBS="-lutil  $LIBS"
18818 cat >conftest.$ac_ext <<_ACEOF
18819 /* confdefs.h.  */
18820 _ACEOF
18821 cat confdefs.h >>conftest.$ac_ext
18822 cat >>conftest.$ac_ext <<_ACEOF
18823 /* end confdefs.h.  */
18824
18825 /* Override any GCC internal prototype to avoid an error.
18826    Use char because int might match the return type of a GCC
18827    builtin and then its argument prototype would still apply.  */
18828 #ifdef __cplusplus
18829 extern "C"
18830 #endif
18831 char forkpty ();
18832 int
18833 main ()
18834 {
18835 return forkpty ();
18836   ;
18837   return 0;
18838 }
18839 _ACEOF
18840 rm -rf conftest.$ac_objext conftest$ac_exeext
18841 if { (ac_try="$ac_link"
18842 case "(($ac_try" in
18843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18844   *) ac_try_echo=$ac_try;;
18845 esac
18846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18847   (eval "$ac_link") 2>conftest.er1
18848   ac_status=$?
18849   grep -v '^ *+' conftest.er1 >conftest.err
18850   rm -rf conftest.er1
18851   cat conftest.err >&5
18852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853   (exit $ac_status); } && {
18854          test -z "$ac_c_werror_flag" ||
18855          test ! -s conftest.err
18856        } && test -s conftest$ac_exeext &&
18857        $as_test_x conftest$ac_exeext; then
18858   ac_cv_lib_util_forkpty=yes
18859 else
18860   echo "$as_me: failed program was:" >&5
18861 sed 's/^/| /' conftest.$ac_ext >&5
18862
18863         ac_cv_lib_util_forkpty=no
18864 fi
18865
18866 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18867       conftest$ac_exeext conftest.$ac_ext
18868 LIBS=$ac_check_lib_save_LIBS
18869 fi
18870 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18871 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18872 if test $ac_cv_lib_util_forkpty = yes; then
18873   PTY_LIBS="-lutil"
18874                 ac_have_forkpty=yes
18875                 cat >>confdefs.h <<\_ACEOF
18876 #define HAVE_FORKPTY 1
18877 _ACEOF
18878
18879 fi
18880
18881   CPPFLAGS="$ac_save_CPPFLAGS"
18882   LDFLAGS="$ac_save_LDFLAGS"
18883 #  LIBS="$ac_save_LIBS"
18884
18885
18886 if test "$ac_have_forkpty" != yes ; then
18887   # we don't need (or have) -lutil on MacOS 10.4.2...
18888
18889   ac_save_CPPFLAGS="$CPPFLAGS"
18890   ac_save_LDFLAGS="$LDFLAGS"
18891 #  ac_save_LIBS="$LIBS"
18892
18893   if test \! -z "$includedir" ; then
18894     CPPFLAGS="$CPPFLAGS -I$includedir"
18895   fi
18896   # note: $X_CFLAGS includes $x_includes
18897   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18898
18899   if test \! -z "$libdir" ; then
18900     LDFLAGS="$LDFLAGS -L$libdir"
18901   fi
18902   # note: $X_LIBS includes $x_libraries
18903   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18904
18905   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18906   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18907   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
18908 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
18909 if test "${ac_cv_lib_c_forkpty+set}" = set; then
18910   echo $ECHO_N "(cached) $ECHO_C" >&6
18911 else
18912   ac_check_lib_save_LIBS=$LIBS
18913 LIBS="-lc  $LIBS"
18914 cat >conftest.$ac_ext <<_ACEOF
18915 /* confdefs.h.  */
18916 _ACEOF
18917 cat confdefs.h >>conftest.$ac_ext
18918 cat >>conftest.$ac_ext <<_ACEOF
18919 /* end confdefs.h.  */
18920
18921 /* Override any GCC internal prototype to avoid an error.
18922    Use char because int might match the return type of a GCC
18923    builtin and then its argument prototype would still apply.  */
18924 #ifdef __cplusplus
18925 extern "C"
18926 #endif
18927 char forkpty ();
18928 int
18929 main ()
18930 {
18931 return forkpty ();
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 rm -rf conftest.$ac_objext conftest$ac_exeext
18937 if { (ac_try="$ac_link"
18938 case "(($ac_try" in
18939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18940   *) ac_try_echo=$ac_try;;
18941 esac
18942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18943   (eval "$ac_link") 2>conftest.er1
18944   ac_status=$?
18945   grep -v '^ *+' conftest.er1 >conftest.err
18946   rm -rf conftest.er1
18947   cat conftest.err >&5
18948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949   (exit $ac_status); } && {
18950          test -z "$ac_c_werror_flag" ||
18951          test ! -s conftest.err
18952        } && test -s conftest$ac_exeext &&
18953        $as_test_x conftest$ac_exeext; then
18954   ac_cv_lib_c_forkpty=yes
18955 else
18956   echo "$as_me: failed program was:" >&5
18957 sed 's/^/| /' conftest.$ac_ext >&5
18958
18959         ac_cv_lib_c_forkpty=no
18960 fi
18961
18962 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18963       conftest$ac_exeext conftest.$ac_ext
18964 LIBS=$ac_check_lib_save_LIBS
18965 fi
18966 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
18967 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
18968 if test $ac_cv_lib_c_forkpty = yes; then
18969   PTY_LIBS=""
18970                   cat >>confdefs.h <<\_ACEOF
18971 #define HAVE_FORKPTY 1
18972 _ACEOF
18973
18974 fi
18975
18976   CPPFLAGS="$ac_save_CPPFLAGS"
18977   LDFLAGS="$ac_save_LDFLAGS"
18978 #  LIBS="$ac_save_LIBS"
18979
18980 fi
18981
18982 ###############################################################################
18983 #
18984 #       Check for the XSHM server extension.
18985 #
18986 ###############################################################################
18987
18988 have_xshm=no
18989 with_xshm_req=unspecified
18990
18991 # Check whether --with-xshm-ext was given.
18992 if test "${with_xshm_ext+set}" = set; then
18993   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
18994 else
18995   with_xshm=yes
18996 fi
18997
18998
18999
19000    case "$with_xshm" in
19001     yes) ;;
19002     no)  ;;
19003
19004     /*)
19005      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19006 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19007      d=$with_xshm/include
19008      if test -d $d; then
19009        X_CFLAGS="-I$d $X_CFLAGS"
19010        { echo "$as_me:$LINENO: result: $d" >&5
19011 echo "${ECHO_T}$d" >&6; }
19012      else
19013        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19014 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19015      fi
19016
19017      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19018 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19019      d=$with_xshm/lib
19020      if test -d $d; then
19021        X_LIBS="-L$d $X_LIBS"
19022        { echo "$as_me:$LINENO: result: $d" >&5
19023 echo "${ECHO_T}$d" >&6; }
19024      else
19025        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19026 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19027      fi
19028
19029      # replace the directory string with "yes".
19030      with_xshm_req="yes"
19031      with_xshm=$with_xshm_req
19032      ;;
19033
19034     *)
19035      echo ""
19036      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19037      echo "       If it is a directory, then \`DIR/include' will be added to"
19038      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19039      exit 1
19040      ;;
19041    esac
19042
19043
19044 if test "$with_xshm" = yes; then
19045
19046   # first check for Xshm.h.
19047
19048   ac_save_CPPFLAGS="$CPPFLAGS"
19049   if test \! -z "$includedir" ; then
19050     CPPFLAGS="$CPPFLAGS -I$includedir"
19051   fi
19052   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19053   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19054   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19055 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19056 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19057   echo $ECHO_N "(cached) $ECHO_C" >&6
19058 else
19059   cat >conftest.$ac_ext <<_ACEOF
19060 /* confdefs.h.  */
19061 _ACEOF
19062 cat confdefs.h >>conftest.$ac_ext
19063 cat >>conftest.$ac_ext <<_ACEOF
19064 /* end confdefs.h.  */
19065 #include <X11/Xlib.h>
19066
19067 #include <X11/extensions/XShm.h>
19068 _ACEOF
19069 rm -rf conftest.$ac_objext
19070 if { (ac_try="$ac_compile"
19071 case "(($ac_try" in
19072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19073   *) ac_try_echo=$ac_try;;
19074 esac
19075 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19076   (eval "$ac_compile") 2>conftest.er1
19077   ac_status=$?
19078   grep -v '^ *+' conftest.er1 >conftest.err
19079   rm -rf conftest.er1
19080   cat conftest.err >&5
19081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19082   (exit $ac_status); } && {
19083          test -z "$ac_c_werror_flag" ||
19084          test ! -s conftest.err
19085        } && test -s conftest.$ac_objext; then
19086   ac_cv_header_X11_extensions_XShm_h=yes
19087 else
19088   echo "$as_me: failed program was:" >&5
19089 sed 's/^/| /' conftest.$ac_ext >&5
19090
19091         ac_cv_header_X11_extensions_XShm_h=no
19092 fi
19093
19094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19095 fi
19096 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19097 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19098 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19099   have_xshm=yes
19100 fi
19101
19102
19103   CPPFLAGS="$ac_save_CPPFLAGS"
19104
19105   # if that succeeded, then check for sys/ipc.h.
19106   if test "$have_xshm" = yes; then
19107     have_xshm=no
19108
19109   ac_save_CPPFLAGS="$CPPFLAGS"
19110   if test \! -z "$includedir" ; then
19111     CPPFLAGS="$CPPFLAGS -I$includedir"
19112   fi
19113   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19114   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19115   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19116   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19117 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19118 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19119   echo $ECHO_N "(cached) $ECHO_C" >&6
19120 fi
19121 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19122 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19123 else
19124   # Is the header compilable?
19125 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19126 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19127 cat >conftest.$ac_ext <<_ACEOF
19128 /* confdefs.h.  */
19129 _ACEOF
19130 cat confdefs.h >>conftest.$ac_ext
19131 cat >>conftest.$ac_ext <<_ACEOF
19132 /* end confdefs.h.  */
19133 $ac_includes_default
19134 #include <sys/ipc.h>
19135 _ACEOF
19136 rm -rf conftest.$ac_objext
19137 if { (ac_try="$ac_compile"
19138 case "(($ac_try" in
19139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19140   *) ac_try_echo=$ac_try;;
19141 esac
19142 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19143   (eval "$ac_compile") 2>conftest.er1
19144   ac_status=$?
19145   grep -v '^ *+' conftest.er1 >conftest.err
19146   rm -rf conftest.er1
19147   cat conftest.err >&5
19148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19149   (exit $ac_status); } && {
19150          test -z "$ac_c_werror_flag" ||
19151          test ! -s conftest.err
19152        } && test -s conftest.$ac_objext; then
19153   ac_header_compiler=yes
19154 else
19155   echo "$as_me: failed program was:" >&5
19156 sed 's/^/| /' conftest.$ac_ext >&5
19157
19158         ac_header_compiler=no
19159 fi
19160
19161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19162 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19163 echo "${ECHO_T}$ac_header_compiler" >&6; }
19164
19165 # Is the header present?
19166 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19167 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19168 cat >conftest.$ac_ext <<_ACEOF
19169 /* confdefs.h.  */
19170 _ACEOF
19171 cat confdefs.h >>conftest.$ac_ext
19172 cat >>conftest.$ac_ext <<_ACEOF
19173 /* end confdefs.h.  */
19174 #include <sys/ipc.h>
19175 _ACEOF
19176 if { (ac_try="$ac_cpp conftest.$ac_ext"
19177 case "(($ac_try" in
19178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19179   *) ac_try_echo=$ac_try;;
19180 esac
19181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19182   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19183   ac_status=$?
19184   grep -v '^ *+' conftest.er1 >conftest.err
19185   rm -rf conftest.er1
19186   cat conftest.err >&5
19187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19188   (exit $ac_status); } >/dev/null && {
19189          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19190          test ! -s conftest.err
19191        }; then
19192   ac_header_preproc=yes
19193 else
19194   echo "$as_me: failed program was:" >&5
19195 sed 's/^/| /' conftest.$ac_ext >&5
19196
19197   ac_header_preproc=no
19198 fi
19199
19200 rm -rf conftest.err conftest.$ac_ext
19201 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19202 echo "${ECHO_T}$ac_header_preproc" >&6; }
19203
19204 # So?  What about this header?
19205 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19206   yes:no: )
19207     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19208 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19209     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19210 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19211     ac_header_preproc=yes
19212     ;;
19213   no:yes:* )
19214     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19215 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19216     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19217 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19218     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19219 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19220     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19221 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19222     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19223 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19224     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19225 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19226
19227     ;;
19228 esac
19229 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19230 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19231 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19232   echo $ECHO_N "(cached) $ECHO_C" >&6
19233 else
19234   ac_cv_header_sys_ipc_h=$ac_header_preproc
19235 fi
19236 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19237 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19238
19239 fi
19240 if test $ac_cv_header_sys_ipc_h = yes; then
19241   have_xshm=yes
19242 fi
19243
19244
19245   CPPFLAGS="$ac_save_CPPFLAGS"
19246   fi
19247
19248   # if that succeeded, then check for sys/shm.h.
19249   if test "$have_xshm" = yes; then
19250     have_xshm=no
19251
19252   ac_save_CPPFLAGS="$CPPFLAGS"
19253   if test \! -z "$includedir" ; then
19254     CPPFLAGS="$CPPFLAGS -I$includedir"
19255   fi
19256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19257   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19258   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19259   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19260 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19261 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 fi
19264 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19265 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19266 else
19267   # Is the header compilable?
19268 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19269 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19270 cat >conftest.$ac_ext <<_ACEOF
19271 /* confdefs.h.  */
19272 _ACEOF
19273 cat confdefs.h >>conftest.$ac_ext
19274 cat >>conftest.$ac_ext <<_ACEOF
19275 /* end confdefs.h.  */
19276 $ac_includes_default
19277 #include <sys/shm.h>
19278 _ACEOF
19279 rm -rf conftest.$ac_objext
19280 if { (ac_try="$ac_compile"
19281 case "(($ac_try" in
19282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19283   *) ac_try_echo=$ac_try;;
19284 esac
19285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19286   (eval "$ac_compile") 2>conftest.er1
19287   ac_status=$?
19288   grep -v '^ *+' conftest.er1 >conftest.err
19289   rm -rf conftest.er1
19290   cat conftest.err >&5
19291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19292   (exit $ac_status); } && {
19293          test -z "$ac_c_werror_flag" ||
19294          test ! -s conftest.err
19295        } && test -s conftest.$ac_objext; then
19296   ac_header_compiler=yes
19297 else
19298   echo "$as_me: failed program was:" >&5
19299 sed 's/^/| /' conftest.$ac_ext >&5
19300
19301         ac_header_compiler=no
19302 fi
19303
19304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19305 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19306 echo "${ECHO_T}$ac_header_compiler" >&6; }
19307
19308 # Is the header present?
19309 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19310 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19311 cat >conftest.$ac_ext <<_ACEOF
19312 /* confdefs.h.  */
19313 _ACEOF
19314 cat confdefs.h >>conftest.$ac_ext
19315 cat >>conftest.$ac_ext <<_ACEOF
19316 /* end confdefs.h.  */
19317 #include <sys/shm.h>
19318 _ACEOF
19319 if { (ac_try="$ac_cpp conftest.$ac_ext"
19320 case "(($ac_try" in
19321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19322   *) ac_try_echo=$ac_try;;
19323 esac
19324 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19325   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19326   ac_status=$?
19327   grep -v '^ *+' conftest.er1 >conftest.err
19328   rm -rf conftest.er1
19329   cat conftest.err >&5
19330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331   (exit $ac_status); } >/dev/null && {
19332          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19333          test ! -s conftest.err
19334        }; then
19335   ac_header_preproc=yes
19336 else
19337   echo "$as_me: failed program was:" >&5
19338 sed 's/^/| /' conftest.$ac_ext >&5
19339
19340   ac_header_preproc=no
19341 fi
19342
19343 rm -rf conftest.err conftest.$ac_ext
19344 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19345 echo "${ECHO_T}$ac_header_preproc" >&6; }
19346
19347 # So?  What about this header?
19348 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19349   yes:no: )
19350     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19351 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19352     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19353 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19354     ac_header_preproc=yes
19355     ;;
19356   no:yes:* )
19357     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19358 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19359     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19360 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19361     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19362 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19363     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19364 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19365     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19366 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19367     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19368 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19369
19370     ;;
19371 esac
19372 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19373 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19374 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19375   echo $ECHO_N "(cached) $ECHO_C" >&6
19376 else
19377   ac_cv_header_sys_shm_h=$ac_header_preproc
19378 fi
19379 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19380 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19381
19382 fi
19383 if test $ac_cv_header_sys_shm_h = yes; then
19384   have_xshm=yes
19385 fi
19386
19387
19388   CPPFLAGS="$ac_save_CPPFLAGS"
19389   fi
19390
19391   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19392   # to exist, but the library code to not exist.  And even better, the library
19393   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19394   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19395   # that's not quite right, but close enough.)
19396   #
19397   case "$host" in
19398     *-aix*)
19399       if  `uname -v` -eq 3 ; then
19400         have_xshm=no
19401
19402   ac_save_CPPFLAGS="$CPPFLAGS"
19403   ac_save_LDFLAGS="$LDFLAGS"
19404 #  ac_save_LIBS="$LIBS"
19405
19406   if test \! -z "$includedir" ; then
19407     CPPFLAGS="$CPPFLAGS -I$includedir"
19408   fi
19409   # note: $X_CFLAGS includes $x_includes
19410   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19411
19412   if test \! -z "$libdir" ; then
19413     LDFLAGS="$LDFLAGS -L$libdir"
19414   fi
19415   # note: $X_LIBS includes $x_libraries
19416   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19417
19418   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19419   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19420   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19421 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19422 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19423   echo $ECHO_N "(cached) $ECHO_C" >&6
19424 else
19425   ac_check_lib_save_LIBS=$LIBS
19426 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19427 cat >conftest.$ac_ext <<_ACEOF
19428 /* confdefs.h.  */
19429 _ACEOF
19430 cat confdefs.h >>conftest.$ac_ext
19431 cat >>conftest.$ac_ext <<_ACEOF
19432 /* end confdefs.h.  */
19433
19434 /* Override any GCC internal prototype to avoid an error.
19435    Use char because int might match the return type of a GCC
19436    builtin and then its argument prototype would still apply.  */
19437 #ifdef __cplusplus
19438 extern "C"
19439 #endif
19440 char XShmQueryExtension ();
19441 int
19442 main ()
19443 {
19444 return XShmQueryExtension ();
19445   ;
19446   return 0;
19447 }
19448 _ACEOF
19449 rm -rf conftest.$ac_objext conftest$ac_exeext
19450 if { (ac_try="$ac_link"
19451 case "(($ac_try" in
19452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19453   *) ac_try_echo=$ac_try;;
19454 esac
19455 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19456   (eval "$ac_link") 2>conftest.er1
19457   ac_status=$?
19458   grep -v '^ *+' conftest.er1 >conftest.err
19459   rm -rf conftest.er1
19460   cat conftest.err >&5
19461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19462   (exit $ac_status); } && {
19463          test -z "$ac_c_werror_flag" ||
19464          test ! -s conftest.err
19465        } && test -s conftest$ac_exeext &&
19466        $as_test_x conftest$ac_exeext; then
19467   ac_cv_lib_XextSam_XShmQueryExtension=yes
19468 else
19469   echo "$as_me: failed program was:" >&5
19470 sed 's/^/| /' conftest.$ac_ext >&5
19471
19472         ac_cv_lib_XextSam_XShmQueryExtension=no
19473 fi
19474
19475 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19476       conftest$ac_exeext conftest.$ac_ext
19477 LIBS=$ac_check_lib_save_LIBS
19478 fi
19479 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19480 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19481 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19482   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19483 else
19484   true
19485 fi
19486
19487   CPPFLAGS="$ac_save_CPPFLAGS"
19488   LDFLAGS="$ac_save_LDFLAGS"
19489 #  LIBS="$ac_save_LIBS"
19490
19491       fi
19492     ;;
19493   esac
19494
19495   # if that succeeded, then we've really got it.
19496   if test "$have_xshm" = yes; then
19497     cat >>confdefs.h <<\_ACEOF
19498 #define HAVE_XSHM_EXTENSION 1
19499 _ACEOF
19500
19501   fi
19502
19503 elif test "$with_xshm" != no; then
19504   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19505   exit 1
19506 fi
19507
19508
19509 ###############################################################################
19510 #
19511 #       Check for the DOUBLE-BUFFER server extension.
19512 #
19513 ###############################################################################
19514
19515 have_xdbe=no
19516 with_xdbe_req=unspecified
19517
19518 # Check whether --with-xdbe-ext was given.
19519 if test "${with_xdbe_ext+set}" = set; then
19520   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19521 else
19522   with_xdbe=yes
19523 fi
19524
19525
19526
19527    case "$with_xdbe" in
19528     yes) ;;
19529     no)  ;;
19530
19531     /*)
19532      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19533 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19534      d=$with_xdbe/include
19535      if test -d $d; then
19536        X_CFLAGS="-I$d $X_CFLAGS"
19537        { echo "$as_me:$LINENO: result: $d" >&5
19538 echo "${ECHO_T}$d" >&6; }
19539      else
19540        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19541 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19542      fi
19543
19544      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19545 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19546      d=$with_xdbe/lib
19547      if test -d $d; then
19548        X_LIBS="-L$d $X_LIBS"
19549        { echo "$as_me:$LINENO: result: $d" >&5
19550 echo "${ECHO_T}$d" >&6; }
19551      else
19552        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19553 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19554      fi
19555
19556      # replace the directory string with "yes".
19557      with_xdbe_req="yes"
19558      with_xdbe=$with_xdbe_req
19559      ;;
19560
19561     *)
19562      echo ""
19563      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19564      echo "       If it is a directory, then \`DIR/include' will be added to"
19565      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19566      exit 1
19567      ;;
19568    esac
19569
19570
19571 if test "$with_xdbe" = yes; then
19572
19573
19574   ac_save_CPPFLAGS="$CPPFLAGS"
19575   if test \! -z "$includedir" ; then
19576     CPPFLAGS="$CPPFLAGS -I$includedir"
19577   fi
19578   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19579   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19580   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19581 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19582 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19583   echo $ECHO_N "(cached) $ECHO_C" >&6
19584 else
19585   cat >conftest.$ac_ext <<_ACEOF
19586 /* confdefs.h.  */
19587 _ACEOF
19588 cat confdefs.h >>conftest.$ac_ext
19589 cat >>conftest.$ac_ext <<_ACEOF
19590 /* end confdefs.h.  */
19591 #include <X11/Xlib.h>
19592
19593 #include <X11/extensions/Xdbe.h>
19594 _ACEOF
19595 rm -rf conftest.$ac_objext
19596 if { (ac_try="$ac_compile"
19597 case "(($ac_try" in
19598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19599   *) ac_try_echo=$ac_try;;
19600 esac
19601 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19602   (eval "$ac_compile") 2>conftest.er1
19603   ac_status=$?
19604   grep -v '^ *+' conftest.er1 >conftest.err
19605   rm -rf conftest.er1
19606   cat conftest.err >&5
19607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19608   (exit $ac_status); } && {
19609          test -z "$ac_c_werror_flag" ||
19610          test ! -s conftest.err
19611        } && test -s conftest.$ac_objext; then
19612   ac_cv_header_X11_extensions_Xdbe_h=yes
19613 else
19614   echo "$as_me: failed program was:" >&5
19615 sed 's/^/| /' conftest.$ac_ext >&5
19616
19617         ac_cv_header_X11_extensions_Xdbe_h=no
19618 fi
19619
19620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19621 fi
19622 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19623 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19624 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19625   have_xdbe=yes
19626 fi
19627
19628
19629   CPPFLAGS="$ac_save_CPPFLAGS"
19630   if test "$have_xdbe" = yes; then
19631     cat >>confdefs.h <<\_ACEOF
19632 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19633 _ACEOF
19634
19635   fi
19636
19637 elif test "$with_xdbe" != no; then
19638   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19639   exit 1
19640 fi
19641
19642
19643 ###############################################################################
19644 #
19645 #       Check for the SGI XReadDisplay server extension.
19646 #
19647 #       Note: this has to be down here, rather than up with the other server
19648 #       extension tests, so that the output of `configure --help' is in the
19649 #       right order.  Arrgh!
19650 #
19651 ###############################################################################
19652
19653 have_readdisplay=no
19654 with_readdisplay_req=unspecified
19655
19656 # Check whether --with-readdisplay was given.
19657 if test "${with_readdisplay+set}" = set; then
19658   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19659 else
19660   with_readdisplay=yes
19661 fi
19662
19663
19664
19665    case "$with_readdisplay" in
19666     yes) ;;
19667     no)  ;;
19668
19669     /*)
19670      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19671 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19672      d=$with_readdisplay/include
19673      if test -d $d; then
19674        X_CFLAGS="-I$d $X_CFLAGS"
19675        { echo "$as_me:$LINENO: result: $d" >&5
19676 echo "${ECHO_T}$d" >&6; }
19677      else
19678        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19679 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19680      fi
19681
19682      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19683 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19684      d=$with_readdisplay/lib
19685      if test -d $d; then
19686        X_LIBS="-L$d $X_LIBS"
19687        { echo "$as_me:$LINENO: result: $d" >&5
19688 echo "${ECHO_T}$d" >&6; }
19689      else
19690        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19691 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19692      fi
19693
19694      # replace the directory string with "yes".
19695      with_readdisplay_req="yes"
19696      with_readdisplay=$with_readdisplay_req
19697      ;;
19698
19699     *)
19700      echo ""
19701      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19702      echo "       If it is a directory, then \`DIR/include' will be added to"
19703      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19704      exit 1
19705      ;;
19706    esac
19707
19708
19709 if test "$with_readdisplay" = yes; then
19710
19711   ac_save_CPPFLAGS="$CPPFLAGS"
19712   if test \! -z "$includedir" ; then
19713     CPPFLAGS="$CPPFLAGS -I$includedir"
19714   fi
19715   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19716   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19717   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19718 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19719 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19720   echo $ECHO_N "(cached) $ECHO_C" >&6
19721 else
19722   cat >conftest.$ac_ext <<_ACEOF
19723 /* confdefs.h.  */
19724 _ACEOF
19725 cat confdefs.h >>conftest.$ac_ext
19726 cat >>conftest.$ac_ext <<_ACEOF
19727 /* end confdefs.h.  */
19728 #include <X11/Xlib.h>
19729
19730 #include <X11/extensions/readdisplay.h>
19731 _ACEOF
19732 rm -rf conftest.$ac_objext
19733 if { (ac_try="$ac_compile"
19734 case "(($ac_try" in
19735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736   *) ac_try_echo=$ac_try;;
19737 esac
19738 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19739   (eval "$ac_compile") 2>conftest.er1
19740   ac_status=$?
19741   grep -v '^ *+' conftest.er1 >conftest.err
19742   rm -rf conftest.er1
19743   cat conftest.err >&5
19744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19745   (exit $ac_status); } && {
19746          test -z "$ac_c_werror_flag" ||
19747          test ! -s conftest.err
19748        } && test -s conftest.$ac_objext; then
19749   ac_cv_header_X11_extensions_readdisplay_h=yes
19750 else
19751   echo "$as_me: failed program was:" >&5
19752 sed 's/^/| /' conftest.$ac_ext >&5
19753
19754         ac_cv_header_X11_extensions_readdisplay_h=no
19755 fi
19756
19757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19758 fi
19759 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19760 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19761 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19762   cat >>confdefs.h <<\_ACEOF
19763 #define HAVE_READ_DISPLAY_EXTENSION 1
19764 _ACEOF
19765
19766 fi
19767
19768
19769   CPPFLAGS="$ac_save_CPPFLAGS"
19770 elif test "$with_readdisplay" != no; then
19771   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19772   exit 1
19773 fi
19774
19775
19776 ###############################################################################
19777 #
19778 #       Check for a directory full of images to use as the default value
19779 #       of the "imageDirectory" preference.
19780 #
19781 ###############################################################################
19782
19783 have_imagedir=no
19784 with_imagedir_req=unspecified
19785
19786
19787 # Check whether --with-image-directory was given.
19788 if test "${with_image_directory+set}" = set; then
19789   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19790 else
19791   with_imagedir=yes
19792 fi
19793
19794 # no HANDLE_X_PATH_ARG for this one
19795
19796 case "$with_imagedir" in
19797   /*)
19798     # absolute path
19799     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19800 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
19801     if test -d "$with_imagedir" ; then
19802       { echo "$as_me:$LINENO: result: yes" >&5
19803 echo "${ECHO_T}yes" >&6; }
19804     else
19805       { echo "$as_me:$LINENO: result: no" >&5
19806 echo "${ECHO_T}no" >&6; }
19807       with_imagedir=""
19808     fi
19809   ;;
19810   yes)
19811     with_imagedir=""
19812
19813     #### Could use some more defaults here...
19814     for dd in \
19815       "/usr/share/backgrounds/images/"          \
19816       "/usr/share/wallpapers/"                  \
19817       "/Library/Desktop Pictures/"              \
19818     ; do
19819       if test -z "$with_imagedir"; then
19820         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
19821 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
19822         if test -d "$dd" ; then
19823           { echo "$as_me:$LINENO: result: yes" >&5
19824 echo "${ECHO_T}yes" >&6; }
19825           with_imagedir="$dd"
19826         else
19827           { echo "$as_me:$LINENO: result: no" >&5
19828 echo "${ECHO_T}no" >&6; }
19829         fi
19830       fi
19831     done
19832
19833   ;;
19834   no)
19835     with_imagedir=""
19836   ;;
19837
19838   *)
19839     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19840     exit 1
19841   ;;
19842 esac
19843 ac_cv_imagedir="$with_imagedir"
19844
19845 DEFAULT_IMAGES_P='True'
19846 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19847
19848 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19849   DEFAULT_IMAGES_P='False'
19850 fi
19851
19852
19853 ###############################################################################
19854 #
19855 #       Pick a text file to use as the default of the "textFile" preference.
19856 #       Any old file will do, but preferably one that will make interesting
19857 #       shapes when displayed by "starwars" and "fontglide".
19858 #
19859 ###############################################################################
19860
19861 have_textfile=no
19862 with_textfile_req=unspecified
19863
19864
19865 # Check whether --with-text-file was given.
19866 if test "${with_text_file+set}" = set; then
19867   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
19868 else
19869   with_textfile=yes
19870 fi
19871
19872 # no HANDLE_X_PATH_ARG for this one
19873
19874 case "$with_textfile" in
19875   /*)
19876     # absolute path
19877     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
19878 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
19879     if test -f "$with_textfile" ; then
19880       { echo "$as_me:$LINENO: result: yes" >&5
19881 echo "${ECHO_T}yes" >&6; }
19882     else
19883       { echo "$as_me:$LINENO: result: no" >&5
19884 echo "${ECHO_T}no" >&6; }
19885       with_textfile=""
19886     fi
19887   ;;
19888   yes)
19889     with_textfile=""
19890
19891     #### Could use some more defaults here...
19892     for f in \
19893       "/usr/X11R6/lib/X11/doc/README"           \
19894       "/usr/share/doc/xserver-common/copyright" \
19895       "/usr/X11R6/README"                       \
19896     ; do
19897       if test -z "$with_textfile"; then
19898         { echo "$as_me:$LINENO: checking for text file $f" >&5
19899 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
19900         if test -f "$f" ; then
19901           { echo "$as_me:$LINENO: result: yes" >&5
19902 echo "${ECHO_T}yes" >&6; }
19903           with_textfile="$f"
19904         else
19905           { echo "$as_me:$LINENO: result: no" >&5
19906 echo "${ECHO_T}no" >&6; }
19907         fi
19908       fi
19909     done
19910
19911   ;;
19912   no)
19913     with_textfile=""
19914   ;;
19915
19916   *)
19917     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
19918     exit 1
19919   ;;
19920 esac
19921 ac_cv_textfile="$with_textfile"
19922
19923 DEFAULT_TEXT_FILE="$ac_cv_textfile"
19924
19925
19926 ###############################################################################
19927 #
19928 #       Check the browser to see help URL
19929 #
19930 ###############################################################################
19931
19932 have_browser=no
19933 with_browser_req=unspecified
19934
19935
19936 # Check whether --with-browser was given.
19937 if test "${with_browser+set}" = set; then
19938   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
19939 else
19940   with_browser=no
19941 fi
19942
19943 # no HANDLE_X_PATH_ARG for this one
19944
19945 case "$with_browser" in
19946   no )
19947   ;;
19948   * )
19949     WITH_BROWSER=$with_browser
19950     gnome_open_program=$with_browser
19951     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
19952 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
19953     with_browser_fullpath=`which $with_browser 2>/dev/null`
19954     case $with_browser_fullpath in
19955          /* )
19956                 { echo "$as_me:$LINENO: result: yes" >&5
19957 echo "${ECHO_T}yes" >&6; }
19958                  have_browser=yes
19959                  ;;
19960         * )
19961                { echo "$as_me:$LINENO: result: no" >&5
19962 echo "${ECHO_T}no" >&6; }
19963 # Only warning: we don't want to install all packages for the
19964 # dependency of the browser in building stage...
19965                echo "WARNING: browser not found: --with-browser=$with_browser"
19966                ;;
19967     esac
19968   ;;
19969 esac
19970 ac_cv_browser="$with_browser"
19971
19972 ###############################################################################
19973 #
19974 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19975 #       This should be safe, but let's give people the option.
19976 #
19977 ###############################################################################
19978
19979 setuid_hacks_default=no
19980 setuid_hacks="$setuid_hacks_default"
19981
19982 # Check whether --with-setuid-hacks was given.
19983 if test "${with_setuid_hacks+set}" = set; then
19984   withval=$with_setuid_hacks; setuid_hacks="$withval"
19985 else
19986   setuid_hacks="$setuid_hacks_default"
19987 fi
19988
19989
19990
19991    case "$setuid_hacks" in
19992     yes) ;;
19993     no)  ;;
19994
19995     /*)
19996      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19997 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
19998      d=$setuid_hacks/include
19999      if test -d $d; then
20000        X_CFLAGS="-I$d $X_CFLAGS"
20001        { echo "$as_me:$LINENO: result: $d" >&5
20002 echo "${ECHO_T}$d" >&6; }
20003      else
20004        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20005 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20006      fi
20007
20008      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20009 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20010      d=$setuid_hacks/lib
20011      if test -d $d; then
20012        X_LIBS="-L$d $X_LIBS"
20013        { echo "$as_me:$LINENO: result: $d" >&5
20014 echo "${ECHO_T}$d" >&6; }
20015      else
20016        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20017 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20018      fi
20019
20020      # replace the directory string with "yes".
20021      setuid_hacks_req="yes"
20022      setuid_hacks=$setuid_hacks_req
20023      ;;
20024
20025     *)
20026      echo ""
20027      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20028      echo "       If it is a directory, then \`DIR/include' will be added to"
20029      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20030      exit 1
20031      ;;
20032    esac
20033
20034
20035 if test "$setuid_hacks" = yes; then
20036   true
20037 elif test "$setuid_hacks" != no; then
20038   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20039   exit 1
20040 fi
20041
20042
20043 ###############################################################################
20044 #
20045 #       Done testing.  Now, set up the various -I and -L variables,
20046 #       and decide which GUI program to build by default.
20047 #
20048 ###############################################################################
20049
20050 DEPEND=makedepend
20051 DEPEND_FLAGS=
20052 DEPEND_DEFINES=
20053
20054
20055 if test \! -z "$includedir" ; then
20056   INCLUDES="$INCLUDES -I$includedir"
20057 fi
20058
20059 if test \! -z "$libdir" ; then
20060   LDFLAGS="$LDFLAGS -L$libdir"
20061 fi
20062
20063
20064 PREFERRED_DEMO_PROGRAM=''
20065 ALL_DEMO_PROGRAMS=
20066 if test "$have_motif" = yes; then
20067   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20068   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20069 fi
20070 if test "$have_gtk" = yes; then
20071   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20072   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20073 fi
20074
20075
20076 if test "$have_kerberos" = yes; then
20077   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20078   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20079 fi
20080 if test "$have_pam" = yes; then
20081   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20082   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20083   INSTALL_PAM="install-pam"
20084 fi
20085 if test "$have_passwd_helper" = yes; then
20086   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20087   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20088 fi
20089   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20090   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20091
20092
20093 if test "$enable_locking" = yes; then
20094   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20095   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20096 else
20097   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20098   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20099 fi
20100
20101 if test "$ac_macosx" = yes; then
20102   EXES_OSX='$(EXES_OSX)'
20103   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20104   MEN_OSX='$(MEN_OSX)'
20105 else
20106   EXES_OSX=
20107   SCRIPTS_OSX=
20108   MEN_OSX=
20109 fi
20110
20111
20112 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20113
20114 if test "$need_setuid" = yes; then
20115   NEED_SETUID=yes
20116 else
20117   NEED_SETUID=no
20118 fi
20119
20120 if test "$setuid_hacks" = yes; then
20121   SETUID_HACKS=yes
20122 else
20123   SETUID_HACKS=no
20124 fi
20125
20126 tab='   '
20127 if test "$have_gl" = yes; then
20128   GL_EXES='$(GL_EXES)'
20129   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20130   GL_MEN='$(GL_MEN)'
20131   GL_KLUDGE="${tab}  "
20132 else
20133   GL_KLUDGE="-${tab}  "
20134 fi
20135
20136 if test "$have_gle" = yes; then
20137   GLE_EXES='$(GLE_EXES)'
20138   GLE_KLUDGE="${tab}   "
20139 else
20140   GLE_KLUDGE="-${tab}   "
20141 fi
20142
20143 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20144  JPEG_EXES='$(JPEG_EXES)'
20145 fi
20146
20147
20148 # Another substitution in the XScreenSaver.ad.in file:
20149 #
20150 if test "$gnome_open_program" != ''; then
20151   GNOME24=''
20152   GNOME22='!    '
20153   NOGNOME='!    '
20154 elif test "$gnome_url_show_program" != ''; then
20155   GNOME24='!    '
20156   GNOME22=''
20157   NOGNOME='!    '
20158 else
20159   GNOME24='!    '
20160   GNOME22='!    '
20161   NOGNOME=''
20162 fi
20163
20164
20165 # Set PO_DATADIR to something sensible.
20166 #
20167 { echo "$as_me:$LINENO: checking for locale directory" >&5
20168 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20169 if test -n "$GTK_DATADIR" ; then
20170   PO_DATADIR="$GTK_DATADIR"
20171 elif test "$have_gtk" = yes; then
20172   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20173   PO_DATADIR="$PO_DATADIR/share"
20174 fi
20175
20176 if test -z "$PO_DATADIR" ; then
20177   #
20178   # #### Total fucking kludge --
20179   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20180   # but of course we need to expand all the nested variables to do that...
20181   #
20182   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20183   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20184 fi
20185
20186 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20187 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20188
20189
20190 # canonicalize slashes.
20191 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20192
20193 # gcc 3.0 likes to issue this warning for every file:
20194 #
20195 # cc1: warning: changing search order for system directory "/usr/local/include"
20196 # cc1: warning:   as it has already been specified as a non-system directory
20197 #
20198 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20199 # Which *should* be totally redundant, and thus an ok thing to delete?
20200 #
20201 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20202
20203
20204 ###############################################################################
20205 #
20206 #       Perform substitutions and write Makefiles.
20207 #
20208 ###############################################################################
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272 APPDEFAULTS=$ac_x_app_defaults
20273
20274
20275
20276
20277
20278
20279
20280 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20281
20282 cat >confcache <<\_ACEOF
20283 # This file is a shell script that caches the results of configure
20284 # tests run on this system so they can be shared between configure
20285 # scripts and configure runs, see configure's option --config-cache.
20286 # It is not useful on other systems.  If it contains results you don't
20287 # want to keep, you may remove or edit it.
20288 #
20289 # config.status only pays attention to the cache file if you give it
20290 # the --recheck option to rerun configure.
20291 #
20292 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20293 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20294 # following values.
20295
20296 _ACEOF
20297
20298 # The following way of writing the cache mishandles newlines in values,
20299 # but we know of no workaround that is simple, portable, and efficient.
20300 # So, we kill variables containing newlines.
20301 # Ultrix sh set writes to stderr and can't be redirected directly,
20302 # and sets the high bit in the cache file unless we assign to the vars.
20303 (
20304   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20305     eval ac_val=\$$ac_var
20306     case $ac_val in #(
20307     *${as_nl}*)
20308       case $ac_var in #(
20309       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20310 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20311       esac
20312       case $ac_var in #(
20313       _ | IFS | as_nl) ;; #(
20314       *) $as_unset $ac_var ;;
20315       esac ;;
20316     esac
20317   done
20318
20319   (set) 2>&1 |
20320     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20321     *${as_nl}ac_space=\ *)
20322       # `set' does not quote correctly, so add quotes (double-quote
20323       # substitution turns \\\\ into \\, and sed turns \\ into \).
20324       sed -n \
20325         "s/'/'\\\\''/g;
20326           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20327       ;; #(
20328     *)
20329       # `set' quotes correctly as required by POSIX, so do not add quotes.
20330       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20331       ;;
20332     esac |
20333     sort
20334 ) |
20335   sed '
20336      /^ac_cv_env_/b end
20337      t clear
20338      :clear
20339      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20340      t end
20341      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20342      :end' >>confcache
20343 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20344   if test -w "$cache_file"; then
20345     test "x$cache_file" != "x/dev/null" &&
20346       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20347 echo "$as_me: updating cache $cache_file" >&6;}
20348     cat confcache >$cache_file
20349   else
20350     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20351 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20352   fi
20353 fi
20354 rm -f confcache
20355
20356 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20357 # Let make expand exec_prefix.
20358 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20359
20360 DEFS=-DHAVE_CONFIG_H
20361
20362 ac_libobjs=
20363 ac_ltlibobjs=
20364 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20365   # 1. Remove the extension, and $U if already installed.
20366   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20367   ac_i=`echo "$ac_i" | sed "$ac_script"`
20368   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20369   #    will be set to the directory where LIBOBJS objects are built.
20370   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20371   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20372 done
20373 LIBOBJS=$ac_libobjs
20374
20375 LTLIBOBJS=$ac_ltlibobjs
20376
20377
20378
20379
20380         mv -f po/POTFILES po/POTFILES.tmp
20381         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20382         rm -f po/POTFILES.tmp
20383
20384
20385
20386 : ${CONFIG_STATUS=./config.status}
20387 ac_clean_files_save=$ac_clean_files
20388 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20389 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20390 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20391 cat >$CONFIG_STATUS <<_ACEOF
20392 #! $SHELL
20393 # Generated by $as_me.
20394 # Run this file to recreate the current configuration.
20395 # Compiler output produced by configure, useful for debugging
20396 # configure, is in config.log if it exists.
20397
20398 debug=false
20399 ac_cs_recheck=false
20400 ac_cs_silent=false
20401 SHELL=\${CONFIG_SHELL-$SHELL}
20402 _ACEOF
20403
20404 cat >>$CONFIG_STATUS <<\_ACEOF
20405 ## --------------------- ##
20406 ## M4sh Initialization.  ##
20407 ## --------------------- ##
20408
20409 # Be more Bourne compatible
20410 DUALCASE=1; export DUALCASE # for MKS sh
20411 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20412   emulate sh
20413   NULLCMD=:
20414   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20415   # is contrary to our usage.  Disable this feature.
20416   alias -g '${1+"$@"}'='"$@"'
20417   setopt NO_GLOB_SUBST
20418 else
20419   case `(set -o) 2>/dev/null` in
20420   *posix*) set -o posix ;;
20421 esac
20422
20423 fi
20424
20425
20426
20427
20428 # PATH needs CR
20429 # Avoid depending upon Character Ranges.
20430 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20431 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20432 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20433 as_cr_digits='0123456789'
20434 as_cr_alnum=$as_cr_Letters$as_cr_digits
20435
20436 # The user is always right.
20437 if test "${PATH_SEPARATOR+set}" != set; then
20438   echo "#! /bin/sh" >conf$$.sh
20439   echo  "exit 0"   >>conf$$.sh
20440   chmod +x conf$$.sh
20441   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20442     PATH_SEPARATOR=';'
20443   else
20444     PATH_SEPARATOR=:
20445   fi
20446   rm -f conf$$.sh
20447 fi
20448
20449 # Support unset when possible.
20450 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20451   as_unset=unset
20452 else
20453   as_unset=false
20454 fi
20455
20456
20457 # IFS
20458 # We need space, tab and new line, in precisely that order.  Quoting is
20459 # there to prevent editors from complaining about space-tab.
20460 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20461 # splitting by setting IFS to empty value.)
20462 as_nl='
20463 '
20464 IFS=" ""        $as_nl"
20465
20466 # Find who we are.  Look in the path if we contain no directory separator.
20467 case $0 in
20468   *[\\/]* ) as_myself=$0 ;;
20469   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20470 for as_dir in $PATH
20471 do
20472   IFS=$as_save_IFS
20473   test -z "$as_dir" && as_dir=.
20474   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20475 done
20476 IFS=$as_save_IFS
20477
20478      ;;
20479 esac
20480 # We did not find ourselves, most probably we were run as `sh COMMAND'
20481 # in which case we are not to be found in the path.
20482 if test "x$as_myself" = x; then
20483   as_myself=$0
20484 fi
20485 if test ! -f "$as_myself"; then
20486   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20487   { (exit 1); exit 1; }
20488 fi
20489
20490 # Work around bugs in pre-3.0 UWIN ksh.
20491 for as_var in ENV MAIL MAILPATH
20492 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20493 done
20494 PS1='$ '
20495 PS2='> '
20496 PS4='+ '
20497
20498 # NLS nuisances.
20499 for as_var in \
20500   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20501   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20502   LC_TELEPHONE LC_TIME
20503 do
20504   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20505     eval $as_var=C; export $as_var
20506   else
20507     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20508   fi
20509 done
20510
20511 # Required to use basename.
20512 if expr a : '\(a\)' >/dev/null 2>&1 &&
20513    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20514   as_expr=expr
20515 else
20516   as_expr=false
20517 fi
20518
20519 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20520   as_basename=basename
20521 else
20522   as_basename=false
20523 fi
20524
20525
20526 # Name of the executable.
20527 as_me=`$as_basename -- "$0" ||
20528 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20529          X"$0" : 'X\(//\)$' \| \
20530          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20531 echo X/"$0" |
20532     sed '/^.*\/\([^/][^/]*\)\/*$/{
20533             s//\1/
20534             q
20535           }
20536           /^X\/\(\/\/\)$/{
20537             s//\1/
20538             q
20539           }
20540           /^X\/\(\/\).*/{
20541             s//\1/
20542             q
20543           }
20544           s/.*/./; q'`
20545
20546 # CDPATH.
20547 $as_unset CDPATH
20548
20549
20550
20551   as_lineno_1=$LINENO
20552   as_lineno_2=$LINENO
20553   test "x$as_lineno_1" != "x$as_lineno_2" &&
20554   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20555
20556   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20557   # uniformly replaced by the line number.  The first 'sed' inserts a
20558   # line-number line after each line using $LINENO; the second 'sed'
20559   # does the real work.  The second script uses 'N' to pair each
20560   # line-number line with the line containing $LINENO, and appends
20561   # trailing '-' during substitution so that $LINENO is not a special
20562   # case at line end.
20563   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20564   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20565   # E. McMahon (1931-1989) for sed's syntax.  :-)
20566   sed -n '
20567     p
20568     /[$]LINENO/=
20569   ' <$as_myself |
20570     sed '
20571       s/[$]LINENO.*/&-/
20572       t lineno
20573       b
20574       :lineno
20575       N
20576       :loop
20577       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20578       t loop
20579       s/-\n.*//
20580     ' >$as_me.lineno &&
20581   chmod +x "$as_me.lineno" ||
20582     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20583    { (exit 1); exit 1; }; }
20584
20585   # Don't try to exec as it changes $[0], causing all sort of problems
20586   # (the dirname of $[0] is not the place where we might find the
20587   # original and so on.  Autoconf is especially sensitive to this).
20588   . "./$as_me.lineno"
20589   # Exit status is that of the last command.
20590   exit
20591 }
20592
20593
20594 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20595   as_dirname=dirname
20596 else
20597   as_dirname=false
20598 fi
20599
20600 ECHO_C= ECHO_N= ECHO_T=
20601 case `echo -n x` in
20602 -n*)
20603   case `echo 'x\c'` in
20604   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20605   *)   ECHO_C='\c';;
20606   esac;;
20607 *)
20608   ECHO_N='-n';;
20609 esac
20610
20611 if expr a : '\(a\)' >/dev/null 2>&1 &&
20612    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20613   as_expr=expr
20614 else
20615   as_expr=false
20616 fi
20617
20618 rm -f conf$$ conf$$.exe conf$$.file
20619 if test -d conf$$.dir; then
20620   rm -f conf$$.dir/conf$$.file
20621 else
20622   rm -f conf$$.dir
20623   mkdir conf$$.dir
20624 fi
20625 echo >conf$$.file
20626 if ln -s conf$$.file conf$$ 2>/dev/null; then
20627   as_ln_s='ln -s'
20628   # ... but there are two gotchas:
20629   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20630   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20631   # In both cases, we have to default to `cp -p'.
20632   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20633     as_ln_s='cp -p'
20634 elif ln conf$$.file conf$$ 2>/dev/null; then
20635   as_ln_s=ln
20636 else
20637   as_ln_s='cp -p'
20638 fi
20639 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20640 rmdir conf$$.dir 2>/dev/null
20641
20642 if mkdir -p . 2>/dev/null; then
20643   as_mkdir_p=:
20644 else
20645   test -d ./-p && rmdir ./-p
20646   as_mkdir_p=false
20647 fi
20648
20649 if test -x / >/dev/null 2>&1; then
20650   as_test_x='test -x'
20651 else
20652   if ls -dL / >/dev/null 2>&1; then
20653     as_ls_L_option=L
20654   else
20655     as_ls_L_option=
20656   fi
20657   as_test_x='
20658     eval sh -c '\''
20659       if test -d "$1"; then
20660         test -d "$1/.";
20661       else
20662         case $1 in
20663         -*)set "./$1";;
20664         esac;
20665         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20666         ???[sx]*):;;*)false;;esac;fi
20667     '\'' sh
20668   '
20669 fi
20670 as_executable_p=$as_test_x
20671
20672 # Sed expression to map a string onto a valid CPP name.
20673 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20674
20675 # Sed expression to map a string onto a valid variable name.
20676 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20677
20678
20679 exec 6>&1
20680
20681 # Save the log message, to keep $[0] and so on meaningful, and to
20682 # report actual input values of CONFIG_FILES etc. instead of their
20683 # values after options handling.
20684 ac_log="
20685 This file was extended by $as_me, which was
20686 generated by GNU Autoconf 2.61.  Invocation command line was
20687
20688   CONFIG_FILES    = $CONFIG_FILES
20689   CONFIG_HEADERS  = $CONFIG_HEADERS
20690   CONFIG_LINKS    = $CONFIG_LINKS
20691   CONFIG_COMMANDS = $CONFIG_COMMANDS
20692   $ $0 $@
20693
20694 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20695 "
20696
20697 _ACEOF
20698
20699 cat >>$CONFIG_STATUS <<_ACEOF
20700 # Files that config.status was made for.
20701 config_files="$ac_config_files"
20702 config_headers="$ac_config_headers"
20703 config_commands="$ac_config_commands"
20704
20705 _ACEOF
20706
20707 cat >>$CONFIG_STATUS <<\_ACEOF
20708 ac_cs_usage="\
20709 \`$as_me' instantiates files from templates according to the
20710 current configuration.
20711
20712 Usage: $0 [OPTIONS] [FILE]...
20713
20714   -h, --help       print this help, then exit
20715   -V, --version    print version number and configuration settings, then exit
20716   -q, --quiet      do not print progress messages
20717   -d, --debug      don't remove temporary files
20718       --recheck    update $as_me by reconfiguring in the same conditions
20719   --file=FILE[:TEMPLATE]
20720                    instantiate the configuration file FILE
20721   --header=FILE[:TEMPLATE]
20722                    instantiate the configuration header FILE
20723
20724 Configuration files:
20725 $config_files
20726
20727 Configuration headers:
20728 $config_headers
20729
20730 Configuration commands:
20731 $config_commands
20732
20733 Report bugs to <bug-autoconf@gnu.org>."
20734
20735 _ACEOF
20736 cat >>$CONFIG_STATUS <<_ACEOF
20737 ac_cs_version="\\
20738 config.status
20739 configured by $0, generated by GNU Autoconf 2.61,
20740   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20741
20742 Copyright (C) 2006 Free Software Foundation, Inc.
20743 This config.status script is free software; the Free Software Foundation
20744 gives unlimited permission to copy, distribute and modify it."
20745
20746 ac_pwd='$ac_pwd'
20747 srcdir='$srcdir'
20748 INSTALL='$INSTALL'
20749 _ACEOF
20750
20751 cat >>$CONFIG_STATUS <<\_ACEOF
20752 # If no file are specified by the user, then we need to provide default
20753 # value.  By we need to know if files were specified by the user.
20754 ac_need_defaults=:
20755 while test $# != 0
20756 do
20757   case $1 in
20758   --*=*)
20759     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20760     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20761     ac_shift=:
20762     ;;
20763   *)
20764     ac_option=$1
20765     ac_optarg=$2
20766     ac_shift=shift
20767     ;;
20768   esac
20769
20770   case $ac_option in
20771   # Handling of the options.
20772   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20773     ac_cs_recheck=: ;;
20774   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20775     echo "$ac_cs_version"; exit ;;
20776   --debug | --debu | --deb | --de | --d | -d )
20777     debug=: ;;
20778   --file | --fil | --fi | --f )
20779     $ac_shift
20780     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20781     ac_need_defaults=false;;
20782   --header | --heade | --head | --hea )
20783     $ac_shift
20784     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20785     ac_need_defaults=false;;
20786   --he | --h)
20787     # Conflict between --help and --header
20788     { echo "$as_me: error: ambiguous option: $1
20789 Try \`$0 --help' for more information." >&2
20790    { (exit 1); exit 1; }; };;
20791   --help | --hel | -h )
20792     echo "$ac_cs_usage"; exit ;;
20793   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20794   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20795     ac_cs_silent=: ;;
20796
20797   # This is an error.
20798   -*) { echo "$as_me: error: unrecognized option: $1
20799 Try \`$0 --help' for more information." >&2
20800    { (exit 1); exit 1; }; } ;;
20801
20802   *) ac_config_targets="$ac_config_targets $1"
20803      ac_need_defaults=false ;;
20804
20805   esac
20806   shift
20807 done
20808
20809 ac_configure_extra_args=
20810
20811 if $ac_cs_silent; then
20812   exec 6>/dev/null
20813   ac_configure_extra_args="$ac_configure_extra_args --silent"
20814 fi
20815
20816 _ACEOF
20817 cat >>$CONFIG_STATUS <<_ACEOF
20818 if \$ac_cs_recheck; then
20819   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20820   CONFIG_SHELL=$SHELL
20821   export CONFIG_SHELL
20822   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20823 fi
20824
20825 _ACEOF
20826 cat >>$CONFIG_STATUS <<\_ACEOF
20827 exec 5>>config.log
20828 {
20829   echo
20830   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20831 ## Running $as_me. ##
20832 _ASBOX
20833   echo "$ac_log"
20834 } >&5
20835
20836 _ACEOF
20837 cat >>$CONFIG_STATUS <<_ACEOF
20838 #
20839 # INIT-COMMANDS
20840 #
20841 INTLTOOL_PERL=${INTLTOOL_PERL}
20842
20843
20844 _ACEOF
20845
20846 cat >>$CONFIG_STATUS <<\_ACEOF
20847
20848 # Handling of arguments.
20849 for ac_config_target in $ac_config_targets
20850 do
20851   case $ac_config_target in
20852     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20853     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20854     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20855     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20856     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20857     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20858     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20859     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20860     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20861     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20862
20863   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20864 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20865    { (exit 1); exit 1; }; };;
20866   esac
20867 done
20868
20869
20870 # If the user did not use the arguments to specify the items to instantiate,
20871 # then the envvar interface is used.  Set only those that are not.
20872 # We use the long form for the default assignment because of an extremely
20873 # bizarre bug on SunOS 4.1.3.
20874 if $ac_need_defaults; then
20875   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20876   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20877   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20878 fi
20879
20880 # Have a temporary directory for convenience.  Make it in the build tree
20881 # simply because there is no reason against having it here, and in addition,
20882 # creating and moving files from /tmp can sometimes cause problems.
20883 # Hook for its removal unless debugging.
20884 # Note that there is a small window in which the directory will not be cleaned:
20885 # after its creation but before its name has been assigned to `$tmp'.
20886 $debug ||
20887 {
20888   tmp=
20889   trap 'exit_status=$?
20890   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
20891 ' 0
20892   trap '{ (exit 1); exit 1; }' 1 2 13 15
20893 }
20894 # Create a (secure) tmp directory for tmp files.
20895
20896 {
20897   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20898   test -n "$tmp" && test -d "$tmp"
20899 }  ||
20900 {
20901   tmp=./conf$$-$RANDOM
20902   (umask 077 && mkdir "$tmp")
20903 } ||
20904 {
20905    echo "$me: cannot create a temporary directory in ." >&2
20906    { (exit 1); exit 1; }
20907 }
20908
20909 #
20910 # Set up the sed scripts for CONFIG_FILES section.
20911 #
20912
20913 # No need to generate the scripts if there are no CONFIG_FILES.
20914 # This happens for instance when ./config.status config.h
20915 if test -n "$CONFIG_FILES"; then
20916
20917 _ACEOF
20918
20919
20920
20921 ac_delim='%!_!# '
20922 for ac_last_try in false false false false false :; do
20923   cat >conf$$subs.sed <<_ACEOF
20924 SHELL!$SHELL$ac_delim
20925 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
20926 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
20927 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
20928 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
20929 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
20930 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
20931 exec_prefix!$exec_prefix$ac_delim
20932 prefix!$prefix$ac_delim
20933 program_transform_name!$program_transform_name$ac_delim
20934 bindir!$bindir$ac_delim
20935 sbindir!$sbindir$ac_delim
20936 libexecdir!$libexecdir$ac_delim
20937 datarootdir!$datarootdir$ac_delim
20938 datadir!$datadir$ac_delim
20939 sysconfdir!$sysconfdir$ac_delim
20940 sharedstatedir!$sharedstatedir$ac_delim
20941 localstatedir!$localstatedir$ac_delim
20942 includedir!$includedir$ac_delim
20943 oldincludedir!$oldincludedir$ac_delim
20944 docdir!$docdir$ac_delim
20945 infodir!$infodir$ac_delim
20946 htmldir!$htmldir$ac_delim
20947 dvidir!$dvidir$ac_delim
20948 pdfdir!$pdfdir$ac_delim
20949 psdir!$psdir$ac_delim
20950 libdir!$libdir$ac_delim
20951 localedir!$localedir$ac_delim
20952 mandir!$mandir$ac_delim
20953 DEFS!$DEFS$ac_delim
20954 ECHO_C!$ECHO_C$ac_delim
20955 ECHO_N!$ECHO_N$ac_delim
20956 ECHO_T!$ECHO_T$ac_delim
20957 LIBS!$LIBS$ac_delim
20958 build_alias!$build_alias$ac_delim
20959 host_alias!$host_alias$ac_delim
20960 target_alias!$target_alias$ac_delim
20961 build!$build$ac_delim
20962 build_cpu!$build_cpu$ac_delim
20963 build_vendor!$build_vendor$ac_delim
20964 build_os!$build_os$ac_delim
20965 host!$host$ac_delim
20966 host_cpu!$host_cpu$ac_delim
20967 host_vendor!$host_vendor$ac_delim
20968 host_os!$host_os$ac_delim
20969 CC!$CC$ac_delim
20970 CFLAGS!$CFLAGS$ac_delim
20971 LDFLAGS!$LDFLAGS$ac_delim
20972 CPPFLAGS!$CPPFLAGS$ac_delim
20973 ac_ct_CC!$ac_ct_CC$ac_delim
20974 EXEEXT!$EXEEXT$ac_delim
20975 OBJEXT!$OBJEXT$ac_delim
20976 CPP!$CPP$ac_delim
20977 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
20978 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
20979 INSTALL_DATA!$INSTALL_DATA$ac_delim
20980 SET_MAKE!$SET_MAKE$ac_delim
20981 GREP!$GREP$ac_delim
20982 EGREP!$EGREP$ac_delim
20983 PERL!$PERL$ac_delim
20984 XMKMF!$XMKMF$ac_delim
20985 X_CFLAGS!$X_CFLAGS$ac_delim
20986 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
20987 X_LIBS!$X_LIBS$ac_delim
20988 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
20989 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
20990 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
20991 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
20992 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
20993 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
20994 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
20995 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
20996 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
20997 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
20998 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
20999 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21000 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21001 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21002 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21003 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21004 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21005 RANLIB!$RANLIB$ac_delim
21006 ALLOCA!$ALLOCA$ac_delim
21007 USE_NLS!$USE_NLS$ac_delim
21008 MSGFMT!$MSGFMT$ac_delim
21009 GMSGFMT!$GMSGFMT$ac_delim
21010 XGETTEXT!$XGETTEXT$ac_delim
21011 CATALOGS!$CATALOGS$ac_delim
21012 CATOBJEXT!$CATOBJEXT$ac_delim
21013 DATADIRNAME!$DATADIRNAME$ac_delim
21014 GMOFILES!$GMOFILES$ac_delim
21015 INSTOBJEXT!$INSTOBJEXT$ac_delim
21016 INTLDEPS!$INTLDEPS$ac_delim
21017 INTLLIBS!$INTLLIBS$ac_delim
21018 INTLOBJS!$INTLOBJS$ac_delim
21019 POFILES!$POFILES$ac_delim
21020 POSUB!$POSUB$ac_delim
21021 _ACEOF
21022
21023   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21024     break
21025   elif $ac_last_try; then
21026     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21027 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21028    { (exit 1); exit 1; }; }
21029   else
21030     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21031   fi
21032 done
21033
21034 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21035 if test -n "$ac_eof"; then
21036   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21037   ac_eof=`expr $ac_eof + 1`
21038 fi
21039
21040 cat >>$CONFIG_STATUS <<_ACEOF
21041 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21042 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21043 _ACEOF
21044 sed '
21045 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21046 s/^/s,@/; s/!/@,|#_!!_#|/
21047 :n
21048 t n
21049 s/'"$ac_delim"'$/,g/; t
21050 s/$/\\/; p
21051 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21052 ' >>$CONFIG_STATUS <conf$$subs.sed
21053 rm -f conf$$subs.sed
21054 cat >>$CONFIG_STATUS <<_ACEOF
21055 CEOF$ac_eof
21056 _ACEOF
21057
21058
21059 ac_delim='%!_!# '
21060 for ac_last_try in false false false false false :; do
21061   cat >conf$$subs.sed <<_ACEOF
21062 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21063 login_manager_tmp!$login_manager_tmp$ac_delim
21064 pkg_config!$pkg_config$ac_delim
21065 gnome_open_program!$gnome_open_program$ac_delim
21066 gnome_url_show_program!$gnome_url_show_program$ac_delim
21067 INCLUDES!$INCLUDES$ac_delim
21068 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21069 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21070 SAVER_LIBS!$SAVER_LIBS$ac_delim
21071 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21072 GTK_LIBS!$GTK_LIBS$ac_delim
21073 XML_LIBS!$XML_LIBS$ac_delim
21074 JPEG_LIBS!$JPEG_LIBS$ac_delim
21075 HACK_LIBS!$HACK_LIBS$ac_delim
21076 XPM_LIBS!$XPM_LIBS$ac_delim
21077 PTY_LIBS!$PTY_LIBS$ac_delim
21078 GL_LIBS!$GL_LIBS$ac_delim
21079 GLE_LIBS!$GLE_LIBS$ac_delim
21080 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21081 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21082 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21083 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21084 SETUID_HACKS!$SETUID_HACKS$ac_delim
21085 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21086 NEED_SETUID!$NEED_SETUID$ac_delim
21087 INSTALL_PAM!$INSTALL_PAM$ac_delim
21088 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21089 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21090 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21091 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21092 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21093 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21094 WITH_BROWSER!$WITH_BROWSER$ac_delim
21095 OBJCC!$OBJCC$ac_delim
21096 EXES_OSX!$EXES_OSX$ac_delim
21097 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21098 MEN_OSX!$MEN_OSX$ac_delim
21099 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21100 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21101 XMU_SRCS!$XMU_SRCS$ac_delim
21102 XMU_OBJS!$XMU_OBJS$ac_delim
21103 XMU_LIBS!$XMU_LIBS$ac_delim
21104 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21105 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21106 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21107 LOCK_SRCS!$LOCK_SRCS$ac_delim
21108 LOCK_OBJS!$LOCK_OBJS$ac_delim
21109 JPEG_EXES!$JPEG_EXES$ac_delim
21110 GL_EXES!$GL_EXES$ac_delim
21111 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21112 GL_MEN!$GL_MEN$ac_delim
21113 GL_KLUDGE!$GL_KLUDGE$ac_delim
21114 GLE_EXES!$GLE_EXES$ac_delim
21115 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21116 GNOME24!$GNOME24$ac_delim
21117 GNOME22!$GNOME22$ac_delim
21118 NOGNOME!$NOGNOME$ac_delim
21119 HACKDIR!$HACKDIR$ac_delim
21120 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21121 GTK_DATADIR!$GTK_DATADIR$ac_delim
21122 PO_DATADIR!$PO_DATADIR$ac_delim
21123 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21124 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21125 APPDEFAULTS!$APPDEFAULTS$ac_delim
21126 DEPEND!$DEPEND$ac_delim
21127 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21128 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21129 LIBOBJS!$LIBOBJS$ac_delim
21130 LTLIBOBJS!$LTLIBOBJS$ac_delim
21131 _ACEOF
21132
21133   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
21134     break
21135   elif $ac_last_try; then
21136     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21137 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21138    { (exit 1); exit 1; }; }
21139   else
21140     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21141   fi
21142 done
21143
21144 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21145 if test -n "$ac_eof"; then
21146   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21147   ac_eof=`expr $ac_eof + 1`
21148 fi
21149
21150 cat >>$CONFIG_STATUS <<_ACEOF
21151 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21152 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21153 _ACEOF
21154 sed '
21155 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21156 s/^/s,@/; s/!/@,|#_!!_#|/
21157 :n
21158 t n
21159 s/'"$ac_delim"'$/,g/; t
21160 s/$/\\/; p
21161 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21162 ' >>$CONFIG_STATUS <conf$$subs.sed
21163 rm -f conf$$subs.sed
21164 cat >>$CONFIG_STATUS <<_ACEOF
21165 :end
21166 s/|#_!!_#|//g
21167 CEOF$ac_eof
21168 _ACEOF
21169
21170
21171 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21172 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21173 # trailing colons and then remove the whole line if VPATH becomes empty
21174 # (actually we leave an empty line to preserve line numbers).
21175 if test "x$srcdir" = x.; then
21176   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21177 s/:*\$(srcdir):*/:/
21178 s/:*\${srcdir}:*/:/
21179 s/:*@srcdir@:*/:/
21180 s/^\([^=]*=[     ]*\):*/\1/
21181 s/:*$//
21182 s/^[^=]*=[       ]*$//
21183 }'
21184 fi
21185
21186 cat >>$CONFIG_STATUS <<\_ACEOF
21187 fi # test -n "$CONFIG_FILES"
21188
21189
21190 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21191 do
21192   case $ac_tag in
21193   :[FHLC]) ac_mode=$ac_tag; continue;;
21194   esac
21195   case $ac_mode$ac_tag in
21196   :[FHL]*:*);;
21197   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21198 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21199    { (exit 1); exit 1; }; };;
21200   :[FH]-) ac_tag=-:-;;
21201   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21202   esac
21203   ac_save_IFS=$IFS
21204   IFS=:
21205   set x $ac_tag
21206   IFS=$ac_save_IFS
21207   shift
21208   ac_file=$1
21209   shift
21210
21211   case $ac_mode in
21212   :L) ac_source=$1;;
21213   :[FH])
21214     ac_file_inputs=
21215     for ac_f
21216     do
21217       case $ac_f in
21218       -) ac_f="$tmp/stdin";;
21219       *) # Look for the file first in the build tree, then in the source tree
21220          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21221          # because $ac_f cannot contain `:'.
21222          test -f "$ac_f" ||
21223            case $ac_f in
21224            [\\/$]*) false;;
21225            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21226            esac ||
21227            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21228 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21229    { (exit 1); exit 1; }; };;
21230       esac
21231       ac_file_inputs="$ac_file_inputs $ac_f"
21232     done
21233
21234     # Let's still pretend it is `configure' which instantiates (i.e., don't
21235     # use $as_me), people would be surprised to read:
21236     #    /* config.h.  Generated by config.status.  */
21237     configure_input="Generated from "`IFS=:
21238           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21239     if test x"$ac_file" != x-; then
21240       configure_input="$ac_file.  $configure_input"
21241       { echo "$as_me:$LINENO: creating $ac_file" >&5
21242 echo "$as_me: creating $ac_file" >&6;}
21243     fi
21244
21245     case $ac_tag in
21246     *:-:* | *:-) cat >"$tmp/stdin";;
21247     esac
21248     ;;
21249   esac
21250
21251   ac_dir=`$as_dirname -- "$ac_file" ||
21252 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21253          X"$ac_file" : 'X\(//\)[^/]' \| \
21254          X"$ac_file" : 'X\(//\)$' \| \
21255          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21256 echo X"$ac_file" |
21257     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21258             s//\1/
21259             q
21260           }
21261           /^X\(\/\/\)[^/].*/{
21262             s//\1/
21263             q
21264           }
21265           /^X\(\/\/\)$/{
21266             s//\1/
21267             q
21268           }
21269           /^X\(\/\).*/{
21270             s//\1/
21271             q
21272           }
21273           s/.*/./; q'`
21274   { as_dir="$ac_dir"
21275   case $as_dir in #(
21276   -*) as_dir=./$as_dir;;
21277   esac
21278   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21279     as_dirs=
21280     while :; do
21281       case $as_dir in #(
21282       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21283       *) as_qdir=$as_dir;;
21284       esac
21285       as_dirs="'$as_qdir' $as_dirs"
21286       as_dir=`$as_dirname -- "$as_dir" ||
21287 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21288          X"$as_dir" : 'X\(//\)[^/]' \| \
21289          X"$as_dir" : 'X\(//\)$' \| \
21290          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21291 echo X"$as_dir" |
21292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21293             s//\1/
21294             q
21295           }
21296           /^X\(\/\/\)[^/].*/{
21297             s//\1/
21298             q
21299           }
21300           /^X\(\/\/\)$/{
21301             s//\1/
21302             q
21303           }
21304           /^X\(\/\).*/{
21305             s//\1/
21306             q
21307           }
21308           s/.*/./; q'`
21309       test -d "$as_dir" && break
21310     done
21311     test -z "$as_dirs" || eval "mkdir $as_dirs"
21312   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21313 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21314    { (exit 1); exit 1; }; }; }
21315   ac_builddir=.
21316
21317 case "$ac_dir" in
21318 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21319 *)
21320   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21321   # A ".." for each directory in $ac_dir_suffix.
21322   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21323   case $ac_top_builddir_sub in
21324   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21325   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21326   esac ;;
21327 esac
21328 ac_abs_top_builddir=$ac_pwd
21329 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21330 # for backward compatibility:
21331 ac_top_builddir=$ac_top_build_prefix
21332
21333 case $srcdir in
21334   .)  # We are building in place.
21335     ac_srcdir=.
21336     ac_top_srcdir=$ac_top_builddir_sub
21337     ac_abs_top_srcdir=$ac_pwd ;;
21338   [\\/]* | ?:[\\/]* )  # Absolute name.
21339     ac_srcdir=$srcdir$ac_dir_suffix;
21340     ac_top_srcdir=$srcdir
21341     ac_abs_top_srcdir=$srcdir ;;
21342   *) # Relative name.
21343     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21344     ac_top_srcdir=$ac_top_build_prefix$srcdir
21345     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21346 esac
21347 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21348
21349
21350   case $ac_mode in
21351   :F)
21352   #
21353   # CONFIG_FILE
21354   #
21355
21356   case $INSTALL in
21357   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21358   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21359   esac
21360 _ACEOF
21361
21362 cat >>$CONFIG_STATUS <<\_ACEOF
21363 # If the template does not know about datarootdir, expand it.
21364 # FIXME: This hack should be removed a few years after 2.60.
21365 ac_datarootdir_hack=; ac_datarootdir_seen=
21366
21367 case `sed -n '/datarootdir/ {
21368   p
21369   q
21370 }
21371 /@datadir@/p
21372 /@docdir@/p
21373 /@infodir@/p
21374 /@localedir@/p
21375 /@mandir@/p
21376 ' $ac_file_inputs` in
21377 *datarootdir*) ac_datarootdir_seen=yes;;
21378 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21379   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21380 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21381 _ACEOF
21382 cat >>$CONFIG_STATUS <<_ACEOF
21383   ac_datarootdir_hack='
21384   s&@datadir@&$datadir&g
21385   s&@docdir@&$docdir&g
21386   s&@infodir@&$infodir&g
21387   s&@localedir@&$localedir&g
21388   s&@mandir@&$mandir&g
21389     s&\\\${datarootdir}&$datarootdir&g' ;;
21390 esac
21391 _ACEOF
21392
21393 # Neutralize VPATH when `$srcdir' = `.'.
21394 # Shell code in configure.ac might set extrasub.
21395 # FIXME: do we really want to maintain this feature?
21396 cat >>$CONFIG_STATUS <<_ACEOF
21397   sed "$ac_vpsub
21398 $extrasub
21399 _ACEOF
21400 cat >>$CONFIG_STATUS <<\_ACEOF
21401 :t
21402 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21403 s&@configure_input@&$configure_input&;t t
21404 s&@top_builddir@&$ac_top_builddir_sub&;t t
21405 s&@srcdir@&$ac_srcdir&;t t
21406 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21407 s&@top_srcdir@&$ac_top_srcdir&;t t
21408 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21409 s&@builddir@&$ac_builddir&;t t
21410 s&@abs_builddir@&$ac_abs_builddir&;t t
21411 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21412 s&@INSTALL@&$ac_INSTALL&;t t
21413 $ac_datarootdir_hack
21414 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21415
21416 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21417   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21418   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21419   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21420 which seems to be undefined.  Please make sure it is defined." >&5
21421 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21422 which seems to be undefined.  Please make sure it is defined." >&2;}
21423
21424   rm -f "$tmp/stdin"
21425   case $ac_file in
21426   -) cat "$tmp/out"; rm -f "$tmp/out";;
21427   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21428   esac
21429  ;;
21430   :H)
21431   #
21432   # CONFIG_HEADER
21433   #
21434 _ACEOF
21435
21436 # Transform confdefs.h into a sed script `conftest.defines', that
21437 # substitutes the proper values into config.h.in to produce config.h.
21438 rm -rf conftest.defines conftest.tail
21439 # First, append a space to every undef/define line, to ease matching.
21440 echo 's/$/ /' >conftest.defines
21441 # Then, protect against being on the right side of a sed subst, or in
21442 # an unquoted here document, in config.status.  If some macros were
21443 # called several times there might be several #defines for the same
21444 # symbol, which is useless.  But do not sort them, since the last
21445 # AC_DEFINE must be honored.
21446 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21447 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21448 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21449 # PARAMS is the parameter list in the macro definition--in most cases, it's
21450 # just an empty string.
21451 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21452 ac_dB='\\)[      (].*,\\1define\\2'
21453 ac_dC=' '
21454 ac_dD=' ,'
21455
21456 uniq confdefs.h |
21457   sed -n '
21458         t rset
21459         :rset
21460         s/^[     ]*#[    ]*define[       ][      ]*//
21461         t ok
21462         d
21463         :ok
21464         s/[\\&,]/\\&/g
21465         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21466         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21467   ' >>conftest.defines
21468
21469 # Remove the space that was appended to ease matching.
21470 # Then replace #undef with comments.  This is necessary, for
21471 # example, in the case of _POSIX_SOURCE, which is predefined and required
21472 # on some systems where configure will not decide to define it.
21473 # (The regexp can be short, since the line contains either #define or #undef.)
21474 echo 's/ $//
21475 s,^[     #]*u.*,/* & */,' >>conftest.defines
21476
21477 # Break up conftest.defines:
21478 ac_max_sed_lines=50
21479
21480 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21481 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21482 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21483 # et cetera.
21484 ac_in='$ac_file_inputs'
21485 ac_out='"$tmp/out1"'
21486 ac_nxt='"$tmp/out2"'
21487
21488 while :
21489 do
21490   # Write a here document:
21491     cat >>$CONFIG_STATUS <<_ACEOF
21492     # First, check the format of the line:
21493     cat >"\$tmp/defines.sed" <<\\CEOF
21494 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21495 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21496 b
21497 :def
21498 _ACEOF
21499   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21500   echo 'CEOF
21501     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21502   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21503   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21504   grep . conftest.tail >/dev/null || break
21505   rm -rf conftest.defines
21506   mv conftest.tail conftest.defines
21507 done
21508 rm -rf conftest.defines conftest.tail
21509
21510 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21511 cat >>$CONFIG_STATUS <<\_ACEOF
21512   if test x"$ac_file" != x-; then
21513     echo "/* $configure_input  */" >"$tmp/config.h"
21514     cat "$ac_result" >>"$tmp/config.h"
21515     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21516       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21517 echo "$as_me: $ac_file is unchanged" >&6;}
21518     else
21519       rm -f $ac_file
21520       mv "$tmp/config.h" $ac_file
21521     fi
21522   else
21523     echo "/* $configure_input  */"
21524     cat "$ac_result"
21525   fi
21526   rm -f "$tmp/out12"
21527  ;;
21528
21529   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21530 echo "$as_me: executing $ac_file commands" >&6;}
21531  ;;
21532   esac
21533
21534
21535   case $ac_file$ac_mode in
21536     "default-1":C)
21537
21538 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21539 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21540   rm -f intltool-extract.out
21541 else
21542   mv -f intltool-extract.out intltool-extract
21543 fi
21544 chmod ugo+x intltool-extract
21545 chmod u+w intltool-extract
21546
21547 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21548 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21549   rm -f intltool-merge.out
21550 else
21551   mv -f intltool-merge.out intltool-merge
21552 fi
21553 chmod ugo+x intltool-merge
21554 chmod u+w intltool-merge
21555
21556 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21557 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21558   rm -f intltool-update.out
21559 else
21560   mv -f intltool-update.out intltool-update
21561 fi
21562 chmod ugo+x intltool-update
21563 chmod u+w intltool-update
21564
21565  ;;
21566     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21567         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21568       esac ;;
21569
21570   esac
21571 done # for ac_tag
21572
21573
21574 { (exit 0); exit 0; }
21575 _ACEOF
21576 chmod +x $CONFIG_STATUS
21577 ac_clean_files=$ac_clean_files_save
21578
21579
21580 # configure is writing to config.log, and then calls config.status.
21581 # config.status does its own redirection, appending to config.log.
21582 # Unfortunately, on DOS this fails, as config.log is still kept open
21583 # by configure, so config.status won't be able to write to it; its
21584 # output is simply discarded.  So we exec the FD to /dev/null,
21585 # effectively closing config.log, so it can be properly (re)opened and
21586 # appended to by config.status.  When coming back to configure, we
21587 # need to make the FD available again.
21588 if test "$no_create" != yes; then
21589   ac_cs_success=:
21590   ac_config_status_args=
21591   test "$silent" = yes &&
21592     ac_config_status_args="$ac_config_status_args --quiet"
21593   exec 5>/dev/null
21594   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21595   exec 5>>config.log
21596   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21597   # would make configure fail if this is the last instruction.
21598   $ac_cs_success || { (exit 1); exit 1; }
21599 fi
21600
21601
21602 ###############################################################################
21603 #
21604 #       Print some warnings at the end.
21605 #
21606 ###############################################################################
21607
21608 warn_prefix_1="    Warning:"
21609 warn_prefix_2="       Note:"
21610 warn_prefix="$warn_prefix_1"
21611
21612 warning=no
21613 warnsep='    #################################################################'
21614
21615 warnpre() {
21616   if test "$warning" = no ; then
21617     echo '' ; echo "$warnsep" ; echo ''
21618     warning=yes
21619   fi
21620 }
21621
21622 warn() {
21623   warnpre
21624   if test "$warning" = long ; then echo '' ; fi
21625   warning=yes
21626   rest="$@"
21627   echo "$warn_prefix $rest"
21628 }
21629
21630 warnL() {
21631   was=$warning
21632   warnpre
21633   warning=yes
21634   if test "$was" != no ; then echo '' ; fi
21635   rest="$@"
21636   echo "$warn_prefix $rest"
21637 }
21638
21639 warn2() {
21640   rest="$@"
21641   echo "             $rest"
21642   warning=long
21643 }
21644
21645 note() {
21646   warn_prefix="$warn_prefix_2"
21647   warn $@
21648   warn_prefix="$warn_prefix_1"
21649 }
21650
21651 noteL() {
21652   warn_prefix="$warn_prefix_2"
21653   warnL $@
21654   warn_prefix="$warn_prefix_1"
21655 }
21656
21657
21658 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21659   warn 'The SGI saver extension was requested, but was not found.'
21660 fi
21661
21662 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21663   warn 'The XIdle extension was requested, but was not found.'
21664 fi
21665
21666 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21667   warn 'The XSHM extension was requested, but was not found.'
21668 fi
21669
21670 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21671   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21672 fi
21673
21674 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21675   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21676 fi
21677
21678 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21679   warn 'The DPMS extension was requested, but was not found.'
21680 fi
21681
21682 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21683   warn 'The Xinerama extension was requested, but was not found.'
21684 fi
21685
21686 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21687   warn 'The XF86VMODE extension was requested, but was not found.'
21688 fi
21689
21690 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21691   warn 'The RANDR extension was requested, but was not found.'
21692 fi
21693
21694 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21695   warn "Checking of /proc/interrupts was requested, but it's bogus."
21696 fi
21697
21698 if test "$pkg_config" = false ; then
21699   warnL 'The "pkg-config" program was not found.  Without that,'
21700   warn2 "detection of the various GTK libraries won't work."
21701 else
21702   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21703   if test "x$pkgerr" != "x" ; then
21704     warnL 'The "pkg-config" program produces errors.  This often causes'
21705     warn2 "detection of the various GTK libraries to malfunction."
21706     warn2 "The errors are:"
21707     echo ''
21708     echo "$pkgerr" | sed 's/^/             > /g'
21709   fi
21710 fi
21711
21712 if test "$gtk_halfassed" != no ; then
21713   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21714   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21715   warn2 "Perhaps some of the development packages are not installed?"
21716   if test "$have_gtk" = yes ; then
21717     v="$ac_gtk_version_string"
21718     warn2 "GTK $v is also installed, so it will be used instead."
21719     warn2 "Please read the above output and the \`config.log' file"
21720     warn2 "for more details."
21721   fi
21722 fi
21723
21724 motif_warn2() {
21725   warn2 'Though the Motif front-end to xscreensaver is still'
21726   warn2 'maintained, it is no longer being updated with new'
21727   warn2 'features: all new development on the xscreensaver-demo'
21728   warn2 'program is happening in the GTK version, and not in the'
21729   warn2 'Motif version.  It is recommended that you build against'
21730   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21731 }
21732
21733 if test "$have_motif" = no -a "$have_gtk" = no; then
21734
21735   if test "$with_motif" = yes; then
21736     warnL "Neither the GTK nor Motif libraries were found; the"
21737     warn2 "\`xscreensaver-demo' program requires one of these."
21738     echo ''
21739     motif_warn2
21740   else
21741     warnL "The GTK libraries do not seem to be available; the"
21742     warn2 "\`xscreensaver-demo' program requires them."
21743 #   echo ''
21744 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21745 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21746 #   motif_warn2
21747   fi
21748
21749 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21750   warnL "Use of Motif was requested, but it wasn't found;"
21751   warn2 "Gtk will be used instead."
21752
21753 elif test "$jurassic_gtk" = yes ; then
21754
21755   pref_gtk=2.0
21756
21757   v="$ac_gtk_version_string"
21758   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21759     warnL "Use of Gtk was requested, but its version number is unknown;"
21760   elif test "$with_gtk_req" = yes ; then
21761     warnL "Use of Gtk was requested, but it is version $v;"
21762   else
21763     warnL "Gtk was found on this system, but it is version $v;"
21764   fi
21765
21766   warn2 "Gtk $pref_gtk or newer is required."
21767
21768 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21769   warnL "Use of Gtk was requested, but it wasn't found."
21770 fi
21771
21772
21773 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21774   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21775   warn2 "headers were not found.  That can't be good.  Please"
21776   warn2 "install the GDK-Pixbuf development kit and re-configure."
21777 fi
21778
21779 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21780
21781   preferred_lesstif=0.92
21782
21783   if test "$lesstif_version" = unknown; then
21784     warnL "Unable to determine the LessTif version number!"
21785     warn2 "Make sure you are using version $preferred_lesstif or newer."
21786     warn2 "See <http://www.lesstif.org/>."
21787
21788   elif test \! $lesstif_version -gt 82; then
21789     warnL "LessTif version $lesstif_version_string is being used."
21790     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21791     warn2 "use with XScreenSaver; it is strongly recommended"
21792     warn2 "that you upgrade to at least version $preferred_lesstif!"
21793     warn2 "See <http://www.lesstif.org/>."
21794   fi
21795 fi
21796
21797
21798 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21799   warn  'Motif is being used, and GTK is not.'
21800   echo  ''
21801   motif_warn2
21802 fi
21803
21804
21805 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21806   warnL 'Use of XPM was requested, but it was not found.'
21807 fi
21808
21809 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21810   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21811 fi
21812
21813 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21814    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21815
21816   if test "$with_gdk_pixbuf_req" = yes ; then
21817     true
21818   elif test "$with_gdk_pixbuf_req" = no ; then
21819     warnL 'The GDK-Pixbuf library is not being used.'
21820   else
21821     warnL 'The GDK-Pixbuf library was not found.'
21822   fi
21823
21824   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21825     true
21826   elif test "$with_xpm_req" = no ; then
21827     warnL 'The XPM library is not being used.'
21828   else
21829     warnL 'The XPM library was not found.'
21830   fi
21831
21832   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21833     warn2 'The XPM library is being used instead.'
21834   fi
21835
21836   if test "$gdk_pixbuf_halfassed" = yes ; then
21837     echo ''
21838     warn2 'More specifically, we found the headers, but not the'
21839     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21840     warn2 "system, or something else went wrong.  The \`config.log'"
21841     warn2 'file might contain some clues.'
21842   fi
21843
21844   echo ''
21845   warn2 'Some of the demos will not use images as much as they could.'
21846   warn2 'You should consider installing GDK-Pixbuf and re-running'
21847   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21848   warn2 'provides support for more image formats.)'
21849 fi
21850
21851
21852 if test "$have_jpeg" = no ; then
21853   if test "$with_jpeg_req" = yes ; then
21854     warnL 'Use of libjpeg was requested, but it was not found.'
21855   elif test "$with_jpeg_req" = no ; then
21856     noteL 'The JPEG library is not being used.'
21857   else
21858     noteL 'The JPEG library was not found.'
21859   fi
21860
21861   if test "$jpeg_halfassed" = yes ; then
21862     echo ''
21863     warn2 'More specifically, we found the headers, but not the'
21864     warn2 'library; so either JPEG is half-installed on this'
21865     warn2 "system, or something else went wrong.  The \`config.log'"
21866     warn2 'file might contain some clues.'
21867     echo ''
21868   fi
21869
21870   if test "$have_gdk_pixbuf" = no ; then
21871     warn2 "This means that it won't be possible for the image-manipulating"
21872     warn2 "display modes to load files from disk; and it also means that"
21873     warn2 "the \`webcollage' program will be much slower."
21874   else
21875     warn2 "This means the \`webcollage' program will be much slower."
21876   fi
21877 fi
21878
21879
21880 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21881   preferred_mesagl=3.4
21882   mgv="$ac_mesagl_version_string"
21883   pgl="$preferred_mesagl"
21884
21885   if test "$ac_mesagl_version" = unknown; then
21886     warnL "Unable to determine the MesaGL version number!"
21887     warn2 "Make sure you are using version $preferred_mesagl or newer."
21888
21889   elif test \! "$ac_mesagl_version" -gt 2006; then
21890     warnL "MesaGL version number is $mgv --"
21891     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21892     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21893
21894   elif test \! "$ac_mesagl_version" -gt 3003; then
21895     warnL "MesaGL version number is $mgv --"
21896     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21897     warn2 "that you upgrade to $pgl or newer."
21898   fi
21899 fi
21900
21901 if test "$have_gl" = no ; then
21902   if test "$with_gl_req" = yes ; then
21903     warnL 'Use of GL was requested, but it was not found.'
21904   elif test "$with_gl_req" = no ; then
21905     noteL 'The OpenGL 3D library is not being used.'
21906   else
21907     noteL 'The OpenGL 3D library was not found.'
21908   fi
21909
21910   if test "$gl_halfassed" = yes ; then
21911     echo ''
21912     warn2 'More specifically, we found the headers, but not the'
21913     warn2 'libraries; so either GL is half-installed on this'
21914     warn2 "system, or something else went wrong.  The \`config.log'"
21915     warn2 'file might contain some clues.'
21916   fi
21917
21918   echo ''
21919   warn2 'Those demos which use 3D will not be built or installed.'
21920   warn2 'You might want to consider installing OpenGL and'
21921   warn2 "re-running configure.  If your vendor doesn't ship"
21922   warn2 'their own implementation of OpenGL, you can get a free'
21923   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21924   warn2 'info, see <http://www.opengl.org/>.'
21925
21926 fi
21927
21928
21929 if test "$have_gl" = yes -a "$have_gle" = no ; then
21930
21931  # nobody cares about this; don't print the warning unless it was
21932  # requested and not found, or halfway-found.
21933  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21934
21935   if test "$with_gle_req" = yes ; then
21936     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21937     warn2 'it was not found (though the OpenGL library was found, and'
21938     warn2 'is being used.)'
21939   elif test "$with_gle_req" = no ; then
21940     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21941     warn2 'library is not.'
21942   else
21943     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21944     warn2 'was not.'
21945   fi
21946
21947   if test "$gle_halfassed" = yes ; then
21948     echo ''
21949     warn2 'More specifically, we found the headers, but not the'
21950     warn2 'libraries; so either GLE is half-installed on this'
21951     warn2 "system, or something else went wrong.  The \`config.log'"
21952     warn2 'file might contain some clues.'
21953   fi
21954
21955   echo ''
21956   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21957   warn2 'will not be built or installed.  You might want to consider'
21958   warn2 'installing GLE and re-running configure.  You can find the'
21959   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21960   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21961
21962  fi
21963 fi
21964
21965
21966 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21967   warn 'Use of XReadDisplay was requested, but it was not found.'
21968 fi
21969
21970 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21971   warn 'Use of Kerberos was requested, but it was not found.'
21972 fi
21973
21974 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21975   warn 'Use of PAM was requested, but it was not found.'
21976 fi
21977
21978 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21979   warn 'Use of shadow passwords was requested, but they were not found.'
21980 fi
21981
21982 if test "$ac_macosx" = yes ; then
21983   if test "$enable_locking" = yes ; then
21984     warn  "You have specified --enable-locking on MacOS X."
21985     warn2 "THIS DOES NOT WORK!  Don't do this!"
21986   fi
21987 fi
21988
21989
21990 # You are in a twisty maze of namespaces and syntaxes, all alike.
21991 # Fuck the skull of Unix.
21992 #
21993 bindir=`eval eval eval eval eval eval eval echo $bindir`
21994 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
21995 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
21996
21997 # canonicalize slashes.
21998 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21999 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22000 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22001
22002
22003 # Sanity check the hackdir
22004 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22005   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22006     echo ""
22007     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22008                    There will be an executable installed with that name, so
22009                    that can't be the name of a directory as well.  Please
22010                    re-configure with a different directory name." >&5
22011 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22012                    There will be an executable installed with that name, so
22013                    that can't be the name of a directory as well.  Please
22014                    re-configure with a different directory name." >&2;}
22015    { (exit 1); exit 1; }; }
22016   fi
22017 done
22018
22019
22020 do_dir_warning=no
22021
22022 # Now let's warn if there's a previous RPM version already installed.
22023 # But don't bother with this test if we are currently *building* an RPM.
22024
22025 if test -z "$RPM_PACKAGE_VERSION" ; then
22026
22027   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22028
22029   # M4 sucks!!
22030
22031   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22032         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22033         head -1`
22034
22035
22036   if test \! -z "$rpmv" ; then
22037     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22038     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
22039
22040     warning=no
22041     warnL "There is already an installed RPM of xscreensaver $rpmv"
22042     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22043     warn2 'before running "make install" in this directory.'
22044     echo ""
22045     warn2 "Alternately, you could build this version of xscreensaver"
22046     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22047     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22048     warn2 "See the RPM documentation for more info."
22049     echo ""
22050
22051     if test "$rpmbdir" = "$rpmhdir" ; then
22052       warn2 "The RPM version was installed in $rpmbdir/."
22053       do_dir_warning=yes
22054     else
22055       warn2 "The RPM version was installed in $rpmbdir/,"
22056       warn2 "with demos in $rpmhdir/."
22057     fi
22058   fi
22059 fi
22060
22061 if test "${bindir}" = "${HACKDIR}" ; then
22062   do_dir_warning=yes
22063 fi
22064
22065 if test "$do_dir_warning" = yes; then
22066   echo ""
22067   echo "$warnsep"
22068   echo ""
22069   echo '      When you run "make install", the "xscreensaver",'
22070   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22071   echo "      will be installed in ${bindir}/."
22072   echo ""
22073   echo "      The various graphics demos (190+ different executables) will"
22074   echo "      be installed in ${HACKDIR}/."
22075   echo ""
22076   echo "      If you would prefer the demos to be installed elsewhere,"
22077   echo "      you should re-run configure with the --with-hackdir=DIR"
22078   echo "      option.  For more information, run \`./configure --help'."
22079   warning=yes
22080 fi
22081
22082 if test "$warning" != no; then
22083   echo '' ; echo "$warnsep" ; echo ''
22084 fi
22085
22086 if test "$do_dir_warning" = no; then
22087   if test "$warning" = no; then
22088     echo ''
22089   fi
22090   echo "User programs will be installed in ${bindir}/"
22091   echo "Screen savers will be installed in ${HACKDIR}/"
22092   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22093   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22094   echo ''
22095 fi