2106b95ff66e0087edd68b622661a78610d12c6c
[xscreensaver] / 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 DBUS_LIBS
731 GLE_LIBS
732 XDPMS_LIBS
733 XINERAMA_LIBS
734 PASSWD_LIBS
735 INSTALL_SETUID
736 SETUID_HACKS
737 INSTALL_DIRS
738 NEED_SETUID
739 INSTALL_PAM
740 HAVE_PAM_FAIL_DELAY
741 NEW_LOGIN_COMMAND
742 NEW_LOGIN_COMMAND_P
743 DEFAULT_IMAGES_P
744 DEFAULT_IMAGE_DIRECTORY
745 DEFAULT_TEXT_FILE
746 WITH_BROWSER
747 OBJCC
748 EXES_OSX
749 SCRIPTS_OSX
750 MEN_OSX
751 PASSWD_SRCS
752 PASSWD_OBJS
753 XMU_SRCS
754 XMU_OBJS
755 XMU_LIBS
756 SAVER_GL_SRCS
757 SAVER_GL_OBJS
758 SAVER_GL_LIBS
759 LOCK_SRCS
760 LOCK_OBJS
761 JPEG_EXES
762 GL_EXES
763 RETIRED_GL_EXES
764 SUID_EXES
765 GL_UTIL_EXES
766 GL_MEN
767 GL_KLUDGE
768 GLE_EXES
769 GLE_KLUDGE
770 GNOME24
771 GNOME22
772 NOGNOME
773 HACKDIR
774 HACKDIR_FULL
775 GTK_DATADIR
776 PO_DATADIR
777 HACK_CONF_DIR
778 GTK_EXTRA_OBJS
779 APPDEFAULTS
780 DEPEND
781 DEPEND_FLAGS
782 DEPEND_DEFINES
783 LIBOBJS
784 LTLIBOBJS'
785 ac_subst_files=''
786       ac_precious_vars='build_alias
787 host_alias
788 target_alias
789 CC
790 CFLAGS
791 LDFLAGS
792 LIBS
793 CPPFLAGS
794 CPP
795 XMKMF'
796
797
798 # Initialize some variables set by options.
799 ac_init_help=
800 ac_init_version=false
801 # The variables have the same names as the options, with
802 # dashes changed to underlines.
803 cache_file=/dev/null
804 exec_prefix=NONE
805 no_create=
806 no_recursion=
807 prefix=NONE
808 program_prefix=NONE
809 program_suffix=NONE
810 program_transform_name=s,x,x,
811 silent=
812 site=
813 srcdir=
814 verbose=
815 x_includes=NONE
816 x_libraries=NONE
817
818 # Installation directory options.
819 # These are left unexpanded so users can "make install exec_prefix=/foo"
820 # and all the variables that are supposed to be based on exec_prefix
821 # by default will actually change.
822 # Use braces instead of parens because sh, perl, etc. also accept them.
823 # (The list follows the same order as the GNU Coding Standards.)
824 bindir='${exec_prefix}/bin'
825 sbindir='${exec_prefix}/sbin'
826 libexecdir='${exec_prefix}/libexec'
827 datarootdir='${prefix}/share'
828 datadir='${datarootdir}'
829 sysconfdir='${prefix}/etc'
830 sharedstatedir='${prefix}/com'
831 localstatedir='${prefix}/var'
832 includedir='${prefix}/include'
833 oldincludedir='/usr/include'
834 docdir='${datarootdir}/doc/${PACKAGE}'
835 infodir='${datarootdir}/info'
836 htmldir='${docdir}'
837 dvidir='${docdir}'
838 pdfdir='${docdir}'
839 psdir='${docdir}'
840 libdir='${exec_prefix}/lib'
841 localedir='${datarootdir}/locale'
842 mandir='${datarootdir}/man'
843
844 ac_prev=
845 ac_dashdash=
846 for ac_option
847 do
848   # If the previous option needs an argument, assign it.
849   if test -n "$ac_prev"; then
850     eval $ac_prev=\$ac_option
851     ac_prev=
852     continue
853   fi
854
855   case $ac_option in
856   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
857   *)    ac_optarg=yes ;;
858   esac
859
860   # Accept the important Cygnus configure options, so we can diagnose typos.
861
862   case $ac_dashdash$ac_option in
863   --)
864     ac_dashdash=yes ;;
865
866   -bindir | --bindir | --bindi | --bind | --bin | --bi)
867     ac_prev=bindir ;;
868   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
869     bindir=$ac_optarg ;;
870
871   -build | --build | --buil | --bui | --bu)
872     ac_prev=build_alias ;;
873   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
874     build_alias=$ac_optarg ;;
875
876   -cache-file | --cache-file | --cache-fil | --cache-fi \
877   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
878     ac_prev=cache_file ;;
879   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
880   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
881     cache_file=$ac_optarg ;;
882
883   --config-cache | -C)
884     cache_file=config.cache ;;
885
886   -datadir | --datadir | --datadi | --datad)
887     ac_prev=datadir ;;
888   -datadir=* | --datadir=* | --datadi=* | --datad=*)
889     datadir=$ac_optarg ;;
890
891   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
892   | --dataroo | --dataro | --datar)
893     ac_prev=datarootdir ;;
894   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
895   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
896     datarootdir=$ac_optarg ;;
897
898   -disable-* | --disable-*)
899     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
900     # Reject names that are not valid shell variable names.
901     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
902       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
903    { (exit 1); exit 1; }; }
904     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
905     eval enable_$ac_feature=no ;;
906
907   -docdir | --docdir | --docdi | --doc | --do)
908     ac_prev=docdir ;;
909   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
910     docdir=$ac_optarg ;;
911
912   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
913     ac_prev=dvidir ;;
914   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
915     dvidir=$ac_optarg ;;
916
917   -enable-* | --enable-*)
918     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
919     # Reject names that are not valid shell variable names.
920     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
921       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
922    { (exit 1); exit 1; }; }
923     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
924     eval enable_$ac_feature=\$ac_optarg ;;
925
926   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
927   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
928   | --exec | --exe | --ex)
929     ac_prev=exec_prefix ;;
930   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
931   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
932   | --exec=* | --exe=* | --ex=*)
933     exec_prefix=$ac_optarg ;;
934
935   -gas | --gas | --ga | --g)
936     # Obsolete; use --with-gas.
937     with_gas=yes ;;
938
939   -help | --help | --hel | --he | -h)
940     ac_init_help=long ;;
941   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
942     ac_init_help=recursive ;;
943   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
944     ac_init_help=short ;;
945
946   -host | --host | --hos | --ho)
947     ac_prev=host_alias ;;
948   -host=* | --host=* | --hos=* | --ho=*)
949     host_alias=$ac_optarg ;;
950
951   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
952     ac_prev=htmldir ;;
953   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
954   | --ht=*)
955     htmldir=$ac_optarg ;;
956
957   -includedir | --includedir | --includedi | --included | --include \
958   | --includ | --inclu | --incl | --inc)
959     ac_prev=includedir ;;
960   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
961   | --includ=* | --inclu=* | --incl=* | --inc=*)
962     includedir=$ac_optarg ;;
963
964   -infodir | --infodir | --infodi | --infod | --info | --inf)
965     ac_prev=infodir ;;
966   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
967     infodir=$ac_optarg ;;
968
969   -libdir | --libdir | --libdi | --libd)
970     ac_prev=libdir ;;
971   -libdir=* | --libdir=* | --libdi=* | --libd=*)
972     libdir=$ac_optarg ;;
973
974   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
975   | --libexe | --libex | --libe)
976     ac_prev=libexecdir ;;
977   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
978   | --libexe=* | --libex=* | --libe=*)
979     libexecdir=$ac_optarg ;;
980
981   -localedir | --localedir | --localedi | --localed | --locale)
982     ac_prev=localedir ;;
983   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
984     localedir=$ac_optarg ;;
985
986   -localstatedir | --localstatedir | --localstatedi | --localstated \
987   | --localstate | --localstat | --localsta | --localst | --locals)
988     ac_prev=localstatedir ;;
989   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
990   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
991     localstatedir=$ac_optarg ;;
992
993   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
994     ac_prev=mandir ;;
995   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
996     mandir=$ac_optarg ;;
997
998   -nfp | --nfp | --nf)
999     # Obsolete; use --without-fp.
1000     with_fp=no ;;
1001
1002   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003   | --no-cr | --no-c | -n)
1004     no_create=yes ;;
1005
1006   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1007   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1008     no_recursion=yes ;;
1009
1010   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1011   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1012   | --oldin | --oldi | --old | --ol | --o)
1013     ac_prev=oldincludedir ;;
1014   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1015   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1016   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1017     oldincludedir=$ac_optarg ;;
1018
1019   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1020     ac_prev=prefix ;;
1021   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1022     prefix=$ac_optarg ;;
1023
1024   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1025   | --program-pre | --program-pr | --program-p)
1026     ac_prev=program_prefix ;;
1027   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1028   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1029     program_prefix=$ac_optarg ;;
1030
1031   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1032   | --program-suf | --program-su | --program-s)
1033     ac_prev=program_suffix ;;
1034   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1035   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1036     program_suffix=$ac_optarg ;;
1037
1038   -program-transform-name | --program-transform-name \
1039   | --program-transform-nam | --program-transform-na \
1040   | --program-transform-n | --program-transform- \
1041   | --program-transform | --program-transfor \
1042   | --program-transfo | --program-transf \
1043   | --program-trans | --program-tran \
1044   | --progr-tra | --program-tr | --program-t)
1045     ac_prev=program_transform_name ;;
1046   -program-transform-name=* | --program-transform-name=* \
1047   | --program-transform-nam=* | --program-transform-na=* \
1048   | --program-transform-n=* | --program-transform-=* \
1049   | --program-transform=* | --program-transfor=* \
1050   | --program-transfo=* | --program-transf=* \
1051   | --program-trans=* | --program-tran=* \
1052   | --progr-tra=* | --program-tr=* | --program-t=*)
1053     program_transform_name=$ac_optarg ;;
1054
1055   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1056     ac_prev=pdfdir ;;
1057   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1058     pdfdir=$ac_optarg ;;
1059
1060   -psdir | --psdir | --psdi | --psd | --ps)
1061     ac_prev=psdir ;;
1062   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1063     psdir=$ac_optarg ;;
1064
1065   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1066   | -silent | --silent | --silen | --sile | --sil)
1067     silent=yes ;;
1068
1069   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1070     ac_prev=sbindir ;;
1071   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1072   | --sbi=* | --sb=*)
1073     sbindir=$ac_optarg ;;
1074
1075   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1076   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1077   | --sharedst | --shareds | --shared | --share | --shar \
1078   | --sha | --sh)
1079     ac_prev=sharedstatedir ;;
1080   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1081   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1082   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1083   | --sha=* | --sh=*)
1084     sharedstatedir=$ac_optarg ;;
1085
1086   -site | --site | --sit)
1087     ac_prev=site ;;
1088   -site=* | --site=* | --sit=*)
1089     site=$ac_optarg ;;
1090
1091   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1092     ac_prev=srcdir ;;
1093   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1094     srcdir=$ac_optarg ;;
1095
1096   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1097   | --syscon | --sysco | --sysc | --sys | --sy)
1098     ac_prev=sysconfdir ;;
1099   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1100   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1101     sysconfdir=$ac_optarg ;;
1102
1103   -target | --target | --targe | --targ | --tar | --ta | --t)
1104     ac_prev=target_alias ;;
1105   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1106     target_alias=$ac_optarg ;;
1107
1108   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1109     verbose=yes ;;
1110
1111   -version | --version | --versio | --versi | --vers | -V)
1112     ac_init_version=: ;;
1113
1114   -with-* | --with-*)
1115     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1116     # Reject names that are not valid shell variable names.
1117     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118       { echo "$as_me: error: invalid package name: $ac_package" >&2
1119    { (exit 1); exit 1; }; }
1120     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1121     eval with_$ac_package=\$ac_optarg ;;
1122
1123   -without-* | --without-*)
1124     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1125     # Reject names that are not valid shell variable names.
1126     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1127       { echo "$as_me: error: invalid package name: $ac_package" >&2
1128    { (exit 1); exit 1; }; }
1129     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1130     eval with_$ac_package=no ;;
1131
1132   --x)
1133     # Obsolete; use --with-x.
1134     with_x=yes ;;
1135
1136   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137   | --x-incl | --x-inc | --x-in | --x-i)
1138     ac_prev=x_includes ;;
1139   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1141     x_includes=$ac_optarg ;;
1142
1143   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145     ac_prev=x_libraries ;;
1146   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1148     x_libraries=$ac_optarg ;;
1149
1150   -*) { echo "$as_me: error: unrecognized option: $ac_option
1151 Try \`$0 --help' for more information." >&2
1152    { (exit 1); exit 1; }; }
1153     ;;
1154
1155   *=*)
1156     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1157     # Reject names that are not valid shell variable names.
1158     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1159       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1160    { (exit 1); exit 1; }; }
1161     eval $ac_envvar=\$ac_optarg
1162     export $ac_envvar ;;
1163
1164   *)
1165     # FIXME: should be removed in autoconf 3.0.
1166     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1167     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1168       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1169     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1170     ;;
1171
1172   esac
1173 done
1174
1175 if test -n "$ac_prev"; then
1176   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1177   { echo "$as_me: error: missing argument to $ac_option" >&2
1178    { (exit 1); exit 1; }; }
1179 fi
1180
1181 # Be sure to have absolute directory names.
1182 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1183                 datadir sysconfdir sharedstatedir localstatedir includedir \
1184                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1185                 libdir localedir mandir
1186 do
1187   eval ac_val=\$$ac_var
1188   case $ac_val in
1189     [\\/$]* | ?:[\\/]* )  continue;;
1190     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1191   esac
1192   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1193    { (exit 1); exit 1; }; }
1194 done
1195
1196 # There might be people who depend on the old broken behavior: `$host'
1197 # used to hold the argument of --host etc.
1198 # FIXME: To remove some day.
1199 build=$build_alias
1200 host=$host_alias
1201 target=$target_alias
1202
1203 # FIXME: To remove some day.
1204 if test "x$host_alias" != x; then
1205   if test "x$build_alias" = x; then
1206     cross_compiling=maybe
1207     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1208     If a cross compiler is detected then cross compile mode will be used." >&2
1209   elif test "x$build_alias" != "x$host_alias"; then
1210     cross_compiling=yes
1211   fi
1212 fi
1213
1214 ac_tool_prefix=
1215 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1216
1217 test "$silent" = yes && exec 6>/dev/null
1218
1219
1220 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1221 ac_ls_di=`ls -di .` &&
1222 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1223   { echo "$as_me: error: Working directory cannot be determined" >&2
1224    { (exit 1); exit 1; }; }
1225 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1226   { echo "$as_me: error: pwd does not report name of working directory" >&2
1227    { (exit 1); exit 1; }; }
1228
1229
1230 # Find the source files, if location was not specified.
1231 if test -z "$srcdir"; then
1232   ac_srcdir_defaulted=yes
1233   # Try the directory containing this script, then the parent directory.
1234   ac_confdir=`$as_dirname -- "$0" ||
1235 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1236          X"$0" : 'X\(//\)[^/]' \| \
1237          X"$0" : 'X\(//\)$' \| \
1238          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1239 echo X"$0" |
1240     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1241             s//\1/
1242             q
1243           }
1244           /^X\(\/\/\)[^/].*/{
1245             s//\1/
1246             q
1247           }
1248           /^X\(\/\/\)$/{
1249             s//\1/
1250             q
1251           }
1252           /^X\(\/\).*/{
1253             s//\1/
1254             q
1255           }
1256           s/.*/./; q'`
1257   srcdir=$ac_confdir
1258   if test ! -r "$srcdir/$ac_unique_file"; then
1259     srcdir=..
1260   fi
1261 else
1262   ac_srcdir_defaulted=no
1263 fi
1264 if test ! -r "$srcdir/$ac_unique_file"; then
1265   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1266   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1267    { (exit 1); exit 1; }; }
1268 fi
1269 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1270 ac_abs_confdir=`(
1271         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1272    { (exit 1); exit 1; }; }
1273         pwd)`
1274 # When building in place, set srcdir=.
1275 if test "$ac_abs_confdir" = "$ac_pwd"; then
1276   srcdir=.
1277 fi
1278 # Remove unnecessary trailing slashes from srcdir.
1279 # Double slashes in file names in object file debugging info
1280 # mess up M-x gdb in Emacs.
1281 case $srcdir in
1282 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1283 esac
1284 for ac_var in $ac_precious_vars; do
1285   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1286   eval ac_env_${ac_var}_value=\$${ac_var}
1287   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1288   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1289 done
1290
1291 #
1292 # Report the --help message.
1293 #
1294 if test "$ac_init_help" = "long"; then
1295   # Omit some internal or obsolete options to make the list less imposing.
1296   # This message is too long to be a string in the A/UX 3.1 sh.
1297   cat <<_ACEOF
1298 \`configure' configures this package to adapt to many kinds of systems.
1299
1300 Usage: $0 [OPTION]... [VAR=VALUE]...
1301
1302 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1303 VAR=VALUE.  See below for descriptions of some of the useful variables.
1304
1305 Defaults for the options are specified in brackets.
1306
1307 Configuration:
1308   -h, --help              display this help and exit
1309       --help=short        display options specific to this package
1310       --help=recursive    display the short help of all the included packages
1311   -V, --version           display version information and exit
1312   -q, --quiet, --silent   do not print \`checking...' messages
1313       --cache-file=FILE   cache test results in FILE [disabled]
1314   -C, --config-cache      alias for \`--cache-file=config.cache'
1315   -n, --no-create         do not create output files
1316       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1317
1318 Installation directories:
1319   --prefix=PREFIX         install architecture-independent files in PREFIX
1320                           [$ac_default_prefix]
1321   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1322                           [PREFIX]
1323
1324 By default, \`make install' will install all the files in
1325 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1326 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1327 for instance \`--prefix=\$HOME'.
1328
1329 For better control, use the options below.
1330
1331 Fine tuning of the installation directories:
1332   --bindir=DIR           user executables [EPREFIX/bin]
1333   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1334   --libexecdir=DIR       program executables [EPREFIX/libexec]
1335   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1336   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1337   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1338   --libdir=DIR           object code libraries [EPREFIX/lib]
1339   --includedir=DIR       C header files [PREFIX/include]
1340   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1341   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1342   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1343   --infodir=DIR          info documentation [DATAROOTDIR/info]
1344   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1345   --mandir=DIR           man documentation [DATAROOTDIR/man]
1346   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1347   --htmldir=DIR          html documentation [DOCDIR]
1348   --dvidir=DIR           dvi documentation [DOCDIR]
1349   --pdfdir=DIR           pdf documentation [DOCDIR]
1350   --psdir=DIR            ps documentation [DOCDIR]
1351 _ACEOF
1352
1353   cat <<\_ACEOF
1354
1355 X features:
1356   --x-includes=DIR    X include files are in DIR
1357   --x-libraries=DIR   X library files are in DIR
1358
1359 System types:
1360   --build=BUILD     configure for building on BUILD [guessed]
1361   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1362 _ACEOF
1363 fi
1364
1365 if test -n "$ac_init_help"; then
1366
1367   cat <<\_ACEOF
1368
1369 Optional Features:
1370   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1371   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1372
1373 Screen locking options:
1374   --enable-locking        Compile in support for locking the display.
1375   --disable-locking       Do not allow locking at all.
1376
1377   --enable-root-passwd        Allow root passwd to unlock screen.
1378   --disable-root-passwd       Do not allow that.
1379
1380 Optional Packages:
1381   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1382   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1383
1384   --with-x                use the X Window System
1385
1386
1387 Installation options:
1388   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1389                           Default: `PREFIX/libexec/xscreensaver/'
1390   --with-configdir=DIR    Where to install the data files that describe each
1391                           of the display modes to the GUI.
1392                           Default: `PREFIX/share/xscreensaver/config/'
1393   --with-x-app-defaults=DIR
1394                            Where to install xscreensaver configuration file.
1395
1396 Except where noted, all of the --with options below can also take a
1397 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1398 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1399 to be added to the -L list, assuming those directories exist.
1400
1401 By default, support for each of these options will be built in, if the
1402 relevant library routines exist.  At run time, they will then be used
1403 only if the X server being used supports them.  Each --with option has
1404 a corresponding --without option, to override building support for them
1405 at all.
1406
1407 Screen blanking and idle-detection options:
1408
1409   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1410   --with-xidle-ext        Include support for the XIDLE extension.
1411   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1412   --with-dpms-ext         Include support for the DPMS extension.
1413   --with-xinerama-ext     Include support for the XINERAMA extension.
1414   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1415   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1416   --with-randr-ext        Include support for the X Resize+Rotate extension.
1417   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1418                           file to notice keyboard activity.
1419   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1420   --with-pam-service-name=NAME
1421                           NAME is the name of the PAM service that
1422                           xscreensaver will authenticate as.
1423   --with-kerberos         Include support for Kerberos authentication.
1424   --with-shadow           Include support for shadow password authentication.
1425   --with-passwd-helper    Include support for an external password
1426                           verification helper program.
1427   --with-login-manager    Put a "New Login" button on the unlock dialog that
1428                           runs a login manager such as gdmflexiserver.
1429
1430 User interface options:
1431
1432   --with-gtk              Use the Gtk toolkit for the user interface.
1433   --with-motif            Use the Motif toolkit for the user interface
1434                           (not recommended.)
1435
1436 Graphics options:
1437
1438   --with-gl               Build those demos which depend on OpenGL.
1439   --with-gle              Build those demos which depend on GLE
1440                           (the OpenGL "extrusion" library.)
1441   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1442                           demos, which will make it possible for them to read
1443                           GIF, JPEG, and PNG files as well.
1444   --with-xpm              Include support for XPM files in some demos.
1445                           (Not needed if Pixbuf is used.)
1446   --with-jpeg             Include support for the JPEG library.
1447   --with-xshm-ext         Include support for the Shared Memory extension.
1448   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1449   --with-readdisplay      Include support for the XReadDisplay extension.
1450   --with-image-directory=DIR  By default, some demos may display random images
1451                           from this directory.
1452   --with-text-file=FILE   By default, some demos may display this file.
1453   --with-browser=BROWSER   Specify the browser to show help URL.
1454   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1455                           (which is needed in order to ping other hosts.)
1456
1457
1458 Some influential environment variables:
1459   CC          C compiler command
1460   CFLAGS      C compiler flags
1461   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1462               nonstandard directory <lib dir>
1463   LIBS        libraries to pass to the linker, e.g. -l<library>
1464   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1465               you have headers in a nonstandard directory <include dir>
1466   CPP         C preprocessor
1467   XMKMF       Path to xmkmf, Makefile generator for X Window System
1468
1469 Use these variables to override the choices made by `configure' or to help
1470 it to find libraries and programs with nonstandard names/locations.
1471
1472 _ACEOF
1473 ac_status=$?
1474 fi
1475
1476 if test "$ac_init_help" = "recursive"; then
1477   # If there are subdirs, report their specific --help.
1478   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1479     test -d "$ac_dir" || continue
1480     ac_builddir=.
1481
1482 case "$ac_dir" in
1483 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484 *)
1485   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1486   # A ".." for each directory in $ac_dir_suffix.
1487   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1488   case $ac_top_builddir_sub in
1489   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1491   esac ;;
1492 esac
1493 ac_abs_top_builddir=$ac_pwd
1494 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1495 # for backward compatibility:
1496 ac_top_builddir=$ac_top_build_prefix
1497
1498 case $srcdir in
1499   .)  # We are building in place.
1500     ac_srcdir=.
1501     ac_top_srcdir=$ac_top_builddir_sub
1502     ac_abs_top_srcdir=$ac_pwd ;;
1503   [\\/]* | ?:[\\/]* )  # Absolute name.
1504     ac_srcdir=$srcdir$ac_dir_suffix;
1505     ac_top_srcdir=$srcdir
1506     ac_abs_top_srcdir=$srcdir ;;
1507   *) # Relative name.
1508     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1509     ac_top_srcdir=$ac_top_build_prefix$srcdir
1510     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1511 esac
1512 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1513
1514     cd "$ac_dir" || { ac_status=$?; continue; }
1515     # Check for guested configure.
1516     if test -f "$ac_srcdir/configure.gnu"; then
1517       echo &&
1518       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1519     elif test -f "$ac_srcdir/configure"; then
1520       echo &&
1521       $SHELL "$ac_srcdir/configure" --help=recursive
1522     else
1523       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1524     fi || ac_status=$?
1525     cd "$ac_pwd" || { ac_status=$?; break; }
1526   done
1527 fi
1528
1529 test -n "$ac_init_help" && exit $ac_status
1530 if $ac_init_version; then
1531   cat <<\_ACEOF
1532 configure
1533 generated by GNU Autoconf 2.61
1534
1535 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1536 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1537 This configure script is free software; the Free Software Foundation
1538 gives unlimited permission to copy, distribute and modify it.
1539 _ACEOF
1540   exit
1541 fi
1542 cat >config.log <<_ACEOF
1543 This file contains any messages produced by compilers while
1544 running configure, to aid debugging if configure makes a mistake.
1545
1546 It was created by $as_me, which was
1547 generated by GNU Autoconf 2.61.  Invocation command line was
1548
1549   $ $0 $@
1550
1551 _ACEOF
1552 exec 5>>config.log
1553 {
1554 cat <<_ASUNAME
1555 ## --------- ##
1556 ## Platform. ##
1557 ## --------- ##
1558
1559 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1560 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1561 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1562 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1563 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1564
1565 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1566 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1567
1568 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1569 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1570 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1571 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1572 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1573 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1574 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1575
1576 _ASUNAME
1577
1578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1579 for as_dir in $PATH
1580 do
1581   IFS=$as_save_IFS
1582   test -z "$as_dir" && as_dir=.
1583   echo "PATH: $as_dir"
1584 done
1585 IFS=$as_save_IFS
1586
1587 } >&5
1588
1589 cat >&5 <<_ACEOF
1590
1591
1592 ## ----------- ##
1593 ## Core tests. ##
1594 ## ----------- ##
1595
1596 _ACEOF
1597
1598
1599 # Keep a trace of the command line.
1600 # Strip out --no-create and --no-recursion so they do not pile up.
1601 # Strip out --silent because we don't want to record it for future runs.
1602 # Also quote any args containing shell meta-characters.
1603 # Make two passes to allow for proper duplicate-argument suppression.
1604 ac_configure_args=
1605 ac_configure_args0=
1606 ac_configure_args1=
1607 ac_must_keep_next=false
1608 for ac_pass in 1 2
1609 do
1610   for ac_arg
1611   do
1612     case $ac_arg in
1613     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1614     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1615     | -silent | --silent | --silen | --sile | --sil)
1616       continue ;;
1617     *\'*)
1618       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1619     esac
1620     case $ac_pass in
1621     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1622     2)
1623       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1624       if test $ac_must_keep_next = true; then
1625         ac_must_keep_next=false # Got value, back to normal.
1626       else
1627         case $ac_arg in
1628           *=* | --config-cache | -C | -disable-* | --disable-* \
1629           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1630           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1631           | -with-* | --with-* | -without-* | --without-* | --x)
1632             case "$ac_configure_args0 " in
1633               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1634             esac
1635             ;;
1636           -* ) ac_must_keep_next=true ;;
1637         esac
1638       fi
1639       ac_configure_args="$ac_configure_args '$ac_arg'"
1640       ;;
1641     esac
1642   done
1643 done
1644 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1645 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1646
1647 # When interrupted or exit'd, cleanup temporary files, and complete
1648 # config.log.  We remove comments because anyway the quotes in there
1649 # would cause problems or look ugly.
1650 # WARNING: Use '\'' to represent an apostrophe within the trap.
1651 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1652 trap 'exit_status=$?
1653   # Save into config.log some information that might help in debugging.
1654   {
1655     echo
1656
1657     cat <<\_ASBOX
1658 ## ---------------- ##
1659 ## Cache variables. ##
1660 ## ---------------- ##
1661 _ASBOX
1662     echo
1663     # The following way of writing the cache mishandles newlines in values,
1664 (
1665   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1666     eval ac_val=\$$ac_var
1667     case $ac_val in #(
1668     *${as_nl}*)
1669       case $ac_var in #(
1670       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1671 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1672       esac
1673       case $ac_var in #(
1674       _ | IFS | as_nl) ;; #(
1675       *) $as_unset $ac_var ;;
1676       esac ;;
1677     esac
1678   done
1679   (set) 2>&1 |
1680     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1681     *${as_nl}ac_space=\ *)
1682       sed -n \
1683         "s/'\''/'\''\\\\'\'''\''/g;
1684           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1685       ;; #(
1686     *)
1687       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1688       ;;
1689     esac |
1690     sort
1691 )
1692     echo
1693
1694     cat <<\_ASBOX
1695 ## ----------------- ##
1696 ## Output variables. ##
1697 ## ----------------- ##
1698 _ASBOX
1699     echo
1700     for ac_var in $ac_subst_vars
1701     do
1702       eval ac_val=\$$ac_var
1703       case $ac_val in
1704       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1705       esac
1706       echo "$ac_var='\''$ac_val'\''"
1707     done | sort
1708     echo
1709
1710     if test -n "$ac_subst_files"; then
1711       cat <<\_ASBOX
1712 ## ------------------- ##
1713 ## File substitutions. ##
1714 ## ------------------- ##
1715 _ASBOX
1716       echo
1717       for ac_var in $ac_subst_files
1718       do
1719         eval ac_val=\$$ac_var
1720         case $ac_val in
1721         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1722         esac
1723         echo "$ac_var='\''$ac_val'\''"
1724       done | sort
1725       echo
1726     fi
1727
1728     if test -s confdefs.h; then
1729       cat <<\_ASBOX
1730 ## ----------- ##
1731 ## confdefs.h. ##
1732 ## ----------- ##
1733 _ASBOX
1734       echo
1735       cat confdefs.h
1736       echo
1737     fi
1738     test "$ac_signal" != 0 &&
1739       echo "$as_me: caught signal $ac_signal"
1740     echo "$as_me: exit $exit_status"
1741   } >&5
1742   rm -f core *.core core.conftest.* &&
1743     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1744     exit $exit_status
1745 ' 0
1746 for ac_signal in 1 2 13 15; do
1747   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1748 done
1749 ac_signal=0
1750
1751 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1752 rm -f -r conftest* confdefs.h
1753
1754 # Predefined preprocessor variables.
1755
1756 cat >>confdefs.h <<_ACEOF
1757 #define PACKAGE_NAME "$PACKAGE_NAME"
1758 _ACEOF
1759
1760
1761 cat >>confdefs.h <<_ACEOF
1762 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1763 _ACEOF
1764
1765
1766 cat >>confdefs.h <<_ACEOF
1767 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1768 _ACEOF
1769
1770
1771 cat >>confdefs.h <<_ACEOF
1772 #define PACKAGE_STRING "$PACKAGE_STRING"
1773 _ACEOF
1774
1775
1776 cat >>confdefs.h <<_ACEOF
1777 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1778 _ACEOF
1779
1780
1781 # Let the site file select an alternate cache file if it wants to.
1782 # Prefer explicitly selected file to automatically selected ones.
1783 if test -n "$CONFIG_SITE"; then
1784   set x "$CONFIG_SITE"
1785 elif test "x$prefix" != xNONE; then
1786   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1787 else
1788   set x "$ac_default_prefix/share/config.site" \
1789         "$ac_default_prefix/etc/config.site"
1790 fi
1791 shift
1792 for ac_site_file
1793 do
1794   if test -r "$ac_site_file"; then
1795     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1796 echo "$as_me: loading site script $ac_site_file" >&6;}
1797     sed 's/^/| /' "$ac_site_file" >&5
1798     . "$ac_site_file"
1799   fi
1800 done
1801
1802 if test -r "$cache_file"; then
1803   # Some versions of bash will fail to source /dev/null (special
1804   # files actually), so we avoid doing that.
1805   if test -f "$cache_file"; then
1806     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1807 echo "$as_me: loading cache $cache_file" >&6;}
1808     case $cache_file in
1809       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1810       *)                      . "./$cache_file";;
1811     esac
1812   fi
1813 else
1814   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1815 echo "$as_me: creating cache $cache_file" >&6;}
1816   >$cache_file
1817 fi
1818
1819 # Check that the precious variables saved in the cache have kept the same
1820 # value.
1821 ac_cache_corrupted=false
1822 for ac_var in $ac_precious_vars; do
1823   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1824   eval ac_new_set=\$ac_env_${ac_var}_set
1825   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1826   eval ac_new_val=\$ac_env_${ac_var}_value
1827   case $ac_old_set,$ac_new_set in
1828     set,)
1829       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1830 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1831       ac_cache_corrupted=: ;;
1832     ,set)
1833       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1834 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1835       ac_cache_corrupted=: ;;
1836     ,);;
1837     *)
1838       if test "x$ac_old_val" != "x$ac_new_val"; then
1839         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1840 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1841         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1842 echo "$as_me:   former value:  $ac_old_val" >&2;}
1843         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1844 echo "$as_me:   current value: $ac_new_val" >&2;}
1845         ac_cache_corrupted=:
1846       fi;;
1847   esac
1848   # Pass precious variables to config.status.
1849   if test "$ac_new_set" = set; then
1850     case $ac_new_val in
1851     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1852     *) ac_arg=$ac_var=$ac_new_val ;;
1853     esac
1854     case " $ac_configure_args " in
1855       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1856       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1857     esac
1858   fi
1859 done
1860 if $ac_cache_corrupted; then
1861   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1862 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1863   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1864 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884 ac_ext=c
1885 ac_cpp='$CPP $CPPFLAGS'
1886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1889
1890
1891 ac_config_headers="$ac_config_headers config.h"
1892
1893
1894 echo "current directory: `pwd`"
1895 echo "command line was: $0 $@"
1896
1897 ###############################################################################
1898 #
1899 #       Autoheader stuff
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
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076 # After checking to see that --srcdir is correct (which AC_INIT does)
2077 # check for some random other files that come later in the tar file,
2078 # to make sure everything is here.
2079 #
2080 for d in driver utils hacks hacks/glx ; do
2081   f=$srcdir/$d/Makefile.in
2082   if test \! -r $f ; then
2083     echo ""
2084     echo "ERROR: The package is incomplete: $f does not exist."
2085     echo "       This probably means that your download was truncated."
2086     echo ""
2087     exit 1
2088   fi
2089 done
2090
2091 ###############################################################################
2092 #
2093 #       Function to figure out how to run the compiler.
2094 #
2095 ###############################################################################
2096
2097
2098
2099
2100 ###############################################################################
2101 #
2102 #       Check for availability of various gcc command-line options.
2103 #
2104 ###############################################################################
2105
2106
2107
2108
2109
2110
2111
2112 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2113 # around an Apple-specific gcc bug.
2114 #
2115
2116
2117 ###############################################################################
2118 #
2119 #       Function to figure out how to disable // comments in ANSI C code.
2120 #
2121 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2122 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2123 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2124 #       so much for compatibility!)
2125 #
2126 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2127 #       declarations preceed statements, without resorting to "-pedantic".
2128 #       This means that there is no way to get gcc3 to issue warnings that
2129 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2130 #       also drowning in totally useless warnings.  Thank you master may I
2131 #       have another.
2132 #
2133 #       So, I give up, let's just use -pedantic.
2134 #
2135 ###############################################################################
2136
2137
2138
2139
2140
2141
2142 ###############################################################################
2143 #
2144 #       Function to figure out how to create directory trees.
2145 #
2146 ###############################################################################
2147
2148
2149
2150
2151 ###############################################################################
2152 #
2153 #       Function to check whether gettimeofday() exists, and how to call it.
2154 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2155 #
2156 ###############################################################################
2157
2158
2159
2160
2161 ###############################################################################
2162 #
2163 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2164 #
2165 ###############################################################################
2166
2167 # M4 sucks!!  perl sucks too!!
2168
2169 perl_version_cmd='print $]'
2170
2171
2172
2173
2174
2175 ###############################################################################
2176 #
2177 #       Function to demand "bc".  Losers.
2178 #
2179 ###############################################################################
2180
2181
2182
2183 ###############################################################################
2184 #
2185 #       Functions to check how to do ICMP PING requests.
2186 #
2187 ###############################################################################
2188
2189
2190
2191
2192
2193
2194 ###############################################################################
2195 #
2196 #       Functions to check for various X11 crap.
2197 #
2198 ###############################################################################
2199
2200 # Try and find the app-defaults directory.
2201 # It sucks that autoconf doesn't do this already...
2202 #
2203
2204
2205 ###############################################################################
2206 #
2207 #       Handle the --with-x-app-defaults option HERE
2208 #
2209 ###############################################################################
2210
2211
2212 # Check whether --with-x-app-defaults was given.
2213 if test "${with_x_app_defaults+set}" = set; then
2214   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2215 else
2216   eval ac_x_app_defaults="$withval"
2217 fi
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229 # Random special-cases for X on certain pathological OSes.
2230 # You know who you are.
2231 #
2232
2233
2234
2235
2236 ###############################################################################
2237 #
2238 #       Some utility functions to make checking for X things easier.
2239 #
2240 ###############################################################################
2241
2242 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2243 #
2244
2245
2246 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2247 #
2248
2249
2250 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2251 #
2252
2253
2254
2255 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2256 # Use this sparingly; it probably doesn't work very well on X programs.
2257 #
2258
2259
2260 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2261 # (But not the -L directories!)
2262 #
2263
2264
2265
2266
2267 # Usage: HANDLE_X_PATH_ARG([variable_name],
2268 #                          [--command-line-option],
2269 #                          [descriptive string])
2270 #
2271 # All of the --with options take three forms:
2272 #
2273 #   --with-foo (or --with-foo=yes)
2274 #   --without-foo (or --with-foo=no)
2275 #   --with-foo=/DIR
2276 #
2277 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2278 # a directory (string beginning with a slash) it checks to see whether
2279 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2280 # as appropriate.
2281 #
2282
2283
2284
2285
2286 ###############################################################################
2287 ###############################################################################
2288 #
2289 #       End of function definitions.  Now start actually executing stuff.
2290 #
2291 ###############################################################################
2292 ###############################################################################
2293
2294 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2295 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2296 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2297
2298
2299 # random compiler setup
2300 ac_aux_dir=
2301 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2302   if test -f "$ac_dir/install-sh"; then
2303     ac_aux_dir=$ac_dir
2304     ac_install_sh="$ac_aux_dir/install-sh -c"
2305     break
2306   elif test -f "$ac_dir/install.sh"; then
2307     ac_aux_dir=$ac_dir
2308     ac_install_sh="$ac_aux_dir/install.sh -c"
2309     break
2310   elif test -f "$ac_dir/shtool"; then
2311     ac_aux_dir=$ac_dir
2312     ac_install_sh="$ac_aux_dir/shtool install -c"
2313     break
2314   fi
2315 done
2316 if test -z "$ac_aux_dir"; then
2317   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2318 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2319    { (exit 1); exit 1; }; }
2320 fi
2321
2322 # These three variables are undocumented and unsupported,
2323 # and are intended to be withdrawn in a future Autoconf release.
2324 # They can cause serious problems if a builder's source tree is in a directory
2325 # whose full name contains unusual characters.
2326 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2327 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2328 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2329
2330
2331 # Make sure we can run config.sub.
2332 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2333   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2334 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2335    { (exit 1); exit 1; }; }
2336
2337 { echo "$as_me:$LINENO: checking build system type" >&5
2338 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2339 if test "${ac_cv_build+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342   ac_build_alias=$build_alias
2343 test "x$ac_build_alias" = x &&
2344   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2345 test "x$ac_build_alias" = x &&
2346   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2347 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2348    { (exit 1); exit 1; }; }
2349 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2350   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2351 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2352    { (exit 1); exit 1; }; }
2353
2354 fi
2355 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2356 echo "${ECHO_T}$ac_cv_build" >&6; }
2357 case $ac_cv_build in
2358 *-*-*) ;;
2359 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2360 echo "$as_me: error: invalid value of canonical build" >&2;}
2361    { (exit 1); exit 1; }; };;
2362 esac
2363 build=$ac_cv_build
2364 ac_save_IFS=$IFS; IFS='-'
2365 set x $ac_cv_build
2366 shift
2367 build_cpu=$1
2368 build_vendor=$2
2369 shift; shift
2370 # Remember, the first character of IFS is used to create $*,
2371 # except with old shells:
2372 build_os=$*
2373 IFS=$ac_save_IFS
2374 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2375
2376
2377 { echo "$as_me:$LINENO: checking host system type" >&5
2378 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2379 if test "${ac_cv_host+set}" = set; then
2380   echo $ECHO_N "(cached) $ECHO_C" >&6
2381 else
2382   if test "x$host_alias" = x; then
2383   ac_cv_host=$ac_cv_build
2384 else
2385   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2386     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2387 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2388    { (exit 1); exit 1; }; }
2389 fi
2390
2391 fi
2392 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2393 echo "${ECHO_T}$ac_cv_host" >&6; }
2394 case $ac_cv_host in
2395 *-*-*) ;;
2396 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2397 echo "$as_me: error: invalid value of canonical host" >&2;}
2398    { (exit 1); exit 1; }; };;
2399 esac
2400 host=$ac_cv_host
2401 ac_save_IFS=$IFS; IFS='-'
2402 set x $ac_cv_host
2403 shift
2404 host_cpu=$1
2405 host_vendor=$2
2406 shift; shift
2407 # Remember, the first character of IFS is used to create $*,
2408 # except with old shells:
2409 host_os=$*
2410 IFS=$ac_save_IFS
2411 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2412
2413
2414
2415 ac_ext=c
2416 ac_cpp='$CPP $CPPFLAGS'
2417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2420 if test -n "$ac_tool_prefix"; then
2421   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2422 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2423 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2425 if test "${ac_cv_prog_CC+set}" = set; then
2426   echo $ECHO_N "(cached) $ECHO_C" >&6
2427 else
2428   if test -n "$CC"; then
2429   ac_cv_prog_CC="$CC" # Let the user override the test.
2430 else
2431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2432 for as_dir in $PATH
2433 do
2434   IFS=$as_save_IFS
2435   test -z "$as_dir" && as_dir=.
2436   for ac_exec_ext in '' $ac_executable_extensions; do
2437   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2438     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2439     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2440     break 2
2441   fi
2442 done
2443 done
2444 IFS=$as_save_IFS
2445
2446 fi
2447 fi
2448 CC=$ac_cv_prog_CC
2449 if test -n "$CC"; then
2450   { echo "$as_me:$LINENO: result: $CC" >&5
2451 echo "${ECHO_T}$CC" >&6; }
2452 else
2453   { echo "$as_me:$LINENO: result: no" >&5
2454 echo "${ECHO_T}no" >&6; }
2455 fi
2456
2457
2458 fi
2459 if test -z "$ac_cv_prog_CC"; then
2460   ac_ct_CC=$CC
2461   # Extract the first word of "gcc", so it can be a program name with args.
2462 set dummy gcc; ac_word=$2
2463 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2465 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2466   echo $ECHO_N "(cached) $ECHO_C" >&6
2467 else
2468   if test -n "$ac_ct_CC"; then
2469   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2470 else
2471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472 for as_dir in $PATH
2473 do
2474   IFS=$as_save_IFS
2475   test -z "$as_dir" && as_dir=.
2476   for ac_exec_ext in '' $ac_executable_extensions; do
2477   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2478     ac_cv_prog_ac_ct_CC="gcc"
2479     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2480     break 2
2481   fi
2482 done
2483 done
2484 IFS=$as_save_IFS
2485
2486 fi
2487 fi
2488 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2489 if test -n "$ac_ct_CC"; then
2490   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2491 echo "${ECHO_T}$ac_ct_CC" >&6; }
2492 else
2493   { echo "$as_me:$LINENO: result: no" >&5
2494 echo "${ECHO_T}no" >&6; }
2495 fi
2496
2497   if test "x$ac_ct_CC" = x; then
2498     CC=""
2499   else
2500     case $cross_compiling:$ac_tool_warned in
2501 yes:)
2502 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2503 whose name does not start with the host triplet.  If you think this
2504 configuration is useful to you, please write to autoconf@gnu.org." >&5
2505 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2506 whose name does not start with the host triplet.  If you think this
2507 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2508 ac_tool_warned=yes ;;
2509 esac
2510     CC=$ac_ct_CC
2511   fi
2512 else
2513   CC="$ac_cv_prog_CC"
2514 fi
2515
2516 if test -z "$CC"; then
2517           if test -n "$ac_tool_prefix"; then
2518     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2519 set dummy ${ac_tool_prefix}cc; ac_word=$2
2520 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2522 if test "${ac_cv_prog_CC+set}" = set; then
2523   echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525   if test -n "$CC"; then
2526   ac_cv_prog_CC="$CC" # Let the user override the test.
2527 else
2528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2529 for as_dir in $PATH
2530 do
2531   IFS=$as_save_IFS
2532   test -z "$as_dir" && as_dir=.
2533   for ac_exec_ext in '' $ac_executable_extensions; do
2534   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2535     ac_cv_prog_CC="${ac_tool_prefix}cc"
2536     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2537     break 2
2538   fi
2539 done
2540 done
2541 IFS=$as_save_IFS
2542
2543 fi
2544 fi
2545 CC=$ac_cv_prog_CC
2546 if test -n "$CC"; then
2547   { echo "$as_me:$LINENO: result: $CC" >&5
2548 echo "${ECHO_T}$CC" >&6; }
2549 else
2550   { echo "$as_me:$LINENO: result: no" >&5
2551 echo "${ECHO_T}no" >&6; }
2552 fi
2553
2554
2555   fi
2556 fi
2557 if test -z "$CC"; then
2558   # Extract the first word of "cc", so it can be a program name with args.
2559 set dummy cc; ac_word=$2
2560 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2561 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2562 if test "${ac_cv_prog_CC+set}" = set; then
2563   echo $ECHO_N "(cached) $ECHO_C" >&6
2564 else
2565   if test -n "$CC"; then
2566   ac_cv_prog_CC="$CC" # Let the user override the test.
2567 else
2568   ac_prog_rejected=no
2569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2570 for as_dir in $PATH
2571 do
2572   IFS=$as_save_IFS
2573   test -z "$as_dir" && as_dir=.
2574   for ac_exec_ext in '' $ac_executable_extensions; do
2575   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2576     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2577        ac_prog_rejected=yes
2578        continue
2579      fi
2580     ac_cv_prog_CC="cc"
2581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2582     break 2
2583   fi
2584 done
2585 done
2586 IFS=$as_save_IFS
2587
2588 if test $ac_prog_rejected = yes; then
2589   # We found a bogon in the path, so make sure we never use it.
2590   set dummy $ac_cv_prog_CC
2591   shift
2592   if test $# != 0; then
2593     # We chose a different compiler from the bogus one.
2594     # However, it has the same basename, so the bogon will be chosen
2595     # first if we set CC to just the basename; use the full file name.
2596     shift
2597     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2598   fi
2599 fi
2600 fi
2601 fi
2602 CC=$ac_cv_prog_CC
2603 if test -n "$CC"; then
2604   { echo "$as_me:$LINENO: result: $CC" >&5
2605 echo "${ECHO_T}$CC" >&6; }
2606 else
2607   { echo "$as_me:$LINENO: result: no" >&5
2608 echo "${ECHO_T}no" >&6; }
2609 fi
2610
2611
2612 fi
2613 if test -z "$CC"; then
2614   if test -n "$ac_tool_prefix"; then
2615   for ac_prog in cl.exe
2616   do
2617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2619 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2621 if test "${ac_cv_prog_CC+set}" = set; then
2622   echo $ECHO_N "(cached) $ECHO_C" >&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628 for as_dir in $PATH
2629 do
2630   IFS=$as_save_IFS
2631   test -z "$as_dir" && as_dir=.
2632   for ac_exec_ext in '' $ac_executable_extensions; do
2633   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2634     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2635     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2636     break 2
2637   fi
2638 done
2639 done
2640 IFS=$as_save_IFS
2641
2642 fi
2643 fi
2644 CC=$ac_cv_prog_CC
2645 if test -n "$CC"; then
2646   { echo "$as_me:$LINENO: result: $CC" >&5
2647 echo "${ECHO_T}$CC" >&6; }
2648 else
2649   { echo "$as_me:$LINENO: result: no" >&5
2650 echo "${ECHO_T}no" >&6; }
2651 fi
2652
2653
2654     test -n "$CC" && break
2655   done
2656 fi
2657 if test -z "$CC"; then
2658   ac_ct_CC=$CC
2659   for ac_prog in cl.exe
2660 do
2661   # Extract the first word of "$ac_prog", so it can be a program name with args.
2662 set dummy $ac_prog; ac_word=$2
2663 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2665 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2666   echo $ECHO_N "(cached) $ECHO_C" >&6
2667 else
2668   if test -n "$ac_ct_CC"; then
2669   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2670 else
2671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672 for as_dir in $PATH
2673 do
2674   IFS=$as_save_IFS
2675   test -z "$as_dir" && as_dir=.
2676   for ac_exec_ext in '' $ac_executable_extensions; do
2677   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2678     ac_cv_prog_ac_ct_CC="$ac_prog"
2679     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2680     break 2
2681   fi
2682 done
2683 done
2684 IFS=$as_save_IFS
2685
2686 fi
2687 fi
2688 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2689 if test -n "$ac_ct_CC"; then
2690   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2691 echo "${ECHO_T}$ac_ct_CC" >&6; }
2692 else
2693   { echo "$as_me:$LINENO: result: no" >&5
2694 echo "${ECHO_T}no" >&6; }
2695 fi
2696
2697
2698   test -n "$ac_ct_CC" && break
2699 done
2700
2701   if test "x$ac_ct_CC" = x; then
2702     CC=""
2703   else
2704     case $cross_compiling:$ac_tool_warned in
2705 yes:)
2706 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2707 whose name does not start with the host triplet.  If you think this
2708 configuration is useful to you, please write to autoconf@gnu.org." >&5
2709 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2710 whose name does not start with the host triplet.  If you think this
2711 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2712 ac_tool_warned=yes ;;
2713 esac
2714     CC=$ac_ct_CC
2715   fi
2716 fi
2717
2718 fi
2719
2720
2721 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2722 See \`config.log' for more details." >&5
2723 echo "$as_me: error: no acceptable C compiler found in \$PATH
2724 See \`config.log' for more details." >&2;}
2725    { (exit 1); exit 1; }; }
2726
2727 # Provide some information about the compiler.
2728 echo "$as_me:$LINENO: checking for C compiler version" >&5
2729 ac_compiler=`set X $ac_compile; echo $2`
2730 { (ac_try="$ac_compiler --version >&5"
2731 case "(($ac_try" in
2732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733   *) ac_try_echo=$ac_try;;
2734 esac
2735 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2736   (eval "$ac_compiler --version >&5") 2>&5
2737   ac_status=$?
2738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739   (exit $ac_status); }
2740 { (ac_try="$ac_compiler -v >&5"
2741 case "(($ac_try" in
2742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2743   *) ac_try_echo=$ac_try;;
2744 esac
2745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2746   (eval "$ac_compiler -v >&5") 2>&5
2747   ac_status=$?
2748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749   (exit $ac_status); }
2750 { (ac_try="$ac_compiler -V >&5"
2751 case "(($ac_try" in
2752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2753   *) ac_try_echo=$ac_try;;
2754 esac
2755 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2756   (eval "$ac_compiler -V >&5") 2>&5
2757   ac_status=$?
2758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2759   (exit $ac_status); }
2760
2761 cat >conftest.$ac_ext <<_ACEOF
2762 /* confdefs.h.  */
2763 _ACEOF
2764 cat confdefs.h >>conftest.$ac_ext
2765 cat >>conftest.$ac_ext <<_ACEOF
2766 /* end confdefs.h.  */
2767
2768 int
2769 main ()
2770 {
2771
2772   ;
2773   return 0;
2774 }
2775 _ACEOF
2776 ac_clean_files_save=$ac_clean_files
2777 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2778 # Try to create an executable without -o first, disregard a.out.
2779 # It will help us diagnose broken compilers, and finding out an intuition
2780 # of exeext.
2781 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2782 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2783 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2784 #
2785 # List of possible output files, starting from the most likely.
2786 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2787 # only as a last resort.  b.out is created by i960 compilers.
2788 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2789 #
2790 # The IRIX 6 linker writes into existing files which may not be
2791 # executable, retaining their permissions.  Remove them first so a
2792 # subsequent execution test works.
2793 ac_rmfiles=
2794 for ac_file in $ac_files
2795 do
2796   case $ac_file in
2797     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2798     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2799   esac
2800 done
2801 rm -f $ac_rmfiles
2802
2803 if { (ac_try="$ac_link_default"
2804 case "(($ac_try" in
2805   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2806   *) ac_try_echo=$ac_try;;
2807 esac
2808 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2809   (eval "$ac_link_default") 2>&5
2810   ac_status=$?
2811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812   (exit $ac_status); }; then
2813   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2814 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2815 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2816 # so that the user can short-circuit this test for compilers unknown to
2817 # Autoconf.
2818 for ac_file in $ac_files ''
2819 do
2820   test -f "$ac_file" || continue
2821   case $ac_file in
2822     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2823         ;;
2824     [ab].out )
2825         # We found the default executable, but exeext='' is most
2826         # certainly right.
2827         break;;
2828     *.* )
2829         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2830         then :; else
2831            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2832         fi
2833         # We set ac_cv_exeext here because the later test for it is not
2834         # safe: cross compilers may not add the suffix if given an `-o'
2835         # argument, so we may need to know it at that point already.
2836         # Even if this section looks crufty: it has the advantage of
2837         # actually working.
2838         break;;
2839     * )
2840         break;;
2841   esac
2842 done
2843 test "$ac_cv_exeext" = no && ac_cv_exeext=
2844
2845 else
2846   ac_file=''
2847 fi
2848
2849 { echo "$as_me:$LINENO: result: $ac_file" >&5
2850 echo "${ECHO_T}$ac_file" >&6; }
2851 if test -z "$ac_file"; then
2852   echo "$as_me: failed program was:" >&5
2853 sed 's/^/| /' conftest.$ac_ext >&5
2854
2855 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2856 See \`config.log' for more details." >&5
2857 echo "$as_me: error: C compiler cannot create executables
2858 See \`config.log' for more details." >&2;}
2859    { (exit 77); exit 77; }; }
2860 fi
2861
2862 ac_exeext=$ac_cv_exeext
2863
2864 # Check that the compiler produces executables we can run.  If not, either
2865 # the compiler is broken, or we cross compile.
2866 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2867 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2868 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2869 # If not cross compiling, check that we can run a simple program.
2870 if test "$cross_compiling" != yes; then
2871   if { ac_try='./$ac_file'
2872   { (case "(($ac_try" in
2873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874   *) ac_try_echo=$ac_try;;
2875 esac
2876 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2877   (eval "$ac_try") 2>&5
2878   ac_status=$?
2879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2880   (exit $ac_status); }; }; then
2881     cross_compiling=no
2882   else
2883     if test "$cross_compiling" = maybe; then
2884         cross_compiling=yes
2885     else
2886         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2887 If you meant to cross compile, use \`--host'.
2888 See \`config.log' for more details." >&5
2889 echo "$as_me: error: cannot run C compiled programs.
2890 If you meant to cross compile, use \`--host'.
2891 See \`config.log' for more details." >&2;}
2892    { (exit 1); exit 1; }; }
2893     fi
2894   fi
2895 fi
2896 { echo "$as_me:$LINENO: result: yes" >&5
2897 echo "${ECHO_T}yes" >&6; }
2898
2899 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2900 ac_clean_files=$ac_clean_files_save
2901 # Check that the compiler produces executables we can run.  If not, either
2902 # the compiler is broken, or we cross compile.
2903 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2904 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2905 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2906 echo "${ECHO_T}$cross_compiling" >&6; }
2907
2908 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2909 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2910 if { (ac_try="$ac_link"
2911 case "(($ac_try" in
2912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2913   *) ac_try_echo=$ac_try;;
2914 esac
2915 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2916   (eval "$ac_link") 2>&5
2917   ac_status=$?
2918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919   (exit $ac_status); }; then
2920   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2921 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2922 # work properly (i.e., refer to `conftest.exe'), while it won't with
2923 # `rm'.
2924 for ac_file in conftest.exe conftest conftest.*; do
2925   test -f "$ac_file" || continue
2926   case $ac_file in
2927     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2928     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2929           break;;
2930     * ) break;;
2931   esac
2932 done
2933 else
2934   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2935 See \`config.log' for more details." >&5
2936 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2937 See \`config.log' for more details." >&2;}
2938    { (exit 1); exit 1; }; }
2939 fi
2940
2941 rm -f conftest$ac_cv_exeext
2942 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2943 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2944
2945 rm -f conftest.$ac_ext
2946 EXEEXT=$ac_cv_exeext
2947 ac_exeext=$EXEEXT
2948 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2949 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2950 if test "${ac_cv_objext+set}" = set; then
2951   echo $ECHO_N "(cached) $ECHO_C" >&6
2952 else
2953   cat >conftest.$ac_ext <<_ACEOF
2954 /* confdefs.h.  */
2955 _ACEOF
2956 cat confdefs.h >>conftest.$ac_ext
2957 cat >>conftest.$ac_ext <<_ACEOF
2958 /* end confdefs.h.  */
2959
2960 int
2961 main ()
2962 {
2963
2964   ;
2965   return 0;
2966 }
2967 _ACEOF
2968 rm -f conftest.o conftest.obj
2969 if { (ac_try="$ac_compile"
2970 case "(($ac_try" in
2971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2972   *) ac_try_echo=$ac_try;;
2973 esac
2974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2975   (eval "$ac_compile") 2>&5
2976   ac_status=$?
2977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2978   (exit $ac_status); }; then
2979   for ac_file in conftest.o conftest.obj conftest.*; do
2980   test -f "$ac_file" || continue;
2981   case $ac_file in
2982     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2983     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2984        break;;
2985   esac
2986 done
2987 else
2988   echo "$as_me: failed program was:" >&5
2989 sed 's/^/| /' conftest.$ac_ext >&5
2990
2991 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2992 See \`config.log' for more details." >&5
2993 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2994 See \`config.log' for more details." >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2999 fi
3000 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3001 echo "${ECHO_T}$ac_cv_objext" >&6; }
3002 OBJEXT=$ac_cv_objext
3003 ac_objext=$OBJEXT
3004 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3005 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3006 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3007   echo $ECHO_N "(cached) $ECHO_C" >&6
3008 else
3009   cat >conftest.$ac_ext <<_ACEOF
3010 /* confdefs.h.  */
3011 _ACEOF
3012 cat confdefs.h >>conftest.$ac_ext
3013 cat >>conftest.$ac_ext <<_ACEOF
3014 /* end confdefs.h.  */
3015
3016 int
3017 main ()
3018 {
3019 #ifndef __GNUC__
3020        choke me
3021 #endif
3022
3023   ;
3024   return 0;
3025 }
3026 _ACEOF
3027 rm -f conftest.$ac_objext
3028 if { (ac_try="$ac_compile"
3029 case "(($ac_try" in
3030   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3031   *) ac_try_echo=$ac_try;;
3032 esac
3033 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3034   (eval "$ac_compile") 2>conftest.er1
3035   ac_status=$?
3036   grep -v '^ *+' conftest.er1 >conftest.err
3037   rm -f conftest.er1
3038   cat conftest.err >&5
3039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3040   (exit $ac_status); } && {
3041          test -z "$ac_c_werror_flag" ||
3042          test ! -s conftest.err
3043        } && test -s conftest.$ac_objext; then
3044   ac_compiler_gnu=yes
3045 else
3046   echo "$as_me: failed program was:" >&5
3047 sed 's/^/| /' conftest.$ac_ext >&5
3048
3049         ac_compiler_gnu=no
3050 fi
3051
3052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3054
3055 fi
3056 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3057 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3058 GCC=`test $ac_compiler_gnu = yes && echo yes`
3059 ac_test_CFLAGS=${CFLAGS+set}
3060 ac_save_CFLAGS=$CFLAGS
3061 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3062 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3063 if test "${ac_cv_prog_cc_g+set}" = set; then
3064   echo $ECHO_N "(cached) $ECHO_C" >&6
3065 else
3066   ac_save_c_werror_flag=$ac_c_werror_flag
3067    ac_c_werror_flag=yes
3068    ac_cv_prog_cc_g=no
3069    CFLAGS="-g"
3070    cat >conftest.$ac_ext <<_ACEOF
3071 /* confdefs.h.  */
3072 _ACEOF
3073 cat confdefs.h >>conftest.$ac_ext
3074 cat >>conftest.$ac_ext <<_ACEOF
3075 /* end confdefs.h.  */
3076
3077 int
3078 main ()
3079 {
3080
3081   ;
3082   return 0;
3083 }
3084 _ACEOF
3085 rm -f conftest.$ac_objext
3086 if { (ac_try="$ac_compile"
3087 case "(($ac_try" in
3088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089   *) ac_try_echo=$ac_try;;
3090 esac
3091 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3092   (eval "$ac_compile") 2>conftest.er1
3093   ac_status=$?
3094   grep -v '^ *+' conftest.er1 >conftest.err
3095   rm -f conftest.er1
3096   cat conftest.err >&5
3097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3098   (exit $ac_status); } && {
3099          test -z "$ac_c_werror_flag" ||
3100          test ! -s conftest.err
3101        } && test -s conftest.$ac_objext; then
3102   ac_cv_prog_cc_g=yes
3103 else
3104   echo "$as_me: failed program was:" >&5
3105 sed 's/^/| /' conftest.$ac_ext >&5
3106
3107         CFLAGS=""
3108       cat >conftest.$ac_ext <<_ACEOF
3109 /* confdefs.h.  */
3110 _ACEOF
3111 cat confdefs.h >>conftest.$ac_ext
3112 cat >>conftest.$ac_ext <<_ACEOF
3113 /* end confdefs.h.  */
3114
3115 int
3116 main ()
3117 {
3118
3119   ;
3120   return 0;
3121 }
3122 _ACEOF
3123 rm -f conftest.$ac_objext
3124 if { (ac_try="$ac_compile"
3125 case "(($ac_try" in
3126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3127   *) ac_try_echo=$ac_try;;
3128 esac
3129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3130   (eval "$ac_compile") 2>conftest.er1
3131   ac_status=$?
3132   grep -v '^ *+' conftest.er1 >conftest.err
3133   rm -f conftest.er1
3134   cat conftest.err >&5
3135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136   (exit $ac_status); } && {
3137          test -z "$ac_c_werror_flag" ||
3138          test ! -s conftest.err
3139        } && test -s conftest.$ac_objext; then
3140   :
3141 else
3142   echo "$as_me: failed program was:" >&5
3143 sed 's/^/| /' conftest.$ac_ext >&5
3144
3145         ac_c_werror_flag=$ac_save_c_werror_flag
3146          CFLAGS="-g"
3147          cat >conftest.$ac_ext <<_ACEOF
3148 /* confdefs.h.  */
3149 _ACEOF
3150 cat confdefs.h >>conftest.$ac_ext
3151 cat >>conftest.$ac_ext <<_ACEOF
3152 /* end confdefs.h.  */
3153
3154 int
3155 main ()
3156 {
3157
3158   ;
3159   return 0;
3160 }
3161 _ACEOF
3162 rm -f conftest.$ac_objext
3163 if { (ac_try="$ac_compile"
3164 case "(($ac_try" in
3165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3166   *) ac_try_echo=$ac_try;;
3167 esac
3168 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3169   (eval "$ac_compile") 2>conftest.er1
3170   ac_status=$?
3171   grep -v '^ *+' conftest.er1 >conftest.err
3172   rm -f conftest.er1
3173   cat conftest.err >&5
3174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175   (exit $ac_status); } && {
3176          test -z "$ac_c_werror_flag" ||
3177          test ! -s conftest.err
3178        } && test -s conftest.$ac_objext; then
3179   ac_cv_prog_cc_g=yes
3180 else
3181   echo "$as_me: failed program was:" >&5
3182 sed 's/^/| /' conftest.$ac_ext >&5
3183
3184
3185 fi
3186
3187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188 fi
3189
3190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3191 fi
3192
3193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3194    ac_c_werror_flag=$ac_save_c_werror_flag
3195 fi
3196 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3197 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3198 if test "$ac_test_CFLAGS" = set; then
3199   CFLAGS=$ac_save_CFLAGS
3200 elif test $ac_cv_prog_cc_g = yes; then
3201   if test "$GCC" = yes; then
3202     CFLAGS="-g -O2"
3203   else
3204     CFLAGS="-g"
3205   fi
3206 else
3207   if test "$GCC" = yes; then
3208     CFLAGS="-O2"
3209   else
3210     CFLAGS=
3211   fi
3212 fi
3213 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3214 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3215 if test "${ac_cv_prog_cc_c89+set}" = set; then
3216   echo $ECHO_N "(cached) $ECHO_C" >&6
3217 else
3218   ac_cv_prog_cc_c89=no
3219 ac_save_CC=$CC
3220 cat >conftest.$ac_ext <<_ACEOF
3221 /* confdefs.h.  */
3222 _ACEOF
3223 cat confdefs.h >>conftest.$ac_ext
3224 cat >>conftest.$ac_ext <<_ACEOF
3225 /* end confdefs.h.  */
3226 #include <stdarg.h>
3227 #include <stdio.h>
3228 #include <sys/types.h>
3229 #include <sys/stat.h>
3230 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3231 struct buf { int x; };
3232 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3233 static char *e (p, i)
3234      char **p;
3235      int i;
3236 {
3237   return p[i];
3238 }
3239 static char *f (char * (*g) (char **, int), char **p, ...)
3240 {
3241   char *s;
3242   va_list v;
3243   va_start (v,p);
3244   s = g (p, va_arg (v,int));
3245   va_end (v);
3246   return s;
3247 }
3248
3249 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3250    function prototypes and stuff, but not '\xHH' hex character constants.
3251    These don't provoke an error unfortunately, instead are silently treated
3252    as 'x'.  The following induces an error, until -std is added to get
3253    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3254    array size at least.  It's necessary to write '\x00'==0 to get something
3255    that's true only with -std.  */
3256 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3257
3258 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3259    inside strings and character constants.  */
3260 #define FOO(x) 'x'
3261 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3262
3263 int test (int i, double x);
3264 struct s1 {int (*f) (int a);};
3265 struct s2 {int (*f) (double a);};
3266 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3267 int argc;
3268 char **argv;
3269 int
3270 main ()
3271 {
3272 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3273   ;
3274   return 0;
3275 }
3276 _ACEOF
3277 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3278         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3279 do
3280   CC="$ac_save_CC $ac_arg"
3281   rm -f conftest.$ac_objext
3282 if { (ac_try="$ac_compile"
3283 case "(($ac_try" in
3284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285   *) ac_try_echo=$ac_try;;
3286 esac
3287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3288   (eval "$ac_compile") 2>conftest.er1
3289   ac_status=$?
3290   grep -v '^ *+' conftest.er1 >conftest.err
3291   rm -f conftest.er1
3292   cat conftest.err >&5
3293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294   (exit $ac_status); } && {
3295          test -z "$ac_c_werror_flag" ||
3296          test ! -s conftest.err
3297        } && test -s conftest.$ac_objext; then
3298   ac_cv_prog_cc_c89=$ac_arg
3299 else
3300   echo "$as_me: failed program was:" >&5
3301 sed 's/^/| /' conftest.$ac_ext >&5
3302
3303
3304 fi
3305
3306 rm -f core conftest.err conftest.$ac_objext
3307   test "x$ac_cv_prog_cc_c89" != "xno" && break
3308 done
3309 rm -f conftest.$ac_ext
3310 CC=$ac_save_CC
3311
3312 fi
3313 # AC_CACHE_VAL
3314 case "x$ac_cv_prog_cc_c89" in
3315   x)
3316     { echo "$as_me:$LINENO: result: none needed" >&5
3317 echo "${ECHO_T}none needed" >&6; } ;;
3318   xno)
3319     { echo "$as_me:$LINENO: result: unsupported" >&5
3320 echo "${ECHO_T}unsupported" >&6; } ;;
3321   *)
3322     CC="$CC $ac_cv_prog_cc_c89"
3323     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3324 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3325 esac
3326
3327
3328 ac_ext=c
3329 ac_cpp='$CPP $CPPFLAGS'
3330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3333
3334
3335   if test -z "$GCC"; then
3336     # not using GCC
3337     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3338 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3339     case "$host" in
3340       *-hpux* )
3341         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3342 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3343         CC="$CC -Ae"
3344       ;;
3345       *-aix* )
3346         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3347 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3348         CC="$CC -qlanglvl=ansi -qhalt=e"
3349       ;;
3350       *-dec-* )
3351         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3352 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3353         CC="$CC -std1"
3354       ;;
3355       *)
3356         { echo "$as_me:$LINENO: result: no idea" >&5
3357 echo "${ECHO_T}no idea" >&6; }
3358       ;;
3359     esac
3360   else
3361     # using GCC
3362     case "$host" in
3363       *-solaris*)
3364         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3365 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3366         CC="$CC -D__EXTENSIONS__"
3367       ;;
3368     esac
3369   fi
3370
3371   OBJCC="$CC"
3372
3373   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3374 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3375   if test "$cross_compiling" = yes; then
3376   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3377 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3378    { (exit 1); exit 1; }; }
3379 else
3380   cat >conftest.$ac_ext <<_ACEOF
3381 /* confdefs.h.  */
3382 _ACEOF
3383 cat confdefs.h >>conftest.$ac_ext
3384 cat >>conftest.$ac_ext <<_ACEOF
3385 /* end confdefs.h.  */
3386  main(int ac, char **av) { return 0; }
3387 _ACEOF
3388 rm -f conftest$ac_exeext
3389 if { (ac_try="$ac_link"
3390 case "(($ac_try" in
3391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392   *) ac_try_echo=$ac_try;;
3393 esac
3394 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3395   (eval "$ac_link") 2>&5
3396   ac_status=$?
3397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3399   { (case "(($ac_try" in
3400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401   *) ac_try_echo=$ac_try;;
3402 esac
3403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3404   (eval "$ac_try") 2>&5
3405   ac_status=$?
3406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407   (exit $ac_status); }; }; then
3408   { echo "$as_me:$LINENO: result: yes" >&5
3409 echo "${ECHO_T}yes" >&6; }
3410 else
3411   echo "$as_me: program exited with status $ac_status" >&5
3412 echo "$as_me: failed program was:" >&5
3413 sed 's/^/| /' conftest.$ac_ext >&5
3414
3415 ( exit $ac_status )
3416 { echo "$as_me:$LINENO: result: no" >&5
3417 echo "${ECHO_T}no" >&6; }
3418      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3419 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3420    { (exit 1); exit 1; }; }
3421 fi
3422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3423 fi
3424
3425
3426
3427   if test -n "$GCC"; then
3428     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3429 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3430     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3431     OBJCC="$OBJCC -Wall"
3432     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3433     # and so perhaps now we can do without -pedantic?
3434   else
3435     case "$host" in
3436       *-irix5* |*-irix6.0-3* )
3437         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3438 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3439         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3440       ;;
3441 #     *-dec-osf* )
3442 #       if test -z "$GCC"; then
3443 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3444 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3445 #       fi
3446 #     ;;
3447     esac
3448   fi
3449
3450 if test -n "$GCC"; then
3451    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3452 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3453 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   rm -rf conftest.$ac_ext
3457      touch conftest.$ac_ext
3458      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3459           grep unrecognized >/dev/null ); then
3460        ac_cv_gcc_accepts_no_overlength=no
3461      else
3462        ac_cv_gcc_accepts_no_overlength=yes
3463        CC="$CC -Wno-overlength-strings"
3464      fi
3465 fi
3466 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3467 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3468    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3469   fi
3470
3471 if test -n "$GCC"; then
3472    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3473 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3474 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3475   echo $ECHO_N "(cached) $ECHO_C" >&6
3476 else
3477   rm -rf conftest.$ac_ext
3478      touch conftest.$ac_ext
3479      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3480           grep unrecognized >/dev/null ); then
3481        ac_cv_gcc_accepts_no_decl_after=no
3482      else
3483        ac_cv_gcc_accepts_no_decl_after=yes
3484        CC="$CC -Wdeclaration-after-statement"
3485      fi
3486 fi
3487 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3488 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3489    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3490   fi
3491
3492 if test -n "$GCC"; then
3493    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3494 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3495 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3496   echo $ECHO_N "(cached) $ECHO_C" >&6
3497 else
3498   rm -rf conftest.$ac_ext
3499      touch conftest.$ac_ext
3500      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3501           grep unrecognized >/dev/null ); then
3502        ac_cv_gcc_accepts_no_cpp_precomp=no
3503      else
3504        ac_cv_gcc_accepts_no_cpp_precomp=yes
3505        CC="$CC -no-cpp-precomp"
3506      fi
3507 fi
3508 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3509 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3510    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3511   fi
3512
3513 if test -n "$GCC"; then
3514
3515   case "$host" in
3516     *-darwin* )
3517       # Fucking Apple let // comments sneak into OpenGL headers, so
3518       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3519     ;;
3520    *)
3521      if test -n "$GCC"; then
3522    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3523 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3524 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3525   echo $ECHO_N "(cached) $ECHO_C" >&6
3526 else
3527   rm -rf conftest.$ac_ext
3528      touch conftest.$ac_ext
3529      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3530           grep unrecognized >/dev/null ); then
3531        ac_cv_gcc_accepts_std=no
3532      else
3533        ac_cv_gcc_accepts_std=yes
3534        CC="$CC -std=c89"
3535      fi
3536 fi
3537 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3538 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3539    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3540   fi
3541
3542    ;;
3543   esac
3544
3545    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3546 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3547    #
3548    # The reason that // comments are banned from xscreensaver is that gcc is
3549    # basically the only compiler in the world that supports them in C code.
3550    # All other vendors support them only in their C++ compilers, not in their
3551    # ANSI C compilers.  This means that it's a portability problem: every time
3552    # these comments have snuck into the xscreensaver source code, I've gotten
3553    # complaints about it the next day.  So we turn off support for them in gcc
3554    # as well to prevent them from accidentially slipping in.
3555    #
3556    if test "$ac_gcc_accepts_std" = yes ; then
3557      #
3558      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3559      # (That appears to be the only additional preprocessor symbol
3560      # it defines, in addition to the syntax changes it makes.)
3561      #
3562      # -std=gnu89 is no good, because // comments were a GNU extension
3563      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3564      # with -std=gnu89 but not with -std=c89.)
3565      #
3566      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3567      CC="$CC -U__STRICT_ANSI__"
3568 #   else
3569 #     # The old way:
3570 #     CC="$CC -Wp,-lang-c89"
3571    fi
3572   fi
3573
3574 ac_ext=c
3575 ac_cpp='$CPP $CPPFLAGS'
3576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3579 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3580 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3581 # On Suns, sometimes $CPP names a directory.
3582 if test -n "$CPP" && test -d "$CPP"; then
3583   CPP=
3584 fi
3585 if test -z "$CPP"; then
3586   if test "${ac_cv_prog_CPP+set}" = set; then
3587   echo $ECHO_N "(cached) $ECHO_C" >&6
3588 else
3589       # Double quotes because CPP needs to be expanded
3590     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3591     do
3592       ac_preproc_ok=false
3593 for ac_c_preproc_warn_flag in '' yes
3594 do
3595   # Use a header file that comes with gcc, so configuring glibc
3596   # with a fresh cross-compiler works.
3597   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3598   # <limits.h> exists even on freestanding compilers.
3599   # On the NeXT, cc -E runs the code through the compiler's parser,
3600   # not just through cpp. "Syntax error" is here to catch this case.
3601   cat >conftest.$ac_ext <<_ACEOF
3602 /* confdefs.h.  */
3603 _ACEOF
3604 cat confdefs.h >>conftest.$ac_ext
3605 cat >>conftest.$ac_ext <<_ACEOF
3606 /* end confdefs.h.  */
3607 #ifdef __STDC__
3608 # include <limits.h>
3609 #else
3610 # include <assert.h>
3611 #endif
3612                      Syntax error
3613 _ACEOF
3614 if { (ac_try="$ac_cpp conftest.$ac_ext"
3615 case "(($ac_try" in
3616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3617   *) ac_try_echo=$ac_try;;
3618 esac
3619 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3620   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3621   ac_status=$?
3622   grep -v '^ *+' conftest.er1 >conftest.err
3623   rm -f conftest.er1
3624   cat conftest.err >&5
3625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626   (exit $ac_status); } >/dev/null && {
3627          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3628          test ! -s conftest.err
3629        }; then
3630   :
3631 else
3632   echo "$as_me: failed program was:" >&5
3633 sed 's/^/| /' conftest.$ac_ext >&5
3634
3635   # Broken: fails on valid input.
3636 continue
3637 fi
3638
3639 rm -f conftest.err conftest.$ac_ext
3640
3641   # OK, works on sane cases.  Now check whether nonexistent headers
3642   # can be detected and how.
3643   cat >conftest.$ac_ext <<_ACEOF
3644 /* confdefs.h.  */
3645 _ACEOF
3646 cat confdefs.h >>conftest.$ac_ext
3647 cat >>conftest.$ac_ext <<_ACEOF
3648 /* end confdefs.h.  */
3649 #include <ac_nonexistent.h>
3650 _ACEOF
3651 if { (ac_try="$ac_cpp conftest.$ac_ext"
3652 case "(($ac_try" in
3653   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3654   *) ac_try_echo=$ac_try;;
3655 esac
3656 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3657   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3658   ac_status=$?
3659   grep -v '^ *+' conftest.er1 >conftest.err
3660   rm -f conftest.er1
3661   cat conftest.err >&5
3662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3663   (exit $ac_status); } >/dev/null && {
3664          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3665          test ! -s conftest.err
3666        }; then
3667   # Broken: success on invalid input.
3668 continue
3669 else
3670   echo "$as_me: failed program was:" >&5
3671 sed 's/^/| /' conftest.$ac_ext >&5
3672
3673   # Passes both tests.
3674 ac_preproc_ok=:
3675 break
3676 fi
3677
3678 rm -f conftest.err conftest.$ac_ext
3679
3680 done
3681 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3682 rm -f conftest.err conftest.$ac_ext
3683 if $ac_preproc_ok; then
3684   break
3685 fi
3686
3687     done
3688     ac_cv_prog_CPP=$CPP
3689
3690 fi
3691   CPP=$ac_cv_prog_CPP
3692 else
3693   ac_cv_prog_CPP=$CPP
3694 fi
3695 { echo "$as_me:$LINENO: result: $CPP" >&5
3696 echo "${ECHO_T}$CPP" >&6; }
3697 ac_preproc_ok=false
3698 for ac_c_preproc_warn_flag in '' yes
3699 do
3700   # Use a header file that comes with gcc, so configuring glibc
3701   # with a fresh cross-compiler works.
3702   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3703   # <limits.h> exists even on freestanding compilers.
3704   # On the NeXT, cc -E runs the code through the compiler's parser,
3705   # not just through cpp. "Syntax error" is here to catch this case.
3706   cat >conftest.$ac_ext <<_ACEOF
3707 /* confdefs.h.  */
3708 _ACEOF
3709 cat confdefs.h >>conftest.$ac_ext
3710 cat >>conftest.$ac_ext <<_ACEOF
3711 /* end confdefs.h.  */
3712 #ifdef __STDC__
3713 # include <limits.h>
3714 #else
3715 # include <assert.h>
3716 #endif
3717                      Syntax error
3718 _ACEOF
3719 if { (ac_try="$ac_cpp conftest.$ac_ext"
3720 case "(($ac_try" in
3721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3722   *) ac_try_echo=$ac_try;;
3723 esac
3724 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3725   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3726   ac_status=$?
3727   grep -v '^ *+' conftest.er1 >conftest.err
3728   rm -f conftest.er1
3729   cat conftest.err >&5
3730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731   (exit $ac_status); } >/dev/null && {
3732          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3733          test ! -s conftest.err
3734        }; then
3735   :
3736 else
3737   echo "$as_me: failed program was:" >&5
3738 sed 's/^/| /' conftest.$ac_ext >&5
3739
3740   # Broken: fails on valid input.
3741 continue
3742 fi
3743
3744 rm -f conftest.err conftest.$ac_ext
3745
3746   # OK, works on sane cases.  Now check whether nonexistent headers
3747   # can be detected and how.
3748   cat >conftest.$ac_ext <<_ACEOF
3749 /* confdefs.h.  */
3750 _ACEOF
3751 cat confdefs.h >>conftest.$ac_ext
3752 cat >>conftest.$ac_ext <<_ACEOF
3753 /* end confdefs.h.  */
3754 #include <ac_nonexistent.h>
3755 _ACEOF
3756 if { (ac_try="$ac_cpp conftest.$ac_ext"
3757 case "(($ac_try" in
3758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3759   *) ac_try_echo=$ac_try;;
3760 esac
3761 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3762   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3763   ac_status=$?
3764   grep -v '^ *+' conftest.er1 >conftest.err
3765   rm -f conftest.er1
3766   cat conftest.err >&5
3767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768   (exit $ac_status); } >/dev/null && {
3769          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3770          test ! -s conftest.err
3771        }; then
3772   # Broken: success on invalid input.
3773 continue
3774 else
3775   echo "$as_me: failed program was:" >&5
3776 sed 's/^/| /' conftest.$ac_ext >&5
3777
3778   # Passes both tests.
3779 ac_preproc_ok=:
3780 break
3781 fi
3782
3783 rm -f conftest.err conftest.$ac_ext
3784
3785 done
3786 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3787 rm -f conftest.err conftest.$ac_ext
3788 if $ac_preproc_ok; then
3789   :
3790 else
3791   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3792 See \`config.log' for more details." >&5
3793 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3794 See \`config.log' for more details." >&2;}
3795    { (exit 1); exit 1; }; }
3796 fi
3797
3798 ac_ext=c
3799 ac_cpp='$CPP $CPPFLAGS'
3800 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803
3804 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3805 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3806 if test "${ac_cv_c_const+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809   cat >conftest.$ac_ext <<_ACEOF
3810 /* confdefs.h.  */
3811 _ACEOF
3812 cat confdefs.h >>conftest.$ac_ext
3813 cat >>conftest.$ac_ext <<_ACEOF
3814 /* end confdefs.h.  */
3815
3816 int
3817 main ()
3818 {
3819 /* FIXME: Include the comments suggested by Paul. */
3820 #ifndef __cplusplus
3821   /* Ultrix mips cc rejects this.  */
3822   typedef int charset[2];
3823   const charset cs;
3824   /* SunOS 4.1.1 cc rejects this.  */
3825   char const *const *pcpcc;
3826   char **ppc;
3827   /* NEC SVR4.0.2 mips cc rejects this.  */
3828   struct point {int x, y;};
3829   static struct point const zero = {0,0};
3830   /* AIX XL C 1.02.0.0 rejects this.
3831      It does not let you subtract one const X* pointer from another in
3832      an arm of an if-expression whose if-part is not a constant
3833      expression */
3834   const char *g = "string";
3835   pcpcc = &g + (g ? g-g : 0);
3836   /* HPUX 7.0 cc rejects these. */
3837   ++pcpcc;
3838   ppc = (char**) pcpcc;
3839   pcpcc = (char const *const *) ppc;
3840   { /* SCO 3.2v4 cc rejects this.  */
3841     char *t;
3842     char const *s = 0 ? (char *) 0 : (char const *) 0;
3843
3844     *t++ = 0;
3845     if (s) return 0;
3846   }
3847   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3848     int x[] = {25, 17};
3849     const int *foo = &x[0];
3850     ++foo;
3851   }
3852   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3853     typedef const int *iptr;
3854     iptr p = 0;
3855     ++p;
3856   }
3857   { /* AIX XL C 1.02.0.0 rejects this saying
3858        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3859     struct s { int j; const int *ap[3]; };
3860     struct s *b; b->j = 5;
3861   }
3862   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3863     const int foo = 10;
3864     if (!foo) return 0;
3865   }
3866   return !cs[0] && !zero.x;
3867 #endif
3868
3869   ;
3870   return 0;
3871 }
3872 _ACEOF
3873 rm -f conftest.$ac_objext
3874 if { (ac_try="$ac_compile"
3875 case "(($ac_try" in
3876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3877   *) ac_try_echo=$ac_try;;
3878 esac
3879 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3880   (eval "$ac_compile") 2>conftest.er1
3881   ac_status=$?
3882   grep -v '^ *+' conftest.er1 >conftest.err
3883   rm -f conftest.er1
3884   cat conftest.err >&5
3885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3886   (exit $ac_status); } && {
3887          test -z "$ac_c_werror_flag" ||
3888          test ! -s conftest.err
3889        } && test -s conftest.$ac_objext; then
3890   ac_cv_c_const=yes
3891 else
3892   echo "$as_me: failed program was:" >&5
3893 sed 's/^/| /' conftest.$ac_ext >&5
3894
3895         ac_cv_c_const=no
3896 fi
3897
3898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3899 fi
3900 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3901 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3902 if test $ac_cv_c_const = no; then
3903
3904 cat >>confdefs.h <<\_ACEOF
3905 #define const
3906 _ACEOF
3907
3908 fi
3909
3910 { echo "$as_me:$LINENO: checking for inline" >&5
3911 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3912 if test "${ac_cv_c_inline+set}" = set; then
3913   echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915   ac_cv_c_inline=no
3916 for ac_kw in inline __inline__ __inline; do
3917   cat >conftest.$ac_ext <<_ACEOF
3918 /* confdefs.h.  */
3919 _ACEOF
3920 cat confdefs.h >>conftest.$ac_ext
3921 cat >>conftest.$ac_ext <<_ACEOF
3922 /* end confdefs.h.  */
3923 #ifndef __cplusplus
3924 typedef int foo_t;
3925 static $ac_kw foo_t static_foo () {return 0; }
3926 $ac_kw foo_t foo () {return 0; }
3927 #endif
3928
3929 _ACEOF
3930 rm -f conftest.$ac_objext
3931 if { (ac_try="$ac_compile"
3932 case "(($ac_try" in
3933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3934   *) ac_try_echo=$ac_try;;
3935 esac
3936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3937   (eval "$ac_compile") 2>conftest.er1
3938   ac_status=$?
3939   grep -v '^ *+' conftest.er1 >conftest.err
3940   rm -f conftest.er1
3941   cat conftest.err >&5
3942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943   (exit $ac_status); } && {
3944          test -z "$ac_c_werror_flag" ||
3945          test ! -s conftest.err
3946        } && test -s conftest.$ac_objext; then
3947   ac_cv_c_inline=$ac_kw
3948 else
3949   echo "$as_me: failed program was:" >&5
3950 sed 's/^/| /' conftest.$ac_ext >&5
3951
3952
3953 fi
3954
3955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956   test "$ac_cv_c_inline" != no && break
3957 done
3958
3959 fi
3960 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3961 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3962
3963
3964 case $ac_cv_c_inline in
3965   inline | yes) ;;
3966   *)
3967     case $ac_cv_c_inline in
3968       no) ac_val=;;
3969       *) ac_val=$ac_cv_c_inline;;
3970     esac
3971     cat >>confdefs.h <<_ACEOF
3972 #ifndef __cplusplus
3973 #define inline $ac_val
3974 #endif
3975 _ACEOF
3976     ;;
3977 esac
3978
3979
3980 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3981   { echo "$as_me:$LINENO: checking for bc" >&5
3982 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3983   if test "$ac_bc_result" = "15" ; then
3984     { echo "$as_me:$LINENO: result: yes" >&5
3985 echo "${ECHO_T}yes" >&6; }
3986   else
3987     { echo "$as_me:$LINENO: result: no" >&5
3988 echo "${ECHO_T}no" >&6; }
3989     echo ''
3990     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3991                   part of Unix since the 1970s.  Come back when your vendor
3992                   has grown a clue." >&5
3993 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3994                   part of Unix since the 1970s.  Come back when your vendor
3995                   has grown a clue." >&2;}
3996    { (exit 1); exit 1; }; }
3997   fi
3998
3999
4000 # stuff for Makefiles
4001 # Find a good install program.  We prefer a C program (faster),
4002 # so one script is as good as another.  But avoid the broken or
4003 # incompatible versions:
4004 # SysV /etc/install, /usr/sbin/install
4005 # SunOS /usr/etc/install
4006 # IRIX /sbin/install
4007 # AIX /bin/install
4008 # AmigaOS /C/install, which installs bootblocks on floppy discs
4009 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4010 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4011 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4012 # OS/2's system install, which has a completely different semantic
4013 # ./install, which can be erroneously created by make from ./install.sh.
4014 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4015 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4016 if test -z "$INSTALL"; then
4017 if test "${ac_cv_path_install+set}" = set; then
4018   echo $ECHO_N "(cached) $ECHO_C" >&6
4019 else
4020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021 for as_dir in $PATH
4022 do
4023   IFS=$as_save_IFS
4024   test -z "$as_dir" && as_dir=.
4025   # Account for people who put trailing slashes in PATH elements.
4026 case $as_dir/ in
4027   ./ | .// | /cC/* | \
4028   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4029   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4030   /usr/ucb/* ) ;;
4031   *)
4032     # OSF1 and SCO ODT 3.0 have their own names for install.
4033     # Don't use installbsd from OSF since it installs stuff as root
4034     # by default.
4035     for ac_prog in ginstall scoinst install; do
4036       for ac_exec_ext in '' $ac_executable_extensions; do
4037         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4038           if test $ac_prog = install &&
4039             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4040             # AIX install.  It has an incompatible calling convention.
4041             :
4042           elif test $ac_prog = install &&
4043             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4044             # program-specific install script used by HP pwplus--don't use.
4045             :
4046           else
4047             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4048             break 3
4049           fi
4050         fi
4051       done
4052     done
4053     ;;
4054 esac
4055 done
4056 IFS=$as_save_IFS
4057
4058
4059 fi
4060   if test "${ac_cv_path_install+set}" = set; then
4061     INSTALL=$ac_cv_path_install
4062   else
4063     # As a last resort, use the slow shell script.  Don't cache a
4064     # value for INSTALL within a source directory, because that will
4065     # break other packages using the cache if that directory is
4066     # removed, or if the value is a relative name.
4067     INSTALL=$ac_install_sh
4068   fi
4069 fi
4070 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4071 echo "${ECHO_T}$INSTALL" >&6; }
4072
4073 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4074 # It thinks the first close brace ends the variable substitution.
4075 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4076
4077 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4078
4079 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4080
4081 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4082 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4083 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   ac_cv_install_d_creates_dirs=no
4087      rm -rf conftestdir
4088      if mkdir conftestdir; then
4089        cd conftestdir 2>/dev/null
4090        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4091        if test -d dir1/dir2/. ; then
4092          ac_cv_install_d_creates_dirs=yes
4093        fi
4094        cd .. 2>/dev/null
4095        rm -rf conftestdir
4096      fi
4097
4098 fi
4099 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4100 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4101
4102   if test "$ac_cv_install_d_creates_dirs" = no ; then
4103     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4104 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4105 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4106   echo $ECHO_N "(cached) $ECHO_C" >&6
4107 else
4108   ac_cv_mkdir_p_creates_dirs=no
4109        rm -rf conftestdir
4110        if mkdir conftestdir; then
4111          cd conftestdir 2>/dev/null
4112          mkdir -p dir1/dir2 >/dev/null 2>&1
4113          if test -d dir1/dir2/. ; then
4114            ac_cv_mkdir_p_creates_dirs=yes
4115          fi
4116          cd .. 2>/dev/null
4117          rm -rf conftestdir
4118        fi
4119
4120 fi
4121 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4122 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4123   fi
4124
4125   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4126     INSTALL_DIRS='${INSTALL} -d'
4127   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4128     INSTALL_DIRS='mkdir -p'
4129   else
4130     # any other ideas?
4131     INSTALL_DIRS='${INSTALL} -d'
4132   fi
4133
4134 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4135 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4136 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4137 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4138   echo $ECHO_N "(cached) $ECHO_C" >&6
4139 else
4140   cat >conftest.make <<\_ACEOF
4141 SHELL = /bin/sh
4142 all:
4143         @echo '@@@%%%=$(MAKE)=@@@%%%'
4144 _ACEOF
4145 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4146 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4147   *@@@%%%=?*=@@@%%%*)
4148     eval ac_cv_prog_make_${ac_make}_set=yes;;
4149   *)
4150     eval ac_cv_prog_make_${ac_make}_set=no;;
4151 esac
4152 rm -f conftest.make
4153 fi
4154 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4155   { echo "$as_me:$LINENO: result: yes" >&5
4156 echo "${ECHO_T}yes" >&6; }
4157   SET_MAKE=
4158 else
4159   { echo "$as_me:$LINENO: result: no" >&5
4160 echo "${ECHO_T}no" >&6; }
4161   SET_MAKE="MAKE=${MAKE-make}"
4162 fi
4163
4164
4165 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4166 # That's wrong: it should be set to '${INSTALL}', so that one can
4167 # implement the "install-strip" target properly (strip executables,
4168 # but do not try to strip scripts.)
4169 #
4170 INSTALL_SCRIPT='${INSTALL}'
4171
4172 # random libc stuff
4173
4174 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4175 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4176 if test "${ac_cv_path_GREP+set}" = set; then
4177   echo $ECHO_N "(cached) $ECHO_C" >&6
4178 else
4179   # Extract the first word of "grep ggrep" to use in msg output
4180 if test -z "$GREP"; then
4181 set dummy grep ggrep; ac_prog_name=$2
4182 if test "${ac_cv_path_GREP+set}" = set; then
4183   echo $ECHO_N "(cached) $ECHO_C" >&6
4184 else
4185   ac_path_GREP_found=false
4186 # Loop through the user's path and test for each of PROGNAME-LIST
4187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4189 do
4190   IFS=$as_save_IFS
4191   test -z "$as_dir" && as_dir=.
4192   for ac_prog in grep ggrep; do
4193   for ac_exec_ext in '' $ac_executable_extensions; do
4194     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4195     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4196     # Check for GNU ac_path_GREP and select it if it is found.
4197   # Check for GNU $ac_path_GREP
4198 case `"$ac_path_GREP" --version 2>&1` in
4199 *GNU*)
4200   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4201 *)
4202   ac_count=0
4203   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4204   while :
4205   do
4206     cat "conftest.in" "conftest.in" >"conftest.tmp"
4207     mv "conftest.tmp" "conftest.in"
4208     cp "conftest.in" "conftest.nl"
4209     echo 'GREP' >> "conftest.nl"
4210     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4211     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4212     ac_count=`expr $ac_count + 1`
4213     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4214       # Best one so far, save it but keep looking for a better one
4215       ac_cv_path_GREP="$ac_path_GREP"
4216       ac_path_GREP_max=$ac_count
4217     fi
4218     # 10*(2^10) chars as input seems more than enough
4219     test $ac_count -gt 10 && break
4220   done
4221   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4222 esac
4223
4224
4225     $ac_path_GREP_found && break 3
4226   done
4227 done
4228
4229 done
4230 IFS=$as_save_IFS
4231
4232
4233 fi
4234
4235 GREP="$ac_cv_path_GREP"
4236 if test -z "$GREP"; then
4237   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4238 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4239    { (exit 1); exit 1; }; }
4240 fi
4241
4242 else
4243   ac_cv_path_GREP=$GREP
4244 fi
4245
4246
4247 fi
4248 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4249 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4250  GREP="$ac_cv_path_GREP"
4251
4252
4253 { echo "$as_me:$LINENO: checking for egrep" >&5
4254 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4255 if test "${ac_cv_path_EGREP+set}" = set; then
4256   echo $ECHO_N "(cached) $ECHO_C" >&6
4257 else
4258   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4259    then ac_cv_path_EGREP="$GREP -E"
4260    else
4261      # Extract the first word of "egrep" to use in msg output
4262 if test -z "$EGREP"; then
4263 set dummy egrep; ac_prog_name=$2
4264 if test "${ac_cv_path_EGREP+set}" = set; then
4265   echo $ECHO_N "(cached) $ECHO_C" >&6
4266 else
4267   ac_path_EGREP_found=false
4268 # Loop through the user's path and test for each of PROGNAME-LIST
4269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4270 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4271 do
4272   IFS=$as_save_IFS
4273   test -z "$as_dir" && as_dir=.
4274   for ac_prog in egrep; do
4275   for ac_exec_ext in '' $ac_executable_extensions; do
4276     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4277     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4278     # Check for GNU ac_path_EGREP and select it if it is found.
4279   # Check for GNU $ac_path_EGREP
4280 case `"$ac_path_EGREP" --version 2>&1` in
4281 *GNU*)
4282   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4283 *)
4284   ac_count=0
4285   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4286   while :
4287   do
4288     cat "conftest.in" "conftest.in" >"conftest.tmp"
4289     mv "conftest.tmp" "conftest.in"
4290     cp "conftest.in" "conftest.nl"
4291     echo 'EGREP' >> "conftest.nl"
4292     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4293     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4294     ac_count=`expr $ac_count + 1`
4295     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4296       # Best one so far, save it but keep looking for a better one
4297       ac_cv_path_EGREP="$ac_path_EGREP"
4298       ac_path_EGREP_max=$ac_count
4299     fi
4300     # 10*(2^10) chars as input seems more than enough
4301     test $ac_count -gt 10 && break
4302   done
4303   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4304 esac
4305
4306
4307     $ac_path_EGREP_found && break 3
4308   done
4309 done
4310
4311 done
4312 IFS=$as_save_IFS
4313
4314
4315 fi
4316
4317 EGREP="$ac_cv_path_EGREP"
4318 if test -z "$EGREP"; then
4319   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4320 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4321    { (exit 1); exit 1; }; }
4322 fi
4323
4324 else
4325   ac_cv_path_EGREP=$EGREP
4326 fi
4327
4328
4329    fi
4330 fi
4331 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4332 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4333  EGREP="$ac_cv_path_EGREP"
4334
4335
4336 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4337 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4338 if test "${ac_cv_header_stdc+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341   cat >conftest.$ac_ext <<_ACEOF
4342 /* confdefs.h.  */
4343 _ACEOF
4344 cat confdefs.h >>conftest.$ac_ext
4345 cat >>conftest.$ac_ext <<_ACEOF
4346 /* end confdefs.h.  */
4347 #include <stdlib.h>
4348 #include <stdarg.h>
4349 #include <string.h>
4350 #include <float.h>
4351
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 rm -f conftest.$ac_objext
4361 if { (ac_try="$ac_compile"
4362 case "(($ac_try" in
4363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4364   *) ac_try_echo=$ac_try;;
4365 esac
4366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4367   (eval "$ac_compile") 2>conftest.er1
4368   ac_status=$?
4369   grep -v '^ *+' conftest.er1 >conftest.err
4370   rm -f conftest.er1
4371   cat conftest.err >&5
4372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373   (exit $ac_status); } && {
4374          test -z "$ac_c_werror_flag" ||
4375          test ! -s conftest.err
4376        } && test -s conftest.$ac_objext; then
4377   ac_cv_header_stdc=yes
4378 else
4379   echo "$as_me: failed program was:" >&5
4380 sed 's/^/| /' conftest.$ac_ext >&5
4381
4382         ac_cv_header_stdc=no
4383 fi
4384
4385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4386
4387 if test $ac_cv_header_stdc = yes; then
4388   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4389   cat >conftest.$ac_ext <<_ACEOF
4390 /* confdefs.h.  */
4391 _ACEOF
4392 cat confdefs.h >>conftest.$ac_ext
4393 cat >>conftest.$ac_ext <<_ACEOF
4394 /* end confdefs.h.  */
4395 #include <string.h>
4396
4397 _ACEOF
4398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4399   $EGREP "memchr" >/dev/null 2>&1; then
4400   :
4401 else
4402   ac_cv_header_stdc=no
4403 fi
4404 rm -f conftest*
4405
4406 fi
4407
4408 if test $ac_cv_header_stdc = yes; then
4409   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4410   cat >conftest.$ac_ext <<_ACEOF
4411 /* confdefs.h.  */
4412 _ACEOF
4413 cat confdefs.h >>conftest.$ac_ext
4414 cat >>conftest.$ac_ext <<_ACEOF
4415 /* end confdefs.h.  */
4416 #include <stdlib.h>
4417
4418 _ACEOF
4419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4420   $EGREP "free" >/dev/null 2>&1; then
4421   :
4422 else
4423   ac_cv_header_stdc=no
4424 fi
4425 rm -f conftest*
4426
4427 fi
4428
4429 if test $ac_cv_header_stdc = yes; then
4430   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4431   if test "$cross_compiling" = yes; then
4432   :
4433 else
4434   cat >conftest.$ac_ext <<_ACEOF
4435 /* confdefs.h.  */
4436 _ACEOF
4437 cat confdefs.h >>conftest.$ac_ext
4438 cat >>conftest.$ac_ext <<_ACEOF
4439 /* end confdefs.h.  */
4440 #include <ctype.h>
4441 #include <stdlib.h>
4442 #if ((' ' & 0x0FF) == 0x020)
4443 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4444 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4445 #else
4446 # define ISLOWER(c) \
4447                    (('a' <= (c) && (c) <= 'i') \
4448                      || ('j' <= (c) && (c) <= 'r') \
4449                      || ('s' <= (c) && (c) <= 'z'))
4450 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4451 #endif
4452
4453 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4454 int
4455 main ()
4456 {
4457   int i;
4458   for (i = 0; i < 256; i++)
4459     if (XOR (islower (i), ISLOWER (i))
4460         || toupper (i) != TOUPPER (i))
4461       return 2;
4462   return 0;
4463 }
4464 _ACEOF
4465 rm -f conftest$ac_exeext
4466 if { (ac_try="$ac_link"
4467 case "(($ac_try" in
4468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4469   *) ac_try_echo=$ac_try;;
4470 esac
4471 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4472   (eval "$ac_link") 2>&5
4473   ac_status=$?
4474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4475   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4476   { (case "(($ac_try" in
4477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4478   *) ac_try_echo=$ac_try;;
4479 esac
4480 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4481   (eval "$ac_try") 2>&5
4482   ac_status=$?
4483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484   (exit $ac_status); }; }; then
4485   :
4486 else
4487   echo "$as_me: program exited with status $ac_status" >&5
4488 echo "$as_me: failed program was:" >&5
4489 sed 's/^/| /' conftest.$ac_ext >&5
4490
4491 ( exit $ac_status )
4492 ac_cv_header_stdc=no
4493 fi
4494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4495 fi
4496
4497
4498 fi
4499 fi
4500 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4501 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4502 if test $ac_cv_header_stdc = yes; then
4503
4504 cat >>confdefs.h <<\_ACEOF
4505 #define STDC_HEADERS 1
4506 _ACEOF
4507
4508 fi
4509
4510 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4521                   inttypes.h stdint.h unistd.h
4522 do
4523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4524 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4526 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   cat >conftest.$ac_ext <<_ACEOF
4530 /* confdefs.h.  */
4531 _ACEOF
4532 cat confdefs.h >>conftest.$ac_ext
4533 cat >>conftest.$ac_ext <<_ACEOF
4534 /* end confdefs.h.  */
4535 $ac_includes_default
4536
4537 #include <$ac_header>
4538 _ACEOF
4539 rm -f conftest.$ac_objext
4540 if { (ac_try="$ac_compile"
4541 case "(($ac_try" in
4542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4543   *) ac_try_echo=$ac_try;;
4544 esac
4545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4546   (eval "$ac_compile") 2>conftest.er1
4547   ac_status=$?
4548   grep -v '^ *+' conftest.er1 >conftest.err
4549   rm -f conftest.er1
4550   cat conftest.err >&5
4551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552   (exit $ac_status); } && {
4553          test -z "$ac_c_werror_flag" ||
4554          test ! -s conftest.err
4555        } && test -s conftest.$ac_objext; then
4556   eval "$as_ac_Header=yes"
4557 else
4558   echo "$as_me: failed program was:" >&5
4559 sed 's/^/| /' conftest.$ac_ext >&5
4560
4561         eval "$as_ac_Header=no"
4562 fi
4563
4564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4565 fi
4566 ac_res=`eval echo '${'$as_ac_Header'}'`
4567                { echo "$as_me:$LINENO: result: $ac_res" >&5
4568 echo "${ECHO_T}$ac_res" >&6; }
4569 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4570   cat >>confdefs.h <<_ACEOF
4571 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4572 _ACEOF
4573
4574 fi
4575
4576 done
4577
4578
4579
4580 for ac_header in unistd.h
4581 do
4582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4583 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4584   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4586 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4587   echo $ECHO_N "(cached) $ECHO_C" >&6
4588 fi
4589 ac_res=`eval echo '${'$as_ac_Header'}'`
4590                { echo "$as_me:$LINENO: result: $ac_res" >&5
4591 echo "${ECHO_T}$ac_res" >&6; }
4592 else
4593   # Is the header compilable?
4594 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4595 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4596 cat >conftest.$ac_ext <<_ACEOF
4597 /* confdefs.h.  */
4598 _ACEOF
4599 cat confdefs.h >>conftest.$ac_ext
4600 cat >>conftest.$ac_ext <<_ACEOF
4601 /* end confdefs.h.  */
4602 $ac_includes_default
4603 #include <$ac_header>
4604 _ACEOF
4605 rm -f conftest.$ac_objext
4606 if { (ac_try="$ac_compile"
4607 case "(($ac_try" in
4608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609   *) ac_try_echo=$ac_try;;
4610 esac
4611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4612   (eval "$ac_compile") 2>conftest.er1
4613   ac_status=$?
4614   grep -v '^ *+' conftest.er1 >conftest.err
4615   rm -f conftest.er1
4616   cat conftest.err >&5
4617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618   (exit $ac_status); } && {
4619          test -z "$ac_c_werror_flag" ||
4620          test ! -s conftest.err
4621        } && test -s conftest.$ac_objext; then
4622   ac_header_compiler=yes
4623 else
4624   echo "$as_me: failed program was:" >&5
4625 sed 's/^/| /' conftest.$ac_ext >&5
4626
4627         ac_header_compiler=no
4628 fi
4629
4630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4631 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4632 echo "${ECHO_T}$ac_header_compiler" >&6; }
4633
4634 # Is the header present?
4635 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4636 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4637 cat >conftest.$ac_ext <<_ACEOF
4638 /* confdefs.h.  */
4639 _ACEOF
4640 cat confdefs.h >>conftest.$ac_ext
4641 cat >>conftest.$ac_ext <<_ACEOF
4642 /* end confdefs.h.  */
4643 #include <$ac_header>
4644 _ACEOF
4645 if { (ac_try="$ac_cpp conftest.$ac_ext"
4646 case "(($ac_try" in
4647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4648   *) ac_try_echo=$ac_try;;
4649 esac
4650 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4651   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4652   ac_status=$?
4653   grep -v '^ *+' conftest.er1 >conftest.err
4654   rm -f conftest.er1
4655   cat conftest.err >&5
4656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657   (exit $ac_status); } >/dev/null && {
4658          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4659          test ! -s conftest.err
4660        }; then
4661   ac_header_preproc=yes
4662 else
4663   echo "$as_me: failed program was:" >&5
4664 sed 's/^/| /' conftest.$ac_ext >&5
4665
4666   ac_header_preproc=no
4667 fi
4668
4669 rm -f conftest.err conftest.$ac_ext
4670 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4671 echo "${ECHO_T}$ac_header_preproc" >&6; }
4672
4673 # So?  What about this header?
4674 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4675   yes:no: )
4676     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4677 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4678     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4679 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4680     ac_header_preproc=yes
4681     ;;
4682   no:yes:* )
4683     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4684 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4685     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4686 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4687     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4688 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4689     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4690 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4691     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4692 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4693     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4694 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4695
4696     ;;
4697 esac
4698 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4699 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4700 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4701   echo $ECHO_N "(cached) $ECHO_C" >&6
4702 else
4703   eval "$as_ac_Header=\$ac_header_preproc"
4704 fi
4705 ac_res=`eval echo '${'$as_ac_Header'}'`
4706                { echo "$as_me:$LINENO: result: $ac_res" >&5
4707 echo "${ECHO_T}$ac_res" >&6; }
4708
4709 fi
4710 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4711   cat >>confdefs.h <<_ACEOF
4712 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4713 _ACEOF
4714
4715 fi
4716
4717 done
4718
4719 { echo "$as_me:$LINENO: checking for mode_t" >&5
4720 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4721 if test "${ac_cv_type_mode_t+set}" = set; then
4722   echo $ECHO_N "(cached) $ECHO_C" >&6
4723 else
4724   cat >conftest.$ac_ext <<_ACEOF
4725 /* confdefs.h.  */
4726 _ACEOF
4727 cat confdefs.h >>conftest.$ac_ext
4728 cat >>conftest.$ac_ext <<_ACEOF
4729 /* end confdefs.h.  */
4730 $ac_includes_default
4731 typedef mode_t ac__type_new_;
4732 int
4733 main ()
4734 {
4735 if ((ac__type_new_ *) 0)
4736   return 0;
4737 if (sizeof (ac__type_new_))
4738   return 0;
4739   ;
4740   return 0;
4741 }
4742 _ACEOF
4743 rm -f conftest.$ac_objext
4744 if { (ac_try="$ac_compile"
4745 case "(($ac_try" in
4746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4747   *) ac_try_echo=$ac_try;;
4748 esac
4749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4750   (eval "$ac_compile") 2>conftest.er1
4751   ac_status=$?
4752   grep -v '^ *+' conftest.er1 >conftest.err
4753   rm -f conftest.er1
4754   cat conftest.err >&5
4755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756   (exit $ac_status); } && {
4757          test -z "$ac_c_werror_flag" ||
4758          test ! -s conftest.err
4759        } && test -s conftest.$ac_objext; then
4760   ac_cv_type_mode_t=yes
4761 else
4762   echo "$as_me: failed program was:" >&5
4763 sed 's/^/| /' conftest.$ac_ext >&5
4764
4765         ac_cv_type_mode_t=no
4766 fi
4767
4768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4769 fi
4770 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4771 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4772 if test $ac_cv_type_mode_t = yes; then
4773   :
4774 else
4775
4776 cat >>confdefs.h <<_ACEOF
4777 #define mode_t int
4778 _ACEOF
4779
4780 fi
4781
4782 { echo "$as_me:$LINENO: checking for pid_t" >&5
4783 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4784 if test "${ac_cv_type_pid_t+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   cat >conftest.$ac_ext <<_ACEOF
4788 /* confdefs.h.  */
4789 _ACEOF
4790 cat confdefs.h >>conftest.$ac_ext
4791 cat >>conftest.$ac_ext <<_ACEOF
4792 /* end confdefs.h.  */
4793 $ac_includes_default
4794 typedef pid_t ac__type_new_;
4795 int
4796 main ()
4797 {
4798 if ((ac__type_new_ *) 0)
4799   return 0;
4800 if (sizeof (ac__type_new_))
4801   return 0;
4802   ;
4803   return 0;
4804 }
4805 _ACEOF
4806 rm -f conftest.$ac_objext
4807 if { (ac_try="$ac_compile"
4808 case "(($ac_try" in
4809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4810   *) ac_try_echo=$ac_try;;
4811 esac
4812 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4813   (eval "$ac_compile") 2>conftest.er1
4814   ac_status=$?
4815   grep -v '^ *+' conftest.er1 >conftest.err
4816   rm -f conftest.er1
4817   cat conftest.err >&5
4818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819   (exit $ac_status); } && {
4820          test -z "$ac_c_werror_flag" ||
4821          test ! -s conftest.err
4822        } && test -s conftest.$ac_objext; then
4823   ac_cv_type_pid_t=yes
4824 else
4825   echo "$as_me: failed program was:" >&5
4826 sed 's/^/| /' conftest.$ac_ext >&5
4827
4828         ac_cv_type_pid_t=no
4829 fi
4830
4831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4832 fi
4833 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4834 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4835 if test $ac_cv_type_pid_t = yes; then
4836   :
4837 else
4838
4839 cat >>confdefs.h <<_ACEOF
4840 #define pid_t int
4841 _ACEOF
4842
4843 fi
4844
4845 { echo "$as_me:$LINENO: checking for size_t" >&5
4846 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4847 if test "${ac_cv_type_size_t+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   cat >conftest.$ac_ext <<_ACEOF
4851 /* confdefs.h.  */
4852 _ACEOF
4853 cat confdefs.h >>conftest.$ac_ext
4854 cat >>conftest.$ac_ext <<_ACEOF
4855 /* end confdefs.h.  */
4856 $ac_includes_default
4857 typedef size_t ac__type_new_;
4858 int
4859 main ()
4860 {
4861 if ((ac__type_new_ *) 0)
4862   return 0;
4863 if (sizeof (ac__type_new_))
4864   return 0;
4865   ;
4866   return 0;
4867 }
4868 _ACEOF
4869 rm -f conftest.$ac_objext
4870 if { (ac_try="$ac_compile"
4871 case "(($ac_try" in
4872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4873   *) ac_try_echo=$ac_try;;
4874 esac
4875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4876   (eval "$ac_compile") 2>conftest.er1
4877   ac_status=$?
4878   grep -v '^ *+' conftest.er1 >conftest.err
4879   rm -f conftest.er1
4880   cat conftest.err >&5
4881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882   (exit $ac_status); } && {
4883          test -z "$ac_c_werror_flag" ||
4884          test ! -s conftest.err
4885        } && test -s conftest.$ac_objext; then
4886   ac_cv_type_size_t=yes
4887 else
4888   echo "$as_me: failed program was:" >&5
4889 sed 's/^/| /' conftest.$ac_ext >&5
4890
4891         ac_cv_type_size_t=no
4892 fi
4893
4894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 fi
4896 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4897 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4898 if test $ac_cv_type_size_t = yes; then
4899   :
4900 else
4901
4902 cat >>confdefs.h <<_ACEOF
4903 #define size_t unsigned int
4904 _ACEOF
4905
4906 fi
4907
4908 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4909 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4910 if test "${ac_cv_type_signal+set}" = set; then
4911   echo $ECHO_N "(cached) $ECHO_C" >&6
4912 else
4913   cat >conftest.$ac_ext <<_ACEOF
4914 /* confdefs.h.  */
4915 _ACEOF
4916 cat confdefs.h >>conftest.$ac_ext
4917 cat >>conftest.$ac_ext <<_ACEOF
4918 /* end confdefs.h.  */
4919 #include <sys/types.h>
4920 #include <signal.h>
4921
4922 int
4923 main ()
4924 {
4925 return *(signal (0, 0)) (0) == 1;
4926   ;
4927   return 0;
4928 }
4929 _ACEOF
4930 rm -f conftest.$ac_objext
4931 if { (ac_try="$ac_compile"
4932 case "(($ac_try" in
4933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4934   *) ac_try_echo=$ac_try;;
4935 esac
4936 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4937   (eval "$ac_compile") 2>conftest.er1
4938   ac_status=$?
4939   grep -v '^ *+' conftest.er1 >conftest.err
4940   rm -f conftest.er1
4941   cat conftest.err >&5
4942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943   (exit $ac_status); } && {
4944          test -z "$ac_c_werror_flag" ||
4945          test ! -s conftest.err
4946        } && test -s conftest.$ac_objext; then
4947   ac_cv_type_signal=int
4948 else
4949   echo "$as_me: failed program was:" >&5
4950 sed 's/^/| /' conftest.$ac_ext >&5
4951
4952         ac_cv_type_signal=void
4953 fi
4954
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4956 fi
4957 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4958 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4959
4960 cat >>confdefs.h <<_ACEOF
4961 #define RETSIGTYPE $ac_cv_type_signal
4962 _ACEOF
4963
4964
4965 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4966 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4967 if test "${ac_cv_header_time+set}" = set; then
4968   echo $ECHO_N "(cached) $ECHO_C" >&6
4969 else
4970   cat >conftest.$ac_ext <<_ACEOF
4971 /* confdefs.h.  */
4972 _ACEOF
4973 cat confdefs.h >>conftest.$ac_ext
4974 cat >>conftest.$ac_ext <<_ACEOF
4975 /* end confdefs.h.  */
4976 #include <sys/types.h>
4977 #include <sys/time.h>
4978 #include <time.h>
4979
4980 int
4981 main ()
4982 {
4983 if ((struct tm *) 0)
4984 return 0;
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext
4990 if { (ac_try="$ac_compile"
4991 case "(($ac_try" in
4992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4993   *) ac_try_echo=$ac_try;;
4994 esac
4995 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4996   (eval "$ac_compile") 2>conftest.er1
4997   ac_status=$?
4998   grep -v '^ *+' conftest.er1 >conftest.err
4999   rm -f conftest.er1
5000   cat conftest.err >&5
5001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5002   (exit $ac_status); } && {
5003          test -z "$ac_c_werror_flag" ||
5004          test ! -s conftest.err
5005        } && test -s conftest.$ac_objext; then
5006   ac_cv_header_time=yes
5007 else
5008   echo "$as_me: failed program was:" >&5
5009 sed 's/^/| /' conftest.$ac_ext >&5
5010
5011         ac_cv_header_time=no
5012 fi
5013
5014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5015 fi
5016 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5017 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5018 if test $ac_cv_header_time = yes; then
5019
5020 cat >>confdefs.h <<\_ACEOF
5021 #define TIME_WITH_SYS_TIME 1
5022 _ACEOF
5023
5024 fi
5025
5026 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5027 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5028 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5029   echo $ECHO_N "(cached) $ECHO_C" >&6
5030 else
5031   cat >conftest.$ac_ext <<_ACEOF
5032 /* confdefs.h.  */
5033 _ACEOF
5034 cat confdefs.h >>conftest.$ac_ext
5035 cat >>conftest.$ac_ext <<_ACEOF
5036 /* end confdefs.h.  */
5037 #include <sys/types.h>
5038 #include <sys/wait.h>
5039 #ifndef WEXITSTATUS
5040 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5041 #endif
5042 #ifndef WIFEXITED
5043 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5044 #endif
5045
5046 int
5047 main ()
5048 {
5049   int s;
5050   wait (&s);
5051   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5052   ;
5053   return 0;
5054 }
5055 _ACEOF
5056 rm -f conftest.$ac_objext
5057 if { (ac_try="$ac_compile"
5058 case "(($ac_try" in
5059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5060   *) ac_try_echo=$ac_try;;
5061 esac
5062 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5063   (eval "$ac_compile") 2>conftest.er1
5064   ac_status=$?
5065   grep -v '^ *+' conftest.er1 >conftest.err
5066   rm -f conftest.er1
5067   cat conftest.err >&5
5068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5069   (exit $ac_status); } && {
5070          test -z "$ac_c_werror_flag" ||
5071          test ! -s conftest.err
5072        } && test -s conftest.$ac_objext; then
5073   ac_cv_header_sys_wait_h=yes
5074 else
5075   echo "$as_me: failed program was:" >&5
5076 sed 's/^/| /' conftest.$ac_ext >&5
5077
5078         ac_cv_header_sys_wait_h=no
5079 fi
5080
5081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5082 fi
5083 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5084 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5085 if test $ac_cv_header_sys_wait_h = yes; then
5086
5087 cat >>confdefs.h <<\_ACEOF
5088 #define HAVE_SYS_WAIT_H 1
5089 _ACEOF
5090
5091 fi
5092
5093
5094
5095
5096
5097
5098 ac_header_dirent=no
5099 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5100   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5101 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5102 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5103 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5104   echo $ECHO_N "(cached) $ECHO_C" >&6
5105 else
5106   cat >conftest.$ac_ext <<_ACEOF
5107 /* confdefs.h.  */
5108 _ACEOF
5109 cat confdefs.h >>conftest.$ac_ext
5110 cat >>conftest.$ac_ext <<_ACEOF
5111 /* end confdefs.h.  */
5112 #include <sys/types.h>
5113 #include <$ac_hdr>
5114
5115 int
5116 main ()
5117 {
5118 if ((DIR *) 0)
5119 return 0;
5120   ;
5121   return 0;
5122 }
5123 _ACEOF
5124 rm -f conftest.$ac_objext
5125 if { (ac_try="$ac_compile"
5126 case "(($ac_try" in
5127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5128   *) ac_try_echo=$ac_try;;
5129 esac
5130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5131   (eval "$ac_compile") 2>conftest.er1
5132   ac_status=$?
5133   grep -v '^ *+' conftest.er1 >conftest.err
5134   rm -f conftest.er1
5135   cat conftest.err >&5
5136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137   (exit $ac_status); } && {
5138          test -z "$ac_c_werror_flag" ||
5139          test ! -s conftest.err
5140        } && test -s conftest.$ac_objext; then
5141   eval "$as_ac_Header=yes"
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 sed 's/^/| /' conftest.$ac_ext >&5
5145
5146         eval "$as_ac_Header=no"
5147 fi
5148
5149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5150 fi
5151 ac_res=`eval echo '${'$as_ac_Header'}'`
5152                { echo "$as_me:$LINENO: result: $ac_res" >&5
5153 echo "${ECHO_T}$ac_res" >&6; }
5154 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5155   cat >>confdefs.h <<_ACEOF
5156 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5157 _ACEOF
5158
5159 ac_header_dirent=$ac_hdr; break
5160 fi
5161
5162 done
5163 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5164 if test $ac_header_dirent = dirent.h; then
5165   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5166 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5167 if test "${ac_cv_search_opendir+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_func_search_save_LIBS=$LIBS
5171 cat >conftest.$ac_ext <<_ACEOF
5172 /* confdefs.h.  */
5173 _ACEOF
5174 cat confdefs.h >>conftest.$ac_ext
5175 cat >>conftest.$ac_ext <<_ACEOF
5176 /* end confdefs.h.  */
5177
5178 /* Override any GCC internal prototype to avoid an error.
5179    Use char because int might match the return type of a GCC
5180    builtin and then its argument prototype would still apply.  */
5181 #ifdef __cplusplus
5182 extern "C"
5183 #endif
5184 char opendir ();
5185 int
5186 main ()
5187 {
5188 return opendir ();
5189   ;
5190   return 0;
5191 }
5192 _ACEOF
5193 for ac_lib in '' dir; do
5194   if test -z "$ac_lib"; then
5195     ac_res="none required"
5196   else
5197     ac_res=-l$ac_lib
5198     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5199   fi
5200   rm -f conftest.$ac_objext conftest$ac_exeext
5201 if { (ac_try="$ac_link"
5202 case "(($ac_try" in
5203   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204   *) ac_try_echo=$ac_try;;
5205 esac
5206 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5207   (eval "$ac_link") 2>conftest.er1
5208   ac_status=$?
5209   grep -v '^ *+' conftest.er1 >conftest.err
5210   rm -f conftest.er1
5211   cat conftest.err >&5
5212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213   (exit $ac_status); } && {
5214          test -z "$ac_c_werror_flag" ||
5215          test ! -s conftest.err
5216        } && test -s conftest$ac_exeext &&
5217        $as_test_x conftest$ac_exeext; then
5218   ac_cv_search_opendir=$ac_res
5219 else
5220   echo "$as_me: failed program was:" >&5
5221 sed 's/^/| /' conftest.$ac_ext >&5
5222
5223
5224 fi
5225
5226 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5227       conftest$ac_exeext
5228   if test "${ac_cv_search_opendir+set}" = set; then
5229   break
5230 fi
5231 done
5232 if test "${ac_cv_search_opendir+set}" = set; then
5233   :
5234 else
5235   ac_cv_search_opendir=no
5236 fi
5237 rm conftest.$ac_ext
5238 LIBS=$ac_func_search_save_LIBS
5239 fi
5240 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5241 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5242 ac_res=$ac_cv_search_opendir
5243 if test "$ac_res" != no; then
5244   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5245
5246 fi
5247
5248 else
5249   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5250 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5251 if test "${ac_cv_search_opendir+set}" = set; then
5252   echo $ECHO_N "(cached) $ECHO_C" >&6
5253 else
5254   ac_func_search_save_LIBS=$LIBS
5255 cat >conftest.$ac_ext <<_ACEOF
5256 /* confdefs.h.  */
5257 _ACEOF
5258 cat confdefs.h >>conftest.$ac_ext
5259 cat >>conftest.$ac_ext <<_ACEOF
5260 /* end confdefs.h.  */
5261
5262 /* Override any GCC internal prototype to avoid an error.
5263    Use char because int might match the return type of a GCC
5264    builtin and then its argument prototype would still apply.  */
5265 #ifdef __cplusplus
5266 extern "C"
5267 #endif
5268 char opendir ();
5269 int
5270 main ()
5271 {
5272 return opendir ();
5273   ;
5274   return 0;
5275 }
5276 _ACEOF
5277 for ac_lib in '' x; do
5278   if test -z "$ac_lib"; then
5279     ac_res="none required"
5280   else
5281     ac_res=-l$ac_lib
5282     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5283   fi
5284   rm -f conftest.$ac_objext conftest$ac_exeext
5285 if { (ac_try="$ac_link"
5286 case "(($ac_try" in
5287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288   *) ac_try_echo=$ac_try;;
5289 esac
5290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5291   (eval "$ac_link") 2>conftest.er1
5292   ac_status=$?
5293   grep -v '^ *+' conftest.er1 >conftest.err
5294   rm -f conftest.er1
5295   cat conftest.err >&5
5296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297   (exit $ac_status); } && {
5298          test -z "$ac_c_werror_flag" ||
5299          test ! -s conftest.err
5300        } && test -s conftest$ac_exeext &&
5301        $as_test_x conftest$ac_exeext; then
5302   ac_cv_search_opendir=$ac_res
5303 else
5304   echo "$as_me: failed program was:" >&5
5305 sed 's/^/| /' conftest.$ac_ext >&5
5306
5307
5308 fi
5309
5310 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5311       conftest$ac_exeext
5312   if test "${ac_cv_search_opendir+set}" = set; then
5313   break
5314 fi
5315 done
5316 if test "${ac_cv_search_opendir+set}" = set; then
5317   :
5318 else
5319   ac_cv_search_opendir=no
5320 fi
5321 rm conftest.$ac_ext
5322 LIBS=$ac_func_search_save_LIBS
5323 fi
5324 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5325 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5326 ac_res=$ac_cv_search_opendir
5327 if test "$ac_res" != no; then
5328   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5329
5330 fi
5331
5332 fi
5333
5334 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5335 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5336   if test "${ac_cv_gettimeofday_args+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   cat >conftest.$ac_ext <<_ACEOF
5340 /* confdefs.h.  */
5341 _ACEOF
5342 cat confdefs.h >>conftest.$ac_ext
5343 cat >>conftest.$ac_ext <<_ACEOF
5344 /* end confdefs.h.  */
5345 #include <stdlib.h>
5346                     #include <sys/time.h>
5347 int
5348 main ()
5349 {
5350 struct timeval tv; struct timezone tzp;
5351                     gettimeofday(&tv, &tzp);
5352   ;
5353   return 0;
5354 }
5355 _ACEOF
5356 rm -f conftest.$ac_objext
5357 if { (ac_try="$ac_compile"
5358 case "(($ac_try" in
5359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5360   *) ac_try_echo=$ac_try;;
5361 esac
5362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5363   (eval "$ac_compile") 2>conftest.er1
5364   ac_status=$?
5365   grep -v '^ *+' conftest.er1 >conftest.err
5366   rm -f conftest.er1
5367   cat conftest.err >&5
5368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369   (exit $ac_status); } && {
5370          test -z "$ac_c_werror_flag" ||
5371          test ! -s conftest.err
5372        } && test -s conftest.$ac_objext; then
5373   ac_gettimeofday_args=2
5374 else
5375   echo "$as_me: failed program was:" >&5
5376 sed 's/^/| /' conftest.$ac_ext >&5
5377
5378         cat >conftest.$ac_ext <<_ACEOF
5379 /* confdefs.h.  */
5380 _ACEOF
5381 cat confdefs.h >>conftest.$ac_ext
5382 cat >>conftest.$ac_ext <<_ACEOF
5383 /* end confdefs.h.  */
5384 #include <stdlib.h>
5385                                     #include <sys/time.h>
5386 int
5387 main ()
5388 {
5389 struct timeval tv; gettimeofday(&tv);
5390   ;
5391   return 0;
5392 }
5393 _ACEOF
5394 rm -f conftest.$ac_objext
5395 if { (ac_try="$ac_compile"
5396 case "(($ac_try" in
5397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5398   *) ac_try_echo=$ac_try;;
5399 esac
5400 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5401   (eval "$ac_compile") 2>conftest.er1
5402   ac_status=$?
5403   grep -v '^ *+' conftest.er1 >conftest.err
5404   rm -f conftest.er1
5405   cat conftest.err >&5
5406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407   (exit $ac_status); } && {
5408          test -z "$ac_c_werror_flag" ||
5409          test ! -s conftest.err
5410        } && test -s conftest.$ac_objext; then
5411   ac_gettimeofday_args=1
5412 else
5413   echo "$as_me: failed program was:" >&5
5414 sed 's/^/| /' conftest.$ac_ext >&5
5415
5416         ac_gettimeofday_args=0
5417 fi
5418
5419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5420 fi
5421
5422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5424 fi
5425
5426   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5427   if test "$ac_gettimeofday_args" = 1 ; then
5428     cat >>confdefs.h <<\_ACEOF
5429 #define HAVE_GETTIMEOFDAY 1
5430 _ACEOF
5431
5432     { echo "$as_me:$LINENO: result: one argument" >&5
5433 echo "${ECHO_T}one argument" >&6; }
5434   elif test "$ac_gettimeofday_args" = 2 ; then
5435     cat >>confdefs.h <<\_ACEOF
5436 #define HAVE_GETTIMEOFDAY 1
5437 _ACEOF
5438
5439     cat >>confdefs.h <<\_ACEOF
5440 #define GETTIMEOFDAY_TWO_ARGS 1
5441 _ACEOF
5442
5443     { echo "$as_me:$LINENO: result: two arguments" >&5
5444 echo "${ECHO_T}two arguments" >&6; }
5445   else
5446     { echo "$as_me:$LINENO: result: unknown" >&5
5447 echo "${ECHO_T}unknown" >&6; }
5448   fi
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5460 do
5461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5462 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5464 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467   cat >conftest.$ac_ext <<_ACEOF
5468 /* confdefs.h.  */
5469 _ACEOF
5470 cat confdefs.h >>conftest.$ac_ext
5471 cat >>conftest.$ac_ext <<_ACEOF
5472 /* end confdefs.h.  */
5473 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5474    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5475 #define $ac_func innocuous_$ac_func
5476
5477 /* System header to define __stub macros and hopefully few prototypes,
5478     which can conflict with char $ac_func (); below.
5479     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5480     <limits.h> exists even on freestanding compilers.  */
5481
5482 #ifdef __STDC__
5483 # include <limits.h>
5484 #else
5485 # include <assert.h>
5486 #endif
5487
5488 #undef $ac_func
5489
5490 /* Override any GCC internal prototype to avoid an error.
5491    Use char because int might match the return type of a GCC
5492    builtin and then its argument prototype would still apply.  */
5493 #ifdef __cplusplus
5494 extern "C"
5495 #endif
5496 char $ac_func ();
5497 /* The GNU C library defines this for functions which it implements
5498     to always fail with ENOSYS.  Some functions are actually named
5499     something starting with __ and the normal name is an alias.  */
5500 #if defined __stub_$ac_func || defined __stub___$ac_func
5501 choke me
5502 #endif
5503
5504 int
5505 main ()
5506 {
5507 return $ac_func ();
5508   ;
5509   return 0;
5510 }
5511 _ACEOF
5512 rm -f conftest.$ac_objext conftest$ac_exeext
5513 if { (ac_try="$ac_link"
5514 case "(($ac_try" in
5515   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5516   *) ac_try_echo=$ac_try;;
5517 esac
5518 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5519   (eval "$ac_link") 2>conftest.er1
5520   ac_status=$?
5521   grep -v '^ *+' conftest.er1 >conftest.err
5522   rm -f conftest.er1
5523   cat conftest.err >&5
5524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525   (exit $ac_status); } && {
5526          test -z "$ac_c_werror_flag" ||
5527          test ! -s conftest.err
5528        } && test -s conftest$ac_exeext &&
5529        $as_test_x conftest$ac_exeext; then
5530   eval "$as_ac_var=yes"
5531 else
5532   echo "$as_me: failed program was:" >&5
5533 sed 's/^/| /' conftest.$ac_ext >&5
5534
5535         eval "$as_ac_var=no"
5536 fi
5537
5538 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5539       conftest$ac_exeext conftest.$ac_ext
5540 fi
5541 ac_res=`eval echo '${'$as_ac_var'}'`
5542                { echo "$as_me:$LINENO: result: $ac_res" >&5
5543 echo "${ECHO_T}$ac_res" >&6; }
5544 if test `eval echo '${'$as_ac_var'}'` = yes; then
5545   cat >>confdefs.h <<_ACEOF
5546 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5547 _ACEOF
5548
5549 fi
5550 done
5551
5552
5553
5554
5555
5556 for ac_func in sigaction syslog realpath setrlimit
5557 do
5558 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5559 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5560 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5561 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5562   echo $ECHO_N "(cached) $ECHO_C" >&6
5563 else
5564   cat >conftest.$ac_ext <<_ACEOF
5565 /* confdefs.h.  */
5566 _ACEOF
5567 cat confdefs.h >>conftest.$ac_ext
5568 cat >>conftest.$ac_ext <<_ACEOF
5569 /* end confdefs.h.  */
5570 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5571    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5572 #define $ac_func innocuous_$ac_func
5573
5574 /* System header to define __stub macros and hopefully few prototypes,
5575     which can conflict with char $ac_func (); below.
5576     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5577     <limits.h> exists even on freestanding compilers.  */
5578
5579 #ifdef __STDC__
5580 # include <limits.h>
5581 #else
5582 # include <assert.h>
5583 #endif
5584
5585 #undef $ac_func
5586
5587 /* Override any GCC internal prototype to avoid an error.
5588    Use char because int might match the return type of a GCC
5589    builtin and then its argument prototype would still apply.  */
5590 #ifdef __cplusplus
5591 extern "C"
5592 #endif
5593 char $ac_func ();
5594 /* The GNU C library defines this for functions which it implements
5595     to always fail with ENOSYS.  Some functions are actually named
5596     something starting with __ and the normal name is an alias.  */
5597 #if defined __stub_$ac_func || defined __stub___$ac_func
5598 choke me
5599 #endif
5600
5601 int
5602 main ()
5603 {
5604 return $ac_func ();
5605   ;
5606   return 0;
5607 }
5608 _ACEOF
5609 rm -f conftest.$ac_objext conftest$ac_exeext
5610 if { (ac_try="$ac_link"
5611 case "(($ac_try" in
5612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5613   *) ac_try_echo=$ac_try;;
5614 esac
5615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5616   (eval "$ac_link") 2>conftest.er1
5617   ac_status=$?
5618   grep -v '^ *+' conftest.er1 >conftest.err
5619   rm -f conftest.er1
5620   cat conftest.err >&5
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); } && {
5623          test -z "$ac_c_werror_flag" ||
5624          test ! -s conftest.err
5625        } && test -s conftest$ac_exeext &&
5626        $as_test_x conftest$ac_exeext; then
5627   eval "$as_ac_var=yes"
5628 else
5629   echo "$as_me: failed program was:" >&5
5630 sed 's/^/| /' conftest.$ac_ext >&5
5631
5632         eval "$as_ac_var=no"
5633 fi
5634
5635 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5636       conftest$ac_exeext conftest.$ac_ext
5637 fi
5638 ac_res=`eval echo '${'$as_ac_var'}'`
5639                { echo "$as_me:$LINENO: result: $ac_res" >&5
5640 echo "${ECHO_T}$ac_res" >&6; }
5641 if test `eval echo '${'$as_ac_var'}'` = yes; then
5642   cat >>confdefs.h <<_ACEOF
5643 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5644 _ACEOF
5645
5646 fi
5647 done
5648
5649
5650 for ac_func in setlocale
5651 do
5652 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5653 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5654 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5655 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5656   echo $ECHO_N "(cached) $ECHO_C" >&6
5657 else
5658   cat >conftest.$ac_ext <<_ACEOF
5659 /* confdefs.h.  */
5660 _ACEOF
5661 cat confdefs.h >>conftest.$ac_ext
5662 cat >>conftest.$ac_ext <<_ACEOF
5663 /* end confdefs.h.  */
5664 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5665    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5666 #define $ac_func innocuous_$ac_func
5667
5668 /* System header to define __stub macros and hopefully few prototypes,
5669     which can conflict with char $ac_func (); below.
5670     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5671     <limits.h> exists even on freestanding compilers.  */
5672
5673 #ifdef __STDC__
5674 # include <limits.h>
5675 #else
5676 # include <assert.h>
5677 #endif
5678
5679 #undef $ac_func
5680
5681 /* Override any GCC internal prototype to avoid an error.
5682    Use char because int might match the return type of a GCC
5683    builtin and then its argument prototype would still apply.  */
5684 #ifdef __cplusplus
5685 extern "C"
5686 #endif
5687 char $ac_func ();
5688 /* The GNU C library defines this for functions which it implements
5689     to always fail with ENOSYS.  Some functions are actually named
5690     something starting with __ and the normal name is an alias.  */
5691 #if defined __stub_$ac_func || defined __stub___$ac_func
5692 choke me
5693 #endif
5694
5695 int
5696 main ()
5697 {
5698 return $ac_func ();
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext conftest$ac_exeext
5704 if { (ac_try="$ac_link"
5705 case "(($ac_try" in
5706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5707   *) ac_try_echo=$ac_try;;
5708 esac
5709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5710   (eval "$ac_link") 2>conftest.er1
5711   ac_status=$?
5712   grep -v '^ *+' conftest.er1 >conftest.err
5713   rm -f conftest.er1
5714   cat conftest.err >&5
5715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716   (exit $ac_status); } && {
5717          test -z "$ac_c_werror_flag" ||
5718          test ! -s conftest.err
5719        } && test -s conftest$ac_exeext &&
5720        $as_test_x conftest$ac_exeext; then
5721   eval "$as_ac_var=yes"
5722 else
5723   echo "$as_me: failed program was:" >&5
5724 sed 's/^/| /' conftest.$ac_ext >&5
5725
5726         eval "$as_ac_var=no"
5727 fi
5728
5729 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5730       conftest$ac_exeext conftest.$ac_ext
5731 fi
5732 ac_res=`eval echo '${'$as_ac_var'}'`
5733                { echo "$as_me:$LINENO: result: $ac_res" >&5
5734 echo "${ECHO_T}$ac_res" >&6; }
5735 if test `eval echo '${'$as_ac_var'}'` = yes; then
5736   cat >>confdefs.h <<_ACEOF
5737 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5738 _ACEOF
5739
5740 fi
5741 done
5742
5743 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5744 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5745 if test "${ac_cv_have_icmp+set}" = set; then
5746   echo $ECHO_N "(cached) $ECHO_C" >&6
5747 else
5748   cat >conftest.$ac_ext <<_ACEOF
5749 /* confdefs.h.  */
5750 _ACEOF
5751 cat confdefs.h >>conftest.$ac_ext
5752 cat >>conftest.$ac_ext <<_ACEOF
5753 /* end confdefs.h.  */
5754 #include <stdlib.h>
5755                    #include <stdio.h>
5756                    #include <math.h>
5757                    #include <unistd.h>
5758                    #include <limits.h>
5759                    #include <signal.h>
5760                    #include <fcntl.h>
5761                    #include <sys/types.h>
5762                    #include <sys/time.h>
5763                    #include <sys/ipc.h>
5764                    #include <sys/shm.h>
5765                    #include <sys/socket.h>
5766                    #include <netinet/in_systm.h>
5767                    #include <netinet/in.h>
5768                    #include <netinet/ip.h>
5769                    #include <netinet/ip_icmp.h>
5770                    #include <netinet/udp.h>
5771                    #include <arpa/inet.h>
5772                    #include <netdb.h>
5773 int
5774 main ()
5775 {
5776 struct icmp i;
5777                    struct sockaddr s;
5778                    struct sockaddr_in si;
5779                    struct ip ip;
5780                    i.icmp_type = ICMP_ECHO;
5781                    i.icmp_code = 0;
5782                    i.icmp_cksum = 0;
5783                    i.icmp_id = 0;
5784                    i.icmp_seq = 0;
5785                    si.sin_family = AF_INET;
5786                    #if defined(__DECC) || defined(_IP_VHL)
5787                    ip.ip_vhl = 0;
5788                    #else
5789                    ip.ip_hl = 0;
5790                    #endif
5791
5792   ;
5793   return 0;
5794 }
5795 _ACEOF
5796 rm -f conftest.$ac_objext
5797 if { (ac_try="$ac_compile"
5798 case "(($ac_try" in
5799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5800   *) ac_try_echo=$ac_try;;
5801 esac
5802 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5803   (eval "$ac_compile") 2>conftest.er1
5804   ac_status=$?
5805   grep -v '^ *+' conftest.er1 >conftest.err
5806   rm -f conftest.er1
5807   cat conftest.err >&5
5808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809   (exit $ac_status); } && {
5810          test -z "$ac_c_werror_flag" ||
5811          test ! -s conftest.err
5812        } && test -s conftest.$ac_objext; then
5813   ac_cv_have_icmp=yes
5814 else
5815   echo "$as_me: failed program was:" >&5
5816 sed 's/^/| /' conftest.$ac_ext >&5
5817
5818         ac_cv_have_icmp=no
5819 fi
5820
5821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822 fi
5823 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5824 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5825  if test "$ac_cv_have_icmp" = yes ; then
5826    cat >>confdefs.h <<\_ACEOF
5827 #define HAVE_ICMP 1
5828 _ACEOF
5829
5830  fi
5831 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5832 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5833 if test "${ac_cv_have_icmphdr+set}" = set; then
5834   echo $ECHO_N "(cached) $ECHO_C" >&6
5835 else
5836   cat >conftest.$ac_ext <<_ACEOF
5837 /* confdefs.h.  */
5838 _ACEOF
5839 cat confdefs.h >>conftest.$ac_ext
5840 cat >>conftest.$ac_ext <<_ACEOF
5841 /* end confdefs.h.  */
5842 #include <stdlib.h>
5843                    #include <stdio.h>
5844                    #include <math.h>
5845                    #include <unistd.h>
5846                    #include <limits.h>
5847                    #include <signal.h>
5848                    #include <fcntl.h>
5849                    #include <sys/types.h>
5850                    #include <sys/time.h>
5851                    #include <sys/ipc.h>
5852                    #include <sys/shm.h>
5853                    #include <sys/socket.h>
5854                    #include <netinet/in_systm.h>
5855                    #include <netinet/in.h>
5856                    #include <netinet/ip.h>
5857                    #include <netinet/ip_icmp.h>
5858                    #include <netinet/udp.h>
5859                    #include <arpa/inet.h>
5860                    #include <netdb.h>
5861 int
5862 main ()
5863 {
5864 struct icmphdr i;
5865                    struct sockaddr s;
5866                    struct sockaddr_in si;
5867                    struct ip ip;
5868                    i.type = ICMP_ECHO;
5869                    i.code = 0;
5870                    i.checksum = 0;
5871                    i.un.echo.id = 0;
5872                    i.un.echo.sequence = 0;
5873                    si.sin_family = AF_INET;
5874                    ip.ip_hl = 0;
5875   ;
5876   return 0;
5877 }
5878 _ACEOF
5879 rm -f conftest.$ac_objext
5880 if { (ac_try="$ac_compile"
5881 case "(($ac_try" in
5882   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5883   *) ac_try_echo=$ac_try;;
5884 esac
5885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5886   (eval "$ac_compile") 2>conftest.er1
5887   ac_status=$?
5888   grep -v '^ *+' conftest.er1 >conftest.err
5889   rm -f conftest.er1
5890   cat conftest.err >&5
5891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892   (exit $ac_status); } && {
5893          test -z "$ac_c_werror_flag" ||
5894          test ! -s conftest.err
5895        } && test -s conftest.$ac_objext; then
5896   ac_cv_have_icmphdr=yes
5897 else
5898   echo "$as_me: failed program was:" >&5
5899 sed 's/^/| /' conftest.$ac_ext >&5
5900
5901         ac_cv_have_icmphdr=no
5902 fi
5903
5904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5905 fi
5906 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5907 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5908  if test "$ac_cv_have_icmphdr" = yes ; then
5909    cat >>confdefs.h <<\_ACEOF
5910 #define HAVE_ICMPHDR 1
5911 _ACEOF
5912
5913  fi
5914
5915
5916 for ac_header in crypt.h sys/select.h
5917 do
5918 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5919 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5920   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5921 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5922 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5923   echo $ECHO_N "(cached) $ECHO_C" >&6
5924 fi
5925 ac_res=`eval echo '${'$as_ac_Header'}'`
5926                { echo "$as_me:$LINENO: result: $ac_res" >&5
5927 echo "${ECHO_T}$ac_res" >&6; }
5928 else
5929   # Is the header compilable?
5930 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5931 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5932 cat >conftest.$ac_ext <<_ACEOF
5933 /* confdefs.h.  */
5934 _ACEOF
5935 cat confdefs.h >>conftest.$ac_ext
5936 cat >>conftest.$ac_ext <<_ACEOF
5937 /* end confdefs.h.  */
5938 $ac_includes_default
5939 #include <$ac_header>
5940 _ACEOF
5941 rm -f conftest.$ac_objext
5942 if { (ac_try="$ac_compile"
5943 case "(($ac_try" in
5944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5945   *) ac_try_echo=$ac_try;;
5946 esac
5947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5948   (eval "$ac_compile") 2>conftest.er1
5949   ac_status=$?
5950   grep -v '^ *+' conftest.er1 >conftest.err
5951   rm -f conftest.er1
5952   cat conftest.err >&5
5953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954   (exit $ac_status); } && {
5955          test -z "$ac_c_werror_flag" ||
5956          test ! -s conftest.err
5957        } && test -s conftest.$ac_objext; then
5958   ac_header_compiler=yes
5959 else
5960   echo "$as_me: failed program was:" >&5
5961 sed 's/^/| /' conftest.$ac_ext >&5
5962
5963         ac_header_compiler=no
5964 fi
5965
5966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5967 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5968 echo "${ECHO_T}$ac_header_compiler" >&6; }
5969
5970 # Is the header present?
5971 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5972 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5973 cat >conftest.$ac_ext <<_ACEOF
5974 /* confdefs.h.  */
5975 _ACEOF
5976 cat confdefs.h >>conftest.$ac_ext
5977 cat >>conftest.$ac_ext <<_ACEOF
5978 /* end confdefs.h.  */
5979 #include <$ac_header>
5980 _ACEOF
5981 if { (ac_try="$ac_cpp conftest.$ac_ext"
5982 case "(($ac_try" in
5983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5984   *) ac_try_echo=$ac_try;;
5985 esac
5986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5987   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5988   ac_status=$?
5989   grep -v '^ *+' conftest.er1 >conftest.err
5990   rm -f conftest.er1
5991   cat conftest.err >&5
5992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993   (exit $ac_status); } >/dev/null && {
5994          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5995          test ! -s conftest.err
5996        }; then
5997   ac_header_preproc=yes
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 sed 's/^/| /' conftest.$ac_ext >&5
6001
6002   ac_header_preproc=no
6003 fi
6004
6005 rm -f conftest.err conftest.$ac_ext
6006 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6007 echo "${ECHO_T}$ac_header_preproc" >&6; }
6008
6009 # So?  What about this header?
6010 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6011   yes:no: )
6012     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6013 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6015 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6016     ac_header_preproc=yes
6017     ;;
6018   no:yes:* )
6019     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6020 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6021     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6022 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6023     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6024 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6025     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6026 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6027     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6028 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6029     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6030 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6031
6032     ;;
6033 esac
6034 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6035 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6036 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6037   echo $ECHO_N "(cached) $ECHO_C" >&6
6038 else
6039   eval "$as_ac_Header=\$ac_header_preproc"
6040 fi
6041 ac_res=`eval echo '${'$as_ac_Header'}'`
6042                { echo "$as_me:$LINENO: result: $ac_res" >&5
6043 echo "${ECHO_T}$ac_res" >&6; }
6044
6045 fi
6046 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6047   cat >>confdefs.h <<_ACEOF
6048 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6049 _ACEOF
6050
6051 fi
6052
6053 done
6054
6055 for ac_prog in perl5 perl
6056 do
6057   # Extract the first word of "$ac_prog", so it can be a program name with args.
6058 set dummy $ac_prog; ac_word=$2
6059 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6061 if test "${ac_cv_path_PERL+set}" = set; then
6062   echo $ECHO_N "(cached) $ECHO_C" >&6
6063 else
6064   case $PERL in
6065   [\\/]* | ?:[\\/]*)
6066   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6067   ;;
6068   *)
6069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070 for as_dir in $PATH
6071 do
6072   IFS=$as_save_IFS
6073   test -z "$as_dir" && as_dir=.
6074   for ac_exec_ext in '' $ac_executable_extensions; do
6075   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6076     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6077     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6078     break 2
6079   fi
6080 done
6081 done
6082 IFS=$as_save_IFS
6083
6084   ;;
6085 esac
6086 fi
6087 PERL=$ac_cv_path_PERL
6088 if test -n "$PERL"; then
6089   { echo "$as_me:$LINENO: result: $PERL" >&5
6090 echo "${ECHO_T}$PERL" >&6; }
6091 else
6092   { echo "$as_me:$LINENO: result: no" >&5
6093 echo "${ECHO_T}no" >&6; }
6094 fi
6095
6096
6097   test -n "$PERL" && break
6098 done
6099
6100   if test -z "$PERL" ; then
6101     PERL_VERSION=0
6102   else
6103     { echo "$as_me:$LINENO: checking perl version" >&5
6104 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6105 if test "${ac_cv_perl_version+set}" = set; then
6106   echo $ECHO_N "(cached) $ECHO_C" >&6
6107 else
6108   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6109 fi
6110 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6111 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6112     PERL_VERSION=$ac_cv_perl_version
6113   fi
6114
6115
6116 if test -z "$PERL" ; then
6117   # don't let it be blank...
6118   PERL=/usr/bin/perl
6119 fi
6120
6121 { echo "$as_me:$LINENO: checking for X" >&5
6122 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6123
6124
6125 # Check whether --with-x was given.
6126 if test "${with_x+set}" = set; then
6127   withval=$with_x;
6128 fi
6129
6130 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6131 if test "x$with_x" = xno; then
6132   # The user explicitly disabled X.
6133   have_x=disabled
6134 else
6135   case $x_includes,$x_libraries in #(
6136     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6137 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6138    { (exit 1); exit 1; }; };; #(
6139     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6140   echo $ECHO_N "(cached) $ECHO_C" >&6
6141 else
6142   # One or both of the vars are not set, and there is no cached value.
6143 ac_x_includes=no ac_x_libraries=no
6144 rm -f -r conftest.dir
6145 if mkdir conftest.dir; then
6146   cd conftest.dir
6147   cat >Imakefile <<'_ACEOF'
6148 incroot:
6149         @echo incroot='${INCROOT}'
6150 usrlibdir:
6151         @echo usrlibdir='${USRLIBDIR}'
6152 libdir:
6153         @echo libdir='${LIBDIR}'
6154 _ACEOF
6155   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6156     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6157     for ac_var in incroot usrlibdir libdir; do
6158       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6159     done
6160     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6161     for ac_extension in a so sl; do
6162       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6163          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6164         ac_im_usrlibdir=$ac_im_libdir; break
6165       fi
6166     done
6167     # Screen out bogus values from the imake configuration.  They are
6168     # bogus both because they are the default anyway, and because
6169     # using them would break gcc on systems where it needs fixed includes.
6170     case $ac_im_incroot in
6171         /usr/include) ac_x_includes= ;;
6172         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6173     esac
6174     case $ac_im_usrlibdir in
6175         /usr/lib | /lib) ;;
6176         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6177     esac
6178   fi
6179   cd ..
6180   rm -f -r conftest.dir
6181 fi
6182
6183 # Standard set of common directories for X headers.
6184 # Check X11 before X11Rn because it is often a symlink to the current release.
6185 ac_x_header_dirs='
6186 /usr/X11/include
6187 /usr/X11R6/include
6188 /usr/X11R5/include
6189 /usr/X11R4/include
6190
6191 /usr/include/X11
6192 /usr/include/X11R6
6193 /usr/include/X11R5
6194 /usr/include/X11R4
6195
6196 /usr/local/X11/include
6197 /usr/local/X11R6/include
6198 /usr/local/X11R5/include
6199 /usr/local/X11R4/include
6200
6201 /usr/local/include/X11
6202 /usr/local/include/X11R6
6203 /usr/local/include/X11R5
6204 /usr/local/include/X11R4
6205
6206 /usr/X386/include
6207 /usr/x386/include
6208 /usr/XFree86/include/X11
6209
6210 /usr/include
6211 /usr/local/include
6212 /usr/unsupported/include
6213 /usr/athena/include
6214 /usr/local/x11r5/include
6215 /usr/lpp/Xamples/include
6216
6217 /usr/openwin/include
6218 /usr/openwin/share/include'
6219
6220 if test "$ac_x_includes" = no; then
6221   # Guess where to find include files, by looking for Xlib.h.
6222   # First, try using that file with no special directory specified.
6223   cat >conftest.$ac_ext <<_ACEOF
6224 /* confdefs.h.  */
6225 _ACEOF
6226 cat confdefs.h >>conftest.$ac_ext
6227 cat >>conftest.$ac_ext <<_ACEOF
6228 /* end confdefs.h.  */
6229 #include <X11/Xlib.h>
6230 _ACEOF
6231 if { (ac_try="$ac_cpp conftest.$ac_ext"
6232 case "(($ac_try" in
6233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6234   *) ac_try_echo=$ac_try;;
6235 esac
6236 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6237   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6238   ac_status=$?
6239   grep -v '^ *+' conftest.er1 >conftest.err
6240   rm -f conftest.er1
6241   cat conftest.err >&5
6242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6243   (exit $ac_status); } >/dev/null && {
6244          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6245          test ! -s conftest.err
6246        }; then
6247   # We can compile using X headers with no special include directory.
6248 ac_x_includes=
6249 else
6250   echo "$as_me: failed program was:" >&5
6251 sed 's/^/| /' conftest.$ac_ext >&5
6252
6253   for ac_dir in $ac_x_header_dirs; do
6254   if test -r "$ac_dir/X11/Xlib.h"; then
6255     ac_x_includes=$ac_dir
6256     break
6257   fi
6258 done
6259 fi
6260
6261 rm -f conftest.err conftest.$ac_ext
6262 fi # $ac_x_includes = no
6263
6264 if test "$ac_x_libraries" = no; then
6265   # Check for the libraries.
6266   # See if we find them without any special options.
6267   # Don't add to $LIBS permanently.
6268   ac_save_LIBS=$LIBS
6269   LIBS="-lX11 $LIBS"
6270   cat >conftest.$ac_ext <<_ACEOF
6271 /* confdefs.h.  */
6272 _ACEOF
6273 cat confdefs.h >>conftest.$ac_ext
6274 cat >>conftest.$ac_ext <<_ACEOF
6275 /* end confdefs.h.  */
6276 #include <X11/Xlib.h>
6277 int
6278 main ()
6279 {
6280 XrmInitialize ()
6281   ;
6282   return 0;
6283 }
6284 _ACEOF
6285 rm -f conftest.$ac_objext conftest$ac_exeext
6286 if { (ac_try="$ac_link"
6287 case "(($ac_try" in
6288   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6289   *) ac_try_echo=$ac_try;;
6290 esac
6291 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6292   (eval "$ac_link") 2>conftest.er1
6293   ac_status=$?
6294   grep -v '^ *+' conftest.er1 >conftest.err
6295   rm -f conftest.er1
6296   cat conftest.err >&5
6297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298   (exit $ac_status); } && {
6299          test -z "$ac_c_werror_flag" ||
6300          test ! -s conftest.err
6301        } && test -s conftest$ac_exeext &&
6302        $as_test_x conftest$ac_exeext; then
6303   LIBS=$ac_save_LIBS
6304 # We can link X programs with no special library path.
6305 ac_x_libraries=
6306 else
6307   echo "$as_me: failed program was:" >&5
6308 sed 's/^/| /' conftest.$ac_ext >&5
6309
6310         LIBS=$ac_save_LIBS
6311 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6312 do
6313   # Don't even attempt the hair of trying to link an X program!
6314   for ac_extension in a so sl; do
6315     if test -r "$ac_dir/libX11.$ac_extension"; then
6316       ac_x_libraries=$ac_dir
6317       break 2
6318     fi
6319   done
6320 done
6321 fi
6322
6323 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6324       conftest$ac_exeext conftest.$ac_ext
6325 fi # $ac_x_libraries = no
6326
6327 case $ac_x_includes,$ac_x_libraries in #(
6328   no,* | *,no | *\'*)
6329     # Didn't find X, or a directory has "'" in its name.
6330     ac_cv_have_x="have_x=no";; #(
6331   *)
6332     # Record where we found X for the cache.
6333     ac_cv_have_x="have_x=yes\
6334         ac_x_includes='$ac_x_includes'\
6335         ac_x_libraries='$ac_x_libraries'"
6336 esac
6337 fi
6338 ;; #(
6339     *) have_x=yes;;
6340   esac
6341   eval "$ac_cv_have_x"
6342 fi # $with_x != no
6343
6344 if test "$have_x" != yes; then
6345   { echo "$as_me:$LINENO: result: $have_x" >&5
6346 echo "${ECHO_T}$have_x" >&6; }
6347   no_x=yes
6348 else
6349   # If each of the values was on the command line, it overrides each guess.
6350   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6351   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6352   # Update the cache value to reflect the command line values.
6353   ac_cv_have_x="have_x=yes\
6354         ac_x_includes='$x_includes'\
6355         ac_x_libraries='$x_libraries'"
6356   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6357 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6358 fi
6359
6360 if test "$no_x" = yes; then
6361   # Not all programs may use this symbol, but it does not hurt to define it.
6362
6363 cat >>confdefs.h <<\_ACEOF
6364 #define X_DISPLAY_MISSING 1
6365 _ACEOF
6366
6367   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6368 else
6369   if test -n "$x_includes"; then
6370     X_CFLAGS="$X_CFLAGS -I$x_includes"
6371   fi
6372
6373   # It would also be nice to do this for all -L options, not just this one.
6374   if test -n "$x_libraries"; then
6375     X_LIBS="$X_LIBS -L$x_libraries"
6376     # For Solaris; some versions of Sun CC require a space after -R and
6377     # others require no space.  Words are not sufficient . . . .
6378     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6379 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6380     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6381     ac_xsave_c_werror_flag=$ac_c_werror_flag
6382     ac_c_werror_flag=yes
6383     cat >conftest.$ac_ext <<_ACEOF
6384 /* confdefs.h.  */
6385 _ACEOF
6386 cat confdefs.h >>conftest.$ac_ext
6387 cat >>conftest.$ac_ext <<_ACEOF
6388 /* end confdefs.h.  */
6389
6390 int
6391 main ()
6392 {
6393
6394   ;
6395   return 0;
6396 }
6397 _ACEOF
6398 rm -f conftest.$ac_objext conftest$ac_exeext
6399 if { (ac_try="$ac_link"
6400 case "(($ac_try" in
6401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402   *) ac_try_echo=$ac_try;;
6403 esac
6404 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6405   (eval "$ac_link") 2>conftest.er1
6406   ac_status=$?
6407   grep -v '^ *+' conftest.er1 >conftest.err
6408   rm -f conftest.er1
6409   cat conftest.err >&5
6410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411   (exit $ac_status); } && {
6412          test -z "$ac_c_werror_flag" ||
6413          test ! -s conftest.err
6414        } && test -s conftest$ac_exeext &&
6415        $as_test_x conftest$ac_exeext; then
6416   { echo "$as_me:$LINENO: result: no" >&5
6417 echo "${ECHO_T}no" >&6; }
6418        X_LIBS="$X_LIBS -R$x_libraries"
6419 else
6420   echo "$as_me: failed program was:" >&5
6421 sed 's/^/| /' conftest.$ac_ext >&5
6422
6423         LIBS="$ac_xsave_LIBS -R $x_libraries"
6424        cat >conftest.$ac_ext <<_ACEOF
6425 /* confdefs.h.  */
6426 _ACEOF
6427 cat confdefs.h >>conftest.$ac_ext
6428 cat >>conftest.$ac_ext <<_ACEOF
6429 /* end confdefs.h.  */
6430
6431 int
6432 main ()
6433 {
6434
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 rm -f conftest.$ac_objext conftest$ac_exeext
6440 if { (ac_try="$ac_link"
6441 case "(($ac_try" in
6442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6443   *) ac_try_echo=$ac_try;;
6444 esac
6445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6446   (eval "$ac_link") 2>conftest.er1
6447   ac_status=$?
6448   grep -v '^ *+' conftest.er1 >conftest.err
6449   rm -f conftest.er1
6450   cat conftest.err >&5
6451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452   (exit $ac_status); } && {
6453          test -z "$ac_c_werror_flag" ||
6454          test ! -s conftest.err
6455        } && test -s conftest$ac_exeext &&
6456        $as_test_x conftest$ac_exeext; then
6457   { echo "$as_me:$LINENO: result: yes" >&5
6458 echo "${ECHO_T}yes" >&6; }
6459           X_LIBS="$X_LIBS -R $x_libraries"
6460 else
6461   echo "$as_me: failed program was:" >&5
6462 sed 's/^/| /' conftest.$ac_ext >&5
6463
6464         { echo "$as_me:$LINENO: result: neither works" >&5
6465 echo "${ECHO_T}neither works" >&6; }
6466 fi
6467
6468 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6469       conftest$ac_exeext conftest.$ac_ext
6470 fi
6471
6472 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6473       conftest$ac_exeext conftest.$ac_ext
6474     ac_c_werror_flag=$ac_xsave_c_werror_flag
6475     LIBS=$ac_xsave_LIBS
6476   fi
6477
6478   # Check for system-dependent libraries X programs must link with.
6479   # Do this before checking for the system-independent R6 libraries
6480   # (-lICE), since we may need -lsocket or whatever for X linking.
6481
6482   if test "$ISC" = yes; then
6483     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6484   else
6485     # Martyn Johnson says this is needed for Ultrix, if the X
6486     # libraries were built with DECnet support.  And Karl Berry says
6487     # the Alpha needs dnet_stub (dnet does not exist).
6488     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6489     cat >conftest.$ac_ext <<_ACEOF
6490 /* confdefs.h.  */
6491 _ACEOF
6492 cat confdefs.h >>conftest.$ac_ext
6493 cat >>conftest.$ac_ext <<_ACEOF
6494 /* end confdefs.h.  */
6495
6496 /* Override any GCC internal prototype to avoid an error.
6497    Use char because int might match the return type of a GCC
6498    builtin and then its argument prototype would still apply.  */
6499 #ifdef __cplusplus
6500 extern "C"
6501 #endif
6502 char XOpenDisplay ();
6503 int
6504 main ()
6505 {
6506 return XOpenDisplay ();
6507   ;
6508   return 0;
6509 }
6510 _ACEOF
6511 rm -f conftest.$ac_objext conftest$ac_exeext
6512 if { (ac_try="$ac_link"
6513 case "(($ac_try" in
6514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6515   *) ac_try_echo=$ac_try;;
6516 esac
6517 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6518   (eval "$ac_link") 2>conftest.er1
6519   ac_status=$?
6520   grep -v '^ *+' conftest.er1 >conftest.err
6521   rm -f conftest.er1
6522   cat conftest.err >&5
6523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6524   (exit $ac_status); } && {
6525          test -z "$ac_c_werror_flag" ||
6526          test ! -s conftest.err
6527        } && test -s conftest$ac_exeext &&
6528        $as_test_x conftest$ac_exeext; then
6529   :
6530 else
6531   echo "$as_me: failed program was:" >&5
6532 sed 's/^/| /' conftest.$ac_ext >&5
6533
6534         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6535 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6536 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6537   echo $ECHO_N "(cached) $ECHO_C" >&6
6538 else
6539   ac_check_lib_save_LIBS=$LIBS
6540 LIBS="-ldnet  $LIBS"
6541 cat >conftest.$ac_ext <<_ACEOF
6542 /* confdefs.h.  */
6543 _ACEOF
6544 cat confdefs.h >>conftest.$ac_ext
6545 cat >>conftest.$ac_ext <<_ACEOF
6546 /* end confdefs.h.  */
6547
6548 /* Override any GCC internal prototype to avoid an error.
6549    Use char because int might match the return type of a GCC
6550    builtin and then its argument prototype would still apply.  */
6551 #ifdef __cplusplus
6552 extern "C"
6553 #endif
6554 char dnet_ntoa ();
6555 int
6556 main ()
6557 {
6558 return dnet_ntoa ();
6559   ;
6560   return 0;
6561 }
6562 _ACEOF
6563 rm -f conftest.$ac_objext conftest$ac_exeext
6564 if { (ac_try="$ac_link"
6565 case "(($ac_try" in
6566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6567   *) ac_try_echo=$ac_try;;
6568 esac
6569 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6570   (eval "$ac_link") 2>conftest.er1
6571   ac_status=$?
6572   grep -v '^ *+' conftest.er1 >conftest.err
6573   rm -f conftest.er1
6574   cat conftest.err >&5
6575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576   (exit $ac_status); } && {
6577          test -z "$ac_c_werror_flag" ||
6578          test ! -s conftest.err
6579        } && test -s conftest$ac_exeext &&
6580        $as_test_x conftest$ac_exeext; then
6581   ac_cv_lib_dnet_dnet_ntoa=yes
6582 else
6583   echo "$as_me: failed program was:" >&5
6584 sed 's/^/| /' conftest.$ac_ext >&5
6585
6586         ac_cv_lib_dnet_dnet_ntoa=no
6587 fi
6588
6589 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6590       conftest$ac_exeext conftest.$ac_ext
6591 LIBS=$ac_check_lib_save_LIBS
6592 fi
6593 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6594 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6595 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6596   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6597 fi
6598
6599     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6600       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6601 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6602 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6603   echo $ECHO_N "(cached) $ECHO_C" >&6
6604 else
6605   ac_check_lib_save_LIBS=$LIBS
6606 LIBS="-ldnet_stub  $LIBS"
6607 cat >conftest.$ac_ext <<_ACEOF
6608 /* confdefs.h.  */
6609 _ACEOF
6610 cat confdefs.h >>conftest.$ac_ext
6611 cat >>conftest.$ac_ext <<_ACEOF
6612 /* end confdefs.h.  */
6613
6614 /* Override any GCC internal prototype to avoid an error.
6615    Use char because int might match the return type of a GCC
6616    builtin and then its argument prototype would still apply.  */
6617 #ifdef __cplusplus
6618 extern "C"
6619 #endif
6620 char dnet_ntoa ();
6621 int
6622 main ()
6623 {
6624 return dnet_ntoa ();
6625   ;
6626   return 0;
6627 }
6628 _ACEOF
6629 rm -f conftest.$ac_objext conftest$ac_exeext
6630 if { (ac_try="$ac_link"
6631 case "(($ac_try" in
6632   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6633   *) ac_try_echo=$ac_try;;
6634 esac
6635 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6636   (eval "$ac_link") 2>conftest.er1
6637   ac_status=$?
6638   grep -v '^ *+' conftest.er1 >conftest.err
6639   rm -f conftest.er1
6640   cat conftest.err >&5
6641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6642   (exit $ac_status); } && {
6643          test -z "$ac_c_werror_flag" ||
6644          test ! -s conftest.err
6645        } && test -s conftest$ac_exeext &&
6646        $as_test_x conftest$ac_exeext; then
6647   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6648 else
6649   echo "$as_me: failed program was:" >&5
6650 sed 's/^/| /' conftest.$ac_ext >&5
6651
6652         ac_cv_lib_dnet_stub_dnet_ntoa=no
6653 fi
6654
6655 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6656       conftest$ac_exeext conftest.$ac_ext
6657 LIBS=$ac_check_lib_save_LIBS
6658 fi
6659 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6660 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6661 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6662   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6663 fi
6664
6665     fi
6666 fi
6667
6668 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6669       conftest$ac_exeext conftest.$ac_ext
6670     LIBS="$ac_xsave_LIBS"
6671
6672     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6673     # to get the SysV transport functions.
6674     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6675     # needs -lnsl.
6676     # The nsl library prevents programs from opening the X display
6677     # on Irix 5.2, according to T.E. Dickey.
6678     # The functions gethostbyname, getservbyname, and inet_addr are
6679     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6680     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6681 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6682 if test "${ac_cv_func_gethostbyname+set}" = set; then
6683   echo $ECHO_N "(cached) $ECHO_C" >&6
6684 else
6685   cat >conftest.$ac_ext <<_ACEOF
6686 /* confdefs.h.  */
6687 _ACEOF
6688 cat confdefs.h >>conftest.$ac_ext
6689 cat >>conftest.$ac_ext <<_ACEOF
6690 /* end confdefs.h.  */
6691 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6692    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6693 #define gethostbyname innocuous_gethostbyname
6694
6695 /* System header to define __stub macros and hopefully few prototypes,
6696     which can conflict with char gethostbyname (); below.
6697     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6698     <limits.h> exists even on freestanding compilers.  */
6699
6700 #ifdef __STDC__
6701 # include <limits.h>
6702 #else
6703 # include <assert.h>
6704 #endif
6705
6706 #undef gethostbyname
6707
6708 /* Override any GCC internal prototype to avoid an error.
6709    Use char because int might match the return type of a GCC
6710    builtin and then its argument prototype would still apply.  */
6711 #ifdef __cplusplus
6712 extern "C"
6713 #endif
6714 char gethostbyname ();
6715 /* The GNU C library defines this for functions which it implements
6716     to always fail with ENOSYS.  Some functions are actually named
6717     something starting with __ and the normal name is an alias.  */
6718 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6719 choke me
6720 #endif
6721
6722 int
6723 main ()
6724 {
6725 return gethostbyname ();
6726   ;
6727   return 0;
6728 }
6729 _ACEOF
6730 rm -f conftest.$ac_objext conftest$ac_exeext
6731 if { (ac_try="$ac_link"
6732 case "(($ac_try" in
6733   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6734   *) ac_try_echo=$ac_try;;
6735 esac
6736 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6737   (eval "$ac_link") 2>conftest.er1
6738   ac_status=$?
6739   grep -v '^ *+' conftest.er1 >conftest.err
6740   rm -f conftest.er1
6741   cat conftest.err >&5
6742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743   (exit $ac_status); } && {
6744          test -z "$ac_c_werror_flag" ||
6745          test ! -s conftest.err
6746        } && test -s conftest$ac_exeext &&
6747        $as_test_x conftest$ac_exeext; then
6748   ac_cv_func_gethostbyname=yes
6749 else
6750   echo "$as_me: failed program was:" >&5
6751 sed 's/^/| /' conftest.$ac_ext >&5
6752
6753         ac_cv_func_gethostbyname=no
6754 fi
6755
6756 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6757       conftest$ac_exeext conftest.$ac_ext
6758 fi
6759 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6760 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6761
6762     if test $ac_cv_func_gethostbyname = no; then
6763       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6764 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6765 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6766   echo $ECHO_N "(cached) $ECHO_C" >&6
6767 else
6768   ac_check_lib_save_LIBS=$LIBS
6769 LIBS="-lnsl  $LIBS"
6770 cat >conftest.$ac_ext <<_ACEOF
6771 /* confdefs.h.  */
6772 _ACEOF
6773 cat confdefs.h >>conftest.$ac_ext
6774 cat >>conftest.$ac_ext <<_ACEOF
6775 /* end confdefs.h.  */
6776
6777 /* Override any GCC internal prototype to avoid an error.
6778    Use char because int might match the return type of a GCC
6779    builtin and then its argument prototype would still apply.  */
6780 #ifdef __cplusplus
6781 extern "C"
6782 #endif
6783 char gethostbyname ();
6784 int
6785 main ()
6786 {
6787 return gethostbyname ();
6788   ;
6789   return 0;
6790 }
6791 _ACEOF
6792 rm -f conftest.$ac_objext conftest$ac_exeext
6793 if { (ac_try="$ac_link"
6794 case "(($ac_try" in
6795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6796   *) ac_try_echo=$ac_try;;
6797 esac
6798 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6799   (eval "$ac_link") 2>conftest.er1
6800   ac_status=$?
6801   grep -v '^ *+' conftest.er1 >conftest.err
6802   rm -f conftest.er1
6803   cat conftest.err >&5
6804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805   (exit $ac_status); } && {
6806          test -z "$ac_c_werror_flag" ||
6807          test ! -s conftest.err
6808        } && test -s conftest$ac_exeext &&
6809        $as_test_x conftest$ac_exeext; then
6810   ac_cv_lib_nsl_gethostbyname=yes
6811 else
6812   echo "$as_me: failed program was:" >&5
6813 sed 's/^/| /' conftest.$ac_ext >&5
6814
6815         ac_cv_lib_nsl_gethostbyname=no
6816 fi
6817
6818 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6819       conftest$ac_exeext conftest.$ac_ext
6820 LIBS=$ac_check_lib_save_LIBS
6821 fi
6822 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6823 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6824 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6825   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6826 fi
6827
6828       if test $ac_cv_lib_nsl_gethostbyname = no; then
6829         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6830 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6831 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6832   echo $ECHO_N "(cached) $ECHO_C" >&6
6833 else
6834   ac_check_lib_save_LIBS=$LIBS
6835 LIBS="-lbsd  $LIBS"
6836 cat >conftest.$ac_ext <<_ACEOF
6837 /* confdefs.h.  */
6838 _ACEOF
6839 cat confdefs.h >>conftest.$ac_ext
6840 cat >>conftest.$ac_ext <<_ACEOF
6841 /* end confdefs.h.  */
6842
6843 /* Override any GCC internal prototype to avoid an error.
6844    Use char because int might match the return type of a GCC
6845    builtin and then its argument prototype would still apply.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 char gethostbyname ();
6850 int
6851 main ()
6852 {
6853 return gethostbyname ();
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 rm -f conftest.$ac_objext conftest$ac_exeext
6859 if { (ac_try="$ac_link"
6860 case "(($ac_try" in
6861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6862   *) ac_try_echo=$ac_try;;
6863 esac
6864 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6865   (eval "$ac_link") 2>conftest.er1
6866   ac_status=$?
6867   grep -v '^ *+' conftest.er1 >conftest.err
6868   rm -f conftest.er1
6869   cat conftest.err >&5
6870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6871   (exit $ac_status); } && {
6872          test -z "$ac_c_werror_flag" ||
6873          test ! -s conftest.err
6874        } && test -s conftest$ac_exeext &&
6875        $as_test_x conftest$ac_exeext; then
6876   ac_cv_lib_bsd_gethostbyname=yes
6877 else
6878   echo "$as_me: failed program was:" >&5
6879 sed 's/^/| /' conftest.$ac_ext >&5
6880
6881         ac_cv_lib_bsd_gethostbyname=no
6882 fi
6883
6884 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6885       conftest$ac_exeext conftest.$ac_ext
6886 LIBS=$ac_check_lib_save_LIBS
6887 fi
6888 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6889 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6890 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6891   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6892 fi
6893
6894       fi
6895     fi
6896
6897     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6898     # socket/setsockopt and other routines are undefined under SCO ODT
6899     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6900     # on later versions), says Simon Leinen: it contains gethostby*
6901     # variants that don't use the name server (or something).  -lsocket
6902     # must be given before -lnsl if both are needed.  We assume that
6903     # if connect needs -lnsl, so does gethostbyname.
6904     { echo "$as_me:$LINENO: checking for connect" >&5
6905 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6906 if test "${ac_cv_func_connect+set}" = set; then
6907   echo $ECHO_N "(cached) $ECHO_C" >&6
6908 else
6909   cat >conftest.$ac_ext <<_ACEOF
6910 /* confdefs.h.  */
6911 _ACEOF
6912 cat confdefs.h >>conftest.$ac_ext
6913 cat >>conftest.$ac_ext <<_ACEOF
6914 /* end confdefs.h.  */
6915 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6916    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6917 #define connect innocuous_connect
6918
6919 /* System header to define __stub macros and hopefully few prototypes,
6920     which can conflict with char connect (); below.
6921     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6922     <limits.h> exists even on freestanding compilers.  */
6923
6924 #ifdef __STDC__
6925 # include <limits.h>
6926 #else
6927 # include <assert.h>
6928 #endif
6929
6930 #undef connect
6931
6932 /* Override any GCC internal prototype to avoid an error.
6933    Use char because int might match the return type of a GCC
6934    builtin and then its argument prototype would still apply.  */
6935 #ifdef __cplusplus
6936 extern "C"
6937 #endif
6938 char connect ();
6939 /* The GNU C library defines this for functions which it implements
6940     to always fail with ENOSYS.  Some functions are actually named
6941     something starting with __ and the normal name is an alias.  */
6942 #if defined __stub_connect || defined __stub___connect
6943 choke me
6944 #endif
6945
6946 int
6947 main ()
6948 {
6949 return connect ();
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 rm -f conftest.$ac_objext conftest$ac_exeext
6955 if { (ac_try="$ac_link"
6956 case "(($ac_try" in
6957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6958   *) ac_try_echo=$ac_try;;
6959 esac
6960 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6961   (eval "$ac_link") 2>conftest.er1
6962   ac_status=$?
6963   grep -v '^ *+' conftest.er1 >conftest.err
6964   rm -f conftest.er1
6965   cat conftest.err >&5
6966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6967   (exit $ac_status); } && {
6968          test -z "$ac_c_werror_flag" ||
6969          test ! -s conftest.err
6970        } && test -s conftest$ac_exeext &&
6971        $as_test_x conftest$ac_exeext; then
6972   ac_cv_func_connect=yes
6973 else
6974   echo "$as_me: failed program was:" >&5
6975 sed 's/^/| /' conftest.$ac_ext >&5
6976
6977         ac_cv_func_connect=no
6978 fi
6979
6980 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6981       conftest$ac_exeext conftest.$ac_ext
6982 fi
6983 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6984 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6985
6986     if test $ac_cv_func_connect = no; then
6987       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6988 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6989 if test "${ac_cv_lib_socket_connect+set}" = set; then
6990   echo $ECHO_N "(cached) $ECHO_C" >&6
6991 else
6992   ac_check_lib_save_LIBS=$LIBS
6993 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6994 cat >conftest.$ac_ext <<_ACEOF
6995 /* confdefs.h.  */
6996 _ACEOF
6997 cat confdefs.h >>conftest.$ac_ext
6998 cat >>conftest.$ac_ext <<_ACEOF
6999 /* end confdefs.h.  */
7000
7001 /* Override any GCC internal prototype to avoid an error.
7002    Use char because int might match the return type of a GCC
7003    builtin and then its argument prototype would still apply.  */
7004 #ifdef __cplusplus
7005 extern "C"
7006 #endif
7007 char connect ();
7008 int
7009 main ()
7010 {
7011 return connect ();
7012   ;
7013   return 0;
7014 }
7015 _ACEOF
7016 rm -f conftest.$ac_objext conftest$ac_exeext
7017 if { (ac_try="$ac_link"
7018 case "(($ac_try" in
7019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7020   *) ac_try_echo=$ac_try;;
7021 esac
7022 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7023   (eval "$ac_link") 2>conftest.er1
7024   ac_status=$?
7025   grep -v '^ *+' conftest.er1 >conftest.err
7026   rm -f conftest.er1
7027   cat conftest.err >&5
7028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029   (exit $ac_status); } && {
7030          test -z "$ac_c_werror_flag" ||
7031          test ! -s conftest.err
7032        } && test -s conftest$ac_exeext &&
7033        $as_test_x conftest$ac_exeext; then
7034   ac_cv_lib_socket_connect=yes
7035 else
7036   echo "$as_me: failed program was:" >&5
7037 sed 's/^/| /' conftest.$ac_ext >&5
7038
7039         ac_cv_lib_socket_connect=no
7040 fi
7041
7042 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7043       conftest$ac_exeext conftest.$ac_ext
7044 LIBS=$ac_check_lib_save_LIBS
7045 fi
7046 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7047 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7048 if test $ac_cv_lib_socket_connect = yes; then
7049   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7050 fi
7051
7052     fi
7053
7054     # Guillermo Gomez says -lposix is necessary on A/UX.
7055     { echo "$as_me:$LINENO: checking for remove" >&5
7056 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7057 if test "${ac_cv_func_remove+set}" = set; then
7058   echo $ECHO_N "(cached) $ECHO_C" >&6
7059 else
7060   cat >conftest.$ac_ext <<_ACEOF
7061 /* confdefs.h.  */
7062 _ACEOF
7063 cat confdefs.h >>conftest.$ac_ext
7064 cat >>conftest.$ac_ext <<_ACEOF
7065 /* end confdefs.h.  */
7066 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7067    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7068 #define remove innocuous_remove
7069
7070 /* System header to define __stub macros and hopefully few prototypes,
7071     which can conflict with char remove (); below.
7072     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7073     <limits.h> exists even on freestanding compilers.  */
7074
7075 #ifdef __STDC__
7076 # include <limits.h>
7077 #else
7078 # include <assert.h>
7079 #endif
7080
7081 #undef remove
7082
7083 /* Override any GCC internal prototype to avoid an error.
7084    Use char because int might match the return type of a GCC
7085    builtin and then its argument prototype would still apply.  */
7086 #ifdef __cplusplus
7087 extern "C"
7088 #endif
7089 char remove ();
7090 /* The GNU C library defines this for functions which it implements
7091     to always fail with ENOSYS.  Some functions are actually named
7092     something starting with __ and the normal name is an alias.  */
7093 #if defined __stub_remove || defined __stub___remove
7094 choke me
7095 #endif
7096
7097 int
7098 main ()
7099 {
7100 return remove ();
7101   ;
7102   return 0;
7103 }
7104 _ACEOF
7105 rm -f conftest.$ac_objext conftest$ac_exeext
7106 if { (ac_try="$ac_link"
7107 case "(($ac_try" in
7108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7109   *) ac_try_echo=$ac_try;;
7110 esac
7111 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7112   (eval "$ac_link") 2>conftest.er1
7113   ac_status=$?
7114   grep -v '^ *+' conftest.er1 >conftest.err
7115   rm -f conftest.er1
7116   cat conftest.err >&5
7117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118   (exit $ac_status); } && {
7119          test -z "$ac_c_werror_flag" ||
7120          test ! -s conftest.err
7121        } && test -s conftest$ac_exeext &&
7122        $as_test_x conftest$ac_exeext; then
7123   ac_cv_func_remove=yes
7124 else
7125   echo "$as_me: failed program was:" >&5
7126 sed 's/^/| /' conftest.$ac_ext >&5
7127
7128         ac_cv_func_remove=no
7129 fi
7130
7131 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7132       conftest$ac_exeext conftest.$ac_ext
7133 fi
7134 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7135 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7136
7137     if test $ac_cv_func_remove = no; then
7138       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7139 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7140 if test "${ac_cv_lib_posix_remove+set}" = set; then
7141   echo $ECHO_N "(cached) $ECHO_C" >&6
7142 else
7143   ac_check_lib_save_LIBS=$LIBS
7144 LIBS="-lposix  $LIBS"
7145 cat >conftest.$ac_ext <<_ACEOF
7146 /* confdefs.h.  */
7147 _ACEOF
7148 cat confdefs.h >>conftest.$ac_ext
7149 cat >>conftest.$ac_ext <<_ACEOF
7150 /* end confdefs.h.  */
7151
7152 /* Override any GCC internal prototype to avoid an error.
7153    Use char because int might match the return type of a GCC
7154    builtin and then its argument prototype would still apply.  */
7155 #ifdef __cplusplus
7156 extern "C"
7157 #endif
7158 char remove ();
7159 int
7160 main ()
7161 {
7162 return remove ();
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext conftest$ac_exeext
7168 if { (ac_try="$ac_link"
7169 case "(($ac_try" in
7170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7171   *) ac_try_echo=$ac_try;;
7172 esac
7173 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7174   (eval "$ac_link") 2>conftest.er1
7175   ac_status=$?
7176   grep -v '^ *+' conftest.er1 >conftest.err
7177   rm -f conftest.er1
7178   cat conftest.err >&5
7179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180   (exit $ac_status); } && {
7181          test -z "$ac_c_werror_flag" ||
7182          test ! -s conftest.err
7183        } && test -s conftest$ac_exeext &&
7184        $as_test_x conftest$ac_exeext; then
7185   ac_cv_lib_posix_remove=yes
7186 else
7187   echo "$as_me: failed program was:" >&5
7188 sed 's/^/| /' conftest.$ac_ext >&5
7189
7190         ac_cv_lib_posix_remove=no
7191 fi
7192
7193 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7194       conftest$ac_exeext conftest.$ac_ext
7195 LIBS=$ac_check_lib_save_LIBS
7196 fi
7197 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7198 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7199 if test $ac_cv_lib_posix_remove = yes; then
7200   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7201 fi
7202
7203     fi
7204
7205     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7206     { echo "$as_me:$LINENO: checking for shmat" >&5
7207 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7208 if test "${ac_cv_func_shmat+set}" = set; then
7209   echo $ECHO_N "(cached) $ECHO_C" >&6
7210 else
7211   cat >conftest.$ac_ext <<_ACEOF
7212 /* confdefs.h.  */
7213 _ACEOF
7214 cat confdefs.h >>conftest.$ac_ext
7215 cat >>conftest.$ac_ext <<_ACEOF
7216 /* end confdefs.h.  */
7217 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7218    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7219 #define shmat innocuous_shmat
7220
7221 /* System header to define __stub macros and hopefully few prototypes,
7222     which can conflict with char shmat (); below.
7223     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7224     <limits.h> exists even on freestanding compilers.  */
7225
7226 #ifdef __STDC__
7227 # include <limits.h>
7228 #else
7229 # include <assert.h>
7230 #endif
7231
7232 #undef shmat
7233
7234 /* Override any GCC internal prototype to avoid an error.
7235    Use char because int might match the return type of a GCC
7236    builtin and then its argument prototype would still apply.  */
7237 #ifdef __cplusplus
7238 extern "C"
7239 #endif
7240 char shmat ();
7241 /* The GNU C library defines this for functions which it implements
7242     to always fail with ENOSYS.  Some functions are actually named
7243     something starting with __ and the normal name is an alias.  */
7244 #if defined __stub_shmat || defined __stub___shmat
7245 choke me
7246 #endif
7247
7248 int
7249 main ()
7250 {
7251 return shmat ();
7252   ;
7253   return 0;
7254 }
7255 _ACEOF
7256 rm -f conftest.$ac_objext conftest$ac_exeext
7257 if { (ac_try="$ac_link"
7258 case "(($ac_try" in
7259   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260   *) ac_try_echo=$ac_try;;
7261 esac
7262 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7263   (eval "$ac_link") 2>conftest.er1
7264   ac_status=$?
7265   grep -v '^ *+' conftest.er1 >conftest.err
7266   rm -f conftest.er1
7267   cat conftest.err >&5
7268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7269   (exit $ac_status); } && {
7270          test -z "$ac_c_werror_flag" ||
7271          test ! -s conftest.err
7272        } && test -s conftest$ac_exeext &&
7273        $as_test_x conftest$ac_exeext; then
7274   ac_cv_func_shmat=yes
7275 else
7276   echo "$as_me: failed program was:" >&5
7277 sed 's/^/| /' conftest.$ac_ext >&5
7278
7279         ac_cv_func_shmat=no
7280 fi
7281
7282 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7283       conftest$ac_exeext conftest.$ac_ext
7284 fi
7285 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7286 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7287
7288     if test $ac_cv_func_shmat = no; then
7289       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7290 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7291 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7292   echo $ECHO_N "(cached) $ECHO_C" >&6
7293 else
7294   ac_check_lib_save_LIBS=$LIBS
7295 LIBS="-lipc  $LIBS"
7296 cat >conftest.$ac_ext <<_ACEOF
7297 /* confdefs.h.  */
7298 _ACEOF
7299 cat confdefs.h >>conftest.$ac_ext
7300 cat >>conftest.$ac_ext <<_ACEOF
7301 /* end confdefs.h.  */
7302
7303 /* Override any GCC internal prototype to avoid an error.
7304    Use char because int might match the return type of a GCC
7305    builtin and then its argument prototype would still apply.  */
7306 #ifdef __cplusplus
7307 extern "C"
7308 #endif
7309 char shmat ();
7310 int
7311 main ()
7312 {
7313 return shmat ();
7314   ;
7315   return 0;
7316 }
7317 _ACEOF
7318 rm -f conftest.$ac_objext conftest$ac_exeext
7319 if { (ac_try="$ac_link"
7320 case "(($ac_try" in
7321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7322   *) ac_try_echo=$ac_try;;
7323 esac
7324 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7325   (eval "$ac_link") 2>conftest.er1
7326   ac_status=$?
7327   grep -v '^ *+' conftest.er1 >conftest.err
7328   rm -f conftest.er1
7329   cat conftest.err >&5
7330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7331   (exit $ac_status); } && {
7332          test -z "$ac_c_werror_flag" ||
7333          test ! -s conftest.err
7334        } && test -s conftest$ac_exeext &&
7335        $as_test_x conftest$ac_exeext; then
7336   ac_cv_lib_ipc_shmat=yes
7337 else
7338   echo "$as_me: failed program was:" >&5
7339 sed 's/^/| /' conftest.$ac_ext >&5
7340
7341         ac_cv_lib_ipc_shmat=no
7342 fi
7343
7344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7345       conftest$ac_exeext conftest.$ac_ext
7346 LIBS=$ac_check_lib_save_LIBS
7347 fi
7348 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7349 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7350 if test $ac_cv_lib_ipc_shmat = yes; then
7351   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7352 fi
7353
7354     fi
7355   fi
7356
7357   # Check for libraries that X11R6 Xt/Xaw programs need.
7358   ac_save_LDFLAGS=$LDFLAGS
7359   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7360   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7361   # check for ICE first), but we must link in the order -lSM -lICE or
7362   # we get undefined symbols.  So assume we have SM if we have ICE.
7363   # These have to be linked with before -lX11, unlike the other
7364   # libraries we check for below, so use a different variable.
7365   # John Interrante, Karl Berry
7366   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7367 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7368 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7369   echo $ECHO_N "(cached) $ECHO_C" >&6
7370 else
7371   ac_check_lib_save_LIBS=$LIBS
7372 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7373 cat >conftest.$ac_ext <<_ACEOF
7374 /* confdefs.h.  */
7375 _ACEOF
7376 cat confdefs.h >>conftest.$ac_ext
7377 cat >>conftest.$ac_ext <<_ACEOF
7378 /* end confdefs.h.  */
7379
7380 /* Override any GCC internal prototype to avoid an error.
7381    Use char because int might match the return type of a GCC
7382    builtin and then its argument prototype would still apply.  */
7383 #ifdef __cplusplus
7384 extern "C"
7385 #endif
7386 char IceConnectionNumber ();
7387 int
7388 main ()
7389 {
7390 return IceConnectionNumber ();
7391   ;
7392   return 0;
7393 }
7394 _ACEOF
7395 rm -f conftest.$ac_objext conftest$ac_exeext
7396 if { (ac_try="$ac_link"
7397 case "(($ac_try" in
7398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7399   *) ac_try_echo=$ac_try;;
7400 esac
7401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7402   (eval "$ac_link") 2>conftest.er1
7403   ac_status=$?
7404   grep -v '^ *+' conftest.er1 >conftest.err
7405   rm -f conftest.er1
7406   cat conftest.err >&5
7407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408   (exit $ac_status); } && {
7409          test -z "$ac_c_werror_flag" ||
7410          test ! -s conftest.err
7411        } && test -s conftest$ac_exeext &&
7412        $as_test_x conftest$ac_exeext; then
7413   ac_cv_lib_ICE_IceConnectionNumber=yes
7414 else
7415   echo "$as_me: failed program was:" >&5
7416 sed 's/^/| /' conftest.$ac_ext >&5
7417
7418         ac_cv_lib_ICE_IceConnectionNumber=no
7419 fi
7420
7421 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7422       conftest$ac_exeext conftest.$ac_ext
7423 LIBS=$ac_check_lib_save_LIBS
7424 fi
7425 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7426 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7427 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7428   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7429 fi
7430
7431   LDFLAGS=$ac_save_LDFLAGS
7432
7433 fi
7434
7435
7436 if test "$have_x" != yes; then
7437   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7438 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7439    { (exit 1); exit 1; }; }
7440 fi
7441
7442
7443     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7444 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7445 if test "${ac_cv_x_app_defaults+set}" = set; then
7446   echo $ECHO_N "(cached) $ECHO_C" >&6
7447 else
7448
7449   rm -fr conftestdir
7450   if mkdir conftestdir; then
7451     cd conftestdir 2>/dev/null
7452     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7453     cat > Imakefile <<'EOF'
7454 acfindx:
7455         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7456 EOF
7457     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7458       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7459       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7460     fi
7461     cd .. 2>/dev/null
7462     rm -fr conftestdir
7463   fi
7464       if test x"$ac_x_app_defaults" = x; then
7465
7466   # Look for the directory under a standard set of common directories.
7467   # Check X11 before X11Rn because it's often a symlink to the current release.
7468   for ac_dir in                                 \
7469     /usr/X11/lib/app-defaults                   \
7470     /usr/X11R6/lib/app-defaults                 \
7471     /usr/X11R6/lib/X11/app-defaults             \
7472     /usr/X11R5/lib/app-defaults                 \
7473     /usr/X11R5/lib/X11/app-defaults             \
7474     /usr/X11R4/lib/app-defaults                 \
7475     /usr/X11R4/lib/X11/app-defaults             \
7476                                                 \
7477     /usr/lib/X11/app-defaults                   \
7478     /usr/lib/X11R6/app-defaults                 \
7479     /usr/lib/X11R5/app-defaults                 \
7480     /usr/lib/X11R4/app-defaults                 \
7481                                                 \
7482     /usr/local/X11/lib/app-defaults             \
7483     /usr/local/X11R6/lib/app-defaults           \
7484     /usr/local/X11R5/lib/app-defaults           \
7485     /usr/local/X11R4/lib/app-defaults           \
7486                                                 \
7487     /usr/local/lib/X11/app-defaults             \
7488     /usr/local/lib/X11R6/app-defaults           \
7489     /usr/local/lib/X11R6/X11/app-defaults       \
7490     /usr/local/lib/X11R5/app-defaults           \
7491     /usr/local/lib/X11R5/X11/app-defaults       \
7492     /usr/local/lib/X11R4/app-defaults           \
7493     /usr/local/lib/X11R4/X11/app-defaults       \
7494                                                 \
7495     /usr/X386/lib/X11/app-defaults              \
7496     /usr/x386/lib/X11/app-defaults              \
7497     /usr/XFree86/lib/X11/app-defaults           \
7498                                                 \
7499     /usr/lib/X11/app-defaults                   \
7500     /usr/local/lib/X11/app-defaults             \
7501     /usr/unsupported/lib/X11/app-defaults       \
7502     /usr/athena/lib/X11/app-defaults            \
7503     /usr/local/x11r5/lib/X11/app-defaults       \
7504     /usr/lpp/Xamples/lib/X11/app-defaults       \
7505     /lib/usr/lib/X11/app-defaults               \
7506                                                 \
7507     /usr/openwin/lib/app-defaults               \
7508     /usr/openwin/lib/X11/app-defaults           \
7509     /usr/openwin/share/lib/app-defaults         \
7510     /usr/openwin/share/lib/X11/app-defaults     \
7511                                                 \
7512     /X11R6/lib/app-defaults                     \
7513     /X11R5/lib/app-defaults                     \
7514     /X11R4/lib/app-defaults                     \
7515     ; \
7516   do
7517     if test -d "$ac_dir"; then
7518       ac_x_app_defaults=$ac_dir
7519       break
7520     fi
7521   done
7522
7523       fi
7524       if test x"$ac_x_app_defaults" = x; then
7525         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7526       else
7527         # Record where we found app-defaults for the cache.
7528         ac_cv_x_app_defaults="$ac_x_app_defaults"
7529       fi
7530 fi
7531 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7532 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7533     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7534 case "$host" in
7535     *-hpux*)
7536
7537       # The following arcana was gleaned from conversations with
7538       # Eric Schwartz <erics@col.hp.com>:
7539       #
7540       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7541       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7542       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7543       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7544       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7545       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7546       # you don't need any -I or -L arguments.
7547       #
7548       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7549       # are the same division as 10.x.  However, there are no symlinks to
7550       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7551       # arguments are always necessary.
7552       #
7553       # However, X11R6 was available on HPUX 9.x as a patch: if that
7554       # patch was installed, then all of X11R6 went in to
7555       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7556       #
7557       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7558       # whether R5 was available as a patch; R6 undoubtedly was not.)
7559       #
7560       # So.  We try and use the highest numbered pair of
7561       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7562       # that are available.  We do not mix and match different versions
7563       # of X.
7564       #
7565       # Question I still don't know the answer to: (do you?)
7566       #
7567       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7568       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7569       #     that contrib directory?  Did it contain so-called "standard"
7570       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7571       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7572       #     be a situation where one had to reach into the R5 headers and
7573       #     libs to find Xmu?  That is, must both R6 and R5 directories
7574       #     be on the -I and -L lists in that case?
7575       #
7576       for version in X11R6 X11R5 X11R4 ; do
7577         # if either pair of directories exists...
7578         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7579         then
7580            # if contrib exists, use it...
7581            if test -d /usr/contrib/$version/include ; then
7582              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7583              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7584            fi
7585            # if the "standard" one exists, use it.
7586            if test -d /usr/include/$version ; then
7587              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7588              X_LIBS="$X_LIBS -L/usr/lib/$version"
7589            fi
7590            # since at least one of the pair exists, go no farther.
7591            break
7592         fi
7593       done
7594
7595       # Now find Motif.  Thanks for not making xmkmf find this by
7596       # default, you losers.
7597       #
7598       if test -d /usr/include/Motif2.1 ; then
7599         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7600         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7601       elif test -d /usr/include/Motif1.2 ; then
7602         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7603         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7604       elif test -d /usr/include/Motif1.1 ; then
7605         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7606         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7607       fi
7608
7609       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7610       #
7611       if test -d /opt/graphics/OpenGL/include ; then
7612         # HP-UX 10.20 puts it here
7613         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7614         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7615       elif test -d /opt/Mesa/lib ; then
7616         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7617         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7618       fi
7619
7620
7621       if test -d /opt/xpm/lib/X11 ; then
7622         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7623         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7624       fi
7625
7626       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7627       # in /usr/local/, unless there is already an xscreensaver in
7628       # /usr/local/bin/.  This can be overridden with the --prefix arg
7629       # to configure.  I'm not sure this is the right thing to do, but
7630       # Richard Lloyd says so...
7631       #
7632       if test \! -x /usr/local/bin/xscreensaver ; then
7633         ac_default_prefix=/opt/xscreensaver
7634       fi
7635
7636     ;;
7637     *-solaris*)
7638
7639       # Thanks for not making xmkmf find this by default, pinheads.
7640       # And thanks for moving things around again, too.  Is this
7641       # really the standard location now?  What happened to the
7642       # joke that this kind of thing went in /opt?
7643       # cthomp says "answer: CDE (Common Disorganized Environment)"
7644       #
7645       if test -f /usr/dt/include/Xm/Xm.h ; then
7646         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7647         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7648
7649         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7650         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7651 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7652 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7653   echo $ECHO_N "(cached) $ECHO_C" >&6
7654 else
7655   ac_check_lib_save_LIBS=$LIBS
7656 LIBS="-lgen  $LIBS"
7657 cat >conftest.$ac_ext <<_ACEOF
7658 /* confdefs.h.  */
7659 _ACEOF
7660 cat confdefs.h >>conftest.$ac_ext
7661 cat >>conftest.$ac_ext <<_ACEOF
7662 /* end confdefs.h.  */
7663
7664 /* Override any GCC internal prototype to avoid an error.
7665    Use char because int might match the return type of a GCC
7666    builtin and then its argument prototype would still apply.  */
7667 #ifdef __cplusplus
7668 extern "C"
7669 #endif
7670 char regcmp ();
7671 int
7672 main ()
7673 {
7674 return regcmp ();
7675   ;
7676   return 0;
7677 }
7678 _ACEOF
7679 rm -f conftest.$ac_objext conftest$ac_exeext
7680 if { (ac_try="$ac_link"
7681 case "(($ac_try" in
7682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7683   *) ac_try_echo=$ac_try;;
7684 esac
7685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7686   (eval "$ac_link") 2>conftest.er1
7687   ac_status=$?
7688   grep -v '^ *+' conftest.er1 >conftest.err
7689   rm -f conftest.er1
7690   cat conftest.err >&5
7691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692   (exit $ac_status); } && {
7693          test -z "$ac_c_werror_flag" ||
7694          test ! -s conftest.err
7695        } && test -s conftest$ac_exeext &&
7696        $as_test_x conftest$ac_exeext; then
7697   ac_cv_lib_gen_regcmp=yes
7698 else
7699   echo "$as_me: failed program was:" >&5
7700 sed 's/^/| /' conftest.$ac_ext >&5
7701
7702         ac_cv_lib_gen_regcmp=no
7703 fi
7704
7705 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7706       conftest$ac_exeext conftest.$ac_ext
7707 LIBS=$ac_check_lib_save_LIBS
7708 fi
7709 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7710 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7711 if test $ac_cv_lib_gen_regcmp = yes; then
7712   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7713 fi
7714
7715       fi
7716
7717     ;;
7718     *-darwin*)
7719
7720       # On MacOS X (10.x with "fink"), many things are under /sw/.
7721       #
7722       if test -d /sw/include ; then
7723         X_CFLAGS="-I/sw/include $X_CFLAGS"
7724         X_LIBS="-L/sw/lib $X_LIBS"
7725       fi
7726     ;;
7727   esac
7728 { echo "$as_me:$LINENO: checking for XPointer" >&5
7729 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7730 if test "${ac_cv_xpointer+set}" = set; then
7731   echo $ECHO_N "(cached) $ECHO_C" >&6
7732 else
7733
7734   ac_save_CPPFLAGS="$CPPFLAGS"
7735   if test \! -z "$includedir" ; then
7736     CPPFLAGS="$CPPFLAGS -I$includedir"
7737   fi
7738   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7739   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7740   cat >conftest.$ac_ext <<_ACEOF
7741 /* confdefs.h.  */
7742 _ACEOF
7743 cat confdefs.h >>conftest.$ac_ext
7744 cat >>conftest.$ac_ext <<_ACEOF
7745 /* end confdefs.h.  */
7746 #include <X11/Xlib.h>
7747 int
7748 main ()
7749 {
7750 XPointer foo = (XPointer) 0;
7751   ;
7752   return 0;
7753 }
7754 _ACEOF
7755 rm -f conftest.$ac_objext
7756 if { (ac_try="$ac_compile"
7757 case "(($ac_try" in
7758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7759   *) ac_try_echo=$ac_try;;
7760 esac
7761 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7762   (eval "$ac_compile") 2>conftest.er1
7763   ac_status=$?
7764   grep -v '^ *+' conftest.er1 >conftest.err
7765   rm -f conftest.er1
7766   cat conftest.err >&5
7767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768   (exit $ac_status); } && {
7769          test -z "$ac_c_werror_flag" ||
7770          test ! -s conftest.err
7771        } && test -s conftest.$ac_objext; then
7772   ac_cv_xpointer=yes
7773 else
7774   echo "$as_me: failed program was:" >&5
7775 sed 's/^/| /' conftest.$ac_ext >&5
7776
7777         ac_cv_xpointer=no
7778 fi
7779
7780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7781   CPPFLAGS="$ac_save_CPPFLAGS"
7782 fi
7783 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7784 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7785   if test "$ac_cv_xpointer" != yes; then
7786    cat >>confdefs.h <<\_ACEOF
7787 #define XPointer char*
7788 _ACEOF
7789
7790   fi
7791
7792 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7793 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7794   ac_macosx=no
7795   case "$host" in
7796     *-apple-darwin* )
7797       ac_macosx=yes
7798     ;;
7799   esac
7800 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7801 echo "${ECHO_T}$ac_macosx" >&6; }
7802
7803
7804 ###############################################################################
7805 #
7806 #       Gettext support
7807 #
7808 ###############################################################################
7809
7810
7811
7812 if test -n ""; then
7813     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7814 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7815
7816     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7817     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7818
7819     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7820
7821
7822     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7823         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7824 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7825     else
7826         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7827 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7828         exit 1
7829     fi
7830 fi
7831
7832   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'
7833 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'
7834      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'
7835       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7836      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'
7837    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'
7838     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'
7839 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'
7840        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'
7841       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'
7842     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'
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856 # Use the tools built into the package, not the ones that are installed.
7857
7858 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7859 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7860 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7861
7862
7863
7864
7865
7866 # Extract the first word of "perl", so it can be a program name with args.
7867 set dummy perl; ac_word=$2
7868 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7870 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7871   echo $ECHO_N "(cached) $ECHO_C" >&6
7872 else
7873   case $INTLTOOL_PERL in
7874   [\\/]* | ?:[\\/]*)
7875   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7876   ;;
7877   *)
7878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7879 for as_dir in $PATH
7880 do
7881   IFS=$as_save_IFS
7882   test -z "$as_dir" && as_dir=.
7883   for ac_exec_ext in '' $ac_executable_extensions; do
7884   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7885     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7886     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7887     break 2
7888   fi
7889 done
7890 done
7891 IFS=$as_save_IFS
7892
7893   ;;
7894 esac
7895 fi
7896 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7897 if test -n "$INTLTOOL_PERL"; then
7898   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7899 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7900 else
7901   { echo "$as_me:$LINENO: result: no" >&5
7902 echo "${ECHO_T}no" >&6; }
7903 fi
7904
7905
7906 if test -z "$INTLTOOL_PERL"; then
7907    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7908 echo "$as_me: error: perl not found; required for intltool" >&2;}
7909    { (exit 1); exit 1; }; }
7910 fi
7911 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7912    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7913 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7914    { (exit 1); exit 1; }; }
7915 fi
7916
7917 # Remove file type tags (using []) from po/POTFILES.
7918
7919
7920
7921
7922
7923
7924
7925 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7926
7927 ac_config_commands="$ac_config_commands default-1"
7928
7929
7930
7931 GETTEXT_PACKAGE=xscreensaver
7932
7933 cat >>confdefs.h <<_ACEOF
7934 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7935 _ACEOF
7936
7937
7938 cat >>confdefs.h <<_ACEOF
7939 #define PACKAGE "$GETTEXT_PACKAGE"
7940 _ACEOF
7941
7942
7943
7944 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7945 if test -n "$ac_tool_prefix"; then
7946   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7947 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7948 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7950 if test "${ac_cv_prog_RANLIB+set}" = set; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953   if test -n "$RANLIB"; then
7954   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7955 else
7956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7957 for as_dir in $PATH
7958 do
7959   IFS=$as_save_IFS
7960   test -z "$as_dir" && as_dir=.
7961   for ac_exec_ext in '' $ac_executable_extensions; do
7962   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7963     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7964     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7965     break 2
7966   fi
7967 done
7968 done
7969 IFS=$as_save_IFS
7970
7971 fi
7972 fi
7973 RANLIB=$ac_cv_prog_RANLIB
7974 if test -n "$RANLIB"; then
7975   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7976 echo "${ECHO_T}$RANLIB" >&6; }
7977 else
7978   { echo "$as_me:$LINENO: result: no" >&5
7979 echo "${ECHO_T}no" >&6; }
7980 fi
7981
7982
7983 fi
7984 if test -z "$ac_cv_prog_RANLIB"; then
7985   ac_ct_RANLIB=$RANLIB
7986   # Extract the first word of "ranlib", so it can be a program name with args.
7987 set dummy ranlib; ac_word=$2
7988 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7990 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7991   echo $ECHO_N "(cached) $ECHO_C" >&6
7992 else
7993   if test -n "$ac_ct_RANLIB"; then
7994   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7995 else
7996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997 for as_dir in $PATH
7998 do
7999   IFS=$as_save_IFS
8000   test -z "$as_dir" && as_dir=.
8001   for ac_exec_ext in '' $ac_executable_extensions; do
8002   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8003     ac_cv_prog_ac_ct_RANLIB="ranlib"
8004     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8005     break 2
8006   fi
8007 done
8008 done
8009 IFS=$as_save_IFS
8010
8011 fi
8012 fi
8013 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8014 if test -n "$ac_ct_RANLIB"; then
8015   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8016 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8017 else
8018   { echo "$as_me:$LINENO: result: no" >&5
8019 echo "${ECHO_T}no" >&6; }
8020 fi
8021
8022   if test "x$ac_ct_RANLIB" = x; then
8023     RANLIB=":"
8024   else
8025     case $cross_compiling:$ac_tool_warned in
8026 yes:)
8027 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8028 whose name does not start with the host triplet.  If you think this
8029 configuration is useful to you, please write to autoconf@gnu.org." >&5
8030 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8031 whose name does not start with the host triplet.  If you think this
8032 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8033 ac_tool_warned=yes ;;
8034 esac
8035     RANLIB=$ac_ct_RANLIB
8036   fi
8037 else
8038   RANLIB="$ac_cv_prog_RANLIB"
8039 fi
8040
8041 { echo "$as_me:$LINENO: checking for off_t" >&5
8042 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8043 if test "${ac_cv_type_off_t+set}" = set; then
8044   echo $ECHO_N "(cached) $ECHO_C" >&6
8045 else
8046   cat >conftest.$ac_ext <<_ACEOF
8047 /* confdefs.h.  */
8048 _ACEOF
8049 cat confdefs.h >>conftest.$ac_ext
8050 cat >>conftest.$ac_ext <<_ACEOF
8051 /* end confdefs.h.  */
8052 $ac_includes_default
8053 typedef off_t ac__type_new_;
8054 int
8055 main ()
8056 {
8057 if ((ac__type_new_ *) 0)
8058   return 0;
8059 if (sizeof (ac__type_new_))
8060   return 0;
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 rm -f conftest.$ac_objext
8066 if { (ac_try="$ac_compile"
8067 case "(($ac_try" in
8068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069   *) ac_try_echo=$ac_try;;
8070 esac
8071 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8072   (eval "$ac_compile") 2>conftest.er1
8073   ac_status=$?
8074   grep -v '^ *+' conftest.er1 >conftest.err
8075   rm -f conftest.er1
8076   cat conftest.err >&5
8077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078   (exit $ac_status); } && {
8079          test -z "$ac_c_werror_flag" ||
8080          test ! -s conftest.err
8081        } && test -s conftest.$ac_objext; then
8082   ac_cv_type_off_t=yes
8083 else
8084   echo "$as_me: failed program was:" >&5
8085 sed 's/^/| /' conftest.$ac_ext >&5
8086
8087         ac_cv_type_off_t=no
8088 fi
8089
8090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8091 fi
8092 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8093 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8094 if test $ac_cv_type_off_t = yes; then
8095   :
8096 else
8097
8098 cat >>confdefs.h <<_ACEOF
8099 #define off_t long int
8100 _ACEOF
8101
8102 fi
8103
8104 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8105 # for constant arguments.  Useless!
8106 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8107 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8108 if test "${ac_cv_working_alloca_h+set}" = set; then
8109   echo $ECHO_N "(cached) $ECHO_C" >&6
8110 else
8111   cat >conftest.$ac_ext <<_ACEOF
8112 /* confdefs.h.  */
8113 _ACEOF
8114 cat confdefs.h >>conftest.$ac_ext
8115 cat >>conftest.$ac_ext <<_ACEOF
8116 /* end confdefs.h.  */
8117 #include <alloca.h>
8118 int
8119 main ()
8120 {
8121 char *p = (char *) alloca (2 * sizeof (int));
8122                           if (p) return 0;
8123   ;
8124   return 0;
8125 }
8126 _ACEOF
8127 rm -f conftest.$ac_objext conftest$ac_exeext
8128 if { (ac_try="$ac_link"
8129 case "(($ac_try" in
8130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8131   *) ac_try_echo=$ac_try;;
8132 esac
8133 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8134   (eval "$ac_link") 2>conftest.er1
8135   ac_status=$?
8136   grep -v '^ *+' conftest.er1 >conftest.err
8137   rm -f conftest.er1
8138   cat conftest.err >&5
8139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140   (exit $ac_status); } && {
8141          test -z "$ac_c_werror_flag" ||
8142          test ! -s conftest.err
8143        } && test -s conftest$ac_exeext &&
8144        $as_test_x conftest$ac_exeext; then
8145   ac_cv_working_alloca_h=yes
8146 else
8147   echo "$as_me: failed program was:" >&5
8148 sed 's/^/| /' conftest.$ac_ext >&5
8149
8150         ac_cv_working_alloca_h=no
8151 fi
8152
8153 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8154       conftest$ac_exeext conftest.$ac_ext
8155 fi
8156 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8157 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8158 if test $ac_cv_working_alloca_h = yes; then
8159
8160 cat >>confdefs.h <<\_ACEOF
8161 #define HAVE_ALLOCA_H 1
8162 _ACEOF
8163
8164 fi
8165
8166 { echo "$as_me:$LINENO: checking for alloca" >&5
8167 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8168 if test "${ac_cv_func_alloca_works+set}" = set; then
8169   echo $ECHO_N "(cached) $ECHO_C" >&6
8170 else
8171   cat >conftest.$ac_ext <<_ACEOF
8172 /* confdefs.h.  */
8173 _ACEOF
8174 cat confdefs.h >>conftest.$ac_ext
8175 cat >>conftest.$ac_ext <<_ACEOF
8176 /* end confdefs.h.  */
8177 #ifdef __GNUC__
8178 # define alloca __builtin_alloca
8179 #else
8180 # ifdef _MSC_VER
8181 #  include <malloc.h>
8182 #  define alloca _alloca
8183 # else
8184 #  ifdef HAVE_ALLOCA_H
8185 #   include <alloca.h>
8186 #  else
8187 #   ifdef _AIX
8188  #pragma alloca
8189 #   else
8190 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8191 char *alloca ();
8192 #    endif
8193 #   endif
8194 #  endif
8195 # endif
8196 #endif
8197
8198 int
8199 main ()
8200 {
8201 char *p = (char *) alloca (1);
8202                                     if (p) return 0;
8203   ;
8204   return 0;
8205 }
8206 _ACEOF
8207 rm -f conftest.$ac_objext conftest$ac_exeext
8208 if { (ac_try="$ac_link"
8209 case "(($ac_try" in
8210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211   *) ac_try_echo=$ac_try;;
8212 esac
8213 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8214   (eval "$ac_link") 2>conftest.er1
8215   ac_status=$?
8216   grep -v '^ *+' conftest.er1 >conftest.err
8217   rm -f conftest.er1
8218   cat conftest.err >&5
8219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220   (exit $ac_status); } && {
8221          test -z "$ac_c_werror_flag" ||
8222          test ! -s conftest.err
8223        } && test -s conftest$ac_exeext &&
8224        $as_test_x conftest$ac_exeext; then
8225   ac_cv_func_alloca_works=yes
8226 else
8227   echo "$as_me: failed program was:" >&5
8228 sed 's/^/| /' conftest.$ac_ext >&5
8229
8230         ac_cv_func_alloca_works=no
8231 fi
8232
8233 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8234       conftest$ac_exeext conftest.$ac_ext
8235 fi
8236 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8237 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8238
8239 if test $ac_cv_func_alloca_works = yes; then
8240
8241 cat >>confdefs.h <<\_ACEOF
8242 #define HAVE_ALLOCA 1
8243 _ACEOF
8244
8245 else
8246   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8247 # that cause trouble.  Some versions do not even contain alloca or
8248 # contain a buggy version.  If you still want to use their alloca,
8249 # use ar to extract alloca.o from them instead of compiling alloca.c.
8250
8251 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8252
8253 cat >>confdefs.h <<\_ACEOF
8254 #define C_ALLOCA 1
8255 _ACEOF
8256
8257
8258 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8259 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8260 if test "${ac_cv_os_cray+set}" = set; then
8261   echo $ECHO_N "(cached) $ECHO_C" >&6
8262 else
8263   cat >conftest.$ac_ext <<_ACEOF
8264 /* confdefs.h.  */
8265 _ACEOF
8266 cat confdefs.h >>conftest.$ac_ext
8267 cat >>conftest.$ac_ext <<_ACEOF
8268 /* end confdefs.h.  */
8269 #if defined CRAY && ! defined CRAY2
8270 webecray
8271 #else
8272 wenotbecray
8273 #endif
8274
8275 _ACEOF
8276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8277   $EGREP "webecray" >/dev/null 2>&1; then
8278   ac_cv_os_cray=yes
8279 else
8280   ac_cv_os_cray=no
8281 fi
8282 rm -f conftest*
8283
8284 fi
8285 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8286 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8287 if test $ac_cv_os_cray = yes; then
8288   for ac_func in _getb67 GETB67 getb67; do
8289     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8290 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8291 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8292 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8293   echo $ECHO_N "(cached) $ECHO_C" >&6
8294 else
8295   cat >conftest.$ac_ext <<_ACEOF
8296 /* confdefs.h.  */
8297 _ACEOF
8298 cat confdefs.h >>conftest.$ac_ext
8299 cat >>conftest.$ac_ext <<_ACEOF
8300 /* end confdefs.h.  */
8301 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8302    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8303 #define $ac_func innocuous_$ac_func
8304
8305 /* System header to define __stub macros and hopefully few prototypes,
8306     which can conflict with char $ac_func (); below.
8307     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8308     <limits.h> exists even on freestanding compilers.  */
8309
8310 #ifdef __STDC__
8311 # include <limits.h>
8312 #else
8313 # include <assert.h>
8314 #endif
8315
8316 #undef $ac_func
8317
8318 /* Override any GCC internal prototype to avoid an error.
8319    Use char because int might match the return type of a GCC
8320    builtin and then its argument prototype would still apply.  */
8321 #ifdef __cplusplus
8322 extern "C"
8323 #endif
8324 char $ac_func ();
8325 /* The GNU C library defines this for functions which it implements
8326     to always fail with ENOSYS.  Some functions are actually named
8327     something starting with __ and the normal name is an alias.  */
8328 #if defined __stub_$ac_func || defined __stub___$ac_func
8329 choke me
8330 #endif
8331
8332 int
8333 main ()
8334 {
8335 return $ac_func ();
8336   ;
8337   return 0;
8338 }
8339 _ACEOF
8340 rm -f conftest.$ac_objext conftest$ac_exeext
8341 if { (ac_try="$ac_link"
8342 case "(($ac_try" in
8343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8344   *) ac_try_echo=$ac_try;;
8345 esac
8346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8347   (eval "$ac_link") 2>conftest.er1
8348   ac_status=$?
8349   grep -v '^ *+' conftest.er1 >conftest.err
8350   rm -f conftest.er1
8351   cat conftest.err >&5
8352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8353   (exit $ac_status); } && {
8354          test -z "$ac_c_werror_flag" ||
8355          test ! -s conftest.err
8356        } && test -s conftest$ac_exeext &&
8357        $as_test_x conftest$ac_exeext; then
8358   eval "$as_ac_var=yes"
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 sed 's/^/| /' conftest.$ac_ext >&5
8362
8363         eval "$as_ac_var=no"
8364 fi
8365
8366 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8367       conftest$ac_exeext conftest.$ac_ext
8368 fi
8369 ac_res=`eval echo '${'$as_ac_var'}'`
8370                { echo "$as_me:$LINENO: result: $ac_res" >&5
8371 echo "${ECHO_T}$ac_res" >&6; }
8372 if test `eval echo '${'$as_ac_var'}'` = yes; then
8373
8374 cat >>confdefs.h <<_ACEOF
8375 #define CRAY_STACKSEG_END $ac_func
8376 _ACEOF
8377
8378     break
8379 fi
8380
8381   done
8382 fi
8383
8384 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8385 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8386 if test "${ac_cv_c_stack_direction+set}" = set; then
8387   echo $ECHO_N "(cached) $ECHO_C" >&6
8388 else
8389   if test "$cross_compiling" = yes; then
8390   ac_cv_c_stack_direction=0
8391 else
8392   cat >conftest.$ac_ext <<_ACEOF
8393 /* confdefs.h.  */
8394 _ACEOF
8395 cat confdefs.h >>conftest.$ac_ext
8396 cat >>conftest.$ac_ext <<_ACEOF
8397 /* end confdefs.h.  */
8398 $ac_includes_default
8399 int
8400 find_stack_direction ()
8401 {
8402   static char *addr = 0;
8403   auto char dummy;
8404   if (addr == 0)
8405     {
8406       addr = &dummy;
8407       return find_stack_direction ();
8408     }
8409   else
8410     return (&dummy > addr) ? 1 : -1;
8411 }
8412
8413 int
8414 main ()
8415 {
8416   return find_stack_direction () < 0;
8417 }
8418 _ACEOF
8419 rm -f conftest$ac_exeext
8420 if { (ac_try="$ac_link"
8421 case "(($ac_try" in
8422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8423   *) ac_try_echo=$ac_try;;
8424 esac
8425 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8426   (eval "$ac_link") 2>&5
8427   ac_status=$?
8428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8429   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8430   { (case "(($ac_try" in
8431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8432   *) ac_try_echo=$ac_try;;
8433 esac
8434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8435   (eval "$ac_try") 2>&5
8436   ac_status=$?
8437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8438   (exit $ac_status); }; }; then
8439   ac_cv_c_stack_direction=1
8440 else
8441   echo "$as_me: program exited with status $ac_status" >&5
8442 echo "$as_me: failed program was:" >&5
8443 sed 's/^/| /' conftest.$ac_ext >&5
8444
8445 ( exit $ac_status )
8446 ac_cv_c_stack_direction=-1
8447 fi
8448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8449 fi
8450
8451
8452 fi
8453 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8454 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8455
8456 cat >>confdefs.h <<_ACEOF
8457 #define STACK_DIRECTION $ac_cv_c_stack_direction
8458 _ACEOF
8459
8460
8461 fi
8462
8463
8464
8465 for ac_header in stdlib.h unistd.h
8466 do
8467 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8468 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8469   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8470 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8471 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8472   echo $ECHO_N "(cached) $ECHO_C" >&6
8473 fi
8474 ac_res=`eval echo '${'$as_ac_Header'}'`
8475                { echo "$as_me:$LINENO: result: $ac_res" >&5
8476 echo "${ECHO_T}$ac_res" >&6; }
8477 else
8478   # Is the header compilable?
8479 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8480 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8481 cat >conftest.$ac_ext <<_ACEOF
8482 /* confdefs.h.  */
8483 _ACEOF
8484 cat confdefs.h >>conftest.$ac_ext
8485 cat >>conftest.$ac_ext <<_ACEOF
8486 /* end confdefs.h.  */
8487 $ac_includes_default
8488 #include <$ac_header>
8489 _ACEOF
8490 rm -f conftest.$ac_objext
8491 if { (ac_try="$ac_compile"
8492 case "(($ac_try" in
8493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8494   *) ac_try_echo=$ac_try;;
8495 esac
8496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8497   (eval "$ac_compile") 2>conftest.er1
8498   ac_status=$?
8499   grep -v '^ *+' conftest.er1 >conftest.err
8500   rm -f conftest.er1
8501   cat conftest.err >&5
8502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503   (exit $ac_status); } && {
8504          test -z "$ac_c_werror_flag" ||
8505          test ! -s conftest.err
8506        } && test -s conftest.$ac_objext; then
8507   ac_header_compiler=yes
8508 else
8509   echo "$as_me: failed program was:" >&5
8510 sed 's/^/| /' conftest.$ac_ext >&5
8511
8512         ac_header_compiler=no
8513 fi
8514
8515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8516 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8517 echo "${ECHO_T}$ac_header_compiler" >&6; }
8518
8519 # Is the header present?
8520 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8521 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8522 cat >conftest.$ac_ext <<_ACEOF
8523 /* confdefs.h.  */
8524 _ACEOF
8525 cat confdefs.h >>conftest.$ac_ext
8526 cat >>conftest.$ac_ext <<_ACEOF
8527 /* end confdefs.h.  */
8528 #include <$ac_header>
8529 _ACEOF
8530 if { (ac_try="$ac_cpp conftest.$ac_ext"
8531 case "(($ac_try" in
8532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8533   *) ac_try_echo=$ac_try;;
8534 esac
8535 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8536   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8537   ac_status=$?
8538   grep -v '^ *+' conftest.er1 >conftest.err
8539   rm -f conftest.er1
8540   cat conftest.err >&5
8541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8542   (exit $ac_status); } >/dev/null && {
8543          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8544          test ! -s conftest.err
8545        }; then
8546   ac_header_preproc=yes
8547 else
8548   echo "$as_me: failed program was:" >&5
8549 sed 's/^/| /' conftest.$ac_ext >&5
8550
8551   ac_header_preproc=no
8552 fi
8553
8554 rm -f conftest.err conftest.$ac_ext
8555 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8556 echo "${ECHO_T}$ac_header_preproc" >&6; }
8557
8558 # So?  What about this header?
8559 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8560   yes:no: )
8561     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8562 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8563     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8564 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8565     ac_header_preproc=yes
8566     ;;
8567   no:yes:* )
8568     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8569 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8570     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8571 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8572     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8573 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8574     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8575 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8576     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8577 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8578     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8579 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8580
8581     ;;
8582 esac
8583 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8585 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588   eval "$as_ac_Header=\$ac_header_preproc"
8589 fi
8590 ac_res=`eval echo '${'$as_ac_Header'}'`
8591                { echo "$as_me:$LINENO: result: $ac_res" >&5
8592 echo "${ECHO_T}$ac_res" >&6; }
8593
8594 fi
8595 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8596   cat >>confdefs.h <<_ACEOF
8597 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8598 _ACEOF
8599
8600 fi
8601
8602 done
8603
8604
8605 for ac_func in getpagesize
8606 do
8607 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8608 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8609 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8610 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8611   echo $ECHO_N "(cached) $ECHO_C" >&6
8612 else
8613   cat >conftest.$ac_ext <<_ACEOF
8614 /* confdefs.h.  */
8615 _ACEOF
8616 cat confdefs.h >>conftest.$ac_ext
8617 cat >>conftest.$ac_ext <<_ACEOF
8618 /* end confdefs.h.  */
8619 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8620    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8621 #define $ac_func innocuous_$ac_func
8622
8623 /* System header to define __stub macros and hopefully few prototypes,
8624     which can conflict with char $ac_func (); below.
8625     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8626     <limits.h> exists even on freestanding compilers.  */
8627
8628 #ifdef __STDC__
8629 # include <limits.h>
8630 #else
8631 # include <assert.h>
8632 #endif
8633
8634 #undef $ac_func
8635
8636 /* Override any GCC internal prototype to avoid an error.
8637    Use char because int might match the return type of a GCC
8638    builtin and then its argument prototype would still apply.  */
8639 #ifdef __cplusplus
8640 extern "C"
8641 #endif
8642 char $ac_func ();
8643 /* The GNU C library defines this for functions which it implements
8644     to always fail with ENOSYS.  Some functions are actually named
8645     something starting with __ and the normal name is an alias.  */
8646 #if defined __stub_$ac_func || defined __stub___$ac_func
8647 choke me
8648 #endif
8649
8650 int
8651 main ()
8652 {
8653 return $ac_func ();
8654   ;
8655   return 0;
8656 }
8657 _ACEOF
8658 rm -f conftest.$ac_objext conftest$ac_exeext
8659 if { (ac_try="$ac_link"
8660 case "(($ac_try" in
8661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8662   *) ac_try_echo=$ac_try;;
8663 esac
8664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8665   (eval "$ac_link") 2>conftest.er1
8666   ac_status=$?
8667   grep -v '^ *+' conftest.er1 >conftest.err
8668   rm -f conftest.er1
8669   cat conftest.err >&5
8670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671   (exit $ac_status); } && {
8672          test -z "$ac_c_werror_flag" ||
8673          test ! -s conftest.err
8674        } && test -s conftest$ac_exeext &&
8675        $as_test_x conftest$ac_exeext; then
8676   eval "$as_ac_var=yes"
8677 else
8678   echo "$as_me: failed program was:" >&5
8679 sed 's/^/| /' conftest.$ac_ext >&5
8680
8681         eval "$as_ac_var=no"
8682 fi
8683
8684 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8685       conftest$ac_exeext conftest.$ac_ext
8686 fi
8687 ac_res=`eval echo '${'$as_ac_var'}'`
8688                { echo "$as_me:$LINENO: result: $ac_res" >&5
8689 echo "${ECHO_T}$ac_res" >&6; }
8690 if test `eval echo '${'$as_ac_var'}'` = yes; then
8691   cat >>confdefs.h <<_ACEOF
8692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8693 _ACEOF
8694
8695 fi
8696 done
8697
8698 { echo "$as_me:$LINENO: checking for working mmap" >&5
8699 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8700 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8701   echo $ECHO_N "(cached) $ECHO_C" >&6
8702 else
8703   if test "$cross_compiling" = yes; then
8704   ac_cv_func_mmap_fixed_mapped=no
8705 else
8706   cat >conftest.$ac_ext <<_ACEOF
8707 /* confdefs.h.  */
8708 _ACEOF
8709 cat confdefs.h >>conftest.$ac_ext
8710 cat >>conftest.$ac_ext <<_ACEOF
8711 /* end confdefs.h.  */
8712 $ac_includes_default
8713 /* malloc might have been renamed as rpl_malloc. */
8714 #undef malloc
8715
8716 /* Thanks to Mike Haertel and Jim Avera for this test.
8717    Here is a matrix of mmap possibilities:
8718         mmap private not fixed
8719         mmap private fixed at somewhere currently unmapped
8720         mmap private fixed at somewhere already mapped
8721         mmap shared not fixed
8722         mmap shared fixed at somewhere currently unmapped
8723         mmap shared fixed at somewhere already mapped
8724    For private mappings, we should verify that changes cannot be read()
8725    back from the file, nor mmap's back from the file at a different
8726    address.  (There have been systems where private was not correctly
8727    implemented like the infamous i386 svr4.0, and systems where the
8728    VM page cache was not coherent with the file system buffer cache
8729    like early versions of FreeBSD and possibly contemporary NetBSD.)
8730    For shared mappings, we should conversely verify that changes get
8731    propagated back to all the places they're supposed to be.
8732
8733    Grep wants private fixed already mapped.
8734    The main things grep needs to know about mmap are:
8735    * does it exist and is it safe to write into the mmap'd area
8736    * how to use it (BSD variants)  */
8737
8738 #include <fcntl.h>
8739 #include <sys/mman.h>
8740
8741 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8742 char *malloc ();
8743 #endif
8744
8745 /* This mess was copied from the GNU getpagesize.h.  */
8746 #ifndef HAVE_GETPAGESIZE
8747 /* Assume that all systems that can run configure have sys/param.h.  */
8748 # ifndef HAVE_SYS_PARAM_H
8749 #  define HAVE_SYS_PARAM_H 1
8750 # endif
8751
8752 # ifdef _SC_PAGESIZE
8753 #  define getpagesize() sysconf(_SC_PAGESIZE)
8754 # else /* no _SC_PAGESIZE */
8755 #  ifdef HAVE_SYS_PARAM_H
8756 #   include <sys/param.h>
8757 #   ifdef EXEC_PAGESIZE
8758 #    define getpagesize() EXEC_PAGESIZE
8759 #   else /* no EXEC_PAGESIZE */
8760 #    ifdef NBPG
8761 #     define getpagesize() NBPG * CLSIZE
8762 #     ifndef CLSIZE
8763 #      define CLSIZE 1
8764 #     endif /* no CLSIZE */
8765 #    else /* no NBPG */
8766 #     ifdef NBPC
8767 #      define getpagesize() NBPC
8768 #     else /* no NBPC */
8769 #      ifdef PAGESIZE
8770 #       define getpagesize() PAGESIZE
8771 #      endif /* PAGESIZE */
8772 #     endif /* no NBPC */
8773 #    endif /* no NBPG */
8774 #   endif /* no EXEC_PAGESIZE */
8775 #  else /* no HAVE_SYS_PARAM_H */
8776 #   define getpagesize() 8192   /* punt totally */
8777 #  endif /* no HAVE_SYS_PARAM_H */
8778 # endif /* no _SC_PAGESIZE */
8779
8780 #endif /* no HAVE_GETPAGESIZE */
8781
8782 int
8783 main ()
8784 {
8785   char *data, *data2, *data3;
8786   int i, pagesize;
8787   int fd;
8788
8789   pagesize = getpagesize ();
8790
8791   /* First, make a file with some known garbage in it. */
8792   data = (char *) malloc (pagesize);
8793   if (!data)
8794     return 1;
8795   for (i = 0; i < pagesize; ++i)
8796     *(data + i) = rand ();
8797   umask (0);
8798   fd = creat ("conftest.mmap", 0600);
8799   if (fd < 0)
8800     return 1;
8801   if (write (fd, data, pagesize) != pagesize)
8802     return 1;
8803   close (fd);
8804
8805   /* Next, try to mmap the file at a fixed address which already has
8806      something else allocated at it.  If we can, also make sure that
8807      we see the same garbage.  */
8808   fd = open ("conftest.mmap", O_RDWR);
8809   if (fd < 0)
8810     return 1;
8811   data2 = (char *) malloc (2 * pagesize);
8812   if (!data2)
8813     return 1;
8814   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8815   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8816                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8817     return 1;
8818   for (i = 0; i < pagesize; ++i)
8819     if (*(data + i) != *(data2 + i))
8820       return 1;
8821
8822   /* Finally, make sure that changes to the mapped area do not
8823      percolate back to the file as seen by read().  (This is a bug on
8824      some variants of i386 svr4.0.)  */
8825   for (i = 0; i < pagesize; ++i)
8826     *(data2 + i) = *(data2 + i) + 1;
8827   data3 = (char *) malloc (pagesize);
8828   if (!data3)
8829     return 1;
8830   if (read (fd, data3, pagesize) != pagesize)
8831     return 1;
8832   for (i = 0; i < pagesize; ++i)
8833     if (*(data + i) != *(data3 + i))
8834       return 1;
8835   close (fd);
8836   return 0;
8837 }
8838 _ACEOF
8839 rm -f conftest$ac_exeext
8840 if { (ac_try="$ac_link"
8841 case "(($ac_try" in
8842   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8843   *) ac_try_echo=$ac_try;;
8844 esac
8845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8846   (eval "$ac_link") 2>&5
8847   ac_status=$?
8848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8850   { (case "(($ac_try" in
8851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8852   *) ac_try_echo=$ac_try;;
8853 esac
8854 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8855   (eval "$ac_try") 2>&5
8856   ac_status=$?
8857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8858   (exit $ac_status); }; }; then
8859   ac_cv_func_mmap_fixed_mapped=yes
8860 else
8861   echo "$as_me: program exited with status $ac_status" >&5
8862 echo "$as_me: failed program was:" >&5
8863 sed 's/^/| /' conftest.$ac_ext >&5
8864
8865 ( exit $ac_status )
8866 ac_cv_func_mmap_fixed_mapped=no
8867 fi
8868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8869 fi
8870
8871
8872 fi
8873 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8874 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8875 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8876
8877 cat >>confdefs.h <<\_ACEOF
8878 #define HAVE_MMAP 1
8879 _ACEOF
8880
8881 fi
8882 rm -f conftest.mmap
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8894 unistd.h sys/param.h
8895 do
8896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8897 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8898   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8900 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8901   echo $ECHO_N "(cached) $ECHO_C" >&6
8902 fi
8903 ac_res=`eval echo '${'$as_ac_Header'}'`
8904                { echo "$as_me:$LINENO: result: $ac_res" >&5
8905 echo "${ECHO_T}$ac_res" >&6; }
8906 else
8907   # Is the header compilable?
8908 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8909 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8910 cat >conftest.$ac_ext <<_ACEOF
8911 /* confdefs.h.  */
8912 _ACEOF
8913 cat confdefs.h >>conftest.$ac_ext
8914 cat >>conftest.$ac_ext <<_ACEOF
8915 /* end confdefs.h.  */
8916 $ac_includes_default
8917 #include <$ac_header>
8918 _ACEOF
8919 rm -f conftest.$ac_objext
8920 if { (ac_try="$ac_compile"
8921 case "(($ac_try" in
8922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8923   *) ac_try_echo=$ac_try;;
8924 esac
8925 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8926   (eval "$ac_compile") 2>conftest.er1
8927   ac_status=$?
8928   grep -v '^ *+' conftest.er1 >conftest.err
8929   rm -f conftest.er1
8930   cat conftest.err >&5
8931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8932   (exit $ac_status); } && {
8933          test -z "$ac_c_werror_flag" ||
8934          test ! -s conftest.err
8935        } && test -s conftest.$ac_objext; then
8936   ac_header_compiler=yes
8937 else
8938   echo "$as_me: failed program was:" >&5
8939 sed 's/^/| /' conftest.$ac_ext >&5
8940
8941         ac_header_compiler=no
8942 fi
8943
8944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8945 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8946 echo "${ECHO_T}$ac_header_compiler" >&6; }
8947
8948 # Is the header present?
8949 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8950 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8951 cat >conftest.$ac_ext <<_ACEOF
8952 /* confdefs.h.  */
8953 _ACEOF
8954 cat confdefs.h >>conftest.$ac_ext
8955 cat >>conftest.$ac_ext <<_ACEOF
8956 /* end confdefs.h.  */
8957 #include <$ac_header>
8958 _ACEOF
8959 if { (ac_try="$ac_cpp conftest.$ac_ext"
8960 case "(($ac_try" in
8961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8962   *) ac_try_echo=$ac_try;;
8963 esac
8964 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8965   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8966   ac_status=$?
8967   grep -v '^ *+' conftest.er1 >conftest.err
8968   rm -f conftest.er1
8969   cat conftest.err >&5
8970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971   (exit $ac_status); } >/dev/null && {
8972          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8973          test ! -s conftest.err
8974        }; then
8975   ac_header_preproc=yes
8976 else
8977   echo "$as_me: failed program was:" >&5
8978 sed 's/^/| /' conftest.$ac_ext >&5
8979
8980   ac_header_preproc=no
8981 fi
8982
8983 rm -f conftest.err conftest.$ac_ext
8984 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8985 echo "${ECHO_T}$ac_header_preproc" >&6; }
8986
8987 # So?  What about this header?
8988 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8989   yes:no: )
8990     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8991 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8992     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8993 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8994     ac_header_preproc=yes
8995     ;;
8996   no:yes:* )
8997     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8998 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8999     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9000 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9001     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9002 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9003     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9004 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9005     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9006 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9007     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9008 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9009
9010     ;;
9011 esac
9012 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9013 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9014 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9015   echo $ECHO_N "(cached) $ECHO_C" >&6
9016 else
9017   eval "$as_ac_Header=\$ac_header_preproc"
9018 fi
9019 ac_res=`eval echo '${'$as_ac_Header'}'`
9020                { echo "$as_me:$LINENO: result: $ac_res" >&5
9021 echo "${ECHO_T}$ac_res" >&6; }
9022
9023 fi
9024 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9025   cat >>confdefs.h <<_ACEOF
9026 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9027 _ACEOF
9028
9029 fi
9030
9031 done
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9045 strdup __argz_count __argz_stringify __argz_next
9046 do
9047 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9048 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9049 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9050 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9051   echo $ECHO_N "(cached) $ECHO_C" >&6
9052 else
9053   cat >conftest.$ac_ext <<_ACEOF
9054 /* confdefs.h.  */
9055 _ACEOF
9056 cat confdefs.h >>conftest.$ac_ext
9057 cat >>conftest.$ac_ext <<_ACEOF
9058 /* end confdefs.h.  */
9059 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9060    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9061 #define $ac_func innocuous_$ac_func
9062
9063 /* System header to define __stub macros and hopefully few prototypes,
9064     which can conflict with char $ac_func (); below.
9065     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9066     <limits.h> exists even on freestanding compilers.  */
9067
9068 #ifdef __STDC__
9069 # include <limits.h>
9070 #else
9071 # include <assert.h>
9072 #endif
9073
9074 #undef $ac_func
9075
9076 /* Override any GCC internal prototype to avoid an error.
9077    Use char because int might match the return type of a GCC
9078    builtin and then its argument prototype would still apply.  */
9079 #ifdef __cplusplus
9080 extern "C"
9081 #endif
9082 char $ac_func ();
9083 /* The GNU C library defines this for functions which it implements
9084     to always fail with ENOSYS.  Some functions are actually named
9085     something starting with __ and the normal name is an alias.  */
9086 #if defined __stub_$ac_func || defined __stub___$ac_func
9087 choke me
9088 #endif
9089
9090 int
9091 main ()
9092 {
9093 return $ac_func ();
9094   ;
9095   return 0;
9096 }
9097 _ACEOF
9098 rm -f conftest.$ac_objext conftest$ac_exeext
9099 if { (ac_try="$ac_link"
9100 case "(($ac_try" in
9101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9102   *) ac_try_echo=$ac_try;;
9103 esac
9104 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9105   (eval "$ac_link") 2>conftest.er1
9106   ac_status=$?
9107   grep -v '^ *+' conftest.er1 >conftest.err
9108   rm -f conftest.er1
9109   cat conftest.err >&5
9110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9111   (exit $ac_status); } && {
9112          test -z "$ac_c_werror_flag" ||
9113          test ! -s conftest.err
9114        } && test -s conftest$ac_exeext &&
9115        $as_test_x conftest$ac_exeext; then
9116   eval "$as_ac_var=yes"
9117 else
9118   echo "$as_me: failed program was:" >&5
9119 sed 's/^/| /' conftest.$ac_ext >&5
9120
9121         eval "$as_ac_var=no"
9122 fi
9123
9124 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9125       conftest$ac_exeext conftest.$ac_ext
9126 fi
9127 ac_res=`eval echo '${'$as_ac_var'}'`
9128                { echo "$as_me:$LINENO: result: $ac_res" >&5
9129 echo "${ECHO_T}$ac_res" >&6; }
9130 if test `eval echo '${'$as_ac_var'}'` = yes; then
9131   cat >>confdefs.h <<_ACEOF
9132 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9133 _ACEOF
9134
9135 fi
9136 done
9137
9138
9139    if test $ac_cv_header_locale_h = yes; then
9140     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9141 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9142 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9143   echo $ECHO_N "(cached) $ECHO_C" >&6
9144 else
9145   cat >conftest.$ac_ext <<_ACEOF
9146 /* confdefs.h.  */
9147 _ACEOF
9148 cat confdefs.h >>conftest.$ac_ext
9149 cat >>conftest.$ac_ext <<_ACEOF
9150 /* end confdefs.h.  */
9151 #include <locale.h>
9152 int
9153 main ()
9154 {
9155 return LC_MESSAGES
9156   ;
9157   return 0;
9158 }
9159 _ACEOF
9160 rm -f conftest.$ac_objext conftest$ac_exeext
9161 if { (ac_try="$ac_link"
9162 case "(($ac_try" in
9163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9164   *) ac_try_echo=$ac_try;;
9165 esac
9166 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9167   (eval "$ac_link") 2>conftest.er1
9168   ac_status=$?
9169   grep -v '^ *+' conftest.er1 >conftest.err
9170   rm -f conftest.er1
9171   cat conftest.err >&5
9172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9173   (exit $ac_status); } && {
9174          test -z "$ac_c_werror_flag" ||
9175          test ! -s conftest.err
9176        } && test -s conftest$ac_exeext &&
9177        $as_test_x conftest$ac_exeext; then
9178   am_cv_val_LC_MESSAGES=yes
9179 else
9180   echo "$as_me: failed program was:" >&5
9181 sed 's/^/| /' conftest.$ac_ext >&5
9182
9183         am_cv_val_LC_MESSAGES=no
9184 fi
9185
9186 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9187       conftest$ac_exeext conftest.$ac_ext
9188 fi
9189 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9190 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9191     if test $am_cv_val_LC_MESSAGES = yes; then
9192
9193 cat >>confdefs.h <<\_ACEOF
9194 #define HAVE_LC_MESSAGES 1
9195 _ACEOF
9196
9197     fi
9198   fi
9199      USE_NLS=yes
9200
9201
9202         nls_cv_force_use_gnu_gettext="no"
9203
9204     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9205     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9206                               nls_cv_header_intl=
9207       nls_cv_header_libgt=
9208       CATOBJEXT=NONE
9209
9210       if test "${ac_cv_header_libintl_h+set}" = set; then
9211   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9212 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9213 if test "${ac_cv_header_libintl_h+set}" = set; then
9214   echo $ECHO_N "(cached) $ECHO_C" >&6
9215 fi
9216 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9217 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9218 else
9219   # Is the header compilable?
9220 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9221 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9222 cat >conftest.$ac_ext <<_ACEOF
9223 /* confdefs.h.  */
9224 _ACEOF
9225 cat confdefs.h >>conftest.$ac_ext
9226 cat >>conftest.$ac_ext <<_ACEOF
9227 /* end confdefs.h.  */
9228 $ac_includes_default
9229 #include <libintl.h>
9230 _ACEOF
9231 rm -f conftest.$ac_objext
9232 if { (ac_try="$ac_compile"
9233 case "(($ac_try" in
9234   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9235   *) ac_try_echo=$ac_try;;
9236 esac
9237 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9238   (eval "$ac_compile") 2>conftest.er1
9239   ac_status=$?
9240   grep -v '^ *+' conftest.er1 >conftest.err
9241   rm -f conftest.er1
9242   cat conftest.err >&5
9243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9244   (exit $ac_status); } && {
9245          test -z "$ac_c_werror_flag" ||
9246          test ! -s conftest.err
9247        } && test -s conftest.$ac_objext; then
9248   ac_header_compiler=yes
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 sed 's/^/| /' conftest.$ac_ext >&5
9252
9253         ac_header_compiler=no
9254 fi
9255
9256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9257 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9258 echo "${ECHO_T}$ac_header_compiler" >&6; }
9259
9260 # Is the header present?
9261 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9262 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9263 cat >conftest.$ac_ext <<_ACEOF
9264 /* confdefs.h.  */
9265 _ACEOF
9266 cat confdefs.h >>conftest.$ac_ext
9267 cat >>conftest.$ac_ext <<_ACEOF
9268 /* end confdefs.h.  */
9269 #include <libintl.h>
9270 _ACEOF
9271 if { (ac_try="$ac_cpp conftest.$ac_ext"
9272 case "(($ac_try" in
9273   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9274   *) ac_try_echo=$ac_try;;
9275 esac
9276 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9277   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9278   ac_status=$?
9279   grep -v '^ *+' conftest.er1 >conftest.err
9280   rm -f conftest.er1
9281   cat conftest.err >&5
9282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9283   (exit $ac_status); } >/dev/null && {
9284          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9285          test ! -s conftest.err
9286        }; then
9287   ac_header_preproc=yes
9288 else
9289   echo "$as_me: failed program was:" >&5
9290 sed 's/^/| /' conftest.$ac_ext >&5
9291
9292   ac_header_preproc=no
9293 fi
9294
9295 rm -f conftest.err conftest.$ac_ext
9296 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9297 echo "${ECHO_T}$ac_header_preproc" >&6; }
9298
9299 # So?  What about this header?
9300 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9301   yes:no: )
9302     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9303 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9304     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9305 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9306     ac_header_preproc=yes
9307     ;;
9308   no:yes:* )
9309     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9310 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9311     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9312 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9313     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9314 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9315     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9316 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9317     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9318 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9319     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9320 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9321
9322     ;;
9323 esac
9324 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9325 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9326 if test "${ac_cv_header_libintl_h+set}" = set; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   ac_cv_header_libintl_h=$ac_header_preproc
9330 fi
9331 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9332 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9333
9334 fi
9335 if test $ac_cv_header_libintl_h = yes; then
9336   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9337 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9338 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9339   echo $ECHO_N "(cached) $ECHO_C" >&6
9340 else
9341   cat >conftest.$ac_ext <<_ACEOF
9342 /* confdefs.h.  */
9343 _ACEOF
9344 cat confdefs.h >>conftest.$ac_ext
9345 cat >>conftest.$ac_ext <<_ACEOF
9346 /* end confdefs.h.  */
9347 #include <libintl.h>
9348 int
9349 main ()
9350 {
9351 return (int) dgettext ("","")
9352   ;
9353   return 0;
9354 }
9355 _ACEOF
9356 rm -f conftest.$ac_objext conftest$ac_exeext
9357 if { (ac_try="$ac_link"
9358 case "(($ac_try" in
9359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9360   *) ac_try_echo=$ac_try;;
9361 esac
9362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9363   (eval "$ac_link") 2>conftest.er1
9364   ac_status=$?
9365   grep -v '^ *+' conftest.er1 >conftest.err
9366   rm -f conftest.er1
9367   cat conftest.err >&5
9368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9369   (exit $ac_status); } && {
9370          test -z "$ac_c_werror_flag" ||
9371          test ! -s conftest.err
9372        } && test -s conftest$ac_exeext &&
9373        $as_test_x conftest$ac_exeext; then
9374   gt_cv_func_dgettext_libc=yes
9375 else
9376   echo "$as_me: failed program was:" >&5
9377 sed 's/^/| /' conftest.$ac_ext >&5
9378
9379         gt_cv_func_dgettext_libc=no
9380 fi
9381
9382 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9383       conftest$ac_exeext conftest.$ac_ext
9384 fi
9385 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9386 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9387
9388           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9389             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9390 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9391 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9392   echo $ECHO_N "(cached) $ECHO_C" >&6
9393 else
9394   ac_check_lib_save_LIBS=$LIBS
9395 LIBS="-lintl  $LIBS"
9396 cat >conftest.$ac_ext <<_ACEOF
9397 /* confdefs.h.  */
9398 _ACEOF
9399 cat confdefs.h >>conftest.$ac_ext
9400 cat >>conftest.$ac_ext <<_ACEOF
9401 /* end confdefs.h.  */
9402
9403 /* Override any GCC internal prototype to avoid an error.
9404    Use char because int might match the return type of a GCC
9405    builtin and then its argument prototype would still apply.  */
9406 #ifdef __cplusplus
9407 extern "C"
9408 #endif
9409 char bindtextdomain ();
9410 int
9411 main ()
9412 {
9413 return bindtextdomain ();
9414   ;
9415   return 0;
9416 }
9417 _ACEOF
9418 rm -f conftest.$ac_objext conftest$ac_exeext
9419 if { (ac_try="$ac_link"
9420 case "(($ac_try" in
9421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9422   *) ac_try_echo=$ac_try;;
9423 esac
9424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9425   (eval "$ac_link") 2>conftest.er1
9426   ac_status=$?
9427   grep -v '^ *+' conftest.er1 >conftest.err
9428   rm -f conftest.er1
9429   cat conftest.err >&5
9430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9431   (exit $ac_status); } && {
9432          test -z "$ac_c_werror_flag" ||
9433          test ! -s conftest.err
9434        } && test -s conftest$ac_exeext &&
9435        $as_test_x conftest$ac_exeext; then
9436   ac_cv_lib_intl_bindtextdomain=yes
9437 else
9438   echo "$as_me: failed program was:" >&5
9439 sed 's/^/| /' conftest.$ac_ext >&5
9440
9441         ac_cv_lib_intl_bindtextdomain=no
9442 fi
9443
9444 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9445       conftest$ac_exeext conftest.$ac_ext
9446 LIBS=$ac_check_lib_save_LIBS
9447 fi
9448 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9449 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9450 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9451   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9452 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9453 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 else
9456   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9457 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9458 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9459   echo $ECHO_N "(cached) $ECHO_C" >&6
9460 else
9461   ac_check_lib_save_LIBS=$LIBS
9462 LIBS="-lintl  $LIBS"
9463 cat >conftest.$ac_ext <<_ACEOF
9464 /* confdefs.h.  */
9465 _ACEOF
9466 cat confdefs.h >>conftest.$ac_ext
9467 cat >>conftest.$ac_ext <<_ACEOF
9468 /* end confdefs.h.  */
9469
9470 /* Override any GCC internal prototype to avoid an error.
9471    Use char because int might match the return type of a GCC
9472    builtin and then its argument prototype would still apply.  */
9473 #ifdef __cplusplus
9474 extern "C"
9475 #endif
9476 char dgettext ();
9477 int
9478 main ()
9479 {
9480 return dgettext ();
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext conftest$ac_exeext
9486 if { (ac_try="$ac_link"
9487 case "(($ac_try" in
9488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9489   *) ac_try_echo=$ac_try;;
9490 esac
9491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9492   (eval "$ac_link") 2>conftest.er1
9493   ac_status=$?
9494   grep -v '^ *+' conftest.er1 >conftest.err
9495   rm -f conftest.er1
9496   cat conftest.err >&5
9497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498   (exit $ac_status); } && {
9499          test -z "$ac_c_werror_flag" ||
9500          test ! -s conftest.err
9501        } && test -s conftest$ac_exeext &&
9502        $as_test_x conftest$ac_exeext; then
9503   ac_cv_lib_intl_dgettext=yes
9504 else
9505   echo "$as_me: failed program was:" >&5
9506 sed 's/^/| /' conftest.$ac_ext >&5
9507
9508         ac_cv_lib_intl_dgettext=no
9509 fi
9510
9511 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9512       conftest$ac_exeext conftest.$ac_ext
9513 LIBS=$ac_check_lib_save_LIBS
9514 fi
9515 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9516 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9517 if test $ac_cv_lib_intl_dgettext = yes; then
9518   gt_cv_func_dgettext_libintl=yes
9519 else
9520   gt_cv_func_dgettext_libintl=no
9521 fi
9522
9523 fi
9524 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9525 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9526 fi
9527
9528           fi
9529
9530           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9531             LIBS="$LIBS -lintl";
9532           fi
9533
9534           if test "$gt_cv_func_dgettext_libc" = "yes" \
9535             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9536
9537 cat >>confdefs.h <<\_ACEOF
9538 #define HAVE_GETTEXT 1
9539 _ACEOF
9540
9541             # Extract the first word of "msgfmt", so it can be a program name with args.
9542 set dummy msgfmt; ac_word=$2
9543 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9545 if test "${ac_cv_path_MSGFMT+set}" = set; then
9546   echo $ECHO_N "(cached) $ECHO_C" >&6
9547 else
9548   case "$MSGFMT" in
9549   /*)
9550   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9551   ;;
9552   *)
9553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9554   for ac_dir in $PATH; do
9555     test -z "$ac_dir" && ac_dir=.
9556     if test -f $ac_dir/$ac_word; then
9557       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9558         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9559         break
9560       fi
9561     fi
9562   done
9563   IFS="$ac_save_ifs"
9564   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9565   ;;
9566 esac
9567 fi
9568 MSGFMT="$ac_cv_path_MSGFMT"
9569 if test -n "$MSGFMT"; then
9570   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9571 echo "${ECHO_T}$MSGFMT" >&6; }
9572 else
9573   { echo "$as_me:$LINENO: result: no" >&5
9574 echo "${ECHO_T}no" >&6; }
9575 fi
9576             if test "$MSGFMT" != "no"; then
9577
9578 for ac_func in dcgettext
9579 do
9580 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9581 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9582 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9583 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9584   echo $ECHO_N "(cached) $ECHO_C" >&6
9585 else
9586   cat >conftest.$ac_ext <<_ACEOF
9587 /* confdefs.h.  */
9588 _ACEOF
9589 cat confdefs.h >>conftest.$ac_ext
9590 cat >>conftest.$ac_ext <<_ACEOF
9591 /* end confdefs.h.  */
9592 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9593    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9594 #define $ac_func innocuous_$ac_func
9595
9596 /* System header to define __stub macros and hopefully few prototypes,
9597     which can conflict with char $ac_func (); below.
9598     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9599     <limits.h> exists even on freestanding compilers.  */
9600
9601 #ifdef __STDC__
9602 # include <limits.h>
9603 #else
9604 # include <assert.h>
9605 #endif
9606
9607 #undef $ac_func
9608
9609 /* Override any GCC internal prototype to avoid an error.
9610    Use char because int might match the return type of a GCC
9611    builtin and then its argument prototype would still apply.  */
9612 #ifdef __cplusplus
9613 extern "C"
9614 #endif
9615 char $ac_func ();
9616 /* The GNU C library defines this for functions which it implements
9617     to always fail with ENOSYS.  Some functions are actually named
9618     something starting with __ and the normal name is an alias.  */
9619 #if defined __stub_$ac_func || defined __stub___$ac_func
9620 choke me
9621 #endif
9622
9623 int
9624 main ()
9625 {
9626 return $ac_func ();
9627   ;
9628   return 0;
9629 }
9630 _ACEOF
9631 rm -f conftest.$ac_objext conftest$ac_exeext
9632 if { (ac_try="$ac_link"
9633 case "(($ac_try" in
9634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9635   *) ac_try_echo=$ac_try;;
9636 esac
9637 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9638   (eval "$ac_link") 2>conftest.er1
9639   ac_status=$?
9640   grep -v '^ *+' conftest.er1 >conftest.err
9641   rm -f conftest.er1
9642   cat conftest.err >&5
9643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9644   (exit $ac_status); } && {
9645          test -z "$ac_c_werror_flag" ||
9646          test ! -s conftest.err
9647        } && test -s conftest$ac_exeext &&
9648        $as_test_x conftest$ac_exeext; then
9649   eval "$as_ac_var=yes"
9650 else
9651   echo "$as_me: failed program was:" >&5
9652 sed 's/^/| /' conftest.$ac_ext >&5
9653
9654         eval "$as_ac_var=no"
9655 fi
9656
9657 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9658       conftest$ac_exeext conftest.$ac_ext
9659 fi
9660 ac_res=`eval echo '${'$as_ac_var'}'`
9661                { echo "$as_me:$LINENO: result: $ac_res" >&5
9662 echo "${ECHO_T}$ac_res" >&6; }
9663 if test `eval echo '${'$as_ac_var'}'` = yes; then
9664   cat >>confdefs.h <<_ACEOF
9665 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9666 _ACEOF
9667
9668 fi
9669 done
9670
9671               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9672 set dummy gmsgfmt; ac_word=$2
9673 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9675 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9676   echo $ECHO_N "(cached) $ECHO_C" >&6
9677 else
9678   case $GMSGFMT in
9679   [\\/]* | ?:[\\/]*)
9680   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9681   ;;
9682   *)
9683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9684 for as_dir in $PATH
9685 do
9686   IFS=$as_save_IFS
9687   test -z "$as_dir" && as_dir=.
9688   for ac_exec_ext in '' $ac_executable_extensions; do
9689   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9690     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9691     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9692     break 2
9693   fi
9694 done
9695 done
9696 IFS=$as_save_IFS
9697
9698   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9699   ;;
9700 esac
9701 fi
9702 GMSGFMT=$ac_cv_path_GMSGFMT
9703 if test -n "$GMSGFMT"; then
9704   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9705 echo "${ECHO_T}$GMSGFMT" >&6; }
9706 else
9707   { echo "$as_me:$LINENO: result: no" >&5
9708 echo "${ECHO_T}no" >&6; }
9709 fi
9710
9711
9712               # Extract the first word of "xgettext", so it can be a program name with args.
9713 set dummy xgettext; ac_word=$2
9714 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9716 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9717   echo $ECHO_N "(cached) $ECHO_C" >&6
9718 else
9719   case "$XGETTEXT" in
9720   /*)
9721   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9722   ;;
9723   *)
9724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9725   for ac_dir in $PATH; do
9726     test -z "$ac_dir" && ac_dir=.
9727     if test -f $ac_dir/$ac_word; then
9728       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9729         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9730         break
9731       fi
9732     fi
9733   done
9734   IFS="$ac_save_ifs"
9735   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9736   ;;
9737 esac
9738 fi
9739 XGETTEXT="$ac_cv_path_XGETTEXT"
9740 if test -n "$XGETTEXT"; then
9741   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9742 echo "${ECHO_T}$XGETTEXT" >&6; }
9743 else
9744   { echo "$as_me:$LINENO: result: no" >&5
9745 echo "${ECHO_T}no" >&6; }
9746 fi
9747
9748               cat >conftest.$ac_ext <<_ACEOF
9749 /* confdefs.h.  */
9750 _ACEOF
9751 cat confdefs.h >>conftest.$ac_ext
9752 cat >>conftest.$ac_ext <<_ACEOF
9753 /* end confdefs.h.  */
9754
9755 int
9756 main ()
9757 {
9758 extern int _nl_msg_cat_cntr;
9759                              return _nl_msg_cat_cntr
9760   ;
9761   return 0;
9762 }
9763 _ACEOF
9764 rm -f conftest.$ac_objext conftest$ac_exeext
9765 if { (ac_try="$ac_link"
9766 case "(($ac_try" in
9767   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768   *) ac_try_echo=$ac_try;;
9769 esac
9770 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9771   (eval "$ac_link") 2>conftest.er1
9772   ac_status=$?
9773   grep -v '^ *+' conftest.er1 >conftest.err
9774   rm -f conftest.er1
9775   cat conftest.err >&5
9776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777   (exit $ac_status); } && {
9778          test -z "$ac_c_werror_flag" ||
9779          test ! -s conftest.err
9780        } && test -s conftest$ac_exeext &&
9781        $as_test_x conftest$ac_exeext; then
9782   CATOBJEXT=.gmo
9783                  DATADIRNAME=share
9784 else
9785   echo "$as_me: failed program was:" >&5
9786 sed 's/^/| /' conftest.$ac_ext >&5
9787
9788         CATOBJEXT=.mo
9789                  DATADIRNAME=lib
9790 fi
9791
9792 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9793       conftest$ac_exeext conftest.$ac_ext
9794               INSTOBJEXT=.mo
9795             fi
9796           fi
9797
9798           # Added by Martin Baulig 12/15/98 for libc5 systems
9799           if test "$gt_cv_func_dgettext_libc" != "yes" \
9800             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9801             INTLLIBS=-lintl
9802             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9803           fi
9804
9805 fi
9806
9807
9808
9809       if test "$CATOBJEXT" = "NONE"; then
9810                         nls_cv_use_gnu_gettext=yes
9811       fi
9812     fi
9813
9814     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9815
9816 cat >>confdefs.h <<\_ACEOF
9817 #define ENABLE_NLS 1
9818 _ACEOF
9819
9820     else
9821             CATOBJEXT=
9822     fi
9823
9824         if test "$XGETTEXT" != ":"; then
9825                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9826         : ;
9827       else
9828         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9829 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9830         XGETTEXT=":"
9831       fi
9832     fi
9833
9834     # We need to process the po/ directory.
9835     POSUB=po
9836
9837     ac_config_commands="$ac_config_commands default-2"
9838
9839
9840                 for lang in $ALL_LINGUAS; do
9841       GMOFILES="$GMOFILES $lang.gmo"
9842       POFILES="$POFILES $lang.po"
9843     done
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857    if test "x$CATOBJEXT" != "x"; then
9858      if test "x$ALL_LINGUAS" = "x"; then
9859        LINGUAS=
9860      else
9861        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9862 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9863        NEW_LINGUAS=
9864        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9865          case "$ALL_LINGUAS" in
9866           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9867          esac
9868        done
9869        LINGUAS=$NEW_LINGUAS
9870        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9871 echo "${ECHO_T}$LINGUAS" >&6; }
9872      fi
9873
9874           if test -n "$LINGUAS"; then
9875        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9876      fi
9877    fi
9878
9879             test -d po || mkdir po
9880    if test "$CATOBJEXT" = ".cat"; then
9881      if test "${ac_cv_header_linux_version_h+set}" = set; then
9882   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9883 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9884 if test "${ac_cv_header_linux_version_h+set}" = set; then
9885   echo $ECHO_N "(cached) $ECHO_C" >&6
9886 fi
9887 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9888 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9889 else
9890   # Is the header compilable?
9891 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9892 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9893 cat >conftest.$ac_ext <<_ACEOF
9894 /* confdefs.h.  */
9895 _ACEOF
9896 cat confdefs.h >>conftest.$ac_ext
9897 cat >>conftest.$ac_ext <<_ACEOF
9898 /* end confdefs.h.  */
9899 $ac_includes_default
9900 #include <linux/version.h>
9901 _ACEOF
9902 rm -f conftest.$ac_objext
9903 if { (ac_try="$ac_compile"
9904 case "(($ac_try" in
9905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9906   *) ac_try_echo=$ac_try;;
9907 esac
9908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9909   (eval "$ac_compile") 2>conftest.er1
9910   ac_status=$?
9911   grep -v '^ *+' conftest.er1 >conftest.err
9912   rm -f conftest.er1
9913   cat conftest.err >&5
9914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9915   (exit $ac_status); } && {
9916          test -z "$ac_c_werror_flag" ||
9917          test ! -s conftest.err
9918        } && test -s conftest.$ac_objext; then
9919   ac_header_compiler=yes
9920 else
9921   echo "$as_me: failed program was:" >&5
9922 sed 's/^/| /' conftest.$ac_ext >&5
9923
9924         ac_header_compiler=no
9925 fi
9926
9927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9928 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9929 echo "${ECHO_T}$ac_header_compiler" >&6; }
9930
9931 # Is the header present?
9932 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9933 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9934 cat >conftest.$ac_ext <<_ACEOF
9935 /* confdefs.h.  */
9936 _ACEOF
9937 cat confdefs.h >>conftest.$ac_ext
9938 cat >>conftest.$ac_ext <<_ACEOF
9939 /* end confdefs.h.  */
9940 #include <linux/version.h>
9941 _ACEOF
9942 if { (ac_try="$ac_cpp conftest.$ac_ext"
9943 case "(($ac_try" in
9944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9945   *) ac_try_echo=$ac_try;;
9946 esac
9947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9948   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9949   ac_status=$?
9950   grep -v '^ *+' conftest.er1 >conftest.err
9951   rm -f conftest.er1
9952   cat conftest.err >&5
9953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954   (exit $ac_status); } >/dev/null && {
9955          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9956          test ! -s conftest.err
9957        }; then
9958   ac_header_preproc=yes
9959 else
9960   echo "$as_me: failed program was:" >&5
9961 sed 's/^/| /' conftest.$ac_ext >&5
9962
9963   ac_header_preproc=no
9964 fi
9965
9966 rm -f conftest.err conftest.$ac_ext
9967 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9968 echo "${ECHO_T}$ac_header_preproc" >&6; }
9969
9970 # So?  What about this header?
9971 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9972   yes:no: )
9973     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9974 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9975     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9976 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9977     ac_header_preproc=yes
9978     ;;
9979   no:yes:* )
9980     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9981 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9982     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9983 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9984     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9985 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9986     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9987 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9988     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9989 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9990     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9991 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9992
9993     ;;
9994 esac
9995 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9996 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9997 if test "${ac_cv_header_linux_version_h+set}" = set; then
9998   echo $ECHO_N "(cached) $ECHO_C" >&6
9999 else
10000   ac_cv_header_linux_version_h=$ac_header_preproc
10001 fi
10002 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10003 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
10004
10005 fi
10006 if test $ac_cv_header_linux_version_h = yes; then
10007   msgformat=linux
10008 else
10009   msgformat=xopen
10010 fi
10011
10012
10013
10014                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10015    fi
10016
10017             MKINSTALLDIRS=
10018 #
10019 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10020 #
10021 #   if test -n "$ac_aux_dir"; then
10022 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10023 #   fi
10024    if test -z "$MKINSTALLDIRS"; then
10025      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10026    fi
10027
10028    # jwz: you know what, screw it.  Let's just use the version that I
10029    # already computed in configure.in, instead of this version that came
10030    # with the i18n crud, ok?
10031    MKINSTALLDIRS="$INSTALL_DIRS"
10032
10033
10034
10035
10036          test -d po || mkdir po
10037    if test "x$srcdir" != "x."; then
10038      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10039        posrcprefix="$srcdir/"
10040      else
10041        posrcprefix="../$srcdir/"
10042      fi
10043    else
10044      posrcprefix="../"
10045    fi
10046    rm -f po/POTFILES
10047    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10048         < $srcdir/po/POTFILES.in > po/POTFILES
10049
10050 MKINSTALLDIRS="$INSTALL_DIRS"
10051
10052
10053 ###############################################################################
10054 #
10055 #       Check for -lXmu (some fucked up vendors don't ship it...)
10056 #
10057 ###############################################################################
10058
10059 have_xmu=no
10060
10061   ac_save_CPPFLAGS="$CPPFLAGS"
10062   if test \! -z "$includedir" ; then
10063     CPPFLAGS="$CPPFLAGS -I$includedir"
10064   fi
10065   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10066   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10067   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10068 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10069 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10070   echo $ECHO_N "(cached) $ECHO_C" >&6
10071 else
10072   cat >conftest.$ac_ext <<_ACEOF
10073 /* confdefs.h.  */
10074 _ACEOF
10075 cat confdefs.h >>conftest.$ac_ext
10076 cat >>conftest.$ac_ext <<_ACEOF
10077 /* end confdefs.h.  */
10078 #include <stdlib.h>
10079                    #include <stdio.h>
10080                    #include <X11/Intrinsic.h>
10081
10082 #include <X11/Xmu/Error.h>
10083 _ACEOF
10084 rm -f conftest.$ac_objext
10085 if { (ac_try="$ac_compile"
10086 case "(($ac_try" in
10087   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10088   *) ac_try_echo=$ac_try;;
10089 esac
10090 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10091   (eval "$ac_compile") 2>conftest.er1
10092   ac_status=$?
10093   grep -v '^ *+' conftest.er1 >conftest.err
10094   rm -f conftest.er1
10095   cat conftest.err >&5
10096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097   (exit $ac_status); } && {
10098          test -z "$ac_c_werror_flag" ||
10099          test ! -s conftest.err
10100        } && test -s conftest.$ac_objext; then
10101   ac_cv_header_X11_Xmu_Error_h=yes
10102 else
10103   echo "$as_me: failed program was:" >&5
10104 sed 's/^/| /' conftest.$ac_ext >&5
10105
10106         ac_cv_header_X11_Xmu_Error_h=no
10107 fi
10108
10109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10110 fi
10111 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10112 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10113 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10114   have_xmu=yes
10115 fi
10116
10117
10118   CPPFLAGS="$ac_save_CPPFLAGS"
10119 if test "$have_xmu" = no ; then
10120   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10121   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10122   XMU_LIBS=''
10123 else
10124   XMU_SRCS=''
10125   XMU_OBJS=''
10126   XMU_LIBS='-lXmu'
10127   cat >>confdefs.h <<\_ACEOF
10128 #define HAVE_XMU 1
10129 _ACEOF
10130
10131 fi
10132
10133
10134 ###############################################################################
10135 #
10136 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10137 #       See comp.windows.x FAQ question 124.  The right fix is to
10138 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10139 #
10140 ###############################################################################
10141
10142 if test "$have_xmu" = yes ; then
10143   case "$host" in
10144     *-sunos4*)
10145     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10146 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10147 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10148   echo $ECHO_N "(cached) $ECHO_C" >&6
10149 else
10150   ac_save_LDFLAGS="$LDFLAGS"
10151                     if test \! -z "$x_libraries" ; then
10152                       LDFLAGS="$LDFLAGS -L$x_libraries"
10153                     fi
10154                     # Note: this trick never works!  (Generally.)
10155                     # We're only getting away with using AC_TRY_LINK
10156                     # with X libraries because we know it's SunOS.
10157                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10158                     cat >conftest.$ac_ext <<_ACEOF
10159 /* confdefs.h.  */
10160 _ACEOF
10161 cat confdefs.h >>conftest.$ac_ext
10162 cat >>conftest.$ac_ext <<_ACEOF
10163 /* end confdefs.h.  */
10164
10165 int
10166 main ()
10167 {
10168
10169   ;
10170   return 0;
10171 }
10172 _ACEOF
10173 rm -f conftest.$ac_objext conftest$ac_exeext
10174 if { (ac_try="$ac_link"
10175 case "(($ac_try" in
10176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10177   *) ac_try_echo=$ac_try;;
10178 esac
10179 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10180   (eval "$ac_link") 2>conftest.er1
10181   ac_status=$?
10182   grep -v '^ *+' conftest.er1 >conftest.err
10183   rm -f conftest.er1
10184   cat conftest.err >&5
10185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186   (exit $ac_status); } && {
10187          test -z "$ac_c_werror_flag" ||
10188          test ! -s conftest.err
10189        } && test -s conftest$ac_exeext &&
10190        $as_test_x conftest$ac_exeext; then
10191   ac_cv_sunos_xmu_bug=no
10192 else
10193   echo "$as_me: failed program was:" >&5
10194 sed 's/^/| /' conftest.$ac_ext >&5
10195
10196         ac_cv_sunos_xmu_bug=yes
10197 fi
10198
10199 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10200       conftest$ac_exeext conftest.$ac_ext
10201                     LDFLAGS="$ac_save_LDFLAGS"
10202 fi
10203 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10204 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10205     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10206       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10207 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10208 if test "${ac_cv_ld_static+set}" = set; then
10209   echo $ECHO_N "(cached) $ECHO_C" >&6
10210 else
10211   ac_save_LDFLAGS="$LDFLAGS"
10212                       LDFLAGS="$LDFLAGS -static"
10213                       cat >conftest.$ac_ext <<_ACEOF
10214 /* confdefs.h.  */
10215 _ACEOF
10216 cat confdefs.h >>conftest.$ac_ext
10217 cat >>conftest.$ac_ext <<_ACEOF
10218 /* end confdefs.h.  */
10219
10220 int
10221 main ()
10222 {
10223
10224   ;
10225   return 0;
10226 }
10227 _ACEOF
10228 rm -f conftest.$ac_objext conftest$ac_exeext
10229 if { (ac_try="$ac_link"
10230 case "(($ac_try" in
10231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232   *) ac_try_echo=$ac_try;;
10233 esac
10234 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10235   (eval "$ac_link") 2>conftest.er1
10236   ac_status=$?
10237   grep -v '^ *+' conftest.er1 >conftest.err
10238   rm -f conftest.er1
10239   cat conftest.err >&5
10240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10241   (exit $ac_status); } && {
10242          test -z "$ac_c_werror_flag" ||
10243          test ! -s conftest.err
10244        } && test -s conftest$ac_exeext &&
10245        $as_test_x conftest$ac_exeext; then
10246   ac_cv_ld_static=yes
10247 else
10248   echo "$as_me: failed program was:" >&5
10249 sed 's/^/| /' conftest.$ac_ext >&5
10250
10251         ac_cv_ld_static=no
10252 fi
10253
10254 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10255       conftest$ac_exeext conftest.$ac_ext
10256                     LDFLAGS="$ac_save_LDFLAGS"
10257 fi
10258 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10259 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10260       if test "$ac_cv_ld_static" = yes ; then
10261         LDFLAGS="$LDFLAGS -static"
10262       else
10263         LDFLAGS="$LDFLAGS -Bstatic"
10264       fi
10265     fi
10266     ;;
10267   esac
10268 fi
10269
10270
10271 ###############################################################################
10272 #
10273 #       Handle the --with-hackdir option
10274 #
10275 ###############################################################################
10276
10277 have_hackdir=yes
10278 with_hackdir_req=unspecified
10279
10280 # Check whether --with-hackdir was given.
10281 if test "${with_hackdir+set}" = set; then
10282   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10283 else
10284   with_hackdir=yes
10285 fi
10286
10287
10288 if test x"$with_hackdir" = xyes; then
10289   HACKDIR='${libexecdir}/xscreensaver'
10290 elif test x"$with_hackdir" = xno; then
10291   HACKDIR='${bindir}'
10292 else
10293   HACKDIR=$with_hackdir
10294 fi
10295
10296 # canonicalize slashes.
10297 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10298
10299 # Expand HACKDIR as HACKDIR_FULL
10300 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10301
10302 # This option used to be called --enable-subdir; make sure that is no longer
10303 # used, since configure brain-damagedly ignores unknown --enable options.
10304
10305 obsolete_enable=
10306 # Check whether --enable-subdir was given.
10307 if test "${enable_subdir+set}" = set; then
10308   enableval=$enable_subdir; obsolete_enable=yes
10309 fi
10310
10311 if test -n "$obsolete_enable"; then
10312   echo "error: the --enable-subdir option has been replaced with"
10313   echo "       the new --with-hackdir option; see \`configure --help'"
10314   echo "       for more information."
10315   exit 1
10316 fi
10317
10318
10319 ###############################################################################
10320 #
10321 #       Handle the --with-configdir option
10322 #       Help for --with-x-app-defaults option added..
10323 #
10324 ###############################################################################
10325
10326 have_configdir=yes
10327 with_configdir_req=unspecified
10328
10329 # Check whether --with-configdir was given.
10330 if test "${with_configdir+set}" = set; then
10331   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10332 else
10333   with_configdir=yes
10334 fi
10335
10336
10337 if test x"$with_configdir" = xyes; then
10338   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10339 elif test x"$with_configdir" = xno; then
10340   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10341   exit 1
10342 else
10343   # there must be a better way than this...
10344   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10345     # absolute path
10346     HACK_CONF_DIR=$with_configdir
10347   else
10348     # relative path
10349     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10350   fi
10351 fi
10352
10353
10354
10355
10356 ###############################################################################
10357 #
10358 #       Check for the SGI SCREEN_SAVER server extension.
10359 #
10360 ###############################################################################
10361
10362 have_sgi=no
10363 with_sgi_req=unspecified
10364
10365 # Check whether --with-sgi-ext was given.
10366 if test "${with_sgi_ext+set}" = set; then
10367   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10368 else
10369   with_sgi=yes
10370 fi
10371
10372
10373
10374    case "$with_sgi" in
10375     yes) ;;
10376     no)  ;;
10377
10378     /*)
10379      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10380 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10381      d=$with_sgi/include
10382      if test -d $d; then
10383        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10392 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10393      d=$with_sgi/lib
10394      if test -d $d; then
10395        X_LIBS="-L$d $X_LIBS"
10396        { echo "$as_me:$LINENO: result: $d" >&5
10397 echo "${ECHO_T}$d" >&6; }
10398      else
10399        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10400 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10401      fi
10402
10403      # replace the directory string with "yes".
10404      with_sgi_req="yes"
10405      with_sgi=$with_sgi_req
10406      ;;
10407
10408     *)
10409      echo ""
10410      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10411      echo "       If it is a directory, then \`DIR/include' will be added to"
10412      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10413      exit 1
10414      ;;
10415    esac
10416
10417
10418 if test "$with_sgi" = yes; then
10419
10420   ac_save_CPPFLAGS="$CPPFLAGS"
10421   if test \! -z "$includedir" ; then
10422     CPPFLAGS="$CPPFLAGS -I$includedir"
10423   fi
10424   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10425   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10426   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10427 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10428 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10429   echo $ECHO_N "(cached) $ECHO_C" >&6
10430 else
10431   cat >conftest.$ac_ext <<_ACEOF
10432 /* confdefs.h.  */
10433 _ACEOF
10434 cat confdefs.h >>conftest.$ac_ext
10435 cat >>conftest.$ac_ext <<_ACEOF
10436 /* end confdefs.h.  */
10437 #include <X11/Xlib.h>
10438
10439 #include <X11/extensions/XScreenSaver.h>
10440 _ACEOF
10441 rm -f conftest.$ac_objext
10442 if { (ac_try="$ac_compile"
10443 case "(($ac_try" in
10444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10445   *) ac_try_echo=$ac_try;;
10446 esac
10447 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10448   (eval "$ac_compile") 2>conftest.er1
10449   ac_status=$?
10450   grep -v '^ *+' conftest.er1 >conftest.err
10451   rm -f conftest.er1
10452   cat conftest.err >&5
10453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454   (exit $ac_status); } && {
10455          test -z "$ac_c_werror_flag" ||
10456          test ! -s conftest.err
10457        } && test -s conftest.$ac_objext; then
10458   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10459 else
10460   echo "$as_me: failed program was:" >&5
10461 sed 's/^/| /' conftest.$ac_ext >&5
10462
10463         ac_cv_header_X11_extensions_XScreenSaver_h=no
10464 fi
10465
10466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10467 fi
10468 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10469 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10470 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10471   have_sgi=yes
10472                      cat >>confdefs.h <<\_ACEOF
10473 #define HAVE_SGI_SAVER_EXTENSION 1
10474 _ACEOF
10475
10476 fi
10477
10478
10479   CPPFLAGS="$ac_save_CPPFLAGS"
10480
10481 elif test "$with_sgi" != no; then
10482   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10483   exit 1
10484 fi
10485
10486
10487 ###############################################################################
10488 #
10489 #       Check for the XIDLE server extension.
10490 #
10491 ###############################################################################
10492
10493 have_xidle=no
10494 with_xidle_req=unspecified
10495
10496 # Check whether --with-xidle-ext was given.
10497 if test "${with_xidle_ext+set}" = set; then
10498   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10499 else
10500   with_xidle=yes
10501 fi
10502
10503
10504
10505    case "$with_xidle" in
10506     yes) ;;
10507     no)  ;;
10508
10509     /*)
10510      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10511 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10512      d=$with_xidle/include
10513      if test -d $d; then
10514        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10523 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10524      d=$with_xidle/lib
10525      if test -d $d; then
10526        X_LIBS="-L$d $X_LIBS"
10527        { echo "$as_me:$LINENO: result: $d" >&5
10528 echo "${ECHO_T}$d" >&6; }
10529      else
10530        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10531 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10532      fi
10533
10534      # replace the directory string with "yes".
10535      with_xidle_req="yes"
10536      with_xidle=$with_xidle_req
10537      ;;
10538
10539     *)
10540      echo ""
10541      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10542      echo "       If it is a directory, then \`DIR/include' will be added to"
10543      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10544      exit 1
10545      ;;
10546    esac
10547
10548
10549 if test "$with_xidle" = yes; then
10550
10551   ac_save_CPPFLAGS="$CPPFLAGS"
10552   if test \! -z "$includedir" ; then
10553     CPPFLAGS="$CPPFLAGS -I$includedir"
10554   fi
10555   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10556   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10557   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10558 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10559 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10560   echo $ECHO_N "(cached) $ECHO_C" >&6
10561 else
10562   cat >conftest.$ac_ext <<_ACEOF
10563 /* confdefs.h.  */
10564 _ACEOF
10565 cat confdefs.h >>conftest.$ac_ext
10566 cat >>conftest.$ac_ext <<_ACEOF
10567 /* end confdefs.h.  */
10568 #include <X11/Xlib.h>
10569
10570 #include <X11/extensions/xidle.h>
10571 _ACEOF
10572 rm -f conftest.$ac_objext
10573 if { (ac_try="$ac_compile"
10574 case "(($ac_try" in
10575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576   *) ac_try_echo=$ac_try;;
10577 esac
10578 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10579   (eval "$ac_compile") 2>conftest.er1
10580   ac_status=$?
10581   grep -v '^ *+' conftest.er1 >conftest.err
10582   rm -f conftest.er1
10583   cat conftest.err >&5
10584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585   (exit $ac_status); } && {
10586          test -z "$ac_c_werror_flag" ||
10587          test ! -s conftest.err
10588        } && test -s conftest.$ac_objext; then
10589   ac_cv_header_X11_extensions_xidle_h=yes
10590 else
10591   echo "$as_me: failed program was:" >&5
10592 sed 's/^/| /' conftest.$ac_ext >&5
10593
10594         ac_cv_header_X11_extensions_xidle_h=no
10595 fi
10596
10597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10598 fi
10599 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10600 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10601 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10602   have_xidle=yes
10603                      cat >>confdefs.h <<\_ACEOF
10604 #define HAVE_XIDLE_EXTENSION 1
10605 _ACEOF
10606
10607 fi
10608
10609
10610   CPPFLAGS="$ac_save_CPPFLAGS"
10611 elif test "$with_xidle" != no; then
10612   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10613   exit 1
10614 fi
10615
10616
10617 ###############################################################################
10618 #
10619 #       Check for the SGI-VIDEO-CONTROL server extension.
10620 #
10621 ###############################################################################
10622
10623 have_sgivc=no
10624 with_sgivc_req=unspecified
10625
10626 # Check whether --with-sgivc-ext was given.
10627 if test "${with_sgivc_ext+set}" = set; then
10628   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10629 else
10630   with_sgivc=yes
10631 fi
10632
10633
10634
10635    case "$with_sgivc" in
10636     yes) ;;
10637     no)  ;;
10638
10639     /*)
10640      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10641 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10642      d=$with_sgivc/include
10643      if test -d $d; then
10644        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10653 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10654      d=$with_sgivc/lib
10655      if test -d $d; then
10656        X_LIBS="-L$d $X_LIBS"
10657        { echo "$as_me:$LINENO: result: $d" >&5
10658 echo "${ECHO_T}$d" >&6; }
10659      else
10660        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10661 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10662      fi
10663
10664      # replace the directory string with "yes".
10665      with_sgivc_req="yes"
10666      with_sgivc=$with_sgivc_req
10667      ;;
10668
10669     *)
10670      echo ""
10671      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10672      echo "       If it is a directory, then \`DIR/include' will be added to"
10673      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10674      exit 1
10675      ;;
10676    esac
10677
10678
10679 if test "$with_sgivc" = yes; then
10680
10681   # first check for XSGIvc.h
10682
10683   ac_save_CPPFLAGS="$CPPFLAGS"
10684   if test \! -z "$includedir" ; then
10685     CPPFLAGS="$CPPFLAGS -I$includedir"
10686   fi
10687   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10688   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10689   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10690 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10691 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10692   echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694   cat >conftest.$ac_ext <<_ACEOF
10695 /* confdefs.h.  */
10696 _ACEOF
10697 cat confdefs.h >>conftest.$ac_ext
10698 cat >>conftest.$ac_ext <<_ACEOF
10699 /* end confdefs.h.  */
10700 #include <X11/Xlib.h>
10701
10702 #include <X11/extensions/XSGIvc.h>
10703 _ACEOF
10704 rm -f conftest.$ac_objext
10705 if { (ac_try="$ac_compile"
10706 case "(($ac_try" in
10707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10708   *) ac_try_echo=$ac_try;;
10709 esac
10710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10711   (eval "$ac_compile") 2>conftest.er1
10712   ac_status=$?
10713   grep -v '^ *+' conftest.er1 >conftest.err
10714   rm -f conftest.er1
10715   cat conftest.err >&5
10716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10717   (exit $ac_status); } && {
10718          test -z "$ac_c_werror_flag" ||
10719          test ! -s conftest.err
10720        } && test -s conftest.$ac_objext; then
10721   ac_cv_header_X11_extensions_XSGIvc_h=yes
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 sed 's/^/| /' conftest.$ac_ext >&5
10725
10726         ac_cv_header_X11_extensions_XSGIvc_h=no
10727 fi
10728
10729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10730 fi
10731 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10732 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10733 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10734   have_sgivc=yes
10735 fi
10736
10737
10738   CPPFLAGS="$ac_save_CPPFLAGS"
10739
10740   # if that succeeded, then check for the -lXsgivc
10741   if test "$have_sgivc" = yes; then
10742     have_sgivc=no
10743
10744   ac_save_CPPFLAGS="$CPPFLAGS"
10745   ac_save_LDFLAGS="$LDFLAGS"
10746 #  ac_save_LIBS="$LIBS"
10747
10748   if test \! -z "$includedir" ; then
10749     CPPFLAGS="$CPPFLAGS -I$includedir"
10750   fi
10751   # note: $X_CFLAGS includes $x_includes
10752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10753
10754   if test \! -z "$libdir" ; then
10755     LDFLAGS="$LDFLAGS -L$libdir"
10756   fi
10757   # note: $X_LIBS includes $x_libraries
10758   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10759
10760   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10761   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10762   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10763 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10764 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10765   echo $ECHO_N "(cached) $ECHO_C" >&6
10766 else
10767   ac_check_lib_save_LIBS=$LIBS
10768 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10769 cat >conftest.$ac_ext <<_ACEOF
10770 /* confdefs.h.  */
10771 _ACEOF
10772 cat confdefs.h >>conftest.$ac_ext
10773 cat >>conftest.$ac_ext <<_ACEOF
10774 /* end confdefs.h.  */
10775
10776 /* Override any GCC internal prototype to avoid an error.
10777    Use char because int might match the return type of a GCC
10778    builtin and then its argument prototype would still apply.  */
10779 #ifdef __cplusplus
10780 extern "C"
10781 #endif
10782 char XSGIvcQueryGammaMap ();
10783 int
10784 main ()
10785 {
10786 return XSGIvcQueryGammaMap ();
10787   ;
10788   return 0;
10789 }
10790 _ACEOF
10791 rm -f conftest.$ac_objext conftest$ac_exeext
10792 if { (ac_try="$ac_link"
10793 case "(($ac_try" in
10794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10795   *) ac_try_echo=$ac_try;;
10796 esac
10797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10798   (eval "$ac_link") 2>conftest.er1
10799   ac_status=$?
10800   grep -v '^ *+' conftest.er1 >conftest.err
10801   rm -f conftest.er1
10802   cat conftest.err >&5
10803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804   (exit $ac_status); } && {
10805          test -z "$ac_c_werror_flag" ||
10806          test ! -s conftest.err
10807        } && test -s conftest$ac_exeext &&
10808        $as_test_x conftest$ac_exeext; then
10809   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10810 else
10811   echo "$as_me: failed program was:" >&5
10812 sed 's/^/| /' conftest.$ac_ext >&5
10813
10814         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10815 fi
10816
10817 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10818       conftest$ac_exeext conftest.$ac_ext
10819 LIBS=$ac_check_lib_save_LIBS
10820 fi
10821 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10822 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10823 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10824   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10825 else
10826   true
10827 fi
10828
10829   CPPFLAGS="$ac_save_CPPFLAGS"
10830   LDFLAGS="$ac_save_LDFLAGS"
10831 #  LIBS="$ac_save_LIBS"
10832
10833   fi
10834
10835   # if that succeeded, then we've really got it.
10836   if test "$have_sgivc" = yes; then
10837     cat >>confdefs.h <<\_ACEOF
10838 #define HAVE_SGI_VC_EXTENSION 1
10839 _ACEOF
10840
10841   fi
10842
10843 elif test "$with_sgivc" != no; then
10844   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10845   exit 1
10846 fi
10847
10848
10849 ###############################################################################
10850 #
10851 #       Check for the DPMS server extension.
10852 #
10853 ###############################################################################
10854
10855 have_dpms=no
10856 with_dpms_req=unspecified
10857
10858 # Check whether --with-dpms-ext was given.
10859 if test "${with_dpms_ext+set}" = set; then
10860   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10861 else
10862   with_dpms=yes
10863 fi
10864
10865
10866
10867    case "$with_dpms" in
10868     yes) ;;
10869     no)  ;;
10870
10871     /*)
10872      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10873 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10874      d=$with_dpms/include
10875      if test -d $d; then
10876        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10885 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10886      d=$with_dpms/lib
10887      if test -d $d; then
10888        X_LIBS="-L$d $X_LIBS"
10889        { echo "$as_me:$LINENO: result: $d" >&5
10890 echo "${ECHO_T}$d" >&6; }
10891      else
10892        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10893 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10894      fi
10895
10896      # replace the directory string with "yes".
10897      with_dpms_req="yes"
10898      with_dpms=$with_dpms_req
10899      ;;
10900
10901     *)
10902      echo ""
10903      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10904      echo "       If it is a directory, then \`DIR/include' will be added to"
10905      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10906      exit 1
10907      ;;
10908    esac
10909
10910
10911 if test "$with_dpms" = yes; then
10912
10913   # first check for dpms.h
10914
10915   ac_save_CPPFLAGS="$CPPFLAGS"
10916   if test \! -z "$includedir" ; then
10917     CPPFLAGS="$CPPFLAGS -I$includedir"
10918   fi
10919   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10920   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10921   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10922 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10923 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10924   echo $ECHO_N "(cached) $ECHO_C" >&6
10925 else
10926   cat >conftest.$ac_ext <<_ACEOF
10927 /* confdefs.h.  */
10928 _ACEOF
10929 cat confdefs.h >>conftest.$ac_ext
10930 cat >>conftest.$ac_ext <<_ACEOF
10931 /* end confdefs.h.  */
10932 #include <X11/Xlib.h>
10933                      #include <X11/Xmd.h>
10934
10935 #include <X11/extensions/dpms.h>
10936 _ACEOF
10937 rm -f conftest.$ac_objext
10938 if { (ac_try="$ac_compile"
10939 case "(($ac_try" in
10940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10941   *) ac_try_echo=$ac_try;;
10942 esac
10943 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10944   (eval "$ac_compile") 2>conftest.er1
10945   ac_status=$?
10946   grep -v '^ *+' conftest.er1 >conftest.err
10947   rm -f conftest.er1
10948   cat conftest.err >&5
10949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950   (exit $ac_status); } && {
10951          test -z "$ac_c_werror_flag" ||
10952          test ! -s conftest.err
10953        } && test -s conftest.$ac_objext; then
10954   ac_cv_header_X11_extensions_dpms_h=yes
10955 else
10956   echo "$as_me: failed program was:" >&5
10957 sed 's/^/| /' conftest.$ac_ext >&5
10958
10959         ac_cv_header_X11_extensions_dpms_h=no
10960 fi
10961
10962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10963 fi
10964 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10965 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10966 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10967   have_dpms=yes
10968 fi
10969
10970
10971   CPPFLAGS="$ac_save_CPPFLAGS"
10972
10973   # if that succeeded, then check for the DPMS code in the libraries
10974   if test "$have_dpms" = yes; then
10975
10976     # first look in -lXext (this is where it is with XFree86 4.0)
10977     have_dpms=no
10978
10979   ac_save_CPPFLAGS="$CPPFLAGS"
10980   ac_save_LDFLAGS="$LDFLAGS"
10981 #  ac_save_LIBS="$LIBS"
10982
10983   if test \! -z "$includedir" ; then
10984     CPPFLAGS="$CPPFLAGS -I$includedir"
10985   fi
10986   # note: $X_CFLAGS includes $x_includes
10987   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10988
10989   if test \! -z "$libdir" ; then
10990     LDFLAGS="$LDFLAGS -L$libdir"
10991   fi
10992   # note: $X_LIBS includes $x_libraries
10993   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10994
10995   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10996   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10997   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10998 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10999 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
11000   echo $ECHO_N "(cached) $ECHO_C" >&6
11001 else
11002   ac_check_lib_save_LIBS=$LIBS
11003 LIBS="-lXext -lXext -lX11 $LIBS"
11004 cat >conftest.$ac_ext <<_ACEOF
11005 /* confdefs.h.  */
11006 _ACEOF
11007 cat confdefs.h >>conftest.$ac_ext
11008 cat >>conftest.$ac_ext <<_ACEOF
11009 /* end confdefs.h.  */
11010
11011 /* Override any GCC internal prototype to avoid an error.
11012    Use char because int might match the return type of a GCC
11013    builtin and then its argument prototype would still apply.  */
11014 #ifdef __cplusplus
11015 extern "C"
11016 #endif
11017 char DPMSInfo ();
11018 int
11019 main ()
11020 {
11021 return DPMSInfo ();
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 rm -f conftest.$ac_objext conftest$ac_exeext
11027 if { (ac_try="$ac_link"
11028 case "(($ac_try" in
11029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11030   *) ac_try_echo=$ac_try;;
11031 esac
11032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11033   (eval "$ac_link") 2>conftest.er1
11034   ac_status=$?
11035   grep -v '^ *+' conftest.er1 >conftest.err
11036   rm -f conftest.er1
11037   cat conftest.err >&5
11038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039   (exit $ac_status); } && {
11040          test -z "$ac_c_werror_flag" ||
11041          test ! -s conftest.err
11042        } && test -s conftest$ac_exeext &&
11043        $as_test_x conftest$ac_exeext; then
11044   ac_cv_lib_Xext_DPMSInfo=yes
11045 else
11046   echo "$as_me: failed program was:" >&5
11047 sed 's/^/| /' conftest.$ac_ext >&5
11048
11049         ac_cv_lib_Xext_DPMSInfo=no
11050 fi
11051
11052 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11053       conftest$ac_exeext conftest.$ac_ext
11054 LIBS=$ac_check_lib_save_LIBS
11055 fi
11056 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11057 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11058 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11059   have_dpms=yes
11060 else
11061   true
11062 fi
11063
11064   CPPFLAGS="$ac_save_CPPFLAGS"
11065   LDFLAGS="$ac_save_LDFLAGS"
11066 #  LIBS="$ac_save_LIBS"
11067
11068
11069     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11070     if test "$have_dpms" = no; then
11071
11072   ac_save_CPPFLAGS="$CPPFLAGS"
11073   ac_save_LDFLAGS="$LDFLAGS"
11074 #  ac_save_LIBS="$LIBS"
11075
11076   if test \! -z "$includedir" ; then
11077     CPPFLAGS="$CPPFLAGS -I$includedir"
11078   fi
11079   # note: $X_CFLAGS includes $x_includes
11080   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11081
11082   if test \! -z "$libdir" ; then
11083     LDFLAGS="$LDFLAGS -L$libdir"
11084   fi
11085   # note: $X_LIBS includes $x_libraries
11086   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11087
11088   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11089   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11090   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11091 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11092 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11093   echo $ECHO_N "(cached) $ECHO_C" >&6
11094 else
11095   ac_check_lib_save_LIBS=$LIBS
11096 LIBS="-lXdpms -lXext -lX11 $LIBS"
11097 cat >conftest.$ac_ext <<_ACEOF
11098 /* confdefs.h.  */
11099 _ACEOF
11100 cat confdefs.h >>conftest.$ac_ext
11101 cat >>conftest.$ac_ext <<_ACEOF
11102 /* end confdefs.h.  */
11103
11104 /* Override any GCC internal prototype to avoid an error.
11105    Use char because int might match the return type of a GCC
11106    builtin and then its argument prototype would still apply.  */
11107 #ifdef __cplusplus
11108 extern "C"
11109 #endif
11110 char DPMSInfo ();
11111 int
11112 main ()
11113 {
11114 return DPMSInfo ();
11115   ;
11116   return 0;
11117 }
11118 _ACEOF
11119 rm -f conftest.$ac_objext conftest$ac_exeext
11120 if { (ac_try="$ac_link"
11121 case "(($ac_try" in
11122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11123   *) ac_try_echo=$ac_try;;
11124 esac
11125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11126   (eval "$ac_link") 2>conftest.er1
11127   ac_status=$?
11128   grep -v '^ *+' conftest.er1 >conftest.err
11129   rm -f conftest.er1
11130   cat conftest.err >&5
11131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132   (exit $ac_status); } && {
11133          test -z "$ac_c_werror_flag" ||
11134          test ! -s conftest.err
11135        } && test -s conftest$ac_exeext &&
11136        $as_test_x conftest$ac_exeext; then
11137   ac_cv_lib_Xdpms_DPMSInfo=yes
11138 else
11139   echo "$as_me: failed program was:" >&5
11140 sed 's/^/| /' conftest.$ac_ext >&5
11141
11142         ac_cv_lib_Xdpms_DPMSInfo=no
11143 fi
11144
11145 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11146       conftest$ac_exeext conftest.$ac_ext
11147 LIBS=$ac_check_lib_save_LIBS
11148 fi
11149 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11150 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11151 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11152   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11153 else
11154   true
11155 fi
11156
11157   CPPFLAGS="$ac_save_CPPFLAGS"
11158   LDFLAGS="$ac_save_LDFLAGS"
11159 #  LIBS="$ac_save_LIBS"
11160
11161     fi
11162   fi
11163
11164
11165   # if that succeeded, then we've really got it.
11166   if test "$have_dpms" = yes; then
11167     cat >>confdefs.h <<\_ACEOF
11168 #define HAVE_DPMS_EXTENSION 1
11169 _ACEOF
11170
11171   fi
11172
11173 elif test "$with_dpms" != no; then
11174   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11175   exit 1
11176 fi
11177
11178
11179 ###############################################################################
11180 #
11181 #       Check for the XINERAMA server extension.
11182 #
11183 ###############################################################################
11184
11185 have_xinerama=no
11186 with_xinerama_req=unspecified
11187
11188 # Check whether --with-xinerama-ext was given.
11189 if test "${with_xinerama_ext+set}" = set; then
11190   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11191 else
11192   with_xinerama=yes
11193 fi
11194
11195
11196
11197    case "$with_xinerama" in
11198     yes) ;;
11199     no)  ;;
11200
11201     /*)
11202      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11203 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11204      d=$with_xinerama/include
11205      if test -d $d; then
11206        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11215 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11216      d=$with_xinerama/lib
11217      if test -d $d; then
11218        X_LIBS="-L$d $X_LIBS"
11219        { echo "$as_me:$LINENO: result: $d" >&5
11220 echo "${ECHO_T}$d" >&6; }
11221      else
11222        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11223 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11224      fi
11225
11226      # replace the directory string with "yes".
11227      with_xinerama_req="yes"
11228      with_xinerama=$with_xinerama_req
11229      ;;
11230
11231     *)
11232      echo ""
11233      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11234      echo "       If it is a directory, then \`DIR/include' will be added to"
11235      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11236      exit 1
11237      ;;
11238    esac
11239
11240
11241 if test "$with_xinerama" = yes; then
11242
11243   # first check for Xinerama.h
11244
11245   ac_save_CPPFLAGS="$CPPFLAGS"
11246   if test \! -z "$includedir" ; then
11247     CPPFLAGS="$CPPFLAGS -I$includedir"
11248   fi
11249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11250   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11251   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11252 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11253 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11254   echo $ECHO_N "(cached) $ECHO_C" >&6
11255 else
11256   cat >conftest.$ac_ext <<_ACEOF
11257 /* confdefs.h.  */
11258 _ACEOF
11259 cat confdefs.h >>conftest.$ac_ext
11260 cat >>conftest.$ac_ext <<_ACEOF
11261 /* end confdefs.h.  */
11262 #include <X11/Xlib.h>
11263
11264 #include <X11/extensions/Xinerama.h>
11265 _ACEOF
11266 rm -f conftest.$ac_objext
11267 if { (ac_try="$ac_compile"
11268 case "(($ac_try" in
11269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270   *) ac_try_echo=$ac_try;;
11271 esac
11272 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11273   (eval "$ac_compile") 2>conftest.er1
11274   ac_status=$?
11275   grep -v '^ *+' conftest.er1 >conftest.err
11276   rm -f conftest.er1
11277   cat conftest.err >&5
11278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279   (exit $ac_status); } && {
11280          test -z "$ac_c_werror_flag" ||
11281          test ! -s conftest.err
11282        } && test -s conftest.$ac_objext; then
11283   ac_cv_header_X11_extensions_Xinerama_h=yes
11284 else
11285   echo "$as_me: failed program was:" >&5
11286 sed 's/^/| /' conftest.$ac_ext >&5
11287
11288         ac_cv_header_X11_extensions_Xinerama_h=no
11289 fi
11290
11291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11292 fi
11293 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11294 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11295 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11296   have_xinerama=yes
11297 fi
11298
11299
11300   CPPFLAGS="$ac_save_CPPFLAGS"
11301
11302   # if that succeeded, then check for the XINERAMA code in the libraries
11303   if test "$have_xinerama" = yes; then
11304
11305     # first look in -lXext
11306     have_xinerama=no
11307
11308   ac_save_CPPFLAGS="$CPPFLAGS"
11309   ac_save_LDFLAGS="$LDFLAGS"
11310 #  ac_save_LIBS="$LIBS"
11311
11312   if test \! -z "$includedir" ; then
11313     CPPFLAGS="$CPPFLAGS -I$includedir"
11314   fi
11315   # note: $X_CFLAGS includes $x_includes
11316   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11317
11318   if test \! -z "$libdir" ; then
11319     LDFLAGS="$LDFLAGS -L$libdir"
11320   fi
11321   # note: $X_LIBS includes $x_libraries
11322   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11323
11324   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11325   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11326   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11327 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11328 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11329   echo $ECHO_N "(cached) $ECHO_C" >&6
11330 else
11331   ac_check_lib_save_LIBS=$LIBS
11332 LIBS="-lXext -lXext -lX11 $LIBS"
11333 cat >conftest.$ac_ext <<_ACEOF
11334 /* confdefs.h.  */
11335 _ACEOF
11336 cat confdefs.h >>conftest.$ac_ext
11337 cat >>conftest.$ac_ext <<_ACEOF
11338 /* end confdefs.h.  */
11339
11340 /* Override any GCC internal prototype to avoid an error.
11341    Use char because int might match the return type of a GCC
11342    builtin and then its argument prototype would still apply.  */
11343 #ifdef __cplusplus
11344 extern "C"
11345 #endif
11346 char XineramaQueryScreens ();
11347 int
11348 main ()
11349 {
11350 return XineramaQueryScreens ();
11351   ;
11352   return 0;
11353 }
11354 _ACEOF
11355 rm -f conftest.$ac_objext conftest$ac_exeext
11356 if { (ac_try="$ac_link"
11357 case "(($ac_try" in
11358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11359   *) ac_try_echo=$ac_try;;
11360 esac
11361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11362   (eval "$ac_link") 2>conftest.er1
11363   ac_status=$?
11364   grep -v '^ *+' conftest.er1 >conftest.err
11365   rm -f conftest.er1
11366   cat conftest.err >&5
11367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11368   (exit $ac_status); } && {
11369          test -z "$ac_c_werror_flag" ||
11370          test ! -s conftest.err
11371        } && test -s conftest$ac_exeext &&
11372        $as_test_x conftest$ac_exeext; then
11373   ac_cv_lib_Xext_XineramaQueryScreens=yes
11374 else
11375   echo "$as_me: failed program was:" >&5
11376 sed 's/^/| /' conftest.$ac_ext >&5
11377
11378         ac_cv_lib_Xext_XineramaQueryScreens=no
11379 fi
11380
11381 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11382       conftest$ac_exeext conftest.$ac_ext
11383 LIBS=$ac_check_lib_save_LIBS
11384 fi
11385 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11386 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11387 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11388   have_xinerama=yes
11389 else
11390   true
11391 fi
11392
11393   CPPFLAGS="$ac_save_CPPFLAGS"
11394   LDFLAGS="$ac_save_LDFLAGS"
11395 #  LIBS="$ac_save_LIBS"
11396
11397
11398     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11399     if test "$have_xinerama" = no; then
11400
11401   ac_save_CPPFLAGS="$CPPFLAGS"
11402   ac_save_LDFLAGS="$LDFLAGS"
11403 #  ac_save_LIBS="$LIBS"
11404
11405   if test \! -z "$includedir" ; then
11406     CPPFLAGS="$CPPFLAGS -I$includedir"
11407   fi
11408   # note: $X_CFLAGS includes $x_includes
11409   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11410
11411   if test \! -z "$libdir" ; then
11412     LDFLAGS="$LDFLAGS -L$libdir"
11413   fi
11414   # note: $X_LIBS includes $x_libraries
11415   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11416
11417   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11418   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11419   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11420 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11421 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11422   echo $ECHO_N "(cached) $ECHO_C" >&6
11423 else
11424   ac_check_lib_save_LIBS=$LIBS
11425 LIBS="-lXinerama -lXext -lX11 $LIBS"
11426 cat >conftest.$ac_ext <<_ACEOF
11427 /* confdefs.h.  */
11428 _ACEOF
11429 cat confdefs.h >>conftest.$ac_ext
11430 cat >>conftest.$ac_ext <<_ACEOF
11431 /* end confdefs.h.  */
11432
11433 /* Override any GCC internal prototype to avoid an error.
11434    Use char because int might match the return type of a GCC
11435    builtin and then its argument prototype would still apply.  */
11436 #ifdef __cplusplus
11437 extern "C"
11438 #endif
11439 char XineramaQueryScreens ();
11440 int
11441 main ()
11442 {
11443 return XineramaQueryScreens ();
11444   ;
11445   return 0;
11446 }
11447 _ACEOF
11448 rm -f conftest.$ac_objext conftest$ac_exeext
11449 if { (ac_try="$ac_link"
11450 case "(($ac_try" in
11451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11452   *) ac_try_echo=$ac_try;;
11453 esac
11454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11455   (eval "$ac_link") 2>conftest.er1
11456   ac_status=$?
11457   grep -v '^ *+' conftest.er1 >conftest.err
11458   rm -f conftest.er1
11459   cat conftest.err >&5
11460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11461   (exit $ac_status); } && {
11462          test -z "$ac_c_werror_flag" ||
11463          test ! -s conftest.err
11464        } && test -s conftest$ac_exeext &&
11465        $as_test_x conftest$ac_exeext; then
11466   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11467 else
11468   echo "$as_me: failed program was:" >&5
11469 sed 's/^/| /' conftest.$ac_ext >&5
11470
11471         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11472 fi
11473
11474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11475       conftest$ac_exeext conftest.$ac_ext
11476 LIBS=$ac_check_lib_save_LIBS
11477 fi
11478 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11479 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11480 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11481   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11482 else
11483   true
11484 fi
11485
11486   CPPFLAGS="$ac_save_CPPFLAGS"
11487   LDFLAGS="$ac_save_LDFLAGS"
11488 #  LIBS="$ac_save_LIBS"
11489
11490     fi
11491   fi
11492
11493   # if that succeeded, then we've really got it.
11494   if test "$have_xinerama" = yes; then
11495     cat >>confdefs.h <<\_ACEOF
11496 #define HAVE_XINERAMA 1
11497 _ACEOF
11498
11499   fi
11500
11501 elif test "$with_xinerama" != no; then
11502   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11503   exit 1
11504 fi
11505
11506
11507 ###############################################################################
11508 #
11509 #       Check for the XF86VMODE server extension (for virtual screens.)
11510 #
11511 ###############################################################################
11512
11513 have_xf86vmode=no
11514 with_xf86vmode_req=unspecified
11515
11516 # Check whether --with-xf86vmode-ext was given.
11517 if test "${with_xf86vmode_ext+set}" = set; then
11518   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11519 else
11520   with_xf86vmode=yes
11521 fi
11522
11523
11524
11525    case "$with_xf86vmode" in
11526     yes) ;;
11527     no)  ;;
11528
11529     /*)
11530      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11531 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11532      d=$with_xf86vmode/include
11533      if test -d $d; then
11534        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11543 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11544      d=$with_xf86vmode/lib
11545      if test -d $d; then
11546        X_LIBS="-L$d $X_LIBS"
11547        { echo "$as_me:$LINENO: result: $d" >&5
11548 echo "${ECHO_T}$d" >&6; }
11549      else
11550        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11551 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11552      fi
11553
11554      # replace the directory string with "yes".
11555      with_xf86vmode_req="yes"
11556      with_xf86vmode=$with_xf86vmode_req
11557      ;;
11558
11559     *)
11560      echo ""
11561      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11562      echo "       If it is a directory, then \`DIR/include' will be added to"
11563      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11564      exit 1
11565      ;;
11566    esac
11567
11568
11569 VIDMODE_LIBS=""
11570
11571 if test "$with_xf86vmode" = yes; then
11572
11573   # first check for xf86vmode.h
11574
11575   ac_save_CPPFLAGS="$CPPFLAGS"
11576   if test \! -z "$includedir" ; then
11577     CPPFLAGS="$CPPFLAGS -I$includedir"
11578   fi
11579   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11580   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11581   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11582 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11583 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11584   echo $ECHO_N "(cached) $ECHO_C" >&6
11585 else
11586   cat >conftest.$ac_ext <<_ACEOF
11587 /* confdefs.h.  */
11588 _ACEOF
11589 cat confdefs.h >>conftest.$ac_ext
11590 cat >>conftest.$ac_ext <<_ACEOF
11591 /* end confdefs.h.  */
11592 #include <X11/Xlib.h>
11593
11594 #include <X11/extensions/xf86vmode.h>
11595 _ACEOF
11596 rm -f conftest.$ac_objext
11597 if { (ac_try="$ac_compile"
11598 case "(($ac_try" in
11599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11600   *) ac_try_echo=$ac_try;;
11601 esac
11602 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11603   (eval "$ac_compile") 2>conftest.er1
11604   ac_status=$?
11605   grep -v '^ *+' conftest.er1 >conftest.err
11606   rm -f conftest.er1
11607   cat conftest.err >&5
11608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11609   (exit $ac_status); } && {
11610          test -z "$ac_c_werror_flag" ||
11611          test ! -s conftest.err
11612        } && test -s conftest.$ac_objext; then
11613   ac_cv_header_X11_extensions_xf86vmode_h=yes
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 sed 's/^/| /' conftest.$ac_ext >&5
11617
11618         ac_cv_header_X11_extensions_xf86vmode_h=no
11619 fi
11620
11621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11622 fi
11623 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11624 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11625 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11626   have_xf86vmode=yes
11627 fi
11628
11629
11630   CPPFLAGS="$ac_save_CPPFLAGS"
11631
11632   # if that succeeded, then check for the -lXxf86vm
11633   if test "$have_xf86vmode" = yes; then
11634     have_xf86vmode=no
11635
11636   ac_save_CPPFLAGS="$CPPFLAGS"
11637   ac_save_LDFLAGS="$LDFLAGS"
11638 #  ac_save_LIBS="$LIBS"
11639
11640   if test \! -z "$includedir" ; then
11641     CPPFLAGS="$CPPFLAGS -I$includedir"
11642   fi
11643   # note: $X_CFLAGS includes $x_includes
11644   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11645
11646   if test \! -z "$libdir" ; then
11647     LDFLAGS="$LDFLAGS -L$libdir"
11648   fi
11649   # note: $X_LIBS includes $x_libraries
11650   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11651
11652   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11653   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11654   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11655 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11656 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11657   echo $ECHO_N "(cached) $ECHO_C" >&6
11658 else
11659   ac_check_lib_save_LIBS=$LIBS
11660 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11661 cat >conftest.$ac_ext <<_ACEOF
11662 /* confdefs.h.  */
11663 _ACEOF
11664 cat confdefs.h >>conftest.$ac_ext
11665 cat >>conftest.$ac_ext <<_ACEOF
11666 /* end confdefs.h.  */
11667
11668 /* Override any GCC internal prototype to avoid an error.
11669    Use char because int might match the return type of a GCC
11670    builtin and then its argument prototype would still apply.  */
11671 #ifdef __cplusplus
11672 extern "C"
11673 #endif
11674 char XF86VidModeGetViewPort ();
11675 int
11676 main ()
11677 {
11678 return XF86VidModeGetViewPort ();
11679   ;
11680   return 0;
11681 }
11682 _ACEOF
11683 rm -f conftest.$ac_objext conftest$ac_exeext
11684 if { (ac_try="$ac_link"
11685 case "(($ac_try" in
11686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11687   *) ac_try_echo=$ac_try;;
11688 esac
11689 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11690   (eval "$ac_link") 2>conftest.er1
11691   ac_status=$?
11692   grep -v '^ *+' conftest.er1 >conftest.err
11693   rm -f conftest.er1
11694   cat conftest.err >&5
11695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696   (exit $ac_status); } && {
11697          test -z "$ac_c_werror_flag" ||
11698          test ! -s conftest.err
11699        } && test -s conftest$ac_exeext &&
11700        $as_test_x conftest$ac_exeext; then
11701   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11702 else
11703   echo "$as_me: failed program was:" >&5
11704 sed 's/^/| /' conftest.$ac_ext >&5
11705
11706         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11707 fi
11708
11709 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11710       conftest$ac_exeext conftest.$ac_ext
11711 LIBS=$ac_check_lib_save_LIBS
11712 fi
11713 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11714 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11715 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11716   have_xf86vmode=yes;
11717                    VIDMODE_LIBS="-lXxf86vm";
11718                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11719 else
11720   true
11721 fi
11722
11723   CPPFLAGS="$ac_save_CPPFLAGS"
11724   LDFLAGS="$ac_save_LDFLAGS"
11725 #  LIBS="$ac_save_LIBS"
11726
11727   fi
11728
11729   # if that succeeded, then we've really got it.
11730   if test "$have_xf86vmode" = yes; then
11731     cat >>confdefs.h <<\_ACEOF
11732 #define HAVE_XF86VMODE 1
11733 _ACEOF
11734
11735   fi
11736
11737 elif test "$with_xf86vmode" != no; then
11738   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11739   exit 1
11740 fi
11741
11742
11743 ###############################################################################
11744 #
11745 #       Check for the XF86VMODE server extension (for gamma fading.)
11746 #
11747 ###############################################################################
11748
11749 have_xf86gamma=no
11750 have_xf86gamma_ramp=no
11751 with_xf86gamma_req=unspecified
11752
11753 # Check whether --with-xf86gamma-ext was given.
11754 if test "${with_xf86gamma_ext+set}" = set; then
11755   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11756 else
11757   with_xf86gamma=yes
11758 fi
11759
11760
11761
11762    case "$with_xf86gamma" in
11763     yes) ;;
11764     no)  ;;
11765
11766     /*)
11767      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11768 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11769      d=$with_xf86gamma/include
11770      if test -d $d; then
11771        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11780 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11781      d=$with_xf86gamma/lib
11782      if test -d $d; then
11783        X_LIBS="-L$d $X_LIBS"
11784        { echo "$as_me:$LINENO: result: $d" >&5
11785 echo "${ECHO_T}$d" >&6; }
11786      else
11787        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11788 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11789      fi
11790
11791      # replace the directory string with "yes".
11792      with_xf86gamma_req="yes"
11793      with_xf86gamma=$with_xf86gamma_req
11794      ;;
11795
11796     *)
11797      echo ""
11798      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11799      echo "       If it is a directory, then \`DIR/include' will be added to"
11800      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11801      exit 1
11802      ;;
11803    esac
11804
11805
11806 if test "$with_xf86gamma" = yes; then
11807
11808   # first check for xf86vmode.h, if we haven't already
11809   if test "$have_xf86vmode" = yes; then
11810     have_xf86gamma=yes
11811   else
11812
11813   ac_save_CPPFLAGS="$CPPFLAGS"
11814   if test \! -z "$includedir" ; then
11815     CPPFLAGS="$CPPFLAGS -I$includedir"
11816   fi
11817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11818   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11819   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11820 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11821 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11822   echo $ECHO_N "(cached) $ECHO_C" >&6
11823 else
11824   cat >conftest.$ac_ext <<_ACEOF
11825 /* confdefs.h.  */
11826 _ACEOF
11827 cat confdefs.h >>conftest.$ac_ext
11828 cat >>conftest.$ac_ext <<_ACEOF
11829 /* end confdefs.h.  */
11830 #include <X11/Xlib.h>
11831
11832 #include <X11/extensions/xf86vmode.h>
11833 _ACEOF
11834 rm -f conftest.$ac_objext
11835 if { (ac_try="$ac_compile"
11836 case "(($ac_try" in
11837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838   *) ac_try_echo=$ac_try;;
11839 esac
11840 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11841   (eval "$ac_compile") 2>conftest.er1
11842   ac_status=$?
11843   grep -v '^ *+' conftest.er1 >conftest.err
11844   rm -f conftest.er1
11845   cat conftest.err >&5
11846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11847   (exit $ac_status); } && {
11848          test -z "$ac_c_werror_flag" ||
11849          test ! -s conftest.err
11850        } && test -s conftest.$ac_objext; then
11851   ac_cv_header_X11_extensions_xf86vmode_h=yes
11852 else
11853   echo "$as_me: failed program was:" >&5
11854 sed 's/^/| /' conftest.$ac_ext >&5
11855
11856         ac_cv_header_X11_extensions_xf86vmode_h=no
11857 fi
11858
11859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11860 fi
11861 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11862 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11863 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11864   have_xf86gamma=yes
11865 fi
11866
11867
11868   CPPFLAGS="$ac_save_CPPFLAGS"
11869   fi
11870
11871   # if that succeeded, then check for the -lXxf86vm
11872   if test "$have_xf86gamma" = yes; then
11873     have_xf86gamma=no
11874
11875   ac_save_CPPFLAGS="$CPPFLAGS"
11876   ac_save_LDFLAGS="$LDFLAGS"
11877 #  ac_save_LIBS="$LIBS"
11878
11879   if test \! -z "$includedir" ; then
11880     CPPFLAGS="$CPPFLAGS -I$includedir"
11881   fi
11882   # note: $X_CFLAGS includes $x_includes
11883   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11884
11885   if test \! -z "$libdir" ; then
11886     LDFLAGS="$LDFLAGS -L$libdir"
11887   fi
11888   # note: $X_LIBS includes $x_libraries
11889   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11890
11891   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11892   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11893   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11894 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11895 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11896   echo $ECHO_N "(cached) $ECHO_C" >&6
11897 else
11898   ac_check_lib_save_LIBS=$LIBS
11899 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11900 cat >conftest.$ac_ext <<_ACEOF
11901 /* confdefs.h.  */
11902 _ACEOF
11903 cat confdefs.h >>conftest.$ac_ext
11904 cat >>conftest.$ac_ext <<_ACEOF
11905 /* end confdefs.h.  */
11906
11907 /* Override any GCC internal prototype to avoid an error.
11908    Use char because int might match the return type of a GCC
11909    builtin and then its argument prototype would still apply.  */
11910 #ifdef __cplusplus
11911 extern "C"
11912 #endif
11913 char XF86VidModeSetGamma ();
11914 int
11915 main ()
11916 {
11917 return XF86VidModeSetGamma ();
11918   ;
11919   return 0;
11920 }
11921 _ACEOF
11922 rm -f conftest.$ac_objext conftest$ac_exeext
11923 if { (ac_try="$ac_link"
11924 case "(($ac_try" in
11925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926   *) ac_try_echo=$ac_try;;
11927 esac
11928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11929   (eval "$ac_link") 2>conftest.er1
11930   ac_status=$?
11931   grep -v '^ *+' conftest.er1 >conftest.err
11932   rm -f conftest.er1
11933   cat conftest.err >&5
11934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935   (exit $ac_status); } && {
11936          test -z "$ac_c_werror_flag" ||
11937          test ! -s conftest.err
11938        } && test -s conftest$ac_exeext &&
11939        $as_test_x conftest$ac_exeext; then
11940   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11941 else
11942   echo "$as_me: failed program was:" >&5
11943 sed 's/^/| /' conftest.$ac_ext >&5
11944
11945         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11946 fi
11947
11948 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11949       conftest$ac_exeext conftest.$ac_ext
11950 LIBS=$ac_check_lib_save_LIBS
11951 fi
11952 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11953 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11954 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11955   have_xf86gamma=yes
11956 else
11957   true
11958 fi
11959
11960   CPPFLAGS="$ac_save_CPPFLAGS"
11961   LDFLAGS="$ac_save_LDFLAGS"
11962 #  LIBS="$ac_save_LIBS"
11963
11964   fi
11965
11966   # check for the Ramp versions of the functions too.
11967   if test "$have_xf86gamma" = yes; then
11968     have_xf86gamma_ramp=no
11969
11970   ac_save_CPPFLAGS="$CPPFLAGS"
11971   ac_save_LDFLAGS="$LDFLAGS"
11972 #  ac_save_LIBS="$LIBS"
11973
11974   if test \! -z "$includedir" ; then
11975     CPPFLAGS="$CPPFLAGS -I$includedir"
11976   fi
11977   # note: $X_CFLAGS includes $x_includes
11978   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11979
11980   if test \! -z "$libdir" ; then
11981     LDFLAGS="$LDFLAGS -L$libdir"
11982   fi
11983   # note: $X_LIBS includes $x_libraries
11984   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11985
11986   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11987   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11988   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11989 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11990 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11991   echo $ECHO_N "(cached) $ECHO_C" >&6
11992 else
11993   ac_check_lib_save_LIBS=$LIBS
11994 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11995 cat >conftest.$ac_ext <<_ACEOF
11996 /* confdefs.h.  */
11997 _ACEOF
11998 cat confdefs.h >>conftest.$ac_ext
11999 cat >>conftest.$ac_ext <<_ACEOF
12000 /* end confdefs.h.  */
12001
12002 /* Override any GCC internal prototype to avoid an error.
12003    Use char because int might match the return type of a GCC
12004    builtin and then its argument prototype would still apply.  */
12005 #ifdef __cplusplus
12006 extern "C"
12007 #endif
12008 char XF86VidModeSetGammaRamp ();
12009 int
12010 main ()
12011 {
12012 return XF86VidModeSetGammaRamp ();
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 rm -f conftest.$ac_objext conftest$ac_exeext
12018 if { (ac_try="$ac_link"
12019 case "(($ac_try" in
12020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12021   *) ac_try_echo=$ac_try;;
12022 esac
12023 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12024   (eval "$ac_link") 2>conftest.er1
12025   ac_status=$?
12026   grep -v '^ *+' conftest.er1 >conftest.err
12027   rm -f conftest.er1
12028   cat conftest.err >&5
12029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030   (exit $ac_status); } && {
12031          test -z "$ac_c_werror_flag" ||
12032          test ! -s conftest.err
12033        } && test -s conftest$ac_exeext &&
12034        $as_test_x conftest$ac_exeext; then
12035   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12036 else
12037   echo "$as_me: failed program was:" >&5
12038 sed 's/^/| /' conftest.$ac_ext >&5
12039
12040         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12041 fi
12042
12043 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12044       conftest$ac_exeext conftest.$ac_ext
12045 LIBS=$ac_check_lib_save_LIBS
12046 fi
12047 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12048 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12049 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12050   have_xf86gamma_ramp=yes
12051 else
12052   true
12053 fi
12054
12055   CPPFLAGS="$ac_save_CPPFLAGS"
12056   LDFLAGS="$ac_save_LDFLAGS"
12057 #  LIBS="$ac_save_LIBS"
12058
12059   fi
12060
12061   # if those tests succeeded, then we've really got the functions.
12062   if test "$have_xf86gamma" = yes; then
12063     cat >>confdefs.h <<\_ACEOF
12064 #define HAVE_XF86VMODE_GAMMA 1
12065 _ACEOF
12066
12067   fi
12068
12069   if test "$have_xf86gamma_ramp" = yes; then
12070     cat >>confdefs.h <<\_ACEOF
12071 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12072 _ACEOF
12073
12074   fi
12075
12076   # pull in the lib, if we haven't already
12077   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12078     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12079   fi
12080
12081 elif test "$with_xf86gamma" != no; then
12082   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12083   exit 1
12084 fi
12085
12086
12087 ###############################################################################
12088 #
12089 #       Check for the RANDR (Resize and Rotate) server extension.
12090 #
12091 #       We need this to detect when the resolution of the desktop
12092 #       has changed out from under us (this is a newer, different
12093 #       mechanism than the XF86VMODE virtual viewports.)
12094 #
12095 ###############################################################################
12096
12097 have_randr=no
12098 with_randr_req=unspecified
12099
12100 # Check whether --with-randr-ext was given.
12101 if test "${with_randr_ext+set}" = set; then
12102   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12103 else
12104   with_randr=yes
12105 fi
12106
12107
12108
12109    case "$with_randr" in
12110     yes) ;;
12111     no)  ;;
12112
12113     /*)
12114      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12115 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12116      d=$with_randr/include
12117      if test -d $d; then
12118        X_CFLAGS="-I$d $X_CFLAGS"
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      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12127 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12128      d=$with_randr/lib
12129      if test -d $d; then
12130        X_LIBS="-L$d $X_LIBS"
12131        { echo "$as_me:$LINENO: result: $d" >&5
12132 echo "${ECHO_T}$d" >&6; }
12133      else
12134        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12135 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12136      fi
12137
12138      # replace the directory string with "yes".
12139      with_randr_req="yes"
12140      with_randr=$with_randr_req
12141      ;;
12142
12143     *)
12144      echo ""
12145      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12146      echo "       If it is a directory, then \`DIR/include' will be added to"
12147      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12148      exit 1
12149      ;;
12150    esac
12151
12152
12153 if test "$with_randr" = yes; then
12154
12155   # first check for Xrandr.h
12156
12157   ac_save_CPPFLAGS="$CPPFLAGS"
12158   if test \! -z "$includedir" ; then
12159     CPPFLAGS="$CPPFLAGS -I$includedir"
12160   fi
12161   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12162   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12163   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12164 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12165 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12166   echo $ECHO_N "(cached) $ECHO_C" >&6
12167 else
12168   cat >conftest.$ac_ext <<_ACEOF
12169 /* confdefs.h.  */
12170 _ACEOF
12171 cat confdefs.h >>conftest.$ac_ext
12172 cat >>conftest.$ac_ext <<_ACEOF
12173 /* end confdefs.h.  */
12174 #include <X11/Xlib.h>
12175
12176 #include <X11/extensions/Xrandr.h>
12177 _ACEOF
12178 rm -f conftest.$ac_objext
12179 if { (ac_try="$ac_compile"
12180 case "(($ac_try" in
12181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12182   *) ac_try_echo=$ac_try;;
12183 esac
12184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12185   (eval "$ac_compile") 2>conftest.er1
12186   ac_status=$?
12187   grep -v '^ *+' conftest.er1 >conftest.err
12188   rm -f conftest.er1
12189   cat conftest.err >&5
12190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12191   (exit $ac_status); } && {
12192          test -z "$ac_c_werror_flag" ||
12193          test ! -s conftest.err
12194        } && test -s conftest.$ac_objext; then
12195   ac_cv_header_X11_extensions_Xrandr_h=yes
12196 else
12197   echo "$as_me: failed program was:" >&5
12198 sed 's/^/| /' conftest.$ac_ext >&5
12199
12200         ac_cv_header_X11_extensions_Xrandr_h=no
12201 fi
12202
12203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12204 fi
12205 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12206 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12207 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12208   have_randr=yes
12209 fi
12210
12211
12212   CPPFLAGS="$ac_save_CPPFLAGS"
12213
12214   # if that succeeded, then check for the XRR code in the libraries
12215   if test "$have_randr" = yes; then
12216
12217     # RANDR probably needs -lXrender
12218     xrender_libs=
12219
12220   ac_save_CPPFLAGS="$CPPFLAGS"
12221   ac_save_LDFLAGS="$LDFLAGS"
12222 #  ac_save_LIBS="$LIBS"
12223
12224   if test \! -z "$includedir" ; then
12225     CPPFLAGS="$CPPFLAGS -I$includedir"
12226   fi
12227   # note: $X_CFLAGS includes $x_includes
12228   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12229
12230   if test \! -z "$libdir" ; then
12231     LDFLAGS="$LDFLAGS -L$libdir"
12232   fi
12233   # note: $X_LIBS includes $x_libraries
12234   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12235
12236   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12237   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12238   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12239 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12240 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12241   echo $ECHO_N "(cached) $ECHO_C" >&6
12242 else
12243   ac_check_lib_save_LIBS=$LIBS
12244 LIBS="-lXrender -lXext -lX11 $LIBS"
12245 cat >conftest.$ac_ext <<_ACEOF
12246 /* confdefs.h.  */
12247 _ACEOF
12248 cat confdefs.h >>conftest.$ac_ext
12249 cat >>conftest.$ac_ext <<_ACEOF
12250 /* end confdefs.h.  */
12251
12252 /* Override any GCC internal prototype to avoid an error.
12253    Use char because int might match the return type of a GCC
12254    builtin and then its argument prototype would still apply.  */
12255 #ifdef __cplusplus
12256 extern "C"
12257 #endif
12258 char XRenderSetSubpixelOrder ();
12259 int
12260 main ()
12261 {
12262 return XRenderSetSubpixelOrder ();
12263   ;
12264   return 0;
12265 }
12266 _ACEOF
12267 rm -f conftest.$ac_objext conftest$ac_exeext
12268 if { (ac_try="$ac_link"
12269 case "(($ac_try" in
12270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271   *) ac_try_echo=$ac_try;;
12272 esac
12273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12274   (eval "$ac_link") 2>conftest.er1
12275   ac_status=$?
12276   grep -v '^ *+' conftest.er1 >conftest.err
12277   rm -f conftest.er1
12278   cat conftest.err >&5
12279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280   (exit $ac_status); } && {
12281          test -z "$ac_c_werror_flag" ||
12282          test ! -s conftest.err
12283        } && test -s conftest$ac_exeext &&
12284        $as_test_x conftest$ac_exeext; then
12285   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12286 else
12287   echo "$as_me: failed program was:" >&5
12288 sed 's/^/| /' conftest.$ac_ext >&5
12289
12290         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12291 fi
12292
12293 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12294       conftest$ac_exeext conftest.$ac_ext
12295 LIBS=$ac_check_lib_save_LIBS
12296 fi
12297 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12298 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12299 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12300   xrender_libs="-lXrender"
12301 else
12302   true
12303 fi
12304
12305   CPPFLAGS="$ac_save_CPPFLAGS"
12306   LDFLAGS="$ac_save_LDFLAGS"
12307 #  LIBS="$ac_save_LIBS"
12308
12309
12310     # first look for RANDR in -lXext
12311     have_randr=no
12312
12313   ac_save_CPPFLAGS="$CPPFLAGS"
12314   ac_save_LDFLAGS="$LDFLAGS"
12315 #  ac_save_LIBS="$LIBS"
12316
12317   if test \! -z "$includedir" ; then
12318     CPPFLAGS="$CPPFLAGS -I$includedir"
12319   fi
12320   # note: $X_CFLAGS includes $x_includes
12321   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12322
12323   if test \! -z "$libdir" ; then
12324     LDFLAGS="$LDFLAGS -L$libdir"
12325   fi
12326   # note: $X_LIBS includes $x_libraries
12327   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12328
12329   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12330   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12331   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12332 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12333 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12334   echo $ECHO_N "(cached) $ECHO_C" >&6
12335 else
12336   ac_check_lib_save_LIBS=$LIBS
12337 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12338 cat >conftest.$ac_ext <<_ACEOF
12339 /* confdefs.h.  */
12340 _ACEOF
12341 cat confdefs.h >>conftest.$ac_ext
12342 cat >>conftest.$ac_ext <<_ACEOF
12343 /* end confdefs.h.  */
12344
12345 /* Override any GCC internal prototype to avoid an error.
12346    Use char because int might match the return type of a GCC
12347    builtin and then its argument prototype would still apply.  */
12348 #ifdef __cplusplus
12349 extern "C"
12350 #endif
12351 char XRRGetScreenInfo ();
12352 int
12353 main ()
12354 {
12355 return XRRGetScreenInfo ();
12356   ;
12357   return 0;
12358 }
12359 _ACEOF
12360 rm -f conftest.$ac_objext conftest$ac_exeext
12361 if { (ac_try="$ac_link"
12362 case "(($ac_try" in
12363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364   *) ac_try_echo=$ac_try;;
12365 esac
12366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12367   (eval "$ac_link") 2>conftest.er1
12368   ac_status=$?
12369   grep -v '^ *+' conftest.er1 >conftest.err
12370   rm -f conftest.er1
12371   cat conftest.err >&5
12372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12373   (exit $ac_status); } && {
12374          test -z "$ac_c_werror_flag" ||
12375          test ! -s conftest.err
12376        } && test -s conftest$ac_exeext &&
12377        $as_test_x conftest$ac_exeext; then
12378   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12379 else
12380   echo "$as_me: failed program was:" >&5
12381 sed 's/^/| /' conftest.$ac_ext >&5
12382
12383         ac_cv_lib_Xext_XRRGetScreenInfo=no
12384 fi
12385
12386 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12387       conftest$ac_exeext conftest.$ac_ext
12388 LIBS=$ac_check_lib_save_LIBS
12389 fi
12390 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12391 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12392 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12393   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12394 else
12395   true
12396 fi
12397
12398   CPPFLAGS="$ac_save_CPPFLAGS"
12399   LDFLAGS="$ac_save_LDFLAGS"
12400 #  LIBS="$ac_save_LIBS"
12401
12402
12403     # if that failed, look in -lXrandr
12404     if test "$have_randr" = no; then
12405
12406   ac_save_CPPFLAGS="$CPPFLAGS"
12407   ac_save_LDFLAGS="$LDFLAGS"
12408 #  ac_save_LIBS="$LIBS"
12409
12410   if test \! -z "$includedir" ; then
12411     CPPFLAGS="$CPPFLAGS -I$includedir"
12412   fi
12413   # note: $X_CFLAGS includes $x_includes
12414   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12415
12416   if test \! -z "$libdir" ; then
12417     LDFLAGS="$LDFLAGS -L$libdir"
12418   fi
12419   # note: $X_LIBS includes $x_libraries
12420   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12421
12422   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12423   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12424   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12425 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12426 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12427   echo $ECHO_N "(cached) $ECHO_C" >&6
12428 else
12429   ac_check_lib_save_LIBS=$LIBS
12430 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12431 cat >conftest.$ac_ext <<_ACEOF
12432 /* confdefs.h.  */
12433 _ACEOF
12434 cat confdefs.h >>conftest.$ac_ext
12435 cat >>conftest.$ac_ext <<_ACEOF
12436 /* end confdefs.h.  */
12437
12438 /* Override any GCC internal prototype to avoid an error.
12439    Use char because int might match the return type of a GCC
12440    builtin and then its argument prototype would still apply.  */
12441 #ifdef __cplusplus
12442 extern "C"
12443 #endif
12444 char XRRGetScreenInfo ();
12445 int
12446 main ()
12447 {
12448 return XRRGetScreenInfo ();
12449   ;
12450   return 0;
12451 }
12452 _ACEOF
12453 rm -f conftest.$ac_objext conftest$ac_exeext
12454 if { (ac_try="$ac_link"
12455 case "(($ac_try" in
12456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12457   *) ac_try_echo=$ac_try;;
12458 esac
12459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12460   (eval "$ac_link") 2>conftest.er1
12461   ac_status=$?
12462   grep -v '^ *+' conftest.er1 >conftest.err
12463   rm -f conftest.er1
12464   cat conftest.err >&5
12465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466   (exit $ac_status); } && {
12467          test -z "$ac_c_werror_flag" ||
12468          test ! -s conftest.err
12469        } && test -s conftest$ac_exeext &&
12470        $as_test_x conftest$ac_exeext; then
12471   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12472 else
12473   echo "$as_me: failed program was:" >&5
12474 sed 's/^/| /' conftest.$ac_ext >&5
12475
12476         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12477 fi
12478
12479 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12480       conftest$ac_exeext conftest.$ac_ext
12481 LIBS=$ac_check_lib_save_LIBS
12482 fi
12483 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12484 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12485 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12486   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12487 else
12488   true
12489 fi
12490
12491   CPPFLAGS="$ac_save_CPPFLAGS"
12492   LDFLAGS="$ac_save_LDFLAGS"
12493 #  LIBS="$ac_save_LIBS"
12494
12495     fi
12496   fi
12497
12498   # if that succeeded, then we've really got it.
12499   if test "$have_randr" = yes; then
12500     cat >>confdefs.h <<\_ACEOF
12501 #define HAVE_RANDR 1
12502 _ACEOF
12503
12504
12505     # Now check for version 1.2 in the same libs.
12506     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12507     { echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12508 echo $ECHO_N "checking for XRRGetScreenResources... $ECHO_C" >&6; }
12509 if test "${ac_cv_randr_12+set}" = set; then
12510   echo $ECHO_N "(cached) $ECHO_C" >&6
12511 else
12512   ac_cv_randr_12=no
12513
12514   ac_save_CPPFLAGS="$CPPFLAGS"
12515   if test \! -z "$includedir" ; then
12516     CPPFLAGS="$CPPFLAGS -I$includedir"
12517   fi
12518   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12519   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12520   cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 #include <stdlib.h>
12527                          #include <X11/Xlib.h>
12528                          #include <X11/extensions/Xrandr.h>
12529 int
12530 main ()
12531 {
12532 XRRScreenResources *res =
12533                            XRRGetScreenResources (0, 0);
12534   ;
12535   return 0;
12536 }
12537 _ACEOF
12538 rm -f conftest.$ac_objext
12539 if { (ac_try="$ac_compile"
12540 case "(($ac_try" in
12541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12542   *) ac_try_echo=$ac_try;;
12543 esac
12544 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12545   (eval "$ac_compile") 2>conftest.er1
12546   ac_status=$?
12547   grep -v '^ *+' conftest.er1 >conftest.err
12548   rm -f conftest.er1
12549   cat conftest.err >&5
12550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551   (exit $ac_status); } && {
12552          test -z "$ac_c_werror_flag" ||
12553          test ! -s conftest.err
12554        } && test -s conftest.$ac_objext; then
12555   ac_cv_randr_12=yes
12556 else
12557   echo "$as_me: failed program was:" >&5
12558 sed 's/^/| /' conftest.$ac_ext >&5
12559
12560         ac_cv_randr_12=no
12561 fi
12562
12563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12564   CPPFLAGS="$ac_save_CPPFLAGS"
12565 fi
12566 { echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12567 echo "${ECHO_T}$ac_cv_randr_12" >&6; }
12568     if test "$ac_cv_randr_12" = yes ; then
12569       cat >>confdefs.h <<\_ACEOF
12570 #define HAVE_RANDR_12 1
12571 _ACEOF
12572
12573     fi
12574 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
12575 #                  [true], $SAVER_LIBS)
12576   fi
12577
12578
12579 elif test "$with_randr" != no; then
12580   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12581   exit 1
12582 fi
12583
12584
12585 ###############################################################################
12586 #
12587 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12588 #       using other XF86 stuff.)
12589 #
12590 ###############################################################################
12591
12592 have_xf86miscsetgrabkeysstate=no
12593 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12594
12595   ac_save_CPPFLAGS="$CPPFLAGS"
12596   ac_save_LDFLAGS="$LDFLAGS"
12597 #  ac_save_LIBS="$LIBS"
12598
12599   if test \! -z "$includedir" ; then
12600     CPPFLAGS="$CPPFLAGS -I$includedir"
12601   fi
12602   # note: $X_CFLAGS includes $x_includes
12603   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12604
12605   if test \! -z "$libdir" ; then
12606     LDFLAGS="$LDFLAGS -L$libdir"
12607   fi
12608   # note: $X_LIBS includes $x_libraries
12609   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12610
12611   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12612   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12613   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12614 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12615 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12616   echo $ECHO_N "(cached) $ECHO_C" >&6
12617 else
12618   ac_check_lib_save_LIBS=$LIBS
12619 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12620 cat >conftest.$ac_ext <<_ACEOF
12621 /* confdefs.h.  */
12622 _ACEOF
12623 cat confdefs.h >>conftest.$ac_ext
12624 cat >>conftest.$ac_ext <<_ACEOF
12625 /* end confdefs.h.  */
12626
12627 /* Override any GCC internal prototype to avoid an error.
12628    Use char because int might match the return type of a GCC
12629    builtin and then its argument prototype would still apply.  */
12630 #ifdef __cplusplus
12631 extern "C"
12632 #endif
12633 char XF86MiscSetGrabKeysState ();
12634 int
12635 main ()
12636 {
12637 return XF86MiscSetGrabKeysState ();
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 rm -f conftest.$ac_objext conftest$ac_exeext
12643 if { (ac_try="$ac_link"
12644 case "(($ac_try" in
12645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646   *) ac_try_echo=$ac_try;;
12647 esac
12648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12649   (eval "$ac_link") 2>conftest.er1
12650   ac_status=$?
12651   grep -v '^ *+' conftest.er1 >conftest.err
12652   rm -f conftest.er1
12653   cat conftest.err >&5
12654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655   (exit $ac_status); } && {
12656          test -z "$ac_c_werror_flag" ||
12657          test ! -s conftest.err
12658        } && test -s conftest$ac_exeext &&
12659        $as_test_x conftest$ac_exeext; then
12660   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12661 else
12662   echo "$as_me: failed program was:" >&5
12663 sed 's/^/| /' conftest.$ac_ext >&5
12664
12665         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12666 fi
12667
12668 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12669       conftest$ac_exeext conftest.$ac_ext
12670 LIBS=$ac_check_lib_save_LIBS
12671 fi
12672 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12673 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12674 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12675   have_xf86miscsetgrabkeysstate=yes
12676 else
12677   true
12678 fi
12679
12680   CPPFLAGS="$ac_save_CPPFLAGS"
12681   LDFLAGS="$ac_save_LDFLAGS"
12682 #  LIBS="$ac_save_LIBS"
12683
12684   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12685     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12686     cat >>confdefs.h <<\_ACEOF
12687 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12688 _ACEOF
12689
12690   fi
12691 fi
12692
12693
12694 ###############################################################################
12695 #
12696 #       Check for HP XHPDisableReset and XHPEnableReset.
12697 #
12698 ###############################################################################
12699
12700 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12701 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12702
12703   ac_save_CPPFLAGS="$CPPFLAGS"
12704   if test \! -z "$includedir" ; then
12705     CPPFLAGS="$CPPFLAGS -I$includedir"
12706   fi
12707   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12708   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12709   cat >conftest.$ac_ext <<_ACEOF
12710 /* confdefs.h.  */
12711 _ACEOF
12712 cat confdefs.h >>conftest.$ac_ext
12713 cat >>conftest.$ac_ext <<_ACEOF
12714 /* end confdefs.h.  */
12715 #include <X11/XHPlib.h>
12716
12717 _ACEOF
12718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12719   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12720   cat >>confdefs.h <<\_ACEOF
12721 #define HAVE_XHPDISABLERESET 1
12722 _ACEOF
12723
12724                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12725                    { echo "$as_me:$LINENO: result: yes" >&5
12726 echo "${ECHO_T}yes" >&6; }
12727 else
12728   { echo "$as_me:$LINENO: result: no" >&5
12729 echo "${ECHO_T}no" >&6; }
12730 fi
12731 rm -f conftest*
12732
12733   CPPFLAGS="$ac_save_CPPFLAGS"
12734
12735
12736 ###############################################################################
12737 #
12738 #       Check for /proc/interrupts.
12739 #
12740 ###############################################################################
12741
12742 have_proc_interrupts=no
12743 with_proc_interrupts_req=unspecified
12744
12745 # Check whether --with-proc-interrupts was given.
12746 if test "${with_proc_interrupts+set}" = set; then
12747   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12748 else
12749   with_proc_interrupts=yes
12750 fi
12751
12752
12753 if test "$with_proc_interrupts" = yes; then
12754
12755   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12756   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12757   # check that it has the bits we need, but otherwise we'll just go on faith.
12758   #
12759   have_proc_interrupts=yes
12760
12761   if test -f /proc/interrupts; then
12762    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12763 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12764 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12765   echo $ECHO_N "(cached) $ECHO_C" >&6
12766 else
12767   ac_cv_have_proc_interrupts=no
12768      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12769        ac_cv_have_proc_interrupts=yes
12770      fi
12771
12772 fi
12773 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12774 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12775    have_proc_interrupts=$ac_cv_have_proc_interrupts
12776   fi
12777
12778   if test "$have_proc_interrupts" = yes; then
12779     cat >>confdefs.h <<\_ACEOF
12780 #define HAVE_PROC_INTERRUPTS 1
12781 _ACEOF
12782
12783   fi
12784
12785 elif test "$with_proc_interrupts" != no; then
12786   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12787   exit 1
12788 fi
12789
12790
12791 ###############################################################################
12792 #
12793 #       The --enable-locking option
12794 #
12795 ###############################################################################
12796
12797 # Check whether --enable-locking was given.
12798 if test "${enable_locking+set}" = set; then
12799   enableval=$enable_locking; enable_locking="$enableval"
12800 else
12801   if test "$ac_macosx" = yes; then
12802     # We can't lock on MacOS X, so default to not compiling in support for it.
12803     # But allow --enable-locking to override that, so I can debug Linux locking
12804     # under MacOS X11.
12805     enable_locking=no
12806    else
12807     enable_locking=yes
12808    fi
12809 fi
12810
12811 if test "$enable_locking" = yes; then
12812   true
12813 elif test "$enable_locking" = no; then
12814   cat >>confdefs.h <<\_ACEOF
12815 #define NO_LOCKING 1
12816 _ACEOF
12817
12818 else
12819   echo "error: must be yes or no: --enable-locking=$enable_locking"
12820   exit 1
12821 fi
12822
12823
12824 ###############################################################################
12825 #
12826 #       Whether to allow root password to unblank.
12827 #
12828 ###############################################################################
12829 # Check whether --enable-root-passwd was given.
12830 if test "${enable_root_passwd+set}" = set; then
12831   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12832 else
12833   enable_root_passwd=yes
12834 fi
12835
12836 if test "$enable_root_passwd" = yes; then
12837   cat >>confdefs.h <<\_ACEOF
12838 #define ALLOW_ROOT_PASSWD 1
12839 _ACEOF
12840
12841   true
12842 elif test "$enable_root_passwd" != no; then
12843   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12844   exit 1
12845 fi
12846
12847 ###############################################################################
12848 #
12849 #       Check for PAM.
12850 #
12851 ###############################################################################
12852
12853 case "$host" in
12854   *-solaris*)
12855    # Solaris systems tend to come with PAM misconfigured.
12856    #  Don't build it by default, even if the headers exist.
12857    with_pam_default=no
12858    ;;
12859   *)
12860    # Default to building PAM support on all other systems, if it exists.
12861    with_pam_default=yes
12862   ;;
12863 esac
12864
12865 have_pam=no
12866 with_pam_req=unspecified
12867
12868
12869 # Check whether --with-pam was given.
12870 if test "${with_pam+set}" = set; then
12871   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12872 else
12873   with_pam=$with_pam_default
12874 fi
12875
12876
12877
12878 # Check whether --with-pam_service_name was given.
12879 if test "${with_pam_service_name+set}" = set; then
12880   withval=$with_pam_service_name; pam_service_name="$withval"
12881 else
12882   pam_service_name="xscreensaver"
12883 fi
12884
12885
12886
12887    case "$with_pam" in
12888     yes) ;;
12889     no)  ;;
12890
12891     /*)
12892      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12893 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12894      d=$with_pam/include
12895      if test -d $d; then
12896        X_CFLAGS="-I$d $X_CFLAGS"
12897        { echo "$as_me:$LINENO: result: $d" >&5
12898 echo "${ECHO_T}$d" >&6; }
12899      else
12900        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12901 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12902      fi
12903
12904      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12905 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12906      d=$with_pam/lib
12907      if test -d $d; then
12908        X_LIBS="-L$d $X_LIBS"
12909        { echo "$as_me:$LINENO: result: $d" >&5
12910 echo "${ECHO_T}$d" >&6; }
12911      else
12912        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12913 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12914      fi
12915
12916      # replace the directory string with "yes".
12917      with_pam_req="yes"
12918      with_pam=$with_pam_req
12919      ;;
12920
12921     *)
12922      echo ""
12923      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12924      echo "       If it is a directory, then \`DIR/include' will be added to"
12925      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12926      exit 1
12927      ;;
12928    esac
12929
12930
12931 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12932   { echo "$as_me:$LINENO: checking for PAM" >&5
12933 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12934 if test "${ac_cv_pam+set}" = set; then
12935   echo $ECHO_N "(cached) $ECHO_C" >&6
12936 else
12937
12938   ac_save_CPPFLAGS="$CPPFLAGS"
12939   if test \! -z "$includedir" ; then
12940     CPPFLAGS="$CPPFLAGS -I$includedir"
12941   fi
12942   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12943   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12944   cat >conftest.$ac_ext <<_ACEOF
12945 /* confdefs.h.  */
12946 _ACEOF
12947 cat confdefs.h >>conftest.$ac_ext
12948 cat >>conftest.$ac_ext <<_ACEOF
12949 /* end confdefs.h.  */
12950 #include <security/pam_appl.h>
12951 int
12952 main ()
12953 {
12954
12955   ;
12956   return 0;
12957 }
12958 _ACEOF
12959 rm -f conftest.$ac_objext
12960 if { (ac_try="$ac_compile"
12961 case "(($ac_try" in
12962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12963   *) ac_try_echo=$ac_try;;
12964 esac
12965 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12966   (eval "$ac_compile") 2>conftest.er1
12967   ac_status=$?
12968   grep -v '^ *+' conftest.er1 >conftest.err
12969   rm -f conftest.er1
12970   cat conftest.err >&5
12971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972   (exit $ac_status); } && {
12973          test -z "$ac_c_werror_flag" ||
12974          test ! -s conftest.err
12975        } && test -s conftest.$ac_objext; then
12976   ac_cv_pam=yes
12977 else
12978   echo "$as_me: failed program was:" >&5
12979 sed 's/^/| /' conftest.$ac_ext >&5
12980
12981         ac_cv_pam=no
12982 fi
12983
12984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12985   CPPFLAGS="$ac_save_CPPFLAGS"
12986 fi
12987 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12988 echo "${ECHO_T}$ac_cv_pam" >&6; }
12989   if test "$ac_cv_pam" = yes ; then
12990     have_pam=yes
12991     cat >>confdefs.h <<\_ACEOF
12992 #define HAVE_PAM 1
12993 _ACEOF
12994
12995     cat >>confdefs.h <<_ACEOF
12996 #define PAM_SERVICE_NAME "$pam_service_name"
12997 _ACEOF
12998
12999
13000     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13001
13002     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13003     # those are in libc.  On Linux and Solaris, they're in libdl.
13004     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13005 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13006 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13007   echo $ECHO_N "(cached) $ECHO_C" >&6
13008 else
13009   ac_check_lib_save_LIBS=$LIBS
13010 LIBS="-ldl  $LIBS"
13011 cat >conftest.$ac_ext <<_ACEOF
13012 /* confdefs.h.  */
13013 _ACEOF
13014 cat confdefs.h >>conftest.$ac_ext
13015 cat >>conftest.$ac_ext <<_ACEOF
13016 /* end confdefs.h.  */
13017
13018 /* Override any GCC internal prototype to avoid an error.
13019    Use char because int might match the return type of a GCC
13020    builtin and then its argument prototype would still apply.  */
13021 #ifdef __cplusplus
13022 extern "C"
13023 #endif
13024 char dlopen ();
13025 int
13026 main ()
13027 {
13028 return dlopen ();
13029   ;
13030   return 0;
13031 }
13032 _ACEOF
13033 rm -f conftest.$ac_objext conftest$ac_exeext
13034 if { (ac_try="$ac_link"
13035 case "(($ac_try" in
13036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13037   *) ac_try_echo=$ac_try;;
13038 esac
13039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13040   (eval "$ac_link") 2>conftest.er1
13041   ac_status=$?
13042   grep -v '^ *+' conftest.er1 >conftest.err
13043   rm -f conftest.er1
13044   cat conftest.err >&5
13045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046   (exit $ac_status); } && {
13047          test -z "$ac_c_werror_flag" ||
13048          test ! -s conftest.err
13049        } && test -s conftest$ac_exeext &&
13050        $as_test_x conftest$ac_exeext; then
13051   ac_cv_lib_dl_dlopen=yes
13052 else
13053   echo "$as_me: failed program was:" >&5
13054 sed 's/^/| /' conftest.$ac_ext >&5
13055
13056         ac_cv_lib_dl_dlopen=no
13057 fi
13058
13059 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13060       conftest$ac_exeext conftest.$ac_ext
13061 LIBS=$ac_check_lib_save_LIBS
13062 fi
13063 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13064 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13065 if test $ac_cv_lib_dl_dlopen = yes; then
13066   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13067 fi
13068
13069
13070     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13071     have_timedwait=no
13072     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13073 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13074 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13075   echo $ECHO_N "(cached) $ECHO_C" >&6
13076 else
13077   ac_check_lib_save_LIBS=$LIBS
13078 LIBS="-lc  $LIBS"
13079 cat >conftest.$ac_ext <<_ACEOF
13080 /* confdefs.h.  */
13081 _ACEOF
13082 cat confdefs.h >>conftest.$ac_ext
13083 cat >>conftest.$ac_ext <<_ACEOF
13084 /* end confdefs.h.  */
13085
13086 /* Override any GCC internal prototype to avoid an error.
13087    Use char because int might match the return type of a GCC
13088    builtin and then its argument prototype would still apply.  */
13089 #ifdef __cplusplus
13090 extern "C"
13091 #endif
13092 char sigtimedwait ();
13093 int
13094 main ()
13095 {
13096 return sigtimedwait ();
13097   ;
13098   return 0;
13099 }
13100 _ACEOF
13101 rm -f conftest.$ac_objext conftest$ac_exeext
13102 if { (ac_try="$ac_link"
13103 case "(($ac_try" in
13104   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13105   *) ac_try_echo=$ac_try;;
13106 esac
13107 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13108   (eval "$ac_link") 2>conftest.er1
13109   ac_status=$?
13110   grep -v '^ *+' conftest.er1 >conftest.err
13111   rm -f conftest.er1
13112   cat conftest.err >&5
13113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13114   (exit $ac_status); } && {
13115          test -z "$ac_c_werror_flag" ||
13116          test ! -s conftest.err
13117        } && test -s conftest$ac_exeext &&
13118        $as_test_x conftest$ac_exeext; then
13119   ac_cv_lib_c_sigtimedwait=yes
13120 else
13121   echo "$as_me: failed program was:" >&5
13122 sed 's/^/| /' conftest.$ac_ext >&5
13123
13124         ac_cv_lib_c_sigtimedwait=no
13125 fi
13126
13127 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13128       conftest$ac_exeext conftest.$ac_ext
13129 LIBS=$ac_check_lib_save_LIBS
13130 fi
13131 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13132 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13133 if test $ac_cv_lib_c_sigtimedwait = yes; then
13134   have_timedwait=yes
13135                   cat >>confdefs.h <<\_ACEOF
13136 #define HAVE_SIGTIMEDWAIT 1
13137 _ACEOF
13138
13139 fi
13140
13141     if test "$have_timedwait" = no ; then
13142       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13143 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13144 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13145   echo $ECHO_N "(cached) $ECHO_C" >&6
13146 else
13147   ac_check_lib_save_LIBS=$LIBS
13148 LIBS="-lrt  $LIBS"
13149 cat >conftest.$ac_ext <<_ACEOF
13150 /* confdefs.h.  */
13151 _ACEOF
13152 cat confdefs.h >>conftest.$ac_ext
13153 cat >>conftest.$ac_ext <<_ACEOF
13154 /* end confdefs.h.  */
13155
13156 /* Override any GCC internal prototype to avoid an error.
13157    Use char because int might match the return type of a GCC
13158    builtin and then its argument prototype would still apply.  */
13159 #ifdef __cplusplus
13160 extern "C"
13161 #endif
13162 char sigtimedwait ();
13163 int
13164 main ()
13165 {
13166 return sigtimedwait ();
13167   ;
13168   return 0;
13169 }
13170 _ACEOF
13171 rm -f conftest.$ac_objext conftest$ac_exeext
13172 if { (ac_try="$ac_link"
13173 case "(($ac_try" in
13174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13175   *) ac_try_echo=$ac_try;;
13176 esac
13177 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13178   (eval "$ac_link") 2>conftest.er1
13179   ac_status=$?
13180   grep -v '^ *+' conftest.er1 >conftest.err
13181   rm -f conftest.er1
13182   cat conftest.err >&5
13183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184   (exit $ac_status); } && {
13185          test -z "$ac_c_werror_flag" ||
13186          test ! -s conftest.err
13187        } && test -s conftest$ac_exeext &&
13188        $as_test_x conftest$ac_exeext; then
13189   ac_cv_lib_rt_sigtimedwait=yes
13190 else
13191   echo "$as_me: failed program was:" >&5
13192 sed 's/^/| /' conftest.$ac_ext >&5
13193
13194         ac_cv_lib_rt_sigtimedwait=no
13195 fi
13196
13197 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13198       conftest$ac_exeext conftest.$ac_ext
13199 LIBS=$ac_check_lib_save_LIBS
13200 fi
13201 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13202 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13203 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13204   have_timedwait=yes
13205                                       cat >>confdefs.h <<\_ACEOF
13206 #define HAVE_SIGTIMEDWAIT 1
13207 _ACEOF
13208
13209                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13210 fi
13211
13212     fi
13213
13214     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13215 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13216     if test "${ac_cv_pam_strerror_args+set}" = set; then
13217   echo $ECHO_N "(cached) $ECHO_C" >&6
13218 else
13219
13220   ac_save_CPPFLAGS="$CPPFLAGS"
13221   if test \! -z "$includedir" ; then
13222     CPPFLAGS="$CPPFLAGS -I$includedir"
13223   fi
13224   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13225   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13226   cat >conftest.$ac_ext <<_ACEOF
13227 /* confdefs.h.  */
13228 _ACEOF
13229 cat confdefs.h >>conftest.$ac_ext
13230 cat >>conftest.$ac_ext <<_ACEOF
13231 /* end confdefs.h.  */
13232 #include <stdio.h>
13233                         #include <stdlib.h>
13234                         #include <security/pam_appl.h>
13235 int
13236 main ()
13237 {
13238 pam_handle_t *pamh = 0;
13239                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13240   ;
13241   return 0;
13242 }
13243 _ACEOF
13244 rm -f conftest.$ac_objext
13245 if { (ac_try="$ac_compile"
13246 case "(($ac_try" in
13247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13248   *) ac_try_echo=$ac_try;;
13249 esac
13250 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13251   (eval "$ac_compile") 2>conftest.er1
13252   ac_status=$?
13253   grep -v '^ *+' conftest.er1 >conftest.err
13254   rm -f conftest.er1
13255   cat conftest.err >&5
13256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257   (exit $ac_status); } && {
13258          test -z "$ac_c_werror_flag" ||
13259          test ! -s conftest.err
13260        } && test -s conftest.$ac_objext; then
13261   ac_pam_strerror_args=2
13262 else
13263   echo "$as_me: failed program was:" >&5
13264 sed 's/^/| /' conftest.$ac_ext >&5
13265
13266
13267   ac_save_CPPFLAGS="$CPPFLAGS"
13268   if test \! -z "$includedir" ; then
13269     CPPFLAGS="$CPPFLAGS -I$includedir"
13270   fi
13271   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13272   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13273   cat >conftest.$ac_ext <<_ACEOF
13274 /* confdefs.h.  */
13275 _ACEOF
13276 cat confdefs.h >>conftest.$ac_ext
13277 cat >>conftest.$ac_ext <<_ACEOF
13278 /* end confdefs.h.  */
13279 #include <stdio.h>
13280                                           #include <stdlib.h>
13281                                           #include <security/pam_appl.h>
13282 int
13283 main ()
13284 {
13285 char *s =
13286                                            pam_strerror(PAM_SUCCESS);
13287   ;
13288   return 0;
13289 }
13290 _ACEOF
13291 rm -f conftest.$ac_objext
13292 if { (ac_try="$ac_compile"
13293 case "(($ac_try" in
13294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13295   *) ac_try_echo=$ac_try;;
13296 esac
13297 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13298   (eval "$ac_compile") 2>conftest.er1
13299   ac_status=$?
13300   grep -v '^ *+' conftest.er1 >conftest.err
13301   rm -f conftest.er1
13302   cat conftest.err >&5
13303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304   (exit $ac_status); } && {
13305          test -z "$ac_c_werror_flag" ||
13306          test ! -s conftest.err
13307        } && test -s conftest.$ac_objext; then
13308   ac_pam_strerror_args=1
13309 else
13310   echo "$as_me: failed program was:" >&5
13311 sed 's/^/| /' conftest.$ac_ext >&5
13312
13313         ac_pam_strerror_args=0
13314 fi
13315
13316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13317   CPPFLAGS="$ac_save_CPPFLAGS"
13318 fi
13319
13320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13321   CPPFLAGS="$ac_save_CPPFLAGS"
13322       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13323 fi
13324
13325     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13326     if test "$ac_pam_strerror_args" = 1 ; then
13327       { echo "$as_me:$LINENO: result: one argument" >&5
13328 echo "${ECHO_T}one argument" >&6; }
13329     elif test "$ac_pam_strerror_args" = 2 ; then
13330       cat >>confdefs.h <<\_ACEOF
13331 #define PAM_STRERROR_TWO_ARGS 1
13332 _ACEOF
13333
13334       { echo "$as_me:$LINENO: result: two arguments" >&5
13335 echo "${ECHO_T}two arguments" >&6; }
13336     else
13337       { echo "$as_me:$LINENO: result: unknown" >&5
13338 echo "${ECHO_T}unknown" >&6; }
13339     fi
13340
13341 # Check pam_fail_delay
13342     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13343 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13344     if test "${ac_cv_pam_fail_delay+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347   ac_save_LDFLAGS="$LDFLAGS"
13348       LDFLAGS="-lpam"
13349       cat >conftest.$ac_ext <<_ACEOF
13350 /* confdefs.h.  */
13351 _ACEOF
13352 cat confdefs.h >>conftest.$ac_ext
13353 cat >>conftest.$ac_ext <<_ACEOF
13354 /* end confdefs.h.  */
13355 #include <security/pam_appl.h>
13356 int
13357 main ()
13358 {
13359 pam_handle_t *pamh = 0;
13360                    unsigned int usec = 1;
13361                    int status = pam_fail_delay (pamh, usec);
13362   ;
13363   return 0;
13364 }
13365 _ACEOF
13366 rm -f conftest.$ac_objext conftest$ac_exeext
13367 if { (ac_try="$ac_link"
13368 case "(($ac_try" in
13369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13370   *) ac_try_echo=$ac_try;;
13371 esac
13372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13373   (eval "$ac_link") 2>conftest.er1
13374   ac_status=$?
13375   grep -v '^ *+' conftest.er1 >conftest.err
13376   rm -f conftest.er1
13377   cat conftest.err >&5
13378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13379   (exit $ac_status); } && {
13380          test -z "$ac_c_werror_flag" ||
13381          test ! -s conftest.err
13382        } && test -s conftest$ac_exeext &&
13383        $as_test_x conftest$ac_exeext; then
13384   ac_pam_fail_delay=yes
13385 else
13386   echo "$as_me: failed program was:" >&5
13387 sed 's/^/| /' conftest.$ac_ext >&5
13388
13389         ac_pam_fail_delay=no
13390 fi
13391
13392 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13393       conftest$ac_exeext conftest.$ac_ext
13394       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13395       LDFLAGS=$ac_save_LDFLAGS
13396 fi
13397
13398
13399       if test "$ac_pam_fail_delay" = yes ; then
13400         { echo "$as_me:$LINENO: result: yes" >&5
13401 echo "${ECHO_T}yes" >&6; }
13402         cat >>confdefs.h <<\_ACEOF
13403 #define HAVE_PAM_FAIL_DELAY 1
13404 _ACEOF
13405
13406       else
13407         { echo "$as_me:$LINENO: result: no" >&5
13408 echo "${ECHO_T}no" >&6; }
13409       fi
13410
13411   fi
13412 fi
13413
13414
13415 ###############################################################################
13416 #
13417 #       Check for Kerberos.
13418 #
13419 ###############################################################################
13420
13421 have_kerberos=no
13422 have_kerberos5=no
13423 with_kerberos_req=unspecified
13424
13425
13426 # Check whether --with-kerberos was given.
13427 if test "${with_kerberos+set}" = set; then
13428   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13429 else
13430   with_kerberos=yes
13431 fi
13432
13433
13434
13435    case "$with_kerberos" in
13436     yes) ;;
13437     no)  ;;
13438
13439     /*)
13440      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13441 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13442      d=$with_kerberos/include
13443      if test -d $d; then
13444        X_CFLAGS="-I$d $X_CFLAGS"
13445        { echo "$as_me:$LINENO: result: $d" >&5
13446 echo "${ECHO_T}$d" >&6; }
13447      else
13448        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13449 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13450      fi
13451
13452      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13453 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13454      d=$with_kerberos/lib
13455      if test -d $d; then
13456        X_LIBS="-L$d $X_LIBS"
13457        { echo "$as_me:$LINENO: result: $d" >&5
13458 echo "${ECHO_T}$d" >&6; }
13459      else
13460        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13461 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13462      fi
13463
13464      # replace the directory string with "yes".
13465      with_kerberos_req="yes"
13466      with_kerberos=$with_kerberos_req
13467      ;;
13468
13469     *)
13470      echo ""
13471      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13472      echo "       If it is a directory, then \`DIR/include' will be added to"
13473      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13474      exit 1
13475      ;;
13476    esac
13477
13478
13479 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13480   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13481 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13482 if test "${ac_cv_kerberos+set}" = set; then
13483   echo $ECHO_N "(cached) $ECHO_C" >&6
13484 else
13485
13486   ac_save_CPPFLAGS="$CPPFLAGS"
13487   if test \! -z "$includedir" ; then
13488     CPPFLAGS="$CPPFLAGS -I$includedir"
13489   fi
13490   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13491   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13492   cat >conftest.$ac_ext <<_ACEOF
13493 /* confdefs.h.  */
13494 _ACEOF
13495 cat confdefs.h >>conftest.$ac_ext
13496 cat >>conftest.$ac_ext <<_ACEOF
13497 /* end confdefs.h.  */
13498 #include <krb.h>
13499 int
13500 main ()
13501 {
13502
13503   ;
13504   return 0;
13505 }
13506 _ACEOF
13507 rm -f conftest.$ac_objext
13508 if { (ac_try="$ac_compile"
13509 case "(($ac_try" in
13510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13511   *) ac_try_echo=$ac_try;;
13512 esac
13513 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13514   (eval "$ac_compile") 2>conftest.er1
13515   ac_status=$?
13516   grep -v '^ *+' conftest.er1 >conftest.err
13517   rm -f conftest.er1
13518   cat conftest.err >&5
13519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520   (exit $ac_status); } && {
13521          test -z "$ac_c_werror_flag" ||
13522          test ! -s conftest.err
13523        } && test -s conftest.$ac_objext; then
13524   ac_cv_kerberos=yes
13525 else
13526   echo "$as_me: failed program was:" >&5
13527 sed 's/^/| /' conftest.$ac_ext >&5
13528
13529         ac_cv_kerberos=no
13530 fi
13531
13532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13533   CPPFLAGS="$ac_save_CPPFLAGS"
13534 fi
13535 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13536 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13537   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13538 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13539 if test "${ac_cv_kerberos5+set}" = set; then
13540   echo $ECHO_N "(cached) $ECHO_C" >&6
13541 else
13542
13543   ac_save_CPPFLAGS="$CPPFLAGS"
13544   if test \! -z "$includedir" ; then
13545     CPPFLAGS="$CPPFLAGS -I$includedir"
13546   fi
13547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13548   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13549   cat >conftest.$ac_ext <<_ACEOF
13550 /* confdefs.h.  */
13551 _ACEOF
13552 cat confdefs.h >>conftest.$ac_ext
13553 cat >>conftest.$ac_ext <<_ACEOF
13554 /* end confdefs.h.  */
13555 #include <kerberosIV/krb.h>
13556 int
13557 main ()
13558 {
13559
13560   ;
13561   return 0;
13562 }
13563 _ACEOF
13564 rm -f conftest.$ac_objext
13565 if { (ac_try="$ac_compile"
13566 case "(($ac_try" in
13567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13568   *) ac_try_echo=$ac_try;;
13569 esac
13570 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13571   (eval "$ac_compile") 2>conftest.er1
13572   ac_status=$?
13573   grep -v '^ *+' conftest.er1 >conftest.err
13574   rm -f conftest.er1
13575   cat conftest.err >&5
13576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577   (exit $ac_status); } && {
13578          test -z "$ac_c_werror_flag" ||
13579          test ! -s conftest.err
13580        } && test -s conftest.$ac_objext; then
13581   ac_cv_kerberos5=yes
13582 else
13583   echo "$as_me: failed program was:" >&5
13584 sed 's/^/| /' conftest.$ac_ext >&5
13585
13586         ac_cv_kerberos5=no
13587 fi
13588
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590   CPPFLAGS="$ac_save_CPPFLAGS"
13591 fi
13592 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13593 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13594
13595   if test "$ac_cv_kerberos" = yes ; then
13596     have_kerberos=yes
13597     cat >>confdefs.h <<\_ACEOF
13598 #define HAVE_KERBEROS 1
13599 _ACEOF
13600
13601   fi
13602
13603   if test "$ac_cv_kerberos5" = yes ; then
13604
13605     # Andrew Snare <ajs@pigpond.com> wrote:
13606     #
13607     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13608     # (krb4) was also available.  This turns out not to be the case with
13609     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13610     # is optional.
13611     #
13612     # So, disable kerberosV support if libkrb4 can't be found.
13613     # This is not the best solution, but it makes the compile not fail.
13614     #
13615
13616   ac_save_CPPFLAGS="$CPPFLAGS"
13617   ac_save_LDFLAGS="$LDFLAGS"
13618 #  ac_save_LIBS="$LIBS"
13619
13620   if test \! -z "$includedir" ; then
13621     CPPFLAGS="$CPPFLAGS -I$includedir"
13622   fi
13623   # note: $X_CFLAGS includes $x_includes
13624   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13625
13626   if test \! -z "$libdir" ; then
13627     LDFLAGS="$LDFLAGS -L$libdir"
13628   fi
13629   # note: $X_LIBS includes $x_libraries
13630   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13631
13632   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13633   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13634   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13635 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13636 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   ac_check_lib_save_LIBS=$LIBS
13640 LIBS="-lkrb4  $LIBS"
13641 cat >conftest.$ac_ext <<_ACEOF
13642 /* confdefs.h.  */
13643 _ACEOF
13644 cat confdefs.h >>conftest.$ac_ext
13645 cat >>conftest.$ac_ext <<_ACEOF
13646 /* end confdefs.h.  */
13647
13648 /* Override any GCC internal prototype to avoid an error.
13649    Use char because int might match the return type of a GCC
13650    builtin and then its argument prototype would still apply.  */
13651 #ifdef __cplusplus
13652 extern "C"
13653 #endif
13654 char krb_get_tf_realm ();
13655 int
13656 main ()
13657 {
13658 return krb_get_tf_realm ();
13659   ;
13660   return 0;
13661 }
13662 _ACEOF
13663 rm -f conftest.$ac_objext conftest$ac_exeext
13664 if { (ac_try="$ac_link"
13665 case "(($ac_try" in
13666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13667   *) ac_try_echo=$ac_try;;
13668 esac
13669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13670   (eval "$ac_link") 2>conftest.er1
13671   ac_status=$?
13672   grep -v '^ *+' conftest.er1 >conftest.err
13673   rm -f conftest.er1
13674   cat conftest.err >&5
13675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13676   (exit $ac_status); } && {
13677          test -z "$ac_c_werror_flag" ||
13678          test ! -s conftest.err
13679        } && test -s conftest$ac_exeext &&
13680        $as_test_x conftest$ac_exeext; then
13681   ac_cv_lib_krb4_krb_get_tf_realm=yes
13682 else
13683   echo "$as_me: failed program was:" >&5
13684 sed 's/^/| /' conftest.$ac_ext >&5
13685
13686         ac_cv_lib_krb4_krb_get_tf_realm=no
13687 fi
13688
13689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13690       conftest$ac_exeext conftest.$ac_ext
13691 LIBS=$ac_check_lib_save_LIBS
13692 fi
13693 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13694 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13695 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13696   have_kerberos=yes
13697 else
13698   have_kerberos=no
13699 fi
13700
13701   CPPFLAGS="$ac_save_CPPFLAGS"
13702   LDFLAGS="$ac_save_LDFLAGS"
13703 #  LIBS="$ac_save_LIBS"
13704
13705     if test "$have_kerberos" = yes ; then
13706       have_kerberos5=yes
13707       cat >>confdefs.h <<\_ACEOF
13708 #define HAVE_KERBEROS 1
13709 _ACEOF
13710
13711       cat >>confdefs.h <<\_ACEOF
13712 #define HAVE_KERBEROS5 1
13713 _ACEOF
13714
13715     else
13716       have_kerberos5=no
13717       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13718 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13719     fi
13720
13721   fi
13722
13723   if test "$have_kerberos5" = yes ; then
13724     # from Matt Knopp <mhat@infocalypse.netlag.com>
13725     # (who got it from amu@mit.edu)
13726
13727     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13728
13729     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13730
13731   ac_save_CPPFLAGS="$CPPFLAGS"
13732   ac_save_LDFLAGS="$LDFLAGS"
13733 #  ac_save_LIBS="$LIBS"
13734
13735   if test \! -z "$includedir" ; then
13736     CPPFLAGS="$CPPFLAGS -I$includedir"
13737   fi
13738   # note: $X_CFLAGS includes $x_includes
13739   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13740
13741   if test \! -z "$libdir" ; then
13742     LDFLAGS="$LDFLAGS -L$libdir"
13743   fi
13744   # note: $X_LIBS includes $x_libraries
13745   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13746
13747   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13748   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13749   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13750 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13751 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13752   echo $ECHO_N "(cached) $ECHO_C" >&6
13753 else
13754   ac_check_lib_save_LIBS=$LIBS
13755 LIBS="-lcrypt  $LIBS"
13756 cat >conftest.$ac_ext <<_ACEOF
13757 /* confdefs.h.  */
13758 _ACEOF
13759 cat confdefs.h >>conftest.$ac_ext
13760 cat >>conftest.$ac_ext <<_ACEOF
13761 /* end confdefs.h.  */
13762
13763 /* Override any GCC internal prototype to avoid an error.
13764    Use char because int might match the return type of a GCC
13765    builtin and then its argument prototype would still apply.  */
13766 #ifdef __cplusplus
13767 extern "C"
13768 #endif
13769 char crypt ();
13770 int
13771 main ()
13772 {
13773 return crypt ();
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 rm -f conftest.$ac_objext conftest$ac_exeext
13779 if { (ac_try="$ac_link"
13780 case "(($ac_try" in
13781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13782   *) ac_try_echo=$ac_try;;
13783 esac
13784 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13785   (eval "$ac_link") 2>conftest.er1
13786   ac_status=$?
13787   grep -v '^ *+' conftest.er1 >conftest.err
13788   rm -f conftest.er1
13789   cat conftest.err >&5
13790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13791   (exit $ac_status); } && {
13792          test -z "$ac_c_werror_flag" ||
13793          test ! -s conftest.err
13794        } && test -s conftest$ac_exeext &&
13795        $as_test_x conftest$ac_exeext; then
13796   ac_cv_lib_crypt_crypt=yes
13797 else
13798   echo "$as_me: failed program was:" >&5
13799 sed 's/^/| /' conftest.$ac_ext >&5
13800
13801         ac_cv_lib_crypt_crypt=no
13802 fi
13803
13804 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13805       conftest$ac_exeext conftest.$ac_ext
13806 LIBS=$ac_check_lib_save_LIBS
13807 fi
13808 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13809 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13810 if test $ac_cv_lib_crypt_crypt = yes; then
13811   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13812 fi
13813
13814   CPPFLAGS="$ac_save_CPPFLAGS"
13815   LDFLAGS="$ac_save_LDFLAGS"
13816 #  LIBS="$ac_save_LIBS"
13817
13818
13819   elif test "$have_kerberos" = yes ; then
13820     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13821     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13822   fi
13823
13824   if test "$have_kerberos" = yes ; then
13825     { echo "$as_me:$LINENO: checking for res_search" >&5
13826 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13827 if test "${ac_cv_func_res_search+set}" = set; then
13828   echo $ECHO_N "(cached) $ECHO_C" >&6
13829 else
13830   cat >conftest.$ac_ext <<_ACEOF
13831 /* confdefs.h.  */
13832 _ACEOF
13833 cat confdefs.h >>conftest.$ac_ext
13834 cat >>conftest.$ac_ext <<_ACEOF
13835 /* end confdefs.h.  */
13836 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13837    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13838 #define res_search innocuous_res_search
13839
13840 /* System header to define __stub macros and hopefully few prototypes,
13841     which can conflict with char res_search (); below.
13842     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13843     <limits.h> exists even on freestanding compilers.  */
13844
13845 #ifdef __STDC__
13846 # include <limits.h>
13847 #else
13848 # include <assert.h>
13849 #endif
13850
13851 #undef res_search
13852
13853 /* Override any GCC internal prototype to avoid an error.
13854    Use char because int might match the return type of a GCC
13855    builtin and then its argument prototype would still apply.  */
13856 #ifdef __cplusplus
13857 extern "C"
13858 #endif
13859 char res_search ();
13860 /* The GNU C library defines this for functions which it implements
13861     to always fail with ENOSYS.  Some functions are actually named
13862     something starting with __ and the normal name is an alias.  */
13863 #if defined __stub_res_search || defined __stub___res_search
13864 choke me
13865 #endif
13866
13867 int
13868 main ()
13869 {
13870 return res_search ();
13871   ;
13872   return 0;
13873 }
13874 _ACEOF
13875 rm -f conftest.$ac_objext conftest$ac_exeext
13876 if { (ac_try="$ac_link"
13877 case "(($ac_try" in
13878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13879   *) ac_try_echo=$ac_try;;
13880 esac
13881 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13882   (eval "$ac_link") 2>conftest.er1
13883   ac_status=$?
13884   grep -v '^ *+' conftest.er1 >conftest.err
13885   rm -f conftest.er1
13886   cat conftest.err >&5
13887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888   (exit $ac_status); } && {
13889          test -z "$ac_c_werror_flag" ||
13890          test ! -s conftest.err
13891        } && test -s conftest$ac_exeext &&
13892        $as_test_x conftest$ac_exeext; then
13893   ac_cv_func_res_search=yes
13894 else
13895   echo "$as_me: failed program was:" >&5
13896 sed 's/^/| /' conftest.$ac_ext >&5
13897
13898         ac_cv_func_res_search=no
13899 fi
13900
13901 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13902       conftest$ac_exeext conftest.$ac_ext
13903 fi
13904 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13905 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13906 if test $ac_cv_func_res_search = yes; then
13907   :
13908 else
13909   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13910 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13911 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13912   echo $ECHO_N "(cached) $ECHO_C" >&6
13913 else
13914   ac_check_lib_save_LIBS=$LIBS
13915 LIBS="-lresolv  $LIBS"
13916 cat >conftest.$ac_ext <<_ACEOF
13917 /* confdefs.h.  */
13918 _ACEOF
13919 cat confdefs.h >>conftest.$ac_ext
13920 cat >>conftest.$ac_ext <<_ACEOF
13921 /* end confdefs.h.  */
13922
13923 /* Override any GCC internal prototype to avoid an error.
13924    Use char because int might match the return type of a GCC
13925    builtin and then its argument prototype would still apply.  */
13926 #ifdef __cplusplus
13927 extern "C"
13928 #endif
13929 char res_search ();
13930 int
13931 main ()
13932 {
13933 return res_search ();
13934   ;
13935   return 0;
13936 }
13937 _ACEOF
13938 rm -f conftest.$ac_objext conftest$ac_exeext
13939 if { (ac_try="$ac_link"
13940 case "(($ac_try" in
13941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13942   *) ac_try_echo=$ac_try;;
13943 esac
13944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13945   (eval "$ac_link") 2>conftest.er1
13946   ac_status=$?
13947   grep -v '^ *+' conftest.er1 >conftest.err
13948   rm -f conftest.er1
13949   cat conftest.err >&5
13950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951   (exit $ac_status); } && {
13952          test -z "$ac_c_werror_flag" ||
13953          test ! -s conftest.err
13954        } && test -s conftest$ac_exeext &&
13955        $as_test_x conftest$ac_exeext; then
13956   ac_cv_lib_resolv_res_search=yes
13957 else
13958   echo "$as_me: failed program was:" >&5
13959 sed 's/^/| /' conftest.$ac_ext >&5
13960
13961         ac_cv_lib_resolv_res_search=no
13962 fi
13963
13964 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13965       conftest$ac_exeext conftest.$ac_ext
13966 LIBS=$ac_check_lib_save_LIBS
13967 fi
13968 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13969 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13970 if test $ac_cv_lib_resolv_res_search = yes; then
13971   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13972 else
13973   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13974 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13975
13976 fi
13977
13978 fi
13979
13980   fi
13981 fi
13982
13983
13984 ###############################################################################
13985 #
13986 #       Check for the nine billion variants of shadow passwords...
13987 #
13988 ###############################################################################
13989
13990 need_setuid=no
13991
13992 have_shadow=no
13993 with_shadow_req=unspecified
13994
13995
13996 # Check whether --with-shadow was given.
13997 if test "${with_shadow+set}" = set; then
13998   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13999 else
14000   with_shadow=yes
14001 fi
14002
14003
14004
14005    case "$with_shadow" in
14006     yes) ;;
14007     no)  ;;
14008
14009     /*)
14010      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14011 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14012      d=$with_shadow/include
14013      if test -d $d; then
14014        X_CFLAGS="-I$d $X_CFLAGS"
14015        { echo "$as_me:$LINENO: result: $d" >&5
14016 echo "${ECHO_T}$d" >&6; }
14017      else
14018        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14019 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14020      fi
14021
14022      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14023 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14024      d=$with_shadow/lib
14025      if test -d $d; then
14026        X_LIBS="-L$d $X_LIBS"
14027        { echo "$as_me:$LINENO: result: $d" >&5
14028 echo "${ECHO_T}$d" >&6; }
14029      else
14030        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14031 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14032      fi
14033
14034      # replace the directory string with "yes".
14035      with_shadow_req="yes"
14036      with_shadow=$with_shadow_req
14037      ;;
14038
14039     *)
14040      echo ""
14041      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14042      echo "       If it is a directory, then \`DIR/include' will be added to"
14043      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14044      exit 1
14045      ;;
14046    esac
14047
14048
14049 if test "$enable_locking" = no ; then
14050   with_shadow_req=no
14051   with_shadow=no
14052 fi
14053
14054
14055 ###############################################################################
14056 #
14057 #       Check for Sun "adjunct" passwords.
14058 #
14059 ###############################################################################
14060
14061 if test "$with_shadow" = yes ; then
14062   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14063 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14064 if test "${ac_cv_sun_adjunct+set}" = set; then
14065   echo $ECHO_N "(cached) $ECHO_C" >&6
14066 else
14067
14068   ac_save_CPPFLAGS="$CPPFLAGS"
14069   if test \! -z "$includedir" ; then
14070     CPPFLAGS="$CPPFLAGS -I$includedir"
14071   fi
14072   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14073   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14074   cat >conftest.$ac_ext <<_ACEOF
14075 /* confdefs.h.  */
14076 _ACEOF
14077 cat confdefs.h >>conftest.$ac_ext
14078 cat >>conftest.$ac_ext <<_ACEOF
14079 /* end confdefs.h.  */
14080 #include <stdlib.h>
14081                                     #include <unistd.h>
14082                                     #include <sys/types.h>
14083                                     #include <sys/label.h>
14084                                     #include <sys/audit.h>
14085                                     #include <pwdadj.h>
14086 int
14087 main ()
14088 {
14089 struct passwd_adjunct *p = getpwanam("nobody");
14090                        const char *pw = p->pwa_passwd;
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 rm -f conftest.$ac_objext
14096 if { (ac_try="$ac_compile"
14097 case "(($ac_try" in
14098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099   *) ac_try_echo=$ac_try;;
14100 esac
14101 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14102   (eval "$ac_compile") 2>conftest.er1
14103   ac_status=$?
14104   grep -v '^ *+' conftest.er1 >conftest.err
14105   rm -f conftest.er1
14106   cat conftest.err >&5
14107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108   (exit $ac_status); } && {
14109          test -z "$ac_c_werror_flag" ||
14110          test ! -s conftest.err
14111        } && test -s conftest.$ac_objext; then
14112   ac_cv_sun_adjunct=yes
14113 else
14114   echo "$as_me: failed program was:" >&5
14115 sed 's/^/| /' conftest.$ac_ext >&5
14116
14117         ac_cv_sun_adjunct=no
14118 fi
14119
14120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14121   CPPFLAGS="$ac_save_CPPFLAGS"
14122 fi
14123 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14124 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14125   if test "$ac_cv_sun_adjunct" = yes; then
14126     have_shadow_adjunct=yes
14127     have_shadow=yes
14128     need_setuid=yes
14129   fi
14130 fi
14131
14132
14133 ###############################################################################
14134 #
14135 #       Check for DEC and SCO so-called "enhanced" security.
14136 #
14137 ###############################################################################
14138
14139 if test "$with_shadow" = yes ; then
14140   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14141 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14142 if test "${ac_cv_enhanced_passwd+set}" = set; then
14143   echo $ECHO_N "(cached) $ECHO_C" >&6
14144 else
14145
14146   ac_save_CPPFLAGS="$CPPFLAGS"
14147   if test \! -z "$includedir" ; then
14148     CPPFLAGS="$CPPFLAGS -I$includedir"
14149   fi
14150   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14151   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14152   cat >conftest.$ac_ext <<_ACEOF
14153 /* confdefs.h.  */
14154 _ACEOF
14155 cat confdefs.h >>conftest.$ac_ext
14156 cat >>conftest.$ac_ext <<_ACEOF
14157 /* end confdefs.h.  */
14158 #include <stdlib.h>
14159                                     #include <unistd.h>
14160                                     #include <sys/types.h>
14161                                     #include <pwd.h>
14162                                     #include <sys/security.h>
14163                                     #include <prot.h>
14164 int
14165 main ()
14166 {
14167 struct pr_passwd *p;
14168                        const char *pw;
14169                        set_auth_parameters(0, 0);
14170                        check_auth_parameters();
14171                        p = getprpwnam("nobody");
14172                        pw = p->ufld.fd_encrypt;
14173   ;
14174   return 0;
14175 }
14176 _ACEOF
14177 rm -f conftest.$ac_objext
14178 if { (ac_try="$ac_compile"
14179 case "(($ac_try" in
14180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14181   *) ac_try_echo=$ac_try;;
14182 esac
14183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14184   (eval "$ac_compile") 2>conftest.er1
14185   ac_status=$?
14186   grep -v '^ *+' conftest.er1 >conftest.err
14187   rm -f conftest.er1
14188   cat conftest.err >&5
14189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14190   (exit $ac_status); } && {
14191          test -z "$ac_c_werror_flag" ||
14192          test ! -s conftest.err
14193        } && test -s conftest.$ac_objext; then
14194   ac_cv_enhanced_passwd=yes
14195 else
14196   echo "$as_me: failed program was:" >&5
14197 sed 's/^/| /' conftest.$ac_ext >&5
14198
14199         ac_cv_enhanced_passwd=no
14200 fi
14201
14202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14203   CPPFLAGS="$ac_save_CPPFLAGS"
14204 fi
14205 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14206 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14207   if test $ac_cv_enhanced_passwd = yes; then
14208     have_shadow_enhanced=yes
14209     have_shadow=yes
14210     need_setuid=yes
14211
14212     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14213     # (I'm told it needs -lcurses too, but I don't understand why.)
14214     # But on DEC, it's in -lsecurity.
14215     #
14216     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14217 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14218 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14219   echo $ECHO_N "(cached) $ECHO_C" >&6
14220 else
14221   ac_check_lib_save_LIBS=$LIBS
14222 LIBS="-lprot -lx $LIBS"
14223 cat >conftest.$ac_ext <<_ACEOF
14224 /* confdefs.h.  */
14225 _ACEOF
14226 cat confdefs.h >>conftest.$ac_ext
14227 cat >>conftest.$ac_ext <<_ACEOF
14228 /* end confdefs.h.  */
14229
14230 /* Override any GCC internal prototype to avoid an error.
14231    Use char because int might match the return type of a GCC
14232    builtin and then its argument prototype would still apply.  */
14233 #ifdef __cplusplus
14234 extern "C"
14235 #endif
14236 char getprpwnam ();
14237 int
14238 main ()
14239 {
14240 return getprpwnam ();
14241   ;
14242   return 0;
14243 }
14244 _ACEOF
14245 rm -f conftest.$ac_objext conftest$ac_exeext
14246 if { (ac_try="$ac_link"
14247 case "(($ac_try" in
14248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14249   *) ac_try_echo=$ac_try;;
14250 esac
14251 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14252   (eval "$ac_link") 2>conftest.er1
14253   ac_status=$?
14254   grep -v '^ *+' conftest.er1 >conftest.err
14255   rm -f conftest.er1
14256   cat conftest.err >&5
14257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14258   (exit $ac_status); } && {
14259          test -z "$ac_c_werror_flag" ||
14260          test ! -s conftest.err
14261        } && test -s conftest$ac_exeext &&
14262        $as_test_x conftest$ac_exeext; then
14263   ac_cv_lib_prot_getprpwnam=yes
14264 else
14265   echo "$as_me: failed program was:" >&5
14266 sed 's/^/| /' conftest.$ac_ext >&5
14267
14268         ac_cv_lib_prot_getprpwnam=no
14269 fi
14270
14271 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14272       conftest$ac_exeext conftest.$ac_ext
14273 LIBS=$ac_check_lib_save_LIBS
14274 fi
14275 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14276 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14277 if test $ac_cv_lib_prot_getprpwnam = yes; then
14278   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14279 else
14280   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14281 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14282 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14283   echo $ECHO_N "(cached) $ECHO_C" >&6
14284 else
14285   ac_check_lib_save_LIBS=$LIBS
14286 LIBS="-lsecurity  $LIBS"
14287 cat >conftest.$ac_ext <<_ACEOF
14288 /* confdefs.h.  */
14289 _ACEOF
14290 cat confdefs.h >>conftest.$ac_ext
14291 cat >>conftest.$ac_ext <<_ACEOF
14292 /* end confdefs.h.  */
14293
14294 /* Override any GCC internal prototype to avoid an error.
14295    Use char because int might match the return type of a GCC
14296    builtin and then its argument prototype would still apply.  */
14297 #ifdef __cplusplus
14298 extern "C"
14299 #endif
14300 char getprpwnam ();
14301 int
14302 main ()
14303 {
14304 return getprpwnam ();
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f conftest.$ac_objext conftest$ac_exeext
14310 if { (ac_try="$ac_link"
14311 case "(($ac_try" in
14312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14313   *) ac_try_echo=$ac_try;;
14314 esac
14315 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14316   (eval "$ac_link") 2>conftest.er1
14317   ac_status=$?
14318   grep -v '^ *+' conftest.er1 >conftest.err
14319   rm -f conftest.er1
14320   cat conftest.err >&5
14321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322   (exit $ac_status); } && {
14323          test -z "$ac_c_werror_flag" ||
14324          test ! -s conftest.err
14325        } && test -s conftest$ac_exeext &&
14326        $as_test_x conftest$ac_exeext; then
14327   ac_cv_lib_security_getprpwnam=yes
14328 else
14329   echo "$as_me: failed program was:" >&5
14330 sed 's/^/| /' conftest.$ac_ext >&5
14331
14332         ac_cv_lib_security_getprpwnam=no
14333 fi
14334
14335 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14336       conftest$ac_exeext conftest.$ac_ext
14337 LIBS=$ac_check_lib_save_LIBS
14338 fi
14339 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14340 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14341 if test $ac_cv_lib_security_getprpwnam = yes; then
14342   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14343 fi
14344
14345 fi
14346
14347   fi
14348 fi
14349
14350 ###############################################################################
14351 #
14352 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14353 #
14354 ###############################################################################
14355
14356 if test "$with_shadow" = yes ; then
14357   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14358 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14359 if test "${ac_cv_hpux_passwd+set}" = set; then
14360   echo $ECHO_N "(cached) $ECHO_C" >&6
14361 else
14362
14363   ac_save_CPPFLAGS="$CPPFLAGS"
14364   if test \! -z "$includedir" ; then
14365     CPPFLAGS="$CPPFLAGS -I$includedir"
14366   fi
14367   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14368   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14369   cat >conftest.$ac_ext <<_ACEOF
14370 /* confdefs.h.  */
14371 _ACEOF
14372 cat confdefs.h >>conftest.$ac_ext
14373 cat >>conftest.$ac_ext <<_ACEOF
14374 /* end confdefs.h.  */
14375 #include <stdlib.h>
14376                                     #include <unistd.h>
14377                                     #include <sys/types.h>
14378                                     #include <pwd.h>
14379                                     #include <hpsecurity.h>
14380                                     #include <prot.h>
14381 int
14382 main ()
14383 {
14384 struct s_passwd *p = getspwnam("nobody");
14385                        const char *pw = p->pw_passwd;
14386   ;
14387   return 0;
14388 }
14389 _ACEOF
14390 rm -f conftest.$ac_objext
14391 if { (ac_try="$ac_compile"
14392 case "(($ac_try" in
14393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14394   *) ac_try_echo=$ac_try;;
14395 esac
14396 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14397   (eval "$ac_compile") 2>conftest.er1
14398   ac_status=$?
14399   grep -v '^ *+' conftest.er1 >conftest.err
14400   rm -f conftest.er1
14401   cat conftest.err >&5
14402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14403   (exit $ac_status); } && {
14404          test -z "$ac_c_werror_flag" ||
14405          test ! -s conftest.err
14406        } && test -s conftest.$ac_objext; then
14407   ac_cv_hpux_passwd=yes
14408 else
14409   echo "$as_me: failed program was:" >&5
14410 sed 's/^/| /' conftest.$ac_ext >&5
14411
14412         ac_cv_hpux_passwd=no
14413 fi
14414
14415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14416   CPPFLAGS="$ac_save_CPPFLAGS"
14417 fi
14418 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14419 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14420   if test "$ac_cv_hpux_passwd" = yes; then
14421     have_shadow_hpux=yes
14422     have_shadow=yes
14423     need_setuid=yes
14424
14425     # on HPUX, bigcrypt is in -lsec
14426     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14427 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14428 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14429   echo $ECHO_N "(cached) $ECHO_C" >&6
14430 else
14431   ac_check_lib_save_LIBS=$LIBS
14432 LIBS="-lsec  $LIBS"
14433 cat >conftest.$ac_ext <<_ACEOF
14434 /* confdefs.h.  */
14435 _ACEOF
14436 cat confdefs.h >>conftest.$ac_ext
14437 cat >>conftest.$ac_ext <<_ACEOF
14438 /* end confdefs.h.  */
14439
14440 /* Override any GCC internal prototype to avoid an error.
14441    Use char because int might match the return type of a GCC
14442    builtin and then its argument prototype would still apply.  */
14443 #ifdef __cplusplus
14444 extern "C"
14445 #endif
14446 char bigcrypt ();
14447 int
14448 main ()
14449 {
14450 return bigcrypt ();
14451   ;
14452   return 0;
14453 }
14454 _ACEOF
14455 rm -f conftest.$ac_objext conftest$ac_exeext
14456 if { (ac_try="$ac_link"
14457 case "(($ac_try" in
14458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14459   *) ac_try_echo=$ac_try;;
14460 esac
14461 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14462   (eval "$ac_link") 2>conftest.er1
14463   ac_status=$?
14464   grep -v '^ *+' conftest.er1 >conftest.err
14465   rm -f conftest.er1
14466   cat conftest.err >&5
14467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468   (exit $ac_status); } && {
14469          test -z "$ac_c_werror_flag" ||
14470          test ! -s conftest.err
14471        } && test -s conftest$ac_exeext &&
14472        $as_test_x conftest$ac_exeext; then
14473   ac_cv_lib_sec_bigcrypt=yes
14474 else
14475   echo "$as_me: failed program was:" >&5
14476 sed 's/^/| /' conftest.$ac_ext >&5
14477
14478         ac_cv_lib_sec_bigcrypt=no
14479 fi
14480
14481 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14482       conftest$ac_exeext conftest.$ac_ext
14483 LIBS=$ac_check_lib_save_LIBS
14484 fi
14485 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14486 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14487 if test $ac_cv_lib_sec_bigcrypt = yes; then
14488   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14489 fi
14490
14491   fi
14492 fi
14493
14494
14495 ###############################################################################
14496 #
14497 #       Check for FreeBSD-style shadow passwords.
14498 #
14499 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14500 #       password systems -- except you only get stuff in the pw_passwd field
14501 #       if the running program is setuid.  So, guess that we've got this
14502 #       lossage to contend with if /etc/master.passwd exists, and default to
14503 #       a setuid installation.
14504 #
14505 ###############################################################################
14506
14507 if test "$with_shadow" = yes ; then
14508   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14509 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14510 if test "${ac_cv_master_passwd+set}" = set; then
14511   echo $ECHO_N "(cached) $ECHO_C" >&6
14512 else
14513   if test -f /etc/master.passwd ; then
14514                     ac_cv_master_passwd=yes
14515                   else
14516                     ac_cv_master_passwd=no
14517                   fi
14518 fi
14519 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14520 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14521   if test "$ac_cv_master_passwd" = yes; then
14522     need_setuid=yes
14523   fi
14524 fi
14525
14526
14527 ###############################################################################
14528 #
14529 #       Check for traditional (ha!) shadow passwords.
14530 #
14531 ###############################################################################
14532
14533 if test "$with_shadow" = yes ; then
14534   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14535 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14536 if test "${ac_cv_shadow+set}" = set; then
14537   echo $ECHO_N "(cached) $ECHO_C" >&6
14538 else
14539
14540   ac_save_CPPFLAGS="$CPPFLAGS"
14541   if test \! -z "$includedir" ; then
14542     CPPFLAGS="$CPPFLAGS -I$includedir"
14543   fi
14544   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14545   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14546   cat >conftest.$ac_ext <<_ACEOF
14547 /* confdefs.h.  */
14548 _ACEOF
14549 cat confdefs.h >>conftest.$ac_ext
14550 cat >>conftest.$ac_ext <<_ACEOF
14551 /* end confdefs.h.  */
14552 #include <stdlib.h>
14553                                     #include <unistd.h>
14554                                     #include <sys/types.h>
14555                                     #include <pwd.h>
14556                                     #include <shadow.h>
14557 int
14558 main ()
14559 {
14560 struct spwd *p = getspnam("nobody");
14561                        const char *pw = p->sp_pwdp;
14562   ;
14563   return 0;
14564 }
14565 _ACEOF
14566 rm -f conftest.$ac_objext
14567 if { (ac_try="$ac_compile"
14568 case "(($ac_try" in
14569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14570   *) ac_try_echo=$ac_try;;
14571 esac
14572 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14573   (eval "$ac_compile") 2>conftest.er1
14574   ac_status=$?
14575   grep -v '^ *+' conftest.er1 >conftest.err
14576   rm -f conftest.er1
14577   cat conftest.err >&5
14578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14579   (exit $ac_status); } && {
14580          test -z "$ac_c_werror_flag" ||
14581          test ! -s conftest.err
14582        } && test -s conftest.$ac_objext; then
14583   ac_cv_shadow=yes
14584 else
14585   echo "$as_me: failed program was:" >&5
14586 sed 's/^/| /' conftest.$ac_ext >&5
14587
14588         ac_cv_shadow=no
14589 fi
14590
14591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14592   CPPFLAGS="$ac_save_CPPFLAGS"
14593 fi
14594 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14595 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14596   if test "$ac_cv_shadow" = yes; then
14597     have_shadow=yes
14598     need_setuid=yes
14599
14600     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14601     have_getspnam=no
14602     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14603 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14604 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14605   echo $ECHO_N "(cached) $ECHO_C" >&6
14606 else
14607   ac_check_lib_save_LIBS=$LIBS
14608 LIBS="-lc  $LIBS"
14609 cat >conftest.$ac_ext <<_ACEOF
14610 /* confdefs.h.  */
14611 _ACEOF
14612 cat confdefs.h >>conftest.$ac_ext
14613 cat >>conftest.$ac_ext <<_ACEOF
14614 /* end confdefs.h.  */
14615
14616 /* Override any GCC internal prototype to avoid an error.
14617    Use char because int might match the return type of a GCC
14618    builtin and then its argument prototype would still apply.  */
14619 #ifdef __cplusplus
14620 extern "C"
14621 #endif
14622 char getspnam ();
14623 int
14624 main ()
14625 {
14626 return getspnam ();
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 rm -f conftest.$ac_objext conftest$ac_exeext
14632 if { (ac_try="$ac_link"
14633 case "(($ac_try" in
14634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14635   *) ac_try_echo=$ac_try;;
14636 esac
14637 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14638   (eval "$ac_link") 2>conftest.er1
14639   ac_status=$?
14640   grep -v '^ *+' conftest.er1 >conftest.err
14641   rm -f conftest.er1
14642   cat conftest.err >&5
14643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644   (exit $ac_status); } && {
14645          test -z "$ac_c_werror_flag" ||
14646          test ! -s conftest.err
14647        } && test -s conftest$ac_exeext &&
14648        $as_test_x conftest$ac_exeext; then
14649   ac_cv_lib_c_getspnam=yes
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 sed 's/^/| /' conftest.$ac_ext >&5
14653
14654         ac_cv_lib_c_getspnam=no
14655 fi
14656
14657 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14658       conftest$ac_exeext conftest.$ac_ext
14659 LIBS=$ac_check_lib_save_LIBS
14660 fi
14661 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14662 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14663 if test $ac_cv_lib_c_getspnam = yes; then
14664   have_getspnam=yes
14665 fi
14666
14667     if test "$have_getspnam" = no ; then
14668       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14669 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14670 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14671   echo $ECHO_N "(cached) $ECHO_C" >&6
14672 else
14673   ac_check_lib_save_LIBS=$LIBS
14674 LIBS="-lgen  $LIBS"
14675 cat >conftest.$ac_ext <<_ACEOF
14676 /* confdefs.h.  */
14677 _ACEOF
14678 cat confdefs.h >>conftest.$ac_ext
14679 cat >>conftest.$ac_ext <<_ACEOF
14680 /* end confdefs.h.  */
14681
14682 /* Override any GCC internal prototype to avoid an error.
14683    Use char because int might match the return type of a GCC
14684    builtin and then its argument prototype would still apply.  */
14685 #ifdef __cplusplus
14686 extern "C"
14687 #endif
14688 char getspnam ();
14689 int
14690 main ()
14691 {
14692 return getspnam ();
14693   ;
14694   return 0;
14695 }
14696 _ACEOF
14697 rm -f conftest.$ac_objext conftest$ac_exeext
14698 if { (ac_try="$ac_link"
14699 case "(($ac_try" in
14700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14701   *) ac_try_echo=$ac_try;;
14702 esac
14703 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14704   (eval "$ac_link") 2>conftest.er1
14705   ac_status=$?
14706   grep -v '^ *+' conftest.er1 >conftest.err
14707   rm -f conftest.er1
14708   cat conftest.err >&5
14709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14710   (exit $ac_status); } && {
14711          test -z "$ac_c_werror_flag" ||
14712          test ! -s conftest.err
14713        } && test -s conftest$ac_exeext &&
14714        $as_test_x conftest$ac_exeext; then
14715   ac_cv_lib_gen_getspnam=yes
14716 else
14717   echo "$as_me: failed program was:" >&5
14718 sed 's/^/| /' conftest.$ac_ext >&5
14719
14720         ac_cv_lib_gen_getspnam=no
14721 fi
14722
14723 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14724       conftest$ac_exeext conftest.$ac_ext
14725 LIBS=$ac_check_lib_save_LIBS
14726 fi
14727 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14728 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14729 if test $ac_cv_lib_gen_getspnam = yes; then
14730   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14731 fi
14732
14733     fi
14734   fi
14735 fi
14736
14737
14738 ###############################################################################
14739 #
14740 #       Check for other libraries needed for non-shadow passwords.
14741 #
14742 ###############################################################################
14743
14744 if test "$enable_locking" = yes ; then
14745
14746   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14747   have_crypt=no
14748   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14749 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14750 if test "${ac_cv_lib_c_crypt+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753   ac_check_lib_save_LIBS=$LIBS
14754 LIBS="-lc  $LIBS"
14755 cat >conftest.$ac_ext <<_ACEOF
14756 /* confdefs.h.  */
14757 _ACEOF
14758 cat confdefs.h >>conftest.$ac_ext
14759 cat >>conftest.$ac_ext <<_ACEOF
14760 /* end confdefs.h.  */
14761
14762 /* Override any GCC internal prototype to avoid an error.
14763    Use char because int might match the return type of a GCC
14764    builtin and then its argument prototype would still apply.  */
14765 #ifdef __cplusplus
14766 extern "C"
14767 #endif
14768 char crypt ();
14769 int
14770 main ()
14771 {
14772 return crypt ();
14773   ;
14774   return 0;
14775 }
14776 _ACEOF
14777 rm -f conftest.$ac_objext conftest$ac_exeext
14778 if { (ac_try="$ac_link"
14779 case "(($ac_try" in
14780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14781   *) ac_try_echo=$ac_try;;
14782 esac
14783 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14784   (eval "$ac_link") 2>conftest.er1
14785   ac_status=$?
14786   grep -v '^ *+' conftest.er1 >conftest.err
14787   rm -f conftest.er1
14788   cat conftest.err >&5
14789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14790   (exit $ac_status); } && {
14791          test -z "$ac_c_werror_flag" ||
14792          test ! -s conftest.err
14793        } && test -s conftest$ac_exeext &&
14794        $as_test_x conftest$ac_exeext; then
14795   ac_cv_lib_c_crypt=yes
14796 else
14797   echo "$as_me: failed program was:" >&5
14798 sed 's/^/| /' conftest.$ac_ext >&5
14799
14800         ac_cv_lib_c_crypt=no
14801 fi
14802
14803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14804       conftest$ac_exeext conftest.$ac_ext
14805 LIBS=$ac_check_lib_save_LIBS
14806 fi
14807 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14808 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14809 if test $ac_cv_lib_c_crypt = yes; then
14810   have_crypt=yes
14811 fi
14812
14813   if test "$have_crypt" = no ; then
14814     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14815 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14816 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14817   echo $ECHO_N "(cached) $ECHO_C" >&6
14818 else
14819   ac_check_lib_save_LIBS=$LIBS
14820 LIBS="-lcrypt  $LIBS"
14821 cat >conftest.$ac_ext <<_ACEOF
14822 /* confdefs.h.  */
14823 _ACEOF
14824 cat confdefs.h >>conftest.$ac_ext
14825 cat >>conftest.$ac_ext <<_ACEOF
14826 /* end confdefs.h.  */
14827
14828 /* Override any GCC internal prototype to avoid an error.
14829    Use char because int might match the return type of a GCC
14830    builtin and then its argument prototype would still apply.  */
14831 #ifdef __cplusplus
14832 extern "C"
14833 #endif
14834 char crypt ();
14835 int
14836 main ()
14837 {
14838 return crypt ();
14839   ;
14840   return 0;
14841 }
14842 _ACEOF
14843 rm -f conftest.$ac_objext conftest$ac_exeext
14844 if { (ac_try="$ac_link"
14845 case "(($ac_try" in
14846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14847   *) ac_try_echo=$ac_try;;
14848 esac
14849 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14850   (eval "$ac_link") 2>conftest.er1
14851   ac_status=$?
14852   grep -v '^ *+' conftest.er1 >conftest.err
14853   rm -f conftest.er1
14854   cat conftest.err >&5
14855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856   (exit $ac_status); } && {
14857          test -z "$ac_c_werror_flag" ||
14858          test ! -s conftest.err
14859        } && test -s conftest$ac_exeext &&
14860        $as_test_x conftest$ac_exeext; then
14861   ac_cv_lib_crypt_crypt=yes
14862 else
14863   echo "$as_me: failed program was:" >&5
14864 sed 's/^/| /' conftest.$ac_ext >&5
14865
14866         ac_cv_lib_crypt_crypt=no
14867 fi
14868
14869 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14870       conftest$ac_exeext conftest.$ac_ext
14871 LIBS=$ac_check_lib_save_LIBS
14872 fi
14873 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14874 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14875 if test $ac_cv_lib_crypt_crypt = yes; then
14876   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14877 fi
14878
14879   fi
14880 fi
14881
14882
14883 # Most of the above shadow mechanisms will have set need_setuid to yes,
14884 # if they were found.  But, on some systems, we need setuid even when
14885 # using plain old vanilla passwords.
14886 #
14887 if test "$enable_locking" = yes ; then
14888   case "$host" in
14889     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14890       need_setuid=yes
14891     ;;
14892   esac
14893 fi
14894
14895
14896 if test "$have_shadow_adjunct" = yes ; then
14897   cat >>confdefs.h <<\_ACEOF
14898 #define HAVE_ADJUNCT_PASSWD 1
14899 _ACEOF
14900
14901 elif test "$have_shadow_enhanced" = yes ; then
14902   cat >>confdefs.h <<\_ACEOF
14903 #define HAVE_ENHANCED_PASSWD 1
14904 _ACEOF
14905
14906 elif test "$have_shadow_hpux" = yes ; then
14907   cat >>confdefs.h <<\_ACEOF
14908 #define HAVE_HPUX_PASSWD 1
14909 _ACEOF
14910
14911 elif test "$have_shadow" = yes ; then
14912   cat >>confdefs.h <<\_ACEOF
14913 #define HAVE_SHADOW_PASSWD 1
14914 _ACEOF
14915
14916 fi
14917
14918
14919 ###############################################################################
14920 #
14921 #       Check for external password helper
14922 #       On SuSE, instead of having xscreensaver be a setuid program, they
14923 #       fork an external program that takes the password on stdin, and
14924 #       returns true if that password is a valid one.  Then only that
14925 #       smaller program needs to be setuid.
14926 #
14927 #       (Note that this external program is not a GUI: the GUI is still
14928 #       all in xscreensaver itself; the external program just does auth.)
14929 #
14930 ###############################################################################
14931
14932 have_passwd_helper=no
14933 with_passwd_helper_req=unspecified
14934
14935
14936 # Check whether --with-passwd-helper was given.
14937 if test "${with_passwd_helper+set}" = set; then
14938   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14939 else
14940   with_passwd_helper=no
14941 fi
14942
14943 # no HANDLE_X_PATH_ARG for this one
14944
14945 if test "$enable_locking" = no ; then
14946   with_passwd_helper_req=no
14947   with_passwd_helper=no
14948 fi
14949
14950 case "$with_passwd_helper" in
14951   ""|no) : ;;
14952   /*)
14953     cat >>confdefs.h <<_ACEOF
14954 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14955 _ACEOF
14956
14957     have_passwd_helper=yes;;
14958   *)
14959     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14960     exit 1
14961 esac
14962
14963
14964 ###############################################################################
14965 #
14966 #       Check for a login manager for a "New Login" button on the lock dialog.
14967 #       Usually this will be "/usr/bin/gdmflexiserver".
14968 #
14969 ###############################################################################
14970
14971 have_login_manager=no
14972 with_login_manager_req=unspecified
14973 default_login_manager='gdmflexiserver -ls'
14974
14975
14976 # Check whether --with-login-manager was given.
14977 if test "${with_login_manager+set}" = set; then
14978   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14979 else
14980   with_login_manager=no
14981 fi
14982
14983 # no HANDLE_X_PATH_ARG for this one
14984
14985 if test "$enable_locking" = no ; then
14986   with_login_manager_req=no
14987   with_login_manager=no
14988 fi
14989
14990 if test -n "$with_login_manager_req" ; then
14991   ac_cv_login_manager_program=""
14992
14993  if test "$with_login_manager_req" = "yes" ; then
14994    with_login_manager_req=$default_login_manager
14995  fi
14996
14997   case "$with_login_manager_req" in
14998     no)
14999       with_login_manager=""
15000     ;;
15001     /*)
15002       # absolute path
15003       set dummy $with_login_manager_req ; login_manager_tmp=$2
15004       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15005 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15006       if test -x "$login_manager_tmp" ; then
15007         { echo "$as_me:$LINENO: result: yes" >&5
15008 echo "${ECHO_T}yes" >&6; }
15009       else
15010         { echo "$as_me:$LINENO: result: no" >&5
15011 echo "${ECHO_T}no" >&6; }
15012         with_login_manager=""
15013       fi
15014     ;;
15015     *)
15016       # relative path
15017       set dummy $with_login_manager_req ; login_manager_tmp=$2
15018       # don't cache
15019       unset ac_cv_path_login_manager_tmp
15020       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15021 set dummy $login_manager_tmp; ac_word=$2
15022 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15024 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15025   echo $ECHO_N "(cached) $ECHO_C" >&6
15026 else
15027   case $login_manager_tmp in
15028   [\\/]* | ?:[\\/]*)
15029   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15030   ;;
15031   *)
15032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15033 for as_dir in $PATH
15034 do
15035   IFS=$as_save_IFS
15036   test -z "$as_dir" && as_dir=.
15037   for ac_exec_ext in '' $ac_executable_extensions; do
15038   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15039     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15040     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15041     break 2
15042   fi
15043 done
15044 done
15045 IFS=$as_save_IFS
15046
15047   ;;
15048 esac
15049 fi
15050 login_manager_tmp=$ac_cv_path_login_manager_tmp
15051 if test -n "$login_manager_tmp"; then
15052   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15053 echo "${ECHO_T}$login_manager_tmp" >&6; }
15054 else
15055   { echo "$as_me:$LINENO: result: no" >&5
15056 echo "${ECHO_T}no" >&6; }
15057 fi
15058
15059
15060       if test -z "$login_manager_tmp" ; then
15061         with_login_manager=""
15062       else
15063         with_login_manager="$login_manager_tmp"
15064       fi
15065     ;;
15066   esac
15067   ac_cv_login_manager_program="$with_login_manager"
15068
15069 elif test -n "$ac_cv_login_manager_program"; then
15070   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15071 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15072 fi
15073
15074 NEW_LOGIN_COMMAND_P=''
15075 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15076
15077 if test -z "$NEW_LOGIN_COMMAND" ; then
15078   NEW_LOGIN_COMMAND="$default_login_manager"
15079   NEW_LOGIN_COMMAND_P='! '
15080 fi
15081
15082
15083
15084 ###############################################################################
15085 #
15086 #       Check for -lgtk (and Gnome stuff)
15087 #
15088 ###############################################################################
15089
15090 have_gtk=no
15091 with_gtk_req=unspecified
15092
15093 # Check whether --with-gtk was given.
15094 if test "${with_gtk+set}" = set; then
15095   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15096 else
15097   with_gtk=yes
15098 fi
15099
15100
15101 # if --with-gtk=/directory/ was specified, remember that directory so that
15102 # we can also look for the `gtk-config' program in that directory.
15103 case "$with_gtk" in
15104   /*)
15105     gtk_dir="$with_gtk"
15106     ;;
15107   *)
15108     gtk_dir=""
15109     ;;
15110 esac
15111
15112
15113    case "$with_gtk" in
15114     yes) ;;
15115     no)  ;;
15116
15117     /*)
15118      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15119 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15120      d=$with_gtk/include
15121      if test -d $d; then
15122        X_CFLAGS="-I$d $X_CFLAGS"
15123        { echo "$as_me:$LINENO: result: $d" >&5
15124 echo "${ECHO_T}$d" >&6; }
15125      else
15126        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15127 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15128      fi
15129
15130      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15131 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15132      d=$with_gtk/lib
15133      if test -d $d; then
15134        X_LIBS="-L$d $X_LIBS"
15135        { echo "$as_me:$LINENO: result: $d" >&5
15136 echo "${ECHO_T}$d" >&6; }
15137      else
15138        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15139 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15140      fi
15141
15142      # replace the directory string with "yes".
15143      with_gtk_req="yes"
15144      with_gtk=$with_gtk_req
15145      ;;
15146
15147     *)
15148      echo ""
15149      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15150      echo "       If it is a directory, then \`DIR/include' will be added to"
15151      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15152      exit 1
15153      ;;
15154    esac
15155
15156
15157 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15158   echo "error: must be yes or no: --with-gtk=$with_gtk"
15159   exit 1
15160 fi
15161
15162
15163 parse_gtk_version_string() {
15164   # M4 sucks!!
15165
15166   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15167   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15168
15169   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15170   if test -z "$ac_gtk_version"; then
15171     ac_gtk_version=unknown
15172     ac_gtk_version_string=unknown
15173   fi
15174 }
15175
15176 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15177 # if the user specified --with-gtk=/foo/ then look there.
15178 #
15179 gtk_path="$PATH"
15180 if test ! -z "$gtk_dir"; then
15181   # canonicalize slashes.
15182   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15183   gtk_path="$foo:$gtk_path"
15184 fi
15185
15186 for ac_prog in pkg-config
15187 do
15188   # Extract the first word of "$ac_prog", so it can be a program name with args.
15189 set dummy $ac_prog; ac_word=$2
15190 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15192 if test "${ac_cv_path_pkg_config+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195   case $pkg_config in
15196   [\\/]* | ?:[\\/]*)
15197   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15198   ;;
15199   *)
15200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15201 for as_dir in $gtk_path
15202 do
15203   IFS=$as_save_IFS
15204   test -z "$as_dir" && as_dir=.
15205   for ac_exec_ext in '' $ac_executable_extensions; do
15206   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15207     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15208     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15209     break 2
15210   fi
15211 done
15212 done
15213 IFS=$as_save_IFS
15214
15215   ;;
15216 esac
15217 fi
15218 pkg_config=$ac_cv_path_pkg_config
15219 if test -n "$pkg_config"; then
15220   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15221 echo "${ECHO_T}$pkg_config" >&6; }
15222 else
15223   { echo "$as_me:$LINENO: result: no" >&5
15224 echo "${ECHO_T}no" >&6; }
15225 fi
15226
15227
15228   test -n "$pkg_config" && break
15229 done
15230
15231
15232 if test -z "$pkg_config" ; then
15233   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15234 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15235   pkg_config="false"
15236 fi
15237
15238
15239 # Utility function for running pkg-config-based tests...
15240 #
15241 pkgs=''
15242 pkg_check_version() {
15243   if test "$ok" = yes ; then
15244     req="$1"
15245     min="$2"
15246     { echo "$as_me:$LINENO: checking for $req" >&5
15247 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15248     if $pkg_config --exists "$req" ; then
15249       vers=`$pkg_config --modversion "$req"`
15250       if $pkg_config --exists "$req >= $min" ; then
15251         { echo "$as_me:$LINENO: result: $vers" >&5
15252 echo "${ECHO_T}$vers" >&6; }
15253         pkgs="$pkgs $req"
15254         return 1
15255       else
15256         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15257 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15258         ok=no
15259         return 0
15260       fi
15261     else
15262       { echo "$as_me:$LINENO: result: no" >&5
15263 echo "${ECHO_T}no" >&6; }
15264       ok=no
15265       return 0
15266     fi
15267   fi
15268 }
15269
15270
15271 jurassic_gtk=no
15272 gtk_halfassed=no
15273
15274 #if test "$with_gtk" = yes; then
15275   have_gtk=no
15276
15277   ok="yes"
15278   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15279   pkg_check_version         gmodule-2.0  2.0.0
15280   pkg_check_version          libxml-2.0  2.4.6
15281   pkg_check_version        libglade-2.0  1.99.0
15282   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15283   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15284   have_gtk="$ok"
15285
15286   if test "$have_gtk" = no; then
15287     if test -n "$ac_gtk_version_string" ; then
15288       gtk_halfassed="$ac_gtk_version_string"
15289       gtk_halfassed_lib="$req"
15290     fi
15291   fi
15292
15293   if test "$have_gtk" = yes; then
15294     parse_gtk_version_string
15295     jurassic_gtk=no
15296   fi
15297
15298   if test "$have_gtk" = yes; then
15299     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15300 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15301 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15302   echo $ECHO_N "(cached) $ECHO_C" >&6
15303 else
15304   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15305 fi
15306 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15307 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15308     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15309 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15310 if test "${ac_cv_gtk_config_libs+set}" = set; then
15311   echo $ECHO_N "(cached) $ECHO_C" >&6
15312 else
15313   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15314 fi
15315 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15316 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15317   fi
15318
15319   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15320   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15321
15322   GTK_EXTRA_OBJS=""
15323   GTK_DATADIR=""
15324   if test "$have_gtk" = yes; then
15325     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15326     GTK_DATADIR="$GTK_DATADIR/share"
15327   fi
15328
15329   if test "$have_gtk" = yes; then
15330     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15331     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15332     cat >>confdefs.h <<\_ACEOF
15333 #define HAVE_GTK 1
15334 _ACEOF
15335
15336     cat >>confdefs.h <<\_ACEOF
15337 #define HAVE_GTK2 1
15338 _ACEOF
15339
15340     cat >>confdefs.h <<\_ACEOF
15341 #define HAVE_XML 1
15342 _ACEOF
15343
15344   fi
15345
15346 #fi
15347
15348 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15349 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15350 if test "${ac_cv_dbus_config_cflags+set}" = set; then
15351   echo $ECHO_N "(cached) $ECHO_C" >&6
15352 else
15353   ac_cv_dbus_config_cflags=`$pkg_config --cflags dbus-1`
15354 fi
15355 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_cflags" >&5
15356 echo "${ECHO_T}$ac_cv_dbus_config_cflags" >&6; }
15357 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15358 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15359 if test "${ac_cv_dbus_config_libs+set}" = set; then
15360   echo $ECHO_N "(cached) $ECHO_C" >&6
15361 else
15362   ac_cv_dbus_config_libs=`$pkg_config --libs dbus-1`
15363 fi
15364 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_libs" >&5
15365 echo "${ECHO_T}$ac_cv_dbus_config_libs" >&6; }
15366
15367 ac_dbus_config_cflags=$ac_cv_dbus_config_cflags
15368 ac_dbus_config_libs=$ac_cv_dbus_config_libs
15369
15370 INCLUDES="$INCLUDES $ac_dbus_config_cflags"
15371 DBUS_LIBS="$GTK_LIBS $ac_dbus_config_libs"
15372
15373 { echo "$as_me:$LINENO: checking for OSSO includes" >&5
15374 echo $ECHO_N "checking for OSSO includes... $ECHO_C" >&6; }
15375 if test "${ac_cv_osso_config_cflags+set}" = set; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378   ac_cv_osso_config_cflags=`$pkg_config --cflags libosso`
15379 fi
15380 { echo "$as_me:$LINENO: result: $ac_cv_osso_config_cflags" >&5
15381 echo "${ECHO_T}$ac_cv_osso_config_cflags" >&6; }
15382 { echo "$as_me:$LINENO: checking for OSSO includes" >&5
15383 echo $ECHO_N "checking for OSSO includes... $ECHO_C" >&6; }
15384 if test "${ac_cv_osso_config_libs+set}" = set; then
15385   echo $ECHO_N "(cached) $ECHO_C" >&6
15386 else
15387   ac_cv_osso_config_libs=`$pkg_config --libs libosso`
15388 fi
15389 { echo "$as_me:$LINENO: result: $ac_cv_osso_config_libs" >&5
15390 echo "${ECHO_T}$ac_cv_osso_config_libs" >&6; }
15391
15392 ac_osso_config_cflags=$ac_cv_osso_config_cflags
15393 ac_osso_config_libs=$ac_cv_osso_config_libs
15394
15395 INCLUDES="$INCLUDES $ac_osso_config_cflags"
15396 GTK_LIBS="$GTK_LIBS $ac_osso_config_libs"
15397
15398
15399
15400
15401 # Check for the various Gnome help and URL loading programs.
15402 #
15403 WITH_BROWSER=gnome-open
15404 if test "$have_gtk" = yes; then
15405   for ac_prog in gnome-open
15406 do
15407   # Extract the first word of "$ac_prog", so it can be a program name with args.
15408 set dummy $ac_prog; ac_word=$2
15409 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15411 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15412   echo $ECHO_N "(cached) $ECHO_C" >&6
15413 else
15414   if test -n "$gnome_open_program"; then
15415   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15416 else
15417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15418 for as_dir in $PATH
15419 do
15420   IFS=$as_save_IFS
15421   test -z "$as_dir" && as_dir=.
15422   for ac_exec_ext in '' $ac_executable_extensions; do
15423   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15424     ac_cv_prog_gnome_open_program="$ac_prog"
15425     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15426     break 2
15427   fi
15428 done
15429 done
15430 IFS=$as_save_IFS
15431
15432 fi
15433 fi
15434 gnome_open_program=$ac_cv_prog_gnome_open_program
15435 if test -n "$gnome_open_program"; then
15436   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15437 echo "${ECHO_T}$gnome_open_program" >&6; }
15438 else
15439   { echo "$as_me:$LINENO: result: no" >&5
15440 echo "${ECHO_T}no" >&6; }
15441 fi
15442
15443
15444   test -n "$gnome_open_program" && break
15445 done
15446
15447   for ac_prog in gnome-url-show
15448 do
15449   # Extract the first word of "$ac_prog", so it can be a program name with args.
15450 set dummy $ac_prog; ac_word=$2
15451 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15453 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15454   echo $ECHO_N "(cached) $ECHO_C" >&6
15455 else
15456   if test -n "$gnome_url_show_program"; then
15457   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15458 else
15459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15460 for as_dir in $PATH
15461 do
15462   IFS=$as_save_IFS
15463   test -z "$as_dir" && as_dir=.
15464   for ac_exec_ext in '' $ac_executable_extensions; do
15465   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15466     ac_cv_prog_gnome_url_show_program="$ac_prog"
15467     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15468     break 2
15469   fi
15470 done
15471 done
15472 IFS=$as_save_IFS
15473
15474 fi
15475 fi
15476 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15477 if test -n "$gnome_url_show_program"; then
15478   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15479 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15480 else
15481   { echo "$as_me:$LINENO: result: no" >&5
15482 echo "${ECHO_T}no" >&6; }
15483 fi
15484
15485
15486   test -n "$gnome_url_show_program" && break
15487 done
15488
15489 fi
15490
15491
15492 ###############################################################################
15493 #
15494 #       Check for -lXm.
15495 #
15496 ###############################################################################
15497
15498 have_motif=no
15499 with_motif_req=unspecified
15500
15501 # Check whether --with-motif was given.
15502 if test "${with_motif+set}" = set; then
15503   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15504 else
15505   with_motif=no
15506 fi
15507
15508
15509
15510    case "$with_motif" in
15511     yes) ;;
15512     no)  ;;
15513
15514     /*)
15515      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15516 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15517      d=$with_motif/include
15518      if test -d $d; then
15519        X_CFLAGS="-I$d $X_CFLAGS"
15520        { echo "$as_me:$LINENO: result: $d" >&5
15521 echo "${ECHO_T}$d" >&6; }
15522      else
15523        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15524 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15525      fi
15526
15527      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15528 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15529      d=$with_motif/lib
15530      if test -d $d; then
15531        X_LIBS="-L$d $X_LIBS"
15532        { echo "$as_me:$LINENO: result: $d" >&5
15533 echo "${ECHO_T}$d" >&6; }
15534      else
15535        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15536 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15537      fi
15538
15539      # replace the directory string with "yes".
15540      with_motif_req="yes"
15541      with_motif=$with_motif_req
15542      ;;
15543
15544     *)
15545      echo ""
15546      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15547      echo "       If it is a directory, then \`DIR/include' will be added to"
15548      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15549      exit 1
15550      ;;
15551    esac
15552
15553
15554 if test "$with_motif" != yes -a "$with_motif" != no ; then
15555   echo "error: must be yes or no: --with-motif=$with_motif"
15556   exit 1
15557 fi
15558
15559 if test "$with_motif" = yes; then
15560   have_motif=no
15561
15562   ac_save_CPPFLAGS="$CPPFLAGS"
15563   if test \! -z "$includedir" ; then
15564     CPPFLAGS="$CPPFLAGS -I$includedir"
15565   fi
15566   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15567   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15568   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15569 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15570 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15571   echo $ECHO_N "(cached) $ECHO_C" >&6
15572 else
15573   cat >conftest.$ac_ext <<_ACEOF
15574 /* confdefs.h.  */
15575 _ACEOF
15576 cat confdefs.h >>conftest.$ac_ext
15577 cat >>conftest.$ac_ext <<_ACEOF
15578 /* end confdefs.h.  */
15579 #include <stdlib.h>
15580                      #include <stdio.h>
15581                      #include <X11/Intrinsic.h>
15582
15583 #include <Xm/Xm.h>
15584 _ACEOF
15585 rm -f conftest.$ac_objext
15586 if { (ac_try="$ac_compile"
15587 case "(($ac_try" in
15588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15589   *) ac_try_echo=$ac_try;;
15590 esac
15591 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15592   (eval "$ac_compile") 2>conftest.er1
15593   ac_status=$?
15594   grep -v '^ *+' conftest.er1 >conftest.err
15595   rm -f conftest.er1
15596   cat conftest.err >&5
15597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15598   (exit $ac_status); } && {
15599          test -z "$ac_c_werror_flag" ||
15600          test ! -s conftest.err
15601        } && test -s conftest.$ac_objext; then
15602   ac_cv_header_Xm_Xm_h=yes
15603 else
15604   echo "$as_me: failed program was:" >&5
15605 sed 's/^/| /' conftest.$ac_ext >&5
15606
15607         ac_cv_header_Xm_Xm_h=no
15608 fi
15609
15610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15611 fi
15612 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15613 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15614 if test $ac_cv_header_Xm_Xm_h = yes; then
15615   have_motif=yes
15616                      cat >>confdefs.h <<\_ACEOF
15617 #define HAVE_MOTIF 1
15618 _ACEOF
15619
15620                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15621 fi
15622
15623
15624   CPPFLAGS="$ac_save_CPPFLAGS"
15625 fi
15626
15627
15628 if test "$have_motif" = yes; then
15629
15630   ac_save_CPPFLAGS="$CPPFLAGS"
15631   if test \! -z "$includedir" ; then
15632     CPPFLAGS="$CPPFLAGS -I$includedir"
15633   fi
15634   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15635   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15636   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15637 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15638 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15639   echo $ECHO_N "(cached) $ECHO_C" >&6
15640 else
15641   cat >conftest.$ac_ext <<_ACEOF
15642 /* confdefs.h.  */
15643 _ACEOF
15644 cat confdefs.h >>conftest.$ac_ext
15645 cat >>conftest.$ac_ext <<_ACEOF
15646 /* end confdefs.h.  */
15647 #include <stdlib.h>
15648                      #include <stdio.h>
15649                      #include <X11/Intrinsic.h>
15650
15651 #include <Xm/ComboBox.h>
15652 _ACEOF
15653 rm -f conftest.$ac_objext
15654 if { (ac_try="$ac_compile"
15655 case "(($ac_try" in
15656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15657   *) ac_try_echo=$ac_try;;
15658 esac
15659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15660   (eval "$ac_compile") 2>conftest.er1
15661   ac_status=$?
15662   grep -v '^ *+' conftest.er1 >conftest.err
15663   rm -f conftest.er1
15664   cat conftest.err >&5
15665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15666   (exit $ac_status); } && {
15667          test -z "$ac_c_werror_flag" ||
15668          test ! -s conftest.err
15669        } && test -s conftest.$ac_objext; then
15670   ac_cv_header_Xm_ComboBox_h=yes
15671 else
15672   echo "$as_me: failed program was:" >&5
15673 sed 's/^/| /' conftest.$ac_ext >&5
15674
15675         ac_cv_header_Xm_ComboBox_h=no
15676 fi
15677
15678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15679 fi
15680 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15681 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15682 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15683   cat >>confdefs.h <<\_ACEOF
15684 #define HAVE_XMCOMBOBOX 1
15685 _ACEOF
15686
15687 fi
15688
15689
15690   CPPFLAGS="$ac_save_CPPFLAGS"
15691 fi
15692
15693
15694 ###############################################################################
15695 #
15696 #       Checking whether Motif is really Lesstif.
15697 #
15698 ###############################################################################
15699
15700 have_lesstif=no
15701 if test "$have_motif" = yes ; then
15702   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15703 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15704 if test "${ac_cv_have_lesstif+set}" = set; then
15705   echo $ECHO_N "(cached) $ECHO_C" >&6
15706 else
15707
15708   ac_save_CPPFLAGS="$CPPFLAGS"
15709   if test \! -z "$includedir" ; then
15710     CPPFLAGS="$CPPFLAGS -I$includedir"
15711   fi
15712   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15713   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15714   cat >conftest.$ac_ext <<_ACEOF
15715 /* confdefs.h.  */
15716 _ACEOF
15717 cat confdefs.h >>conftest.$ac_ext
15718 cat >>conftest.$ac_ext <<_ACEOF
15719 /* end confdefs.h.  */
15720 #include <Xm/Xm.h>
15721 int
15722 main ()
15723 {
15724 long vers = LesstifVersion;
15725   ;
15726   return 0;
15727 }
15728 _ACEOF
15729 rm -f conftest.$ac_objext
15730 if { (ac_try="$ac_compile"
15731 case "(($ac_try" in
15732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15733   *) ac_try_echo=$ac_try;;
15734 esac
15735 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15736   (eval "$ac_compile") 2>conftest.er1
15737   ac_status=$?
15738   grep -v '^ *+' conftest.er1 >conftest.err
15739   rm -f conftest.er1
15740   cat conftest.err >&5
15741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15742   (exit $ac_status); } && {
15743          test -z "$ac_c_werror_flag" ||
15744          test ! -s conftest.err
15745        } && test -s conftest.$ac_objext; then
15746   ac_cv_have_lesstif=yes
15747 else
15748   echo "$as_me: failed program was:" >&5
15749 sed 's/^/| /' conftest.$ac_ext >&5
15750
15751         ac_cv_have_lesstif=no
15752 fi
15753
15754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15755   CPPFLAGS="$ac_save_CPPFLAGS"
15756 fi
15757 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15758 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15759   have_lesstif=$ac_cv_have_lesstif
15760 fi
15761
15762
15763 lesstif_version=unknown
15764 lesstif_version_string=unknown
15765
15766 if test "$have_lesstif" = yes ; then
15767   ltv=unknown
15768   echo unknown > conftest-lt
15769   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15770 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15771 if test "${ac_cv_lesstif_version_string+set}" = set; then
15772   echo $ECHO_N "(cached) $ECHO_C" >&6
15773 else
15774
15775   ac_save_CPPFLAGS="$CPPFLAGS"
15776   if test \! -z "$includedir" ; then
15777     CPPFLAGS="$CPPFLAGS -I$includedir"
15778   fi
15779   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15780   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15781   if test "$cross_compiling" = yes; then
15782   ac_cv_lesstif_version=unknown
15783                      ac_cv_lesstif_version_string=unknown
15784 else
15785   cat >conftest.$ac_ext <<_ACEOF
15786 /* confdefs.h.  */
15787 _ACEOF
15788 cat confdefs.h >>conftest.$ac_ext
15789 cat >>conftest.$ac_ext <<_ACEOF
15790 /* end confdefs.h.  */
15791 #include <stdio.h>
15792                      #include <Xm/Xm.h>
15793                      int main() {
15794                        FILE *f = fopen("conftest-lt", "w");
15795                        if (!f) exit(1);
15796                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15797                           LESSTIF_VERSION, LESSTIF_REVISION);
15798                        fclose(f);
15799                        exit(0);
15800                      }
15801 _ACEOF
15802 rm -f conftest$ac_exeext
15803 if { (ac_try="$ac_link"
15804 case "(($ac_try" in
15805   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15806   *) ac_try_echo=$ac_try;;
15807 esac
15808 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15809   (eval "$ac_link") 2>&5
15810   ac_status=$?
15811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15813   { (case "(($ac_try" in
15814   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15815   *) ac_try_echo=$ac_try;;
15816 esac
15817 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15818   (eval "$ac_try") 2>&5
15819   ac_status=$?
15820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15821   (exit $ac_status); }; }; then
15822   ltv=`cat conftest-lt`
15823                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15824                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15825 else
15826   echo "$as_me: program exited with status $ac_status" >&5
15827 echo "$as_me: failed program was:" >&5
15828 sed 's/^/| /' conftest.$ac_ext >&5
15829
15830 ( exit $ac_status )
15831 ac_cv_lesstif_version=unknown
15832                      ac_cv_lesstif_version_string=unknown
15833 fi
15834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15835 fi
15836
15837
15838   CPPFLAGS="$ac_save_CPPFLAGS"
15839 fi
15840 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15841 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15842   rm -f conftest-lt
15843   lesstif_version=$ac_cv_lesstif_version
15844   lesstif_version_string=$ac_cv_lesstif_version_string
15845
15846 fi
15847
15848
15849 if test "$have_motif" = yes ; then
15850   mtv=unknown
15851   echo unknown > conftest-mt
15852   { echo "$as_me:$LINENO: checking Motif version number" >&5
15853 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15854 if test "${ac_cv_motif_version_string+set}" = set; then
15855   echo $ECHO_N "(cached) $ECHO_C" >&6
15856 else
15857
15858   ac_save_CPPFLAGS="$CPPFLAGS"
15859   if test \! -z "$includedir" ; then
15860     CPPFLAGS="$CPPFLAGS -I$includedir"
15861   fi
15862   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15863   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15864   if test "$cross_compiling" = yes; then
15865   ac_cv_motif_version=unknown
15866                      ac_cv_motif_version_string=unknown
15867 else
15868   cat >conftest.$ac_ext <<_ACEOF
15869 /* confdefs.h.  */
15870 _ACEOF
15871 cat confdefs.h >>conftest.$ac_ext
15872 cat >>conftest.$ac_ext <<_ACEOF
15873 /* end confdefs.h.  */
15874 #include <stdio.h>
15875                      #include <Xm/Xm.h>
15876                      int main() {
15877                        FILE *f = fopen("conftest-mt", "w");
15878                        if (!f) exit(1);
15879                        fprintf(f, "%d %d.%d\n", XmVersion,
15880                           XmVERSION, XmREVISION);
15881                        fclose(f);
15882                        exit(0);
15883                      }
15884 _ACEOF
15885 rm -f conftest$ac_exeext
15886 if { (ac_try="$ac_link"
15887 case "(($ac_try" in
15888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15889   *) ac_try_echo=$ac_try;;
15890 esac
15891 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15892   (eval "$ac_link") 2>&5
15893   ac_status=$?
15894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15895   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15896   { (case "(($ac_try" in
15897   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15898   *) ac_try_echo=$ac_try;;
15899 esac
15900 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15901   (eval "$ac_try") 2>&5
15902   ac_status=$?
15903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15904   (exit $ac_status); }; }; then
15905   mtv=`cat conftest-mt`
15906                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15907                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15908 else
15909   echo "$as_me: program exited with status $ac_status" >&5
15910 echo "$as_me: failed program was:" >&5
15911 sed 's/^/| /' conftest.$ac_ext >&5
15912
15913 ( exit $ac_status )
15914 ac_cv_motif_version=unknown
15915                      ac_cv_motif_version_string=unknown
15916 fi
15917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15918 fi
15919
15920
15921   CPPFLAGS="$ac_save_CPPFLAGS"
15922 fi
15923 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15924 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15925   rm -f conftest-mt
15926   motif_version=$ac_cv_motif_version
15927   motif_version_string=$ac_cv_motif_version_string
15928
15929 fi
15930
15931
15932 ###############################################################################
15933 #
15934 #       Checking whether Motif requires -lXpm.
15935 #
15936 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15937 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15938 #       of the library whether to build the XPM code into libXm, or whether
15939 #       to rely on an external libXm.  So the only way to tell whether XPM is
15940 #       a link-time requirement is to examine libXm.a, which is very
15941 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15942 #       always link against XPM if the XPM lib exists (and this will be a
15943 #       no-op if libXm happens to already have the XPM code in it.)
15944 #
15945 ###############################################################################
15946
15947 motif_requires_xpm=no
15948 if test "$have_motif" = yes ; then
15949    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15950 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15951    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15952    then
15953      motif_requires_xpm=yes
15954      { echo "$as_me:$LINENO: result: maybe" >&5
15955 echo "${ECHO_T}maybe" >&6; }
15956    else
15957      { echo "$as_me:$LINENO: result: no" >&5
15958 echo "${ECHO_T}no" >&6; }
15959    fi
15960 fi
15961
15962
15963 ###############################################################################
15964 #
15965 #       Checking whether Motif requires -lXp.
15966 #
15967 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15968 #       Extension".   Why this extension isn't in -lXext with all the others,
15969 #       I have no idea.
15970 #
15971 ###############################################################################
15972
15973 have_xp_ext=no
15974 if test "$have_motif" = yes ; then
15975    have_xp_ext=no
15976
15977   ac_save_CPPFLAGS="$CPPFLAGS"
15978   ac_save_LDFLAGS="$LDFLAGS"
15979 #  ac_save_LIBS="$LIBS"
15980
15981   if test \! -z "$includedir" ; then
15982     CPPFLAGS="$CPPFLAGS -I$includedir"
15983   fi
15984   # note: $X_CFLAGS includes $x_includes
15985   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15986
15987   if test \! -z "$libdir" ; then
15988     LDFLAGS="$LDFLAGS -L$libdir"
15989   fi
15990   # note: $X_LIBS includes $x_libraries
15991   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15992
15993   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15994   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15995   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15996 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15997 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000   ac_check_lib_save_LIBS=$LIBS
16001 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16002 cat >conftest.$ac_ext <<_ACEOF
16003 /* confdefs.h.  */
16004 _ACEOF
16005 cat confdefs.h >>conftest.$ac_ext
16006 cat >>conftest.$ac_ext <<_ACEOF
16007 /* end confdefs.h.  */
16008
16009 /* Override any GCC internal prototype to avoid an error.
16010    Use char because int might match the return type of a GCC
16011    builtin and then its argument prototype would still apply.  */
16012 #ifdef __cplusplus
16013 extern "C"
16014 #endif
16015 char XpQueryExtension ();
16016 int
16017 main ()
16018 {
16019 return XpQueryExtension ();
16020   ;
16021   return 0;
16022 }
16023 _ACEOF
16024 rm -f conftest.$ac_objext conftest$ac_exeext
16025 if { (ac_try="$ac_link"
16026 case "(($ac_try" in
16027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16028   *) ac_try_echo=$ac_try;;
16029 esac
16030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16031   (eval "$ac_link") 2>conftest.er1
16032   ac_status=$?
16033   grep -v '^ *+' conftest.er1 >conftest.err
16034   rm -f conftest.er1
16035   cat conftest.err >&5
16036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16037   (exit $ac_status); } && {
16038          test -z "$ac_c_werror_flag" ||
16039          test ! -s conftest.err
16040        } && test -s conftest$ac_exeext &&
16041        $as_test_x conftest$ac_exeext; then
16042   ac_cv_lib_Xp_XpQueryExtension=yes
16043 else
16044   echo "$as_me: failed program was:" >&5
16045 sed 's/^/| /' conftest.$ac_ext >&5
16046
16047         ac_cv_lib_Xp_XpQueryExtension=no
16048 fi
16049
16050 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16051       conftest$ac_exeext conftest.$ac_ext
16052 LIBS=$ac_check_lib_save_LIBS
16053 fi
16054 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16055 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16056 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16057   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16058 else
16059   true
16060 fi
16061
16062   CPPFLAGS="$ac_save_CPPFLAGS"
16063   LDFLAGS="$ac_save_LDFLAGS"
16064 #  LIBS="$ac_save_LIBS"
16065
16066 fi
16067
16068
16069 ###############################################################################
16070 #
16071 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16072 #
16073 ###############################################################################
16074
16075 have_xintl=no
16076 if test "$have_motif" = yes ; then
16077
16078   ac_save_CPPFLAGS="$CPPFLAGS"
16079   ac_save_LDFLAGS="$LDFLAGS"
16080 #  ac_save_LIBS="$LIBS"
16081
16082   if test \! -z "$includedir" ; then
16083     CPPFLAGS="$CPPFLAGS -I$includedir"
16084   fi
16085   # note: $X_CFLAGS includes $x_includes
16086   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16087
16088   if test \! -z "$libdir" ; then
16089     LDFLAGS="$LDFLAGS -L$libdir"
16090   fi
16091   # note: $X_LIBS includes $x_libraries
16092   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16093
16094   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16095   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16096   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16097 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16098 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16099   echo $ECHO_N "(cached) $ECHO_C" >&6
16100 else
16101   ac_check_lib_save_LIBS=$LIBS
16102 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16103 cat >conftest.$ac_ext <<_ACEOF
16104 /* confdefs.h.  */
16105 _ACEOF
16106 cat confdefs.h >>conftest.$ac_ext
16107 cat >>conftest.$ac_ext <<_ACEOF
16108 /* end confdefs.h.  */
16109
16110 /* Override any GCC internal prototype to avoid an error.
16111    Use char because int might match the return type of a GCC
16112    builtin and then its argument prototype would still apply.  */
16113 #ifdef __cplusplus
16114 extern "C"
16115 #endif
16116 char _Xsetlocale ();
16117 int
16118 main ()
16119 {
16120 return _Xsetlocale ();
16121   ;
16122   return 0;
16123 }
16124 _ACEOF
16125 rm -f conftest.$ac_objext conftest$ac_exeext
16126 if { (ac_try="$ac_link"
16127 case "(($ac_try" in
16128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16129   *) ac_try_echo=$ac_try;;
16130 esac
16131 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16132   (eval "$ac_link") 2>conftest.er1
16133   ac_status=$?
16134   grep -v '^ *+' conftest.er1 >conftest.err
16135   rm -f conftest.er1
16136   cat conftest.err >&5
16137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16138   (exit $ac_status); } && {
16139          test -z "$ac_c_werror_flag" ||
16140          test ! -s conftest.err
16141        } && test -s conftest$ac_exeext &&
16142        $as_test_x conftest$ac_exeext; then
16143   ac_cv_lib_Xintl__Xsetlocale=yes
16144 else
16145   echo "$as_me: failed program was:" >&5
16146 sed 's/^/| /' conftest.$ac_ext >&5
16147
16148         ac_cv_lib_Xintl__Xsetlocale=no
16149 fi
16150
16151 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16152       conftest$ac_exeext conftest.$ac_ext
16153 LIBS=$ac_check_lib_save_LIBS
16154 fi
16155 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16156 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16157 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16158   have_xintl=yes
16159 else
16160   have_xintl=no
16161 fi
16162
16163   CPPFLAGS="$ac_save_CPPFLAGS"
16164   LDFLAGS="$ac_save_LDFLAGS"
16165 #  LIBS="$ac_save_LIBS"
16166
16167   if test "$have_xintl" = yes; then
16168     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16169   fi
16170 fi
16171
16172
16173 ###############################################################################
16174 #
16175 #       Check for -lGL or -lMesaGL.
16176 #
16177 ###############################################################################
16178
16179 have_gl=no
16180 ac_have_mesa_gl=no
16181 with_gl_req=unspecified
16182 gl_halfassed=no
16183
16184 # Check whether --with-gl was given.
16185 if test "${with_gl+set}" = set; then
16186   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16187 else
16188   with_gl=yes
16189 fi
16190
16191
16192
16193    case "$with_gl" in
16194     yes) ;;
16195     no)  ;;
16196
16197     /*)
16198      { echo "$as_me:$LINENO: checking for GL headers" >&5
16199 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16200      d=$with_gl/include
16201      if test -d $d; then
16202        X_CFLAGS="-I$d $X_CFLAGS"
16203        { echo "$as_me:$LINENO: result: $d" >&5
16204 echo "${ECHO_T}$d" >&6; }
16205      else
16206        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16207 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16208      fi
16209
16210      { echo "$as_me:$LINENO: checking for GL libs" >&5
16211 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16212      d=$with_gl/lib
16213      if test -d $d; then
16214        X_LIBS="-L$d $X_LIBS"
16215        { echo "$as_me:$LINENO: result: $d" >&5
16216 echo "${ECHO_T}$d" >&6; }
16217      else
16218        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16219 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16220      fi
16221
16222      # replace the directory string with "yes".
16223      with_gl_req="yes"
16224      with_gl=$with_gl_req
16225      ;;
16226
16227     *)
16228      echo ""
16229      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16230      echo "       If it is a directory, then \`DIR/include' will be added to"
16231      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16232      exit 1
16233      ;;
16234    esac
16235
16236
16237 ac_mesagl_version=unknown
16238 ac_mesagl_version_string=unknown
16239
16240 if test "$with_gl" = yes; then
16241
16242   ac_save_CPPFLAGS="$CPPFLAGS"
16243   if test \! -z "$includedir" ; then
16244     CPPFLAGS="$CPPFLAGS -I$includedir"
16245   fi
16246   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16247   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16248   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16249   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16250 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16251 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16252   echo $ECHO_N "(cached) $ECHO_C" >&6
16253 fi
16254 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16255 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16256 else
16257   # Is the header compilable?
16258 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16259 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16260 cat >conftest.$ac_ext <<_ACEOF
16261 /* confdefs.h.  */
16262 _ACEOF
16263 cat confdefs.h >>conftest.$ac_ext
16264 cat >>conftest.$ac_ext <<_ACEOF
16265 /* end confdefs.h.  */
16266 $ac_includes_default
16267 #include <GL/gl.h>
16268 _ACEOF
16269 rm -f conftest.$ac_objext
16270 if { (ac_try="$ac_compile"
16271 case "(($ac_try" in
16272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16273   *) ac_try_echo=$ac_try;;
16274 esac
16275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16276   (eval "$ac_compile") 2>conftest.er1
16277   ac_status=$?
16278   grep -v '^ *+' conftest.er1 >conftest.err
16279   rm -f conftest.er1
16280   cat conftest.err >&5
16281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16282   (exit $ac_status); } && {
16283          test -z "$ac_c_werror_flag" ||
16284          test ! -s conftest.err
16285        } && test -s conftest.$ac_objext; then
16286   ac_header_compiler=yes
16287 else
16288   echo "$as_me: failed program was:" >&5
16289 sed 's/^/| /' conftest.$ac_ext >&5
16290
16291         ac_header_compiler=no
16292 fi
16293
16294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16295 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16296 echo "${ECHO_T}$ac_header_compiler" >&6; }
16297
16298 # Is the header present?
16299 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16300 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16301 cat >conftest.$ac_ext <<_ACEOF
16302 /* confdefs.h.  */
16303 _ACEOF
16304 cat confdefs.h >>conftest.$ac_ext
16305 cat >>conftest.$ac_ext <<_ACEOF
16306 /* end confdefs.h.  */
16307 #include <GL/gl.h>
16308 _ACEOF
16309 if { (ac_try="$ac_cpp conftest.$ac_ext"
16310 case "(($ac_try" in
16311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16312   *) ac_try_echo=$ac_try;;
16313 esac
16314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16315   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16316   ac_status=$?
16317   grep -v '^ *+' conftest.er1 >conftest.err
16318   rm -f conftest.er1
16319   cat conftest.err >&5
16320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321   (exit $ac_status); } >/dev/null && {
16322          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16323          test ! -s conftest.err
16324        }; then
16325   ac_header_preproc=yes
16326 else
16327   echo "$as_me: failed program was:" >&5
16328 sed 's/^/| /' conftest.$ac_ext >&5
16329
16330   ac_header_preproc=no
16331 fi
16332
16333 rm -f conftest.err conftest.$ac_ext
16334 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16335 echo "${ECHO_T}$ac_header_preproc" >&6; }
16336
16337 # So?  What about this header?
16338 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16339   yes:no: )
16340     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16341 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16342     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16343 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16344     ac_header_preproc=yes
16345     ;;
16346   no:yes:* )
16347     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16348 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16349     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16350 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16351     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16352 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16353     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16354 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16355     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16356 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16357     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16358 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16359
16360     ;;
16361 esac
16362 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16363 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16364 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16365   echo $ECHO_N "(cached) $ECHO_C" >&6
16366 else
16367   ac_cv_header_GL_gl_h=$ac_header_preproc
16368 fi
16369 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16370 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16371
16372 fi
16373 if test $ac_cv_header_GL_gl_h = yes; then
16374   have_gl=yes
16375 else
16376   have_gl=no
16377 fi
16378
16379
16380   CPPFLAGS="$ac_save_CPPFLAGS"
16381   if test "$have_gl" = yes ; then
16382
16383   ac_save_CPPFLAGS="$CPPFLAGS"
16384   if test \! -z "$includedir" ; then
16385     CPPFLAGS="$CPPFLAGS -I$includedir"
16386   fi
16387   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16388   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16389   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16390 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16391 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16392   echo $ECHO_N "(cached) $ECHO_C" >&6
16393 else
16394   cat >conftest.$ac_ext <<_ACEOF
16395 /* confdefs.h.  */
16396 _ACEOF
16397 cat confdefs.h >>conftest.$ac_ext
16398 cat >>conftest.$ac_ext <<_ACEOF
16399 /* end confdefs.h.  */
16400 #include <GL/gl.h>
16401
16402 #include <GL/glx.h>
16403 _ACEOF
16404 rm -f conftest.$ac_objext
16405 if { (ac_try="$ac_compile"
16406 case "(($ac_try" in
16407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16408   *) ac_try_echo=$ac_try;;
16409 esac
16410 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16411   (eval "$ac_compile") 2>conftest.er1
16412   ac_status=$?
16413   grep -v '^ *+' conftest.er1 >conftest.err
16414   rm -f conftest.er1
16415   cat conftest.err >&5
16416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16417   (exit $ac_status); } && {
16418          test -z "$ac_c_werror_flag" ||
16419          test ! -s conftest.err
16420        } && test -s conftest.$ac_objext; then
16421   ac_cv_header_GL_glx_h=yes
16422 else
16423   echo "$as_me: failed program was:" >&5
16424 sed 's/^/| /' conftest.$ac_ext >&5
16425
16426         ac_cv_header_GL_glx_h=no
16427 fi
16428
16429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16430 fi
16431 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16432 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16433 if test $ac_cv_header_GL_glx_h = yes; then
16434   have_gl=yes
16435 else
16436   have_gl=no
16437 fi
16438
16439
16440   CPPFLAGS="$ac_save_CPPFLAGS"
16441   fi
16442
16443   # If we have the headers, try and figure out which vendor it's from.
16444   #
16445   if test "$have_gl" = yes ; then
16446
16447     # We need to know whether it's MesaGL so that we know which libraries
16448     # to link against.
16449     #
16450     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16451 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16452 if test "${ac_cv_have_mesa_gl+set}" = set; then
16453   echo $ECHO_N "(cached) $ECHO_C" >&6
16454 else
16455   ac_cv_have_mesa_gl=no
16456        if test "$ac_macosx" = no; then
16457          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16458          # It's not really Mesa, is it?
16459
16460   ac_save_CPPFLAGS="$CPPFLAGS"
16461   if test \! -z "$includedir" ; then
16462     CPPFLAGS="$CPPFLAGS -I$includedir"
16463   fi
16464   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16465   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16466   cat >conftest.$ac_ext <<_ACEOF
16467 /* confdefs.h.  */
16468 _ACEOF
16469 cat confdefs.h >>conftest.$ac_ext
16470 cat >>conftest.$ac_ext <<_ACEOF
16471 /* end confdefs.h.  */
16472 #include <GL/glx.h>
16473
16474 _ACEOF
16475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16476   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16477   ac_cv_have_mesa_gl=yes
16478 fi
16479 rm -f conftest*
16480
16481   CPPFLAGS="$ac_save_CPPFLAGS"
16482        fi
16483 fi
16484 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16485 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16486     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16487
16488     gl_lib_1=""
16489     GL_LIBS=""
16490
16491     if test "$ac_macosx" = yes; then
16492
16493       # Without these, every link against libGL gets a bunch of useless
16494       # warnings.
16495       #
16496       osx_crud="-bind_at_load -multiply_defined suppress"
16497       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16498 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16499       GL_LIBS="$GL_LIBS $osx_crud"
16500       unset osx_crud
16501
16502       # New lossage in 10.5.0: without this, we get:
16503       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16504       #
16505       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16506       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16507
16508       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16509 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16510       GL_LIBS="$GL_LIBS $osx_crud"
16511       unset osx_crud
16512     fi
16513
16514
16515     # Some versions of MesaGL are compiled to require -lpthread.
16516     # So if the Mesa headers exist, and -lpthread exists, then always
16517     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16518     #
16519     if test "$ac_have_mesa_gl" = yes; then
16520       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16521 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16522 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16523   echo $ECHO_N "(cached) $ECHO_C" >&6
16524 else
16525   ac_check_lib_save_LIBS=$LIBS
16526 LIBS="-lpthread  $LIBS"
16527 cat >conftest.$ac_ext <<_ACEOF
16528 /* confdefs.h.  */
16529 _ACEOF
16530 cat confdefs.h >>conftest.$ac_ext
16531 cat >>conftest.$ac_ext <<_ACEOF
16532 /* end confdefs.h.  */
16533
16534 /* Override any GCC internal prototype to avoid an error.
16535    Use char because int might match the return type of a GCC
16536    builtin and then its argument prototype would still apply.  */
16537 #ifdef __cplusplus
16538 extern "C"
16539 #endif
16540 char pthread_create ();
16541 int
16542 main ()
16543 {
16544 return pthread_create ();
16545   ;
16546   return 0;
16547 }
16548 _ACEOF
16549 rm -f conftest.$ac_objext conftest$ac_exeext
16550 if { (ac_try="$ac_link"
16551 case "(($ac_try" in
16552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16553   *) ac_try_echo=$ac_try;;
16554 esac
16555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16556   (eval "$ac_link") 2>conftest.er1
16557   ac_status=$?
16558   grep -v '^ *+' conftest.er1 >conftest.err
16559   rm -f conftest.er1
16560   cat conftest.err >&5
16561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562   (exit $ac_status); } && {
16563          test -z "$ac_c_werror_flag" ||
16564          test ! -s conftest.err
16565        } && test -s conftest$ac_exeext &&
16566        $as_test_x conftest$ac_exeext; then
16567   ac_cv_lib_pthread_pthread_create=yes
16568 else
16569   echo "$as_me: failed program was:" >&5
16570 sed 's/^/| /' conftest.$ac_ext >&5
16571
16572         ac_cv_lib_pthread_pthread_create=no
16573 fi
16574
16575 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16576       conftest$ac_exeext conftest.$ac_ext
16577 LIBS=$ac_check_lib_save_LIBS
16578 fi
16579 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16580 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16581 if test $ac_cv_lib_pthread_pthread_create = yes; then
16582   GL_LIBS="-lpthread"
16583 fi
16584
16585     fi
16586
16587
16588     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16589     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16590     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16591     #
16592
16593     if test "$ac_have_mesa_gl" = yes ; then
16594
16595   ac_save_CPPFLAGS="$CPPFLAGS"
16596   ac_save_LDFLAGS="$LDFLAGS"
16597 #  ac_save_LIBS="$LIBS"
16598
16599   if test \! -z "$includedir" ; then
16600     CPPFLAGS="$CPPFLAGS -I$includedir"
16601   fi
16602   # note: $X_CFLAGS includes $x_includes
16603   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16604
16605   if test \! -z "$libdir" ; then
16606     LDFLAGS="$LDFLAGS -L$libdir"
16607   fi
16608   # note: $X_LIBS includes $x_libraries
16609   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16610
16611   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16612   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16613   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16614 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16615 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618   ac_check_lib_save_LIBS=$LIBS
16619 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16620 cat >conftest.$ac_ext <<_ACEOF
16621 /* confdefs.h.  */
16622 _ACEOF
16623 cat confdefs.h >>conftest.$ac_ext
16624 cat >>conftest.$ac_ext <<_ACEOF
16625 /* end confdefs.h.  */
16626
16627 /* Override any GCC internal prototype to avoid an error.
16628    Use char because int might match the return type of a GCC
16629    builtin and then its argument prototype would still apply.  */
16630 #ifdef __cplusplus
16631 extern "C"
16632 #endif
16633 char glXCreateContext ();
16634 int
16635 main ()
16636 {
16637 return glXCreateContext ();
16638   ;
16639   return 0;
16640 }
16641 _ACEOF
16642 rm -f conftest.$ac_objext conftest$ac_exeext
16643 if { (ac_try="$ac_link"
16644 case "(($ac_try" in
16645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16646   *) ac_try_echo=$ac_try;;
16647 esac
16648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16649   (eval "$ac_link") 2>conftest.er1
16650   ac_status=$?
16651   grep -v '^ *+' conftest.er1 >conftest.err
16652   rm -f conftest.er1
16653   cat conftest.err >&5
16654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655   (exit $ac_status); } && {
16656          test -z "$ac_c_werror_flag" ||
16657          test ! -s conftest.err
16658        } && test -s conftest$ac_exeext &&
16659        $as_test_x conftest$ac_exeext; then
16660   ac_cv_lib_MesaGL_glXCreateContext=yes
16661 else
16662   echo "$as_me: failed program was:" >&5
16663 sed 's/^/| /' conftest.$ac_ext >&5
16664
16665         ac_cv_lib_MesaGL_glXCreateContext=no
16666 fi
16667
16668 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16669       conftest$ac_exeext conftest.$ac_ext
16670 LIBS=$ac_check_lib_save_LIBS
16671 fi
16672 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16673 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16674 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16675   gl_lib_1="MesaGL"
16676                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16677 fi
16678
16679   CPPFLAGS="$ac_save_CPPFLAGS"
16680   LDFLAGS="$ac_save_LDFLAGS"
16681 #  LIBS="$ac_save_LIBS"
16682
16683     fi
16684
16685     if test "$gl_lib_1" = "" ; then
16686
16687   ac_save_CPPFLAGS="$CPPFLAGS"
16688   ac_save_LDFLAGS="$LDFLAGS"
16689 #  ac_save_LIBS="$LIBS"
16690
16691   if test \! -z "$includedir" ; then
16692     CPPFLAGS="$CPPFLAGS -I$includedir"
16693   fi
16694   # note: $X_CFLAGS includes $x_includes
16695   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16696
16697   if test \! -z "$libdir" ; then
16698     LDFLAGS="$LDFLAGS -L$libdir"
16699   fi
16700   # note: $X_LIBS includes $x_libraries
16701   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16702
16703   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16704   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16705   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16706 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16707 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16708   echo $ECHO_N "(cached) $ECHO_C" >&6
16709 else
16710   ac_check_lib_save_LIBS=$LIBS
16711 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16712 cat >conftest.$ac_ext <<_ACEOF
16713 /* confdefs.h.  */
16714 _ACEOF
16715 cat confdefs.h >>conftest.$ac_ext
16716 cat >>conftest.$ac_ext <<_ACEOF
16717 /* end confdefs.h.  */
16718
16719 /* Override any GCC internal prototype to avoid an error.
16720    Use char because int might match the return type of a GCC
16721    builtin and then its argument prototype would still apply.  */
16722 #ifdef __cplusplus
16723 extern "C"
16724 #endif
16725 char glXCreateContext ();
16726 int
16727 main ()
16728 {
16729 return glXCreateContext ();
16730   ;
16731   return 0;
16732 }
16733 _ACEOF
16734 rm -f conftest.$ac_objext conftest$ac_exeext
16735 if { (ac_try="$ac_link"
16736 case "(($ac_try" in
16737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16738   *) ac_try_echo=$ac_try;;
16739 esac
16740 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16741   (eval "$ac_link") 2>conftest.er1
16742   ac_status=$?
16743   grep -v '^ *+' conftest.er1 >conftest.err
16744   rm -f conftest.er1
16745   cat conftest.err >&5
16746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747   (exit $ac_status); } && {
16748          test -z "$ac_c_werror_flag" ||
16749          test ! -s conftest.err
16750        } && test -s conftest$ac_exeext &&
16751        $as_test_x conftest$ac_exeext; then
16752   ac_cv_lib_GL_glXCreateContext=yes
16753 else
16754   echo "$as_me: failed program was:" >&5
16755 sed 's/^/| /' conftest.$ac_ext >&5
16756
16757         ac_cv_lib_GL_glXCreateContext=no
16758 fi
16759
16760 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16761       conftest$ac_exeext conftest.$ac_ext
16762 LIBS=$ac_check_lib_save_LIBS
16763 fi
16764 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16765 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16766 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16767   gl_lib_1="GL"
16768                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16769 fi
16770
16771   CPPFLAGS="$ac_save_CPPFLAGS"
16772   LDFLAGS="$ac_save_LDFLAGS"
16773 #  LIBS="$ac_save_LIBS"
16774
16775     fi
16776
16777     if test "$gl_lib_1" = "" ; then
16778       # we have headers, but no libs -- bail.
16779       have_gl=no
16780       ac_have_mesa_gl=no
16781       gl_halfassed=yes
16782     else
16783       # linking works -- we can build the GL hacks.
16784       cat >>confdefs.h <<\_ACEOF
16785 #define HAVE_GL 1
16786 _ACEOF
16787
16788       if test "$ac_have_mesa_gl" = yes ; then
16789         cat >>confdefs.h <<\_ACEOF
16790 #define HAVE_MESA_GL 1
16791 _ACEOF
16792
16793       fi
16794     fi
16795   fi
16796
16797
16798   # Now that we know we have GL headers and libs, do some more GL testing.
16799   #
16800
16801   if test "$have_gl" = yes ; then
16802     # If it's MesaGL, we'd like to issue a warning if the version number
16803     # is less than or equal to 2.6, because that version had a security bug.
16804     #
16805     if test "$ac_have_mesa_gl" = yes; then
16806
16807       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16808 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16809 if test "${ac_cv_mesagl_version_string+set}" = set; then
16810   echo $ECHO_N "(cached) $ECHO_C" >&6
16811 else
16812   cat > conftest.$ac_ext <<EOF
16813 #line 16813 "configure"
16814 #include "confdefs.h"
16815 #include <GL/gl.h>
16816 #ifndef MESA_MAJOR_VERSION
16817 # include <GL/xmesa.h>
16818 # ifdef XMESA_MAJOR_VERSION
16819    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16820       we have to check the XMesa version number (the number of the X protocol
16821       support, which seems to be the same as the Mesa version number.)
16822     */
16823 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16824 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16825 # else
16826    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16827       so we have no way of telling what version of Mesa this is at all.
16828       So, we'll guess that the osmesa version (the "offscreen protocol")
16829       is less than or equal to the real mesa version number.  Except that
16830       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16831       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16832     */
16833 # include <GL/osmesa.h>
16834 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16835 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16836 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16837 #   undef MESA_MINOR_VERSION
16838 #   define MESA_MINOR_VERSION 4 or newer, probably?
16839 #  endif
16840 # endif
16841 #endif
16842 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16843 EOF
16844
16845          ac_save_CPPFLAGS="$CPPFLAGS"
16846          if test \! -z "$includedir" ; then
16847            CPPFLAGS="$CPPFLAGS -I$includedir"
16848          fi
16849          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16850
16851          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16852
16853          # M4 sucks!!
16854
16855           mglv=`echo "$mglv" | sed -n \
16856              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16857
16858
16859          rm -f conftest.$ac_ext
16860
16861          CPPFLAGS="$ac_save_CPPFLAGS"
16862
16863          if test "$mglv" = ""; then
16864            ac_mesagl_version=unknown
16865            ac_mesagl_version_string=unknown
16866          else
16867            ac_mesagl_version_string="$mglv"
16868            # M4 sucks!!
16869
16870            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16871            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16872
16873            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16874            if test -z "$ac_mesagl_version"; then
16875              ac_mesagl_version=unknown
16876              ac_mesagl_version_string=unknown
16877            fi
16878          fi
16879          ac_cv_mesagl_version=$ac_mesagl_version
16880          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16881
16882 fi
16883 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16884 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16885       ac_mesagl_version=$ac_cv_mesagl_version
16886       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16887     fi
16888
16889
16890     # Check for OpenGL 1.1 features.
16891     #
16892
16893   ac_save_CPPFLAGS="$CPPFLAGS"
16894   ac_save_LDFLAGS="$LDFLAGS"
16895 #  ac_save_LIBS="$LIBS"
16896
16897   if test \! -z "$includedir" ; then
16898     CPPFLAGS="$CPPFLAGS -I$includedir"
16899   fi
16900   # note: $X_CFLAGS includes $x_includes
16901   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16902
16903   if test \! -z "$libdir" ; then
16904     LDFLAGS="$LDFLAGS -L$libdir"
16905   fi
16906   # note: $X_LIBS includes $x_libraries
16907   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16908
16909   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16910   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16911   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16912 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16913 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16914 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16915   echo $ECHO_N "(cached) $ECHO_C" >&6
16916 else
16917   ac_check_lib_save_LIBS=$LIBS
16918 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16919 cat >conftest.$ac_ext <<_ACEOF
16920 /* confdefs.h.  */
16921 _ACEOF
16922 cat confdefs.h >>conftest.$ac_ext
16923 cat >>conftest.$ac_ext <<_ACEOF
16924 /* end confdefs.h.  */
16925
16926 /* Override any GCC internal prototype to avoid an error.
16927    Use char because int might match the return type of a GCC
16928    builtin and then its argument prototype would still apply.  */
16929 #ifdef __cplusplus
16930 extern "C"
16931 #endif
16932 char glBindTexture ();
16933 int
16934 main ()
16935 {
16936 return glBindTexture ();
16937   ;
16938   return 0;
16939 }
16940 _ACEOF
16941 rm -f conftest.$ac_objext conftest$ac_exeext
16942 if { (ac_try="$ac_link"
16943 case "(($ac_try" in
16944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945   *) ac_try_echo=$ac_try;;
16946 esac
16947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16948   (eval "$ac_link") 2>conftest.er1
16949   ac_status=$?
16950   grep -v '^ *+' conftest.er1 >conftest.err
16951   rm -f conftest.er1
16952   cat conftest.err >&5
16953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954   (exit $ac_status); } && {
16955          test -z "$ac_c_werror_flag" ||
16956          test ! -s conftest.err
16957        } && test -s conftest$ac_exeext &&
16958        $as_test_x conftest$ac_exeext; then
16959   eval "$as_ac_Lib=yes"
16960 else
16961   echo "$as_me: failed program was:" >&5
16962 sed 's/^/| /' conftest.$ac_ext >&5
16963
16964         eval "$as_ac_Lib=no"
16965 fi
16966
16967 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16968       conftest$ac_exeext conftest.$ac_ext
16969 LIBS=$ac_check_lib_save_LIBS
16970 fi
16971 ac_res=`eval echo '${'$as_ac_Lib'}'`
16972                { echo "$as_me:$LINENO: result: $ac_res" >&5
16973 echo "${ECHO_T}$ac_res" >&6; }
16974 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16975   cat >>confdefs.h <<\_ACEOF
16976 #define HAVE_GLBINDTEXTURE 1
16977 _ACEOF
16978
16979 else
16980   true
16981 fi
16982
16983   CPPFLAGS="$ac_save_CPPFLAGS"
16984   LDFLAGS="$ac_save_LDFLAGS"
16985 #  LIBS="$ac_save_LIBS"
16986
16987   fi
16988
16989 elif test "$with_gl" != no; then
16990   echo "error: must be yes or no: --with-gl=$with_gl"
16991   exit 1
16992 fi
16993
16994
16995 ###############################################################################
16996 #
16997 #       Check for -lgle.
16998 #
16999 ###############################################################################
17000
17001 have_gle=no
17002 with_gle_req=unspecified
17003 gle_halfassed=no
17004
17005 # Check whether --with-gle was given.
17006 if test "${with_gle+set}" = set; then
17007   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17008 else
17009   with_gle=yes
17010 fi
17011
17012
17013
17014    case "$with_gle" in
17015     yes) ;;
17016     no)  ;;
17017
17018     /*)
17019      { echo "$as_me:$LINENO: checking for GLE headers" >&5
17020 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
17021      d=$with_gle/include
17022      if test -d $d; then
17023        X_CFLAGS="-I$d $X_CFLAGS"
17024        { echo "$as_me:$LINENO: result: $d" >&5
17025 echo "${ECHO_T}$d" >&6; }
17026      else
17027        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17028 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17029      fi
17030
17031      { echo "$as_me:$LINENO: checking for GLE libs" >&5
17032 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
17033      d=$with_gle/lib
17034      if test -d $d; then
17035        X_LIBS="-L$d $X_LIBS"
17036        { echo "$as_me:$LINENO: result: $d" >&5
17037 echo "${ECHO_T}$d" >&6; }
17038      else
17039        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17040 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17041      fi
17042
17043      # replace the directory string with "yes".
17044      with_gle_req="yes"
17045      with_gle=$with_gle_req
17046      ;;
17047
17048     *)
17049      echo ""
17050      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17051      echo "       If it is a directory, then \`DIR/include' will be added to"
17052      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17053      exit 1
17054      ;;
17055    esac
17056
17057
17058 GLE_LIBS=""
17059
17060 if test "$have_gl" = no ; then
17061  true
17062 elif test "$with_gle" = yes; then
17063
17064
17065   ac_save_CPPFLAGS="$CPPFLAGS"
17066   if test \! -z "$includedir" ; then
17067     CPPFLAGS="$CPPFLAGS -I$includedir"
17068   fi
17069   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17070   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17071   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17072 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17073 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17074   echo $ECHO_N "(cached) $ECHO_C" >&6
17075 else
17076   cat >conftest.$ac_ext <<_ACEOF
17077 /* confdefs.h.  */
17078 _ACEOF
17079 cat confdefs.h >>conftest.$ac_ext
17080 cat >>conftest.$ac_ext <<_ACEOF
17081 /* end confdefs.h.  */
17082 #include <GL/gl.h>
17083
17084 #include <GL/gle.h>
17085 _ACEOF
17086 rm -f conftest.$ac_objext
17087 if { (ac_try="$ac_compile"
17088 case "(($ac_try" in
17089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090   *) ac_try_echo=$ac_try;;
17091 esac
17092 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093   (eval "$ac_compile") 2>conftest.er1
17094   ac_status=$?
17095   grep -v '^ *+' conftest.er1 >conftest.err
17096   rm -f conftest.er1
17097   cat conftest.err >&5
17098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17099   (exit $ac_status); } && {
17100          test -z "$ac_c_werror_flag" ||
17101          test ! -s conftest.err
17102        } && test -s conftest.$ac_objext; then
17103   ac_cv_header_GL_gle_h=yes
17104 else
17105   echo "$as_me: failed program was:" >&5
17106 sed 's/^/| /' conftest.$ac_ext >&5
17107
17108         ac_cv_header_GL_gle_h=no
17109 fi
17110
17111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17112 fi
17113 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17114 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17115 if test $ac_cv_header_GL_gle_h = yes; then
17116   have_gle3=yes
17117 else
17118   have_gle3=no
17119 fi
17120
17121
17122   CPPFLAGS="$ac_save_CPPFLAGS"
17123   if test "$have_gle3" = yes ; then
17124     have_gle=yes;
17125   else
17126
17127   ac_save_CPPFLAGS="$CPPFLAGS"
17128   if test \! -z "$includedir" ; then
17129     CPPFLAGS="$CPPFLAGS -I$includedir"
17130   fi
17131   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17132   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17133   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17134 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17135 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17136   echo $ECHO_N "(cached) $ECHO_C" >&6
17137 else
17138   cat >conftest.$ac_ext <<_ACEOF
17139 /* confdefs.h.  */
17140 _ACEOF
17141 cat confdefs.h >>conftest.$ac_ext
17142 cat >>conftest.$ac_ext <<_ACEOF
17143 /* end confdefs.h.  */
17144 #include <GL/gl.h>
17145
17146 #include <GL/gutil.h>
17147 _ACEOF
17148 rm -f conftest.$ac_objext
17149 if { (ac_try="$ac_compile"
17150 case "(($ac_try" in
17151   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17152   *) ac_try_echo=$ac_try;;
17153 esac
17154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17155   (eval "$ac_compile") 2>conftest.er1
17156   ac_status=$?
17157   grep -v '^ *+' conftest.er1 >conftest.err
17158   rm -f conftest.er1
17159   cat conftest.err >&5
17160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17161   (exit $ac_status); } && {
17162          test -z "$ac_c_werror_flag" ||
17163          test ! -s conftest.err
17164        } && test -s conftest.$ac_objext; then
17165   ac_cv_header_GL_gutil_h=yes
17166 else
17167   echo "$as_me: failed program was:" >&5
17168 sed 's/^/| /' conftest.$ac_ext >&5
17169
17170         ac_cv_header_GL_gutil_h=no
17171 fi
17172
17173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17174 fi
17175 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17176 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17177 if test $ac_cv_header_GL_gutil_h = yes; then
17178   have_gle=yes
17179 else
17180   have_gle=no
17181 fi
17182
17183
17184   CPPFLAGS="$ac_save_CPPFLAGS"
17185     if test "$have_gle" = yes ; then
17186
17187   ac_save_CPPFLAGS="$CPPFLAGS"
17188   if test \! -z "$includedir" ; then
17189     CPPFLAGS="$CPPFLAGS -I$includedir"
17190   fi
17191   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17192   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17193   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17194 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17195 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17196   echo $ECHO_N "(cached) $ECHO_C" >&6
17197 else
17198   cat >conftest.$ac_ext <<_ACEOF
17199 /* confdefs.h.  */
17200 _ACEOF
17201 cat confdefs.h >>conftest.$ac_ext
17202 cat >>conftest.$ac_ext <<_ACEOF
17203 /* end confdefs.h.  */
17204 #include <GL/gl.h>
17205
17206 #include <GL/tube.h>
17207 _ACEOF
17208 rm -f conftest.$ac_objext
17209 if { (ac_try="$ac_compile"
17210 case "(($ac_try" in
17211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17212   *) ac_try_echo=$ac_try;;
17213 esac
17214 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17215   (eval "$ac_compile") 2>conftest.er1
17216   ac_status=$?
17217   grep -v '^ *+' conftest.er1 >conftest.err
17218   rm -f conftest.er1
17219   cat conftest.err >&5
17220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17221   (exit $ac_status); } && {
17222          test -z "$ac_c_werror_flag" ||
17223          test ! -s conftest.err
17224        } && test -s conftest.$ac_objext; then
17225   ac_cv_header_GL_tube_h=yes
17226 else
17227   echo "$as_me: failed program was:" >&5
17228 sed 's/^/| /' conftest.$ac_ext >&5
17229
17230         ac_cv_header_GL_tube_h=no
17231 fi
17232
17233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17234 fi
17235 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17236 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17237 if test $ac_cv_header_GL_tube_h = yes; then
17238   have_gle=yes
17239 else
17240   have_gle=no
17241 fi
17242
17243
17244   CPPFLAGS="$ac_save_CPPFLAGS"
17245     fi
17246   fi
17247
17248   if test "$have_gle" = yes ; then
17249     have_gle=no
17250     gle_halfassed=yes
17251
17252   ac_save_CPPFLAGS="$CPPFLAGS"
17253   ac_save_LDFLAGS="$LDFLAGS"
17254 #  ac_save_LIBS="$LIBS"
17255
17256   if test \! -z "$includedir" ; then
17257     CPPFLAGS="$CPPFLAGS -I$includedir"
17258   fi
17259   # note: $X_CFLAGS includes $x_includes
17260   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17261
17262   if test \! -z "$libdir" ; then
17263     LDFLAGS="$LDFLAGS -L$libdir"
17264   fi
17265   # note: $X_LIBS includes $x_libraries
17266   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17267
17268   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17269   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17270   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17271 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17272 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17273   echo $ECHO_N "(cached) $ECHO_C" >&6
17274 else
17275   ac_check_lib_save_LIBS=$LIBS
17276 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17277 cat >conftest.$ac_ext <<_ACEOF
17278 /* confdefs.h.  */
17279 _ACEOF
17280 cat confdefs.h >>conftest.$ac_ext
17281 cat >>conftest.$ac_ext <<_ACEOF
17282 /* end confdefs.h.  */
17283
17284 /* Override any GCC internal prototype to avoid an error.
17285    Use char because int might match the return type of a GCC
17286    builtin and then its argument prototype would still apply.  */
17287 #ifdef __cplusplus
17288 extern "C"
17289 #endif
17290 char gleCreateGC ();
17291 int
17292 main ()
17293 {
17294 return gleCreateGC ();
17295   ;
17296   return 0;
17297 }
17298 _ACEOF
17299 rm -f conftest.$ac_objext conftest$ac_exeext
17300 if { (ac_try="$ac_link"
17301 case "(($ac_try" in
17302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303   *) ac_try_echo=$ac_try;;
17304 esac
17305 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17306   (eval "$ac_link") 2>conftest.er1
17307   ac_status=$?
17308   grep -v '^ *+' conftest.er1 >conftest.err
17309   rm -f conftest.er1
17310   cat conftest.err >&5
17311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312   (exit $ac_status); } && {
17313          test -z "$ac_c_werror_flag" ||
17314          test ! -s conftest.err
17315        } && test -s conftest$ac_exeext &&
17316        $as_test_x conftest$ac_exeext; then
17317   ac_cv_lib_gle_gleCreateGC=yes
17318 else
17319   echo "$as_me: failed program was:" >&5
17320 sed 's/^/| /' conftest.$ac_ext >&5
17321
17322         ac_cv_lib_gle_gleCreateGC=no
17323 fi
17324
17325 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17326       conftest$ac_exeext conftest.$ac_ext
17327 LIBS=$ac_check_lib_save_LIBS
17328 fi
17329 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17330 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17331 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17332   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17333 fi
17334
17335   CPPFLAGS="$ac_save_CPPFLAGS"
17336   LDFLAGS="$ac_save_LDFLAGS"
17337 #  LIBS="$ac_save_LIBS"
17338
17339   fi
17340   if test "$have_gle" = yes ; then
17341     have_gle=no
17342     gle_halfassed=yes
17343
17344     # sometimes the libmatrix stuff is included in libgle.  look there first.
17345 #
17346 # I don't get it.  For some reason, this test passes on SGI, as if
17347 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17348 # Yet the link is succeeding.  Why???
17349 #
17350 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17351 #                   [have_gle=yes; gle_halfassed=no],
17352 #                   [], $GL_LIBS -lX11 -lXext -lm)
17353
17354     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17355     # *sigh*
17356     if test "$have_gle3" = yes ; then
17357
17358   ac_save_CPPFLAGS="$CPPFLAGS"
17359   ac_save_LDFLAGS="$LDFLAGS"
17360 #  ac_save_LIBS="$LIBS"
17361
17362   if test \! -z "$includedir" ; then
17363     CPPFLAGS="$CPPFLAGS -I$includedir"
17364   fi
17365   # note: $X_CFLAGS includes $x_includes
17366   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17367
17368   if test \! -z "$libdir" ; then
17369     LDFLAGS="$LDFLAGS -L$libdir"
17370   fi
17371   # note: $X_LIBS includes $x_libraries
17372   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17373
17374   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17375   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17376   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17377 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17378 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17379   echo $ECHO_N "(cached) $ECHO_C" >&6
17380 else
17381   ac_check_lib_save_LIBS=$LIBS
17382 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17383 cat >conftest.$ac_ext <<_ACEOF
17384 /* confdefs.h.  */
17385 _ACEOF
17386 cat confdefs.h >>conftest.$ac_ext
17387 cat >>conftest.$ac_ext <<_ACEOF
17388 /* end confdefs.h.  */
17389
17390 /* Override any GCC internal prototype to avoid an error.
17391    Use char because int might match the return type of a GCC
17392    builtin and then its argument prototype would still apply.  */
17393 #ifdef __cplusplus
17394 extern "C"
17395 #endif
17396 char uview_direction ();
17397 int
17398 main ()
17399 {
17400 return uview_direction ();
17401   ;
17402   return 0;
17403 }
17404 _ACEOF
17405 rm -f conftest.$ac_objext conftest$ac_exeext
17406 if { (ac_try="$ac_link"
17407 case "(($ac_try" in
17408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17409   *) ac_try_echo=$ac_try;;
17410 esac
17411 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17412   (eval "$ac_link") 2>conftest.er1
17413   ac_status=$?
17414   grep -v '^ *+' conftest.er1 >conftest.err
17415   rm -f conftest.er1
17416   cat conftest.err >&5
17417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17418   (exit $ac_status); } && {
17419          test -z "$ac_c_werror_flag" ||
17420          test ! -s conftest.err
17421        } && test -s conftest$ac_exeext &&
17422        $as_test_x conftest$ac_exeext; then
17423   ac_cv_lib_gle_uview_direction=yes
17424 else
17425   echo "$as_me: failed program was:" >&5
17426 sed 's/^/| /' conftest.$ac_ext >&5
17427
17428         ac_cv_lib_gle_uview_direction=no
17429 fi
17430
17431 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17432       conftest$ac_exeext conftest.$ac_ext
17433 LIBS=$ac_check_lib_save_LIBS
17434 fi
17435 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17436 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17437 if test $ac_cv_lib_gle_uview_direction = yes; then
17438   have_gle=yes; gle_halfassed=no
17439 fi
17440
17441   CPPFLAGS="$ac_save_CPPFLAGS"
17442   LDFLAGS="$ac_save_LDFLAGS"
17443 #  LIBS="$ac_save_LIBS"
17444
17445     fi
17446     # if it wasn't in libgle, then look in libmatrix.
17447     if test "$have_gle" = no ; then
17448
17449   ac_save_CPPFLAGS="$CPPFLAGS"
17450   ac_save_LDFLAGS="$LDFLAGS"
17451 #  ac_save_LIBS="$LIBS"
17452
17453   if test \! -z "$includedir" ; then
17454     CPPFLAGS="$CPPFLAGS -I$includedir"
17455   fi
17456   # note: $X_CFLAGS includes $x_includes
17457   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17458
17459   if test \! -z "$libdir" ; then
17460     LDFLAGS="$LDFLAGS -L$libdir"
17461   fi
17462   # note: $X_LIBS includes $x_libraries
17463   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17464
17465   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17466   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17467   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17468 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17469 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17470   echo $ECHO_N "(cached) $ECHO_C" >&6
17471 else
17472   ac_check_lib_save_LIBS=$LIBS
17473 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17474 cat >conftest.$ac_ext <<_ACEOF
17475 /* confdefs.h.  */
17476 _ACEOF
17477 cat confdefs.h >>conftest.$ac_ext
17478 cat >>conftest.$ac_ext <<_ACEOF
17479 /* end confdefs.h.  */
17480
17481 /* Override any GCC internal prototype to avoid an error.
17482    Use char because int might match the return type of a GCC
17483    builtin and then its argument prototype would still apply.  */
17484 #ifdef __cplusplus
17485 extern "C"
17486 #endif
17487 char uview_direction_d ();
17488 int
17489 main ()
17490 {
17491 return uview_direction_d ();
17492   ;
17493   return 0;
17494 }
17495 _ACEOF
17496 rm -f conftest.$ac_objext conftest$ac_exeext
17497 if { (ac_try="$ac_link"
17498 case "(($ac_try" in
17499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17500   *) ac_try_echo=$ac_try;;
17501 esac
17502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17503   (eval "$ac_link") 2>conftest.er1
17504   ac_status=$?
17505   grep -v '^ *+' conftest.er1 >conftest.err
17506   rm -f conftest.er1
17507   cat conftest.err >&5
17508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17509   (exit $ac_status); } && {
17510          test -z "$ac_c_werror_flag" ||
17511          test ! -s conftest.err
17512        } && test -s conftest$ac_exeext &&
17513        $as_test_x conftest$ac_exeext; then
17514   ac_cv_lib_matrix_uview_direction_d=yes
17515 else
17516   echo "$as_me: failed program was:" >&5
17517 sed 's/^/| /' conftest.$ac_ext >&5
17518
17519         ac_cv_lib_matrix_uview_direction_d=no
17520 fi
17521
17522 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17523       conftest$ac_exeext conftest.$ac_ext
17524 LIBS=$ac_check_lib_save_LIBS
17525 fi
17526 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17527 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17528 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17529   have_gle=yes; gle_halfassed=no;
17530                       GLE_LIBS="$GLE_LIBS -lmatrix"
17531 fi
17532
17533   CPPFLAGS="$ac_save_CPPFLAGS"
17534   LDFLAGS="$ac_save_LDFLAGS"
17535 #  LIBS="$ac_save_LIBS"
17536
17537     fi
17538   fi
17539
17540   if test "$have_gle" = yes ; then
17541     cat >>confdefs.h <<\_ACEOF
17542 #define HAVE_GLE 1
17543 _ACEOF
17544
17545     if test "$have_gle3" = yes ; then
17546       cat >>confdefs.h <<\_ACEOF
17547 #define HAVE_GLE3 1
17548 _ACEOF
17549
17550     fi
17551   fi
17552
17553 elif test "$with_gle" != no; then
17554   echo "error: must be yes or no: --with-gle=$with_gle"
17555   exit 1
17556
17557 fi
17558
17559
17560 ###############################################################################
17561 #
17562 #       Check for -lgdk_pixbuf.
17563 #       These tests are for gdk_pixbuf usage of the hacks,
17564 #       not xscreensaver-demo (thus we have to test again to get
17565 #       the libraries right: don't want to pull in all of GTK
17566 #       for the hacks.)
17567 #
17568 ###############################################################################
17569
17570 have_gdk_pixbuf=no
17571 with_gdk_pixbuf_req=unspecified
17572
17573 # Check whether --with-pixbuf was given.
17574 if test "${with_pixbuf+set}" = set; then
17575   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17576 else
17577   with_gdk_pixbuf=yes
17578 fi
17579
17580
17581 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17582 # we can also look for the `gdk-pixbuf-config' program in that directory.
17583 case "$with_gdk_pixbuf" in
17584   /*)
17585     gdk_pixbuf_dir="$with_gdk_pixbuf"
17586     ;;
17587   *)
17588     gdk_pixbuf_dir=""
17589     ;;
17590 esac
17591
17592
17593    case "$with_gdk_pixbuf" in
17594     yes) ;;
17595     no)  ;;
17596
17597     /*)
17598      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17599 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17600      d=$with_gdk_pixbuf/include
17601      if test -d $d; then
17602        X_CFLAGS="-I$d $X_CFLAGS"
17603        { echo "$as_me:$LINENO: result: $d" >&5
17604 echo "${ECHO_T}$d" >&6; }
17605      else
17606        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17607 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17608      fi
17609
17610      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17611 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17612      d=$with_gdk_pixbuf/lib
17613      if test -d $d; then
17614        X_LIBS="-L$d $X_LIBS"
17615        { echo "$as_me:$LINENO: result: $d" >&5
17616 echo "${ECHO_T}$d" >&6; }
17617      else
17618        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17619 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17620      fi
17621
17622      # replace the directory string with "yes".
17623      with_gdk_pixbuf_req="yes"
17624      with_gdk_pixbuf=$with_gdk_pixbuf_req
17625      ;;
17626
17627     *)
17628      echo ""
17629      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17630      echo "       If it is a directory, then \`DIR/include' will be added to"
17631      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17632      exit 1
17633      ;;
17634    esac
17635
17636
17637 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17638   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17639   exit 1
17640 fi
17641
17642 if test "$with_gdk_pixbuf" = yes; then
17643   have_gdk_pixbuf=no
17644
17645   pkgs=''
17646   ok="yes"
17647
17648   pkg_check_version gdk-pixbuf-2.0      2.0.0
17649   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17650   have_gdk_pixbuf="$ok"
17651
17652   if test "$have_gdk_pixbuf" = yes; then
17653     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17654 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17655 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17659 fi
17660 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17661 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17662     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17663 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17664 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17665   echo $ECHO_N "(cached) $ECHO_C" >&6
17666 else
17667   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17668 fi
17669 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17670 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17671   fi
17672
17673   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17674   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17675
17676
17677   if test "$have_gdk_pixbuf" = yes; then
17678     #
17679     # we appear to have pixbuf; check for headers/libs to be sure.
17680     #
17681     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17682     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17683
17684     have_gdk_pixbuf=no
17685
17686     # check for header A...
17687
17688   ac_save_CPPFLAGS="$CPPFLAGS"
17689   if test \! -z "$includedir" ; then
17690     CPPFLAGS="$CPPFLAGS -I$includedir"
17691   fi
17692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17693   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17694   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17695   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17696 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17697 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17698   echo $ECHO_N "(cached) $ECHO_C" >&6
17699 fi
17700 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17701 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17702 else
17703   # Is the header compilable?
17704 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17705 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17706 cat >conftest.$ac_ext <<_ACEOF
17707 /* confdefs.h.  */
17708 _ACEOF
17709 cat confdefs.h >>conftest.$ac_ext
17710 cat >>conftest.$ac_ext <<_ACEOF
17711 /* end confdefs.h.  */
17712 $ac_includes_default
17713 #include <gdk-pixbuf/gdk-pixbuf.h>
17714 _ACEOF
17715 rm -f conftest.$ac_objext
17716 if { (ac_try="$ac_compile"
17717 case "(($ac_try" in
17718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17719   *) ac_try_echo=$ac_try;;
17720 esac
17721 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17722   (eval "$ac_compile") 2>conftest.er1
17723   ac_status=$?
17724   grep -v '^ *+' conftest.er1 >conftest.err
17725   rm -f conftest.er1
17726   cat conftest.err >&5
17727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17728   (exit $ac_status); } && {
17729          test -z "$ac_c_werror_flag" ||
17730          test ! -s conftest.err
17731        } && test -s conftest.$ac_objext; then
17732   ac_header_compiler=yes
17733 else
17734   echo "$as_me: failed program was:" >&5
17735 sed 's/^/| /' conftest.$ac_ext >&5
17736
17737         ac_header_compiler=no
17738 fi
17739
17740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17741 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17742 echo "${ECHO_T}$ac_header_compiler" >&6; }
17743
17744 # Is the header present?
17745 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17746 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17747 cat >conftest.$ac_ext <<_ACEOF
17748 /* confdefs.h.  */
17749 _ACEOF
17750 cat confdefs.h >>conftest.$ac_ext
17751 cat >>conftest.$ac_ext <<_ACEOF
17752 /* end confdefs.h.  */
17753 #include <gdk-pixbuf/gdk-pixbuf.h>
17754 _ACEOF
17755 if { (ac_try="$ac_cpp conftest.$ac_ext"
17756 case "(($ac_try" in
17757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17758   *) ac_try_echo=$ac_try;;
17759 esac
17760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17761   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17762   ac_status=$?
17763   grep -v '^ *+' conftest.er1 >conftest.err
17764   rm -f conftest.er1
17765   cat conftest.err >&5
17766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17767   (exit $ac_status); } >/dev/null && {
17768          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17769          test ! -s conftest.err
17770        }; then
17771   ac_header_preproc=yes
17772 else
17773   echo "$as_me: failed program was:" >&5
17774 sed 's/^/| /' conftest.$ac_ext >&5
17775
17776   ac_header_preproc=no
17777 fi
17778
17779 rm -f conftest.err conftest.$ac_ext
17780 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17781 echo "${ECHO_T}$ac_header_preproc" >&6; }
17782
17783 # So?  What about this header?
17784 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17785   yes:no: )
17786     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17787 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17788     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17789 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17790     ac_header_preproc=yes
17791     ;;
17792   no:yes:* )
17793     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17794 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17795     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17796 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17797     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17798 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17799     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17800 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17801     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17802 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17803     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17804 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17805
17806     ;;
17807 esac
17808 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17809 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17810 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17811   echo $ECHO_N "(cached) $ECHO_C" >&6
17812 else
17813   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17814 fi
17815 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17816 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17817
17818 fi
17819 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17820   have_gdk_pixbuf=yes
17821 fi
17822
17823
17824   CPPFLAGS="$ac_save_CPPFLAGS"
17825
17826     # if that worked, check for header B...
17827     if test "$have_gdk_pixbuf" = yes; then
17828       have_gdk_pixbuf=no
17829       gdk_pixbuf_halfassed=yes
17830
17831   ac_save_CPPFLAGS="$CPPFLAGS"
17832   if test \! -z "$includedir" ; then
17833     CPPFLAGS="$CPPFLAGS -I$includedir"
17834   fi
17835   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17836   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17837   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17838   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17839 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17840 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17841   echo $ECHO_N "(cached) $ECHO_C" >&6
17842 fi
17843 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17844 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17845 else
17846   # Is the header compilable?
17847 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17848 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17849 cat >conftest.$ac_ext <<_ACEOF
17850 /* confdefs.h.  */
17851 _ACEOF
17852 cat confdefs.h >>conftest.$ac_ext
17853 cat >>conftest.$ac_ext <<_ACEOF
17854 /* end confdefs.h.  */
17855 $ac_includes_default
17856 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17857 _ACEOF
17858 rm -f conftest.$ac_objext
17859 if { (ac_try="$ac_compile"
17860 case "(($ac_try" in
17861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17862   *) ac_try_echo=$ac_try;;
17863 esac
17864 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17865   (eval "$ac_compile") 2>conftest.er1
17866   ac_status=$?
17867   grep -v '^ *+' conftest.er1 >conftest.err
17868   rm -f conftest.er1
17869   cat conftest.err >&5
17870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17871   (exit $ac_status); } && {
17872          test -z "$ac_c_werror_flag" ||
17873          test ! -s conftest.err
17874        } && test -s conftest.$ac_objext; then
17875   ac_header_compiler=yes
17876 else
17877   echo "$as_me: failed program was:" >&5
17878 sed 's/^/| /' conftest.$ac_ext >&5
17879
17880         ac_header_compiler=no
17881 fi
17882
17883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17884 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17885 echo "${ECHO_T}$ac_header_compiler" >&6; }
17886
17887 # Is the header present?
17888 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17889 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17890 cat >conftest.$ac_ext <<_ACEOF
17891 /* confdefs.h.  */
17892 _ACEOF
17893 cat confdefs.h >>conftest.$ac_ext
17894 cat >>conftest.$ac_ext <<_ACEOF
17895 /* end confdefs.h.  */
17896 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17897 _ACEOF
17898 if { (ac_try="$ac_cpp conftest.$ac_ext"
17899 case "(($ac_try" in
17900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17901   *) ac_try_echo=$ac_try;;
17902 esac
17903 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17904   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17905   ac_status=$?
17906   grep -v '^ *+' conftest.er1 >conftest.err
17907   rm -f conftest.er1
17908   cat conftest.err >&5
17909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910   (exit $ac_status); } >/dev/null && {
17911          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17912          test ! -s conftest.err
17913        }; then
17914   ac_header_preproc=yes
17915 else
17916   echo "$as_me: failed program was:" >&5
17917 sed 's/^/| /' conftest.$ac_ext >&5
17918
17919   ac_header_preproc=no
17920 fi
17921
17922 rm -f conftest.err conftest.$ac_ext
17923 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17924 echo "${ECHO_T}$ac_header_preproc" >&6; }
17925
17926 # So?  What about this header?
17927 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17928   yes:no: )
17929     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17930 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17931     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17932 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17933     ac_header_preproc=yes
17934     ;;
17935   no:yes:* )
17936     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17937 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17938     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17939 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17940     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17941 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17942     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17943 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17944     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17945 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17946     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17947 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17948
17949     ;;
17950 esac
17951 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17952 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17953 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17954   echo $ECHO_N "(cached) $ECHO_C" >&6
17955 else
17956   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17957 fi
17958 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17959 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17960
17961 fi
17962 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17963   have_gdk_pixbuf=yes
17964                          gdk_pixbuf_halfassed=no
17965 fi
17966
17967
17968   CPPFLAGS="$ac_save_CPPFLAGS"
17969
17970       # yay, it has a new name in Gtk 2.x...
17971       if test "$have_gdk_pixbuf" = no; then
17972         have_gdk_pixbuf=no
17973         gdk_pixbuf_halfassed=yes
17974
17975   ac_save_CPPFLAGS="$CPPFLAGS"
17976   if test \! -z "$includedir" ; then
17977     CPPFLAGS="$CPPFLAGS -I$includedir"
17978   fi
17979   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17980   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17981   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17982   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17983 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17984 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17985   echo $ECHO_N "(cached) $ECHO_C" >&6
17986 fi
17987 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17988 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17989 else
17990   # Is the header compilable?
17991 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17992 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17993 cat >conftest.$ac_ext <<_ACEOF
17994 /* confdefs.h.  */
17995 _ACEOF
17996 cat confdefs.h >>conftest.$ac_ext
17997 cat >>conftest.$ac_ext <<_ACEOF
17998 /* end confdefs.h.  */
17999 $ac_includes_default
18000 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18001 _ACEOF
18002 rm -f conftest.$ac_objext
18003 if { (ac_try="$ac_compile"
18004 case "(($ac_try" in
18005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18006   *) ac_try_echo=$ac_try;;
18007 esac
18008 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18009   (eval "$ac_compile") 2>conftest.er1
18010   ac_status=$?
18011   grep -v '^ *+' conftest.er1 >conftest.err
18012   rm -f conftest.er1
18013   cat conftest.err >&5
18014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015   (exit $ac_status); } && {
18016          test -z "$ac_c_werror_flag" ||
18017          test ! -s conftest.err
18018        } && test -s conftest.$ac_objext; then
18019   ac_header_compiler=yes
18020 else
18021   echo "$as_me: failed program was:" >&5
18022 sed 's/^/| /' conftest.$ac_ext >&5
18023
18024         ac_header_compiler=no
18025 fi
18026
18027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18028 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18029 echo "${ECHO_T}$ac_header_compiler" >&6; }
18030
18031 # Is the header present?
18032 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18033 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
18034 cat >conftest.$ac_ext <<_ACEOF
18035 /* confdefs.h.  */
18036 _ACEOF
18037 cat confdefs.h >>conftest.$ac_ext
18038 cat >>conftest.$ac_ext <<_ACEOF
18039 /* end confdefs.h.  */
18040 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18041 _ACEOF
18042 if { (ac_try="$ac_cpp conftest.$ac_ext"
18043 case "(($ac_try" in
18044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18045   *) ac_try_echo=$ac_try;;
18046 esac
18047 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18048   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18049   ac_status=$?
18050   grep -v '^ *+' conftest.er1 >conftest.err
18051   rm -f conftest.er1
18052   cat conftest.err >&5
18053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054   (exit $ac_status); } >/dev/null && {
18055          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18056          test ! -s conftest.err
18057        }; then
18058   ac_header_preproc=yes
18059 else
18060   echo "$as_me: failed program was:" >&5
18061 sed 's/^/| /' conftest.$ac_ext >&5
18062
18063   ac_header_preproc=no
18064 fi
18065
18066 rm -f conftest.err conftest.$ac_ext
18067 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18068 echo "${ECHO_T}$ac_header_preproc" >&6; }
18069
18070 # So?  What about this header?
18071 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18072   yes:no: )
18073     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18074 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18075     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18076 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18077     ac_header_preproc=yes
18078     ;;
18079   no:yes:* )
18080     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18081 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18082     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18083 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18084     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18085 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18086     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18087 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18088     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18089 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18090     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18091 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18092
18093     ;;
18094 esac
18095 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18096 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18097 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18098   echo $ECHO_N "(cached) $ECHO_C" >&6
18099 else
18100   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18101 fi
18102 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18103 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18104
18105 fi
18106 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18107   have_gdk_pixbuf=yes
18108                            gdk_pixbuf_halfassed=no
18109 fi
18110
18111
18112   CPPFLAGS="$ac_save_CPPFLAGS"
18113       fi
18114     fi
18115     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18116   fi
18117
18118   if test "$have_gdk_pixbuf" = yes; then
18119     # we have the headers, now check for the libraries
18120     have_gdk_pixbuf=no
18121     gdk_pixbuf_halfassed=yes
18122
18123     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18124 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18125
18126     # library A...
18127
18128   ac_save_CPPFLAGS="$CPPFLAGS"
18129   ac_save_LDFLAGS="$LDFLAGS"
18130 #  ac_save_LIBS="$LIBS"
18131
18132   if test \! -z "$includedir" ; then
18133     CPPFLAGS="$CPPFLAGS -I$includedir"
18134   fi
18135   # note: $X_CFLAGS includes $x_includes
18136   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18137
18138   if test \! -z "$libdir" ; then
18139     LDFLAGS="$LDFLAGS -L$libdir"
18140   fi
18141   # note: $X_LIBS includes $x_libraries
18142   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18143
18144   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18145   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18146   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18147 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18148 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   ac_check_lib_save_LIBS=$LIBS
18152 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18153 cat >conftest.$ac_ext <<_ACEOF
18154 /* confdefs.h.  */
18155 _ACEOF
18156 cat confdefs.h >>conftest.$ac_ext
18157 cat >>conftest.$ac_ext <<_ACEOF
18158 /* end confdefs.h.  */
18159
18160 /* Override any GCC internal prototype to avoid an error.
18161    Use char because int might match the return type of a GCC
18162    builtin and then its argument prototype would still apply.  */
18163 #ifdef __cplusplus
18164 extern "C"
18165 #endif
18166 char gdk_pixbuf_new_from_file ();
18167 int
18168 main ()
18169 {
18170 return gdk_pixbuf_new_from_file ();
18171   ;
18172   return 0;
18173 }
18174 _ACEOF
18175 rm -f conftest.$ac_objext conftest$ac_exeext
18176 if { (ac_try="$ac_link"
18177 case "(($ac_try" in
18178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18179   *) ac_try_echo=$ac_try;;
18180 esac
18181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18182   (eval "$ac_link") 2>conftest.er1
18183   ac_status=$?
18184   grep -v '^ *+' conftest.er1 >conftest.err
18185   rm -f conftest.er1
18186   cat conftest.err >&5
18187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18188   (exit $ac_status); } && {
18189          test -z "$ac_c_werror_flag" ||
18190          test ! -s conftest.err
18191        } && test -s conftest$ac_exeext &&
18192        $as_test_x conftest$ac_exeext; then
18193   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18194 else
18195   echo "$as_me: failed program was:" >&5
18196 sed 's/^/| /' conftest.$ac_ext >&5
18197
18198         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18199 fi
18200
18201 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18202       conftest$ac_exeext conftest.$ac_ext
18203 LIBS=$ac_check_lib_save_LIBS
18204 fi
18205 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18206 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18207 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18208   have_gdk_pixbuf=yes
18209 fi
18210
18211   CPPFLAGS="$ac_save_CPPFLAGS"
18212   LDFLAGS="$ac_save_LDFLAGS"
18213 #  LIBS="$ac_save_LIBS"
18214
18215     # library B...
18216     if test "$have_gdk_pixbuf" = yes; then
18217       have_gdk_pixbuf=no
18218
18219   ac_save_CPPFLAGS="$CPPFLAGS"
18220   ac_save_LDFLAGS="$LDFLAGS"
18221 #  ac_save_LIBS="$LIBS"
18222
18223   if test \! -z "$includedir" ; then
18224     CPPFLAGS="$CPPFLAGS -I$includedir"
18225   fi
18226   # note: $X_CFLAGS includes $x_includes
18227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18228
18229   if test \! -z "$libdir" ; then
18230     LDFLAGS="$LDFLAGS -L$libdir"
18231   fi
18232   # note: $X_LIBS includes $x_libraries
18233   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18234
18235   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18236   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18237   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18238 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18239 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18240   echo $ECHO_N "(cached) $ECHO_C" >&6
18241 else
18242   ac_check_lib_save_LIBS=$LIBS
18243 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18244 cat >conftest.$ac_ext <<_ACEOF
18245 /* confdefs.h.  */
18246 _ACEOF
18247 cat confdefs.h >>conftest.$ac_ext
18248 cat >>conftest.$ac_ext <<_ACEOF
18249 /* end confdefs.h.  */
18250
18251 /* Override any GCC internal prototype to avoid an error.
18252    Use char because int might match the return type of a GCC
18253    builtin and then its argument prototype would still apply.  */
18254 #ifdef __cplusplus
18255 extern "C"
18256 #endif
18257 char gdk_pixbuf_xlib_init ();
18258 int
18259 main ()
18260 {
18261 return gdk_pixbuf_xlib_init ();
18262   ;
18263   return 0;
18264 }
18265 _ACEOF
18266 rm -f conftest.$ac_objext conftest$ac_exeext
18267 if { (ac_try="$ac_link"
18268 case "(($ac_try" in
18269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18270   *) ac_try_echo=$ac_try;;
18271 esac
18272 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18273   (eval "$ac_link") 2>conftest.er1
18274   ac_status=$?
18275   grep -v '^ *+' conftest.er1 >conftest.err
18276   rm -f conftest.er1
18277   cat conftest.err >&5
18278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18279   (exit $ac_status); } && {
18280          test -z "$ac_c_werror_flag" ||
18281          test ! -s conftest.err
18282        } && test -s conftest$ac_exeext &&
18283        $as_test_x conftest$ac_exeext; then
18284   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18285 else
18286   echo "$as_me: failed program was:" >&5
18287 sed 's/^/| /' conftest.$ac_ext >&5
18288
18289         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18290 fi
18291
18292 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18293       conftest$ac_exeext conftest.$ac_ext
18294 LIBS=$ac_check_lib_save_LIBS
18295 fi
18296 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18297 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18298 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18299   have_gdk_pixbuf=yes
18300                       gdk_pixbuf_halfassed=no
18301 fi
18302
18303   CPPFLAGS="$ac_save_CPPFLAGS"
18304   LDFLAGS="$ac_save_LDFLAGS"
18305 #  LIBS="$ac_save_LIBS"
18306
18307     fi
18308   fi
18309
18310   if test "$have_gdk_pixbuf" = yes; then
18311     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18312     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18313     cat >>confdefs.h <<\_ACEOF
18314 #define HAVE_GDK_PIXBUF 1
18315 _ACEOF
18316
18317   else
18318     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18319 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18320   fi
18321
18322   if test "$have_gdk_pixbuf" = yes; then
18323
18324   ac_save_CPPFLAGS="$CPPFLAGS"
18325   ac_save_LDFLAGS="$LDFLAGS"
18326 #  ac_save_LIBS="$LIBS"
18327
18328   if test \! -z "$includedir" ; then
18329     CPPFLAGS="$CPPFLAGS -I$includedir"
18330   fi
18331   # note: $X_CFLAGS includes $x_includes
18332   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18333
18334   if test \! -z "$libdir" ; then
18335     LDFLAGS="$LDFLAGS -L$libdir"
18336   fi
18337   # note: $X_LIBS includes $x_libraries
18338   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18339
18340   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18341   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18342   { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18343 echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
18344 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18345   echo $ECHO_N "(cached) $ECHO_C" >&6
18346 else
18347   ac_check_lib_save_LIBS=$LIBS
18348 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18349 cat >conftest.$ac_ext <<_ACEOF
18350 /* confdefs.h.  */
18351 _ACEOF
18352 cat confdefs.h >>conftest.$ac_ext
18353 cat >>conftest.$ac_ext <<_ACEOF
18354 /* end confdefs.h.  */
18355
18356 /* Override any GCC internal prototype to avoid an error.
18357    Use char because int might match the return type of a GCC
18358    builtin and then its argument prototype would still apply.  */
18359 #ifdef __cplusplus
18360 extern "C"
18361 #endif
18362 char gdk_pixbuf_apply_embedded_orientation ();
18363 int
18364 main ()
18365 {
18366 return gdk_pixbuf_apply_embedded_orientation ();
18367   ;
18368   return 0;
18369 }
18370 _ACEOF
18371 rm -f conftest.$ac_objext conftest$ac_exeext
18372 if { (ac_try="$ac_link"
18373 case "(($ac_try" in
18374   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18375   *) ac_try_echo=$ac_try;;
18376 esac
18377 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18378   (eval "$ac_link") 2>conftest.er1
18379   ac_status=$?
18380   grep -v '^ *+' conftest.er1 >conftest.err
18381   rm -f conftest.er1
18382   cat conftest.err >&5
18383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18384   (exit $ac_status); } && {
18385          test -z "$ac_c_werror_flag" ||
18386          test ! -s conftest.err
18387        } && test -s conftest$ac_exeext &&
18388        $as_test_x conftest$ac_exeext; then
18389   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18390 else
18391   echo "$as_me: failed program was:" >&5
18392 sed 's/^/| /' conftest.$ac_ext >&5
18393
18394         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18395 fi
18396
18397 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18398       conftest$ac_exeext conftest.$ac_ext
18399 LIBS=$ac_check_lib_save_LIBS
18400 fi
18401 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18402 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18403 if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
18404   cat >>confdefs.h <<\_ACEOF
18405 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18406 _ACEOF
18407
18408 fi
18409
18410   CPPFLAGS="$ac_save_CPPFLAGS"
18411   LDFLAGS="$ac_save_LDFLAGS"
18412 #  LIBS="$ac_save_LIBS"
18413
18414   fi
18415 fi
18416
18417
18418 ###############################################################################
18419 #
18420 #       Check for -lXpm.
18421 #
18422 ###############################################################################
18423
18424 have_xpm=no
18425 with_xpm_req=unspecified
18426
18427 # Check whether --with-xpm was given.
18428 if test "${with_xpm+set}" = set; then
18429   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18430 else
18431   with_xpm=yes
18432 fi
18433
18434
18435
18436    case "$with_xpm" in
18437     yes) ;;
18438     no)  ;;
18439
18440     /*)
18441      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18442 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18443      d=$with_xpm/include
18444      if test -d $d; then
18445        X_CFLAGS="-I$d $X_CFLAGS"
18446        { echo "$as_me:$LINENO: result: $d" >&5
18447 echo "${ECHO_T}$d" >&6; }
18448      else
18449        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18450 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18451      fi
18452
18453      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18454 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18455      d=$with_xpm/lib
18456      if test -d $d; then
18457        X_LIBS="-L$d $X_LIBS"
18458        { echo "$as_me:$LINENO: result: $d" >&5
18459 echo "${ECHO_T}$d" >&6; }
18460      else
18461        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18462 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18463      fi
18464
18465      # replace the directory string with "yes".
18466      with_xpm_req="yes"
18467      with_xpm=$with_xpm_req
18468      ;;
18469
18470     *)
18471      echo ""
18472      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18473      echo "       If it is a directory, then \`DIR/include' will be added to"
18474      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18475      exit 1
18476      ;;
18477    esac
18478
18479
18480 if test "$with_xpm" = yes; then
18481
18482   ac_save_CPPFLAGS="$CPPFLAGS"
18483   if test \! -z "$includedir" ; then
18484     CPPFLAGS="$CPPFLAGS -I$includedir"
18485   fi
18486   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18487   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18488   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18489 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18490 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18491   echo $ECHO_N "(cached) $ECHO_C" >&6
18492 else
18493   cat >conftest.$ac_ext <<_ACEOF
18494 /* confdefs.h.  */
18495 _ACEOF
18496 cat confdefs.h >>conftest.$ac_ext
18497 cat >>conftest.$ac_ext <<_ACEOF
18498 /* end confdefs.h.  */
18499 #include <X11/Xlib.h>
18500
18501 #include <X11/xpm.h>
18502 _ACEOF
18503 rm -f conftest.$ac_objext
18504 if { (ac_try="$ac_compile"
18505 case "(($ac_try" in
18506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18507   *) ac_try_echo=$ac_try;;
18508 esac
18509 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18510   (eval "$ac_compile") 2>conftest.er1
18511   ac_status=$?
18512   grep -v '^ *+' conftest.er1 >conftest.err
18513   rm -f conftest.er1
18514   cat conftest.err >&5
18515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18516   (exit $ac_status); } && {
18517          test -z "$ac_c_werror_flag" ||
18518          test ! -s conftest.err
18519        } && test -s conftest.$ac_objext; then
18520   ac_cv_header_X11_xpm_h=yes
18521 else
18522   echo "$as_me: failed program was:" >&5
18523 sed 's/^/| /' conftest.$ac_ext >&5
18524
18525         ac_cv_header_X11_xpm_h=no
18526 fi
18527
18528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18529 fi
18530 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18531 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18532 if test $ac_cv_header_X11_xpm_h = yes; then
18533   have_xpm=yes
18534                     cat >>confdefs.h <<\_ACEOF
18535 #define HAVE_XPM 1
18536 _ACEOF
18537
18538                     XPM_LIBS="-lXpm $XPM_LIBS"
18539 fi
18540
18541
18542   CPPFLAGS="$ac_save_CPPFLAGS"
18543 elif test "$with_xpm" != no; then
18544   echo "error: must be yes or no: --with-xpm=$with_xpm"
18545   exit 1
18546 fi
18547
18548 # See comment near $motif_requires_xpm, above.
18549 # Need to do this here, after both Motif and XPM have been checked for.
18550 #
18551 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18552   if test "$motif_requires_xpm" = yes ; then
18553     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18554   fi
18555 fi
18556
18557 if test "$XPM_LIBS" = "" ; then
18558   XPM_LIBS=$(MINIXPM)
18559 fi
18560
18561
18562 ###############################################################################
18563 #
18564 #       Check for -ljpeg
18565 #
18566 ###############################################################################
18567
18568 have_jpeg=no
18569 with_jpeg_req=unspecified
18570 jpeg_halfassed=no
18571
18572 # Check whether --with-jpeg was given.
18573 if test "${with_jpeg+set}" = set; then
18574   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18575 else
18576   with_jpeg=yes
18577 fi
18578
18579
18580
18581    case "$with_jpeg" in
18582     yes) ;;
18583     no)  ;;
18584
18585     /*)
18586      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18587 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18588      d=$with_jpeg/include
18589      if test -d $d; then
18590        X_CFLAGS="-I$d $X_CFLAGS"
18591        { echo "$as_me:$LINENO: result: $d" >&5
18592 echo "${ECHO_T}$d" >&6; }
18593      else
18594        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18595 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18596      fi
18597
18598      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18599 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18600      d=$with_jpeg/lib
18601      if test -d $d; then
18602        X_LIBS="-L$d $X_LIBS"
18603        { echo "$as_me:$LINENO: result: $d" >&5
18604 echo "${ECHO_T}$d" >&6; }
18605      else
18606        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18607 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18608      fi
18609
18610      # replace the directory string with "yes".
18611      with_jpeg_req="yes"
18612      with_jpeg=$with_jpeg_req
18613      ;;
18614
18615     *)
18616      echo ""
18617      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18618      echo "       If it is a directory, then \`DIR/include' will be added to"
18619      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18620      exit 1
18621      ;;
18622    esac
18623
18624
18625 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18626   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18627   exit 1
18628 fi
18629
18630 if test "$with_jpeg" = yes; then
18631
18632   have_jpeg=no
18633
18634   ac_save_CPPFLAGS="$CPPFLAGS"
18635   if test \! -z "$includedir" ; then
18636     CPPFLAGS="$CPPFLAGS -I$includedir"
18637   fi
18638   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18639   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18640   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18641   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18642 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18643 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18644   echo $ECHO_N "(cached) $ECHO_C" >&6
18645 fi
18646 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18647 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18648 else
18649   # Is the header compilable?
18650 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18651 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18652 cat >conftest.$ac_ext <<_ACEOF
18653 /* confdefs.h.  */
18654 _ACEOF
18655 cat confdefs.h >>conftest.$ac_ext
18656 cat >>conftest.$ac_ext <<_ACEOF
18657 /* end confdefs.h.  */
18658 $ac_includes_default
18659 #include <jpeglib.h>
18660 _ACEOF
18661 rm -f conftest.$ac_objext
18662 if { (ac_try="$ac_compile"
18663 case "(($ac_try" in
18664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18665   *) ac_try_echo=$ac_try;;
18666 esac
18667 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18668   (eval "$ac_compile") 2>conftest.er1
18669   ac_status=$?
18670   grep -v '^ *+' conftest.er1 >conftest.err
18671   rm -f conftest.er1
18672   cat conftest.err >&5
18673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18674   (exit $ac_status); } && {
18675          test -z "$ac_c_werror_flag" ||
18676          test ! -s conftest.err
18677        } && test -s conftest.$ac_objext; then
18678   ac_header_compiler=yes
18679 else
18680   echo "$as_me: failed program was:" >&5
18681 sed 's/^/| /' conftest.$ac_ext >&5
18682
18683         ac_header_compiler=no
18684 fi
18685
18686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18687 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18688 echo "${ECHO_T}$ac_header_compiler" >&6; }
18689
18690 # Is the header present?
18691 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18692 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18693 cat >conftest.$ac_ext <<_ACEOF
18694 /* confdefs.h.  */
18695 _ACEOF
18696 cat confdefs.h >>conftest.$ac_ext
18697 cat >>conftest.$ac_ext <<_ACEOF
18698 /* end confdefs.h.  */
18699 #include <jpeglib.h>
18700 _ACEOF
18701 if { (ac_try="$ac_cpp conftest.$ac_ext"
18702 case "(($ac_try" in
18703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18704   *) ac_try_echo=$ac_try;;
18705 esac
18706 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18707   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18708   ac_status=$?
18709   grep -v '^ *+' conftest.er1 >conftest.err
18710   rm -f conftest.er1
18711   cat conftest.err >&5
18712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18713   (exit $ac_status); } >/dev/null && {
18714          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18715          test ! -s conftest.err
18716        }; then
18717   ac_header_preproc=yes
18718 else
18719   echo "$as_me: failed program was:" >&5
18720 sed 's/^/| /' conftest.$ac_ext >&5
18721
18722   ac_header_preproc=no
18723 fi
18724
18725 rm -f conftest.err conftest.$ac_ext
18726 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18727 echo "${ECHO_T}$ac_header_preproc" >&6; }
18728
18729 # So?  What about this header?
18730 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18731   yes:no: )
18732     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18733 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18734     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18735 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18736     ac_header_preproc=yes
18737     ;;
18738   no:yes:* )
18739     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18740 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18741     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18742 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18743     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18744 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18745     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18746 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18747     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18748 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18749     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18750 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18751
18752     ;;
18753 esac
18754 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18755 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18756 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18757   echo $ECHO_N "(cached) $ECHO_C" >&6
18758 else
18759   ac_cv_header_jpeglib_h=$ac_header_preproc
18760 fi
18761 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18762 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18763
18764 fi
18765 if test $ac_cv_header_jpeglib_h = yes; then
18766   have_jpeg=yes
18767 fi
18768
18769
18770   CPPFLAGS="$ac_save_CPPFLAGS"
18771
18772   if test "$have_jpeg" = yes; then
18773     # we have the header, now check for the library
18774     have_jpeg=no
18775     jpeg_halfassed=yes
18776
18777   ac_save_CPPFLAGS="$CPPFLAGS"
18778   ac_save_LDFLAGS="$LDFLAGS"
18779 #  ac_save_LIBS="$LIBS"
18780
18781   if test \! -z "$includedir" ; then
18782     CPPFLAGS="$CPPFLAGS -I$includedir"
18783   fi
18784   # note: $X_CFLAGS includes $x_includes
18785   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18786
18787   if test \! -z "$libdir" ; then
18788     LDFLAGS="$LDFLAGS -L$libdir"
18789   fi
18790   # note: $X_LIBS includes $x_libraries
18791   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18792
18793   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18794   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18795   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18796 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18797 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18798   echo $ECHO_N "(cached) $ECHO_C" >&6
18799 else
18800   ac_check_lib_save_LIBS=$LIBS
18801 LIBS="-ljpeg  $LIBS"
18802 cat >conftest.$ac_ext <<_ACEOF
18803 /* confdefs.h.  */
18804 _ACEOF
18805 cat confdefs.h >>conftest.$ac_ext
18806 cat >>conftest.$ac_ext <<_ACEOF
18807 /* end confdefs.h.  */
18808
18809 /* Override any GCC internal prototype to avoid an error.
18810    Use char because int might match the return type of a GCC
18811    builtin and then its argument prototype would still apply.  */
18812 #ifdef __cplusplus
18813 extern "C"
18814 #endif
18815 char jpeg_start_compress ();
18816 int
18817 main ()
18818 {
18819 return jpeg_start_compress ();
18820   ;
18821   return 0;
18822 }
18823 _ACEOF
18824 rm -f conftest.$ac_objext conftest$ac_exeext
18825 if { (ac_try="$ac_link"
18826 case "(($ac_try" in
18827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18828   *) ac_try_echo=$ac_try;;
18829 esac
18830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18831   (eval "$ac_link") 2>conftest.er1
18832   ac_status=$?
18833   grep -v '^ *+' conftest.er1 >conftest.err
18834   rm -f conftest.er1
18835   cat conftest.err >&5
18836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18837   (exit $ac_status); } && {
18838          test -z "$ac_c_werror_flag" ||
18839          test ! -s conftest.err
18840        } && test -s conftest$ac_exeext &&
18841        $as_test_x conftest$ac_exeext; then
18842   ac_cv_lib_jpeg_jpeg_start_compress=yes
18843 else
18844   echo "$as_me: failed program was:" >&5
18845 sed 's/^/| /' conftest.$ac_ext >&5
18846
18847         ac_cv_lib_jpeg_jpeg_start_compress=no
18848 fi
18849
18850 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18851       conftest$ac_exeext conftest.$ac_ext
18852 LIBS=$ac_check_lib_save_LIBS
18853 fi
18854 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18855 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18856 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18857   have_jpeg=yes
18858                     jpeg_halfassed=no
18859                     JPEG_LIBS="-ljpeg"
18860                     cat >>confdefs.h <<\_ACEOF
18861 #define HAVE_JPEGLIB 1
18862 _ACEOF
18863
18864 fi
18865
18866   CPPFLAGS="$ac_save_CPPFLAGS"
18867   LDFLAGS="$ac_save_LDFLAGS"
18868 #  LIBS="$ac_save_LIBS"
18869
18870   fi
18871 fi
18872
18873
18874 ###############################################################################
18875 #
18876 #       Check for pty support: this allows 'phosphor' and 'apple2'
18877 #       to run curses-based programs, or be used as terminal windows.
18878 #
18879 ###############################################################################
18880
18881 PTY_LIBS=
18882
18883
18884 for ac_header in pty.h util.h
18885 do
18886 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18887 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18888   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18889 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18890 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18891   echo $ECHO_N "(cached) $ECHO_C" >&6
18892 fi
18893 ac_res=`eval echo '${'$as_ac_Header'}'`
18894                { echo "$as_me:$LINENO: result: $ac_res" >&5
18895 echo "${ECHO_T}$ac_res" >&6; }
18896 else
18897   # Is the header compilable?
18898 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18899 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18900 cat >conftest.$ac_ext <<_ACEOF
18901 /* confdefs.h.  */
18902 _ACEOF
18903 cat confdefs.h >>conftest.$ac_ext
18904 cat >>conftest.$ac_ext <<_ACEOF
18905 /* end confdefs.h.  */
18906 $ac_includes_default
18907 #include <$ac_header>
18908 _ACEOF
18909 rm -f conftest.$ac_objext
18910 if { (ac_try="$ac_compile"
18911 case "(($ac_try" in
18912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18913   *) ac_try_echo=$ac_try;;
18914 esac
18915 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18916   (eval "$ac_compile") 2>conftest.er1
18917   ac_status=$?
18918   grep -v '^ *+' conftest.er1 >conftest.err
18919   rm -f conftest.er1
18920   cat conftest.err >&5
18921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18922   (exit $ac_status); } && {
18923          test -z "$ac_c_werror_flag" ||
18924          test ! -s conftest.err
18925        } && test -s conftest.$ac_objext; then
18926   ac_header_compiler=yes
18927 else
18928   echo "$as_me: failed program was:" >&5
18929 sed 's/^/| /' conftest.$ac_ext >&5
18930
18931         ac_header_compiler=no
18932 fi
18933
18934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18935 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18936 echo "${ECHO_T}$ac_header_compiler" >&6; }
18937
18938 # Is the header present?
18939 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18940 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18941 cat >conftest.$ac_ext <<_ACEOF
18942 /* confdefs.h.  */
18943 _ACEOF
18944 cat confdefs.h >>conftest.$ac_ext
18945 cat >>conftest.$ac_ext <<_ACEOF
18946 /* end confdefs.h.  */
18947 #include <$ac_header>
18948 _ACEOF
18949 if { (ac_try="$ac_cpp conftest.$ac_ext"
18950 case "(($ac_try" in
18951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18952   *) ac_try_echo=$ac_try;;
18953 esac
18954 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18955   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18956   ac_status=$?
18957   grep -v '^ *+' conftest.er1 >conftest.err
18958   rm -f conftest.er1
18959   cat conftest.err >&5
18960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961   (exit $ac_status); } >/dev/null && {
18962          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18963          test ! -s conftest.err
18964        }; then
18965   ac_header_preproc=yes
18966 else
18967   echo "$as_me: failed program was:" >&5
18968 sed 's/^/| /' conftest.$ac_ext >&5
18969
18970   ac_header_preproc=no
18971 fi
18972
18973 rm -f conftest.err conftest.$ac_ext
18974 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18975 echo "${ECHO_T}$ac_header_preproc" >&6; }
18976
18977 # So?  What about this header?
18978 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18979   yes:no: )
18980     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18981 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18982     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18983 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18984     ac_header_preproc=yes
18985     ;;
18986   no:yes:* )
18987     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18988 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18989     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18990 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18991     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18992 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18993     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18994 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18995     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18996 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18997     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18998 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18999
19000     ;;
19001 esac
19002 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19004 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19005   echo $ECHO_N "(cached) $ECHO_C" >&6
19006 else
19007   eval "$as_ac_Header=\$ac_header_preproc"
19008 fi
19009 ac_res=`eval echo '${'$as_ac_Header'}'`
19010                { echo "$as_me:$LINENO: result: $ac_res" >&5
19011 echo "${ECHO_T}$ac_res" >&6; }
19012
19013 fi
19014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19015   cat >>confdefs.h <<_ACEOF
19016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19017 _ACEOF
19018
19019 fi
19020
19021 done
19022
19023
19024   ac_save_CPPFLAGS="$CPPFLAGS"
19025   ac_save_LDFLAGS="$LDFLAGS"
19026 #  ac_save_LIBS="$LIBS"
19027
19028   if test \! -z "$includedir" ; then
19029     CPPFLAGS="$CPPFLAGS -I$includedir"
19030   fi
19031   # note: $X_CFLAGS includes $x_includes
19032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19033
19034   if test \! -z "$libdir" ; then
19035     LDFLAGS="$LDFLAGS -L$libdir"
19036   fi
19037   # note: $X_LIBS includes $x_libraries
19038   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19039
19040   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19041   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19042   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19043 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
19044 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19045   echo $ECHO_N "(cached) $ECHO_C" >&6
19046 else
19047   ac_check_lib_save_LIBS=$LIBS
19048 LIBS="-lutil  $LIBS"
19049 cat >conftest.$ac_ext <<_ACEOF
19050 /* confdefs.h.  */
19051 _ACEOF
19052 cat confdefs.h >>conftest.$ac_ext
19053 cat >>conftest.$ac_ext <<_ACEOF
19054 /* end confdefs.h.  */
19055
19056 /* Override any GCC internal prototype to avoid an error.
19057    Use char because int might match the return type of a GCC
19058    builtin and then its argument prototype would still apply.  */
19059 #ifdef __cplusplus
19060 extern "C"
19061 #endif
19062 char forkpty ();
19063 int
19064 main ()
19065 {
19066 return forkpty ();
19067   ;
19068   return 0;
19069 }
19070 _ACEOF
19071 rm -f conftest.$ac_objext conftest$ac_exeext
19072 if { (ac_try="$ac_link"
19073 case "(($ac_try" in
19074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19075   *) ac_try_echo=$ac_try;;
19076 esac
19077 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19078   (eval "$ac_link") 2>conftest.er1
19079   ac_status=$?
19080   grep -v '^ *+' conftest.er1 >conftest.err
19081   rm -f conftest.er1
19082   cat conftest.err >&5
19083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19084   (exit $ac_status); } && {
19085          test -z "$ac_c_werror_flag" ||
19086          test ! -s conftest.err
19087        } && test -s conftest$ac_exeext &&
19088        $as_test_x conftest$ac_exeext; then
19089   ac_cv_lib_util_forkpty=yes
19090 else
19091   echo "$as_me: failed program was:" >&5
19092 sed 's/^/| /' conftest.$ac_ext >&5
19093
19094         ac_cv_lib_util_forkpty=no
19095 fi
19096
19097 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19098       conftest$ac_exeext conftest.$ac_ext
19099 LIBS=$ac_check_lib_save_LIBS
19100 fi
19101 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19102 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19103 if test $ac_cv_lib_util_forkpty = yes; then
19104   PTY_LIBS="-lutil"
19105                 ac_have_forkpty=yes
19106                 cat >>confdefs.h <<\_ACEOF
19107 #define HAVE_FORKPTY 1
19108 _ACEOF
19109
19110 fi
19111
19112   CPPFLAGS="$ac_save_CPPFLAGS"
19113   LDFLAGS="$ac_save_LDFLAGS"
19114 #  LIBS="$ac_save_LIBS"
19115
19116
19117 if test "$ac_have_forkpty" != yes ; then
19118   # we don't need (or have) -lutil on MacOS 10.4.2...
19119
19120   ac_save_CPPFLAGS="$CPPFLAGS"
19121   ac_save_LDFLAGS="$LDFLAGS"
19122 #  ac_save_LIBS="$LIBS"
19123
19124   if test \! -z "$includedir" ; then
19125     CPPFLAGS="$CPPFLAGS -I$includedir"
19126   fi
19127   # note: $X_CFLAGS includes $x_includes
19128   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19129
19130   if test \! -z "$libdir" ; then
19131     LDFLAGS="$LDFLAGS -L$libdir"
19132   fi
19133   # note: $X_LIBS includes $x_libraries
19134   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19135
19136   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19137   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19138   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19139 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
19140 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19141   echo $ECHO_N "(cached) $ECHO_C" >&6
19142 else
19143   ac_check_lib_save_LIBS=$LIBS
19144 LIBS="-lc  $LIBS"
19145 cat >conftest.$ac_ext <<_ACEOF
19146 /* confdefs.h.  */
19147 _ACEOF
19148 cat confdefs.h >>conftest.$ac_ext
19149 cat >>conftest.$ac_ext <<_ACEOF
19150 /* end confdefs.h.  */
19151
19152 /* Override any GCC internal prototype to avoid an error.
19153    Use char because int might match the return type of a GCC
19154    builtin and then its argument prototype would still apply.  */
19155 #ifdef __cplusplus
19156 extern "C"
19157 #endif
19158 char forkpty ();
19159 int
19160 main ()
19161 {
19162 return forkpty ();
19163   ;
19164   return 0;
19165 }
19166 _ACEOF
19167 rm -f conftest.$ac_objext conftest$ac_exeext
19168 if { (ac_try="$ac_link"
19169 case "(($ac_try" in
19170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19171   *) ac_try_echo=$ac_try;;
19172 esac
19173 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19174   (eval "$ac_link") 2>conftest.er1
19175   ac_status=$?
19176   grep -v '^ *+' conftest.er1 >conftest.err
19177   rm -f conftest.er1
19178   cat conftest.err >&5
19179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19180   (exit $ac_status); } && {
19181          test -z "$ac_c_werror_flag" ||
19182          test ! -s conftest.err
19183        } && test -s conftest$ac_exeext &&
19184        $as_test_x conftest$ac_exeext; then
19185   ac_cv_lib_c_forkpty=yes
19186 else
19187   echo "$as_me: failed program was:" >&5
19188 sed 's/^/| /' conftest.$ac_ext >&5
19189
19190         ac_cv_lib_c_forkpty=no
19191 fi
19192
19193 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19194       conftest$ac_exeext conftest.$ac_ext
19195 LIBS=$ac_check_lib_save_LIBS
19196 fi
19197 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19198 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19199 if test $ac_cv_lib_c_forkpty = yes; then
19200   PTY_LIBS=""
19201                   cat >>confdefs.h <<\_ACEOF
19202 #define HAVE_FORKPTY 1
19203 _ACEOF
19204
19205 fi
19206
19207   CPPFLAGS="$ac_save_CPPFLAGS"
19208   LDFLAGS="$ac_save_LDFLAGS"
19209 #  LIBS="$ac_save_LIBS"
19210
19211 fi
19212
19213 ###############################################################################
19214 #
19215 #       Check for the XSHM server extension.
19216 #
19217 ###############################################################################
19218
19219 have_xshm=no
19220 with_xshm_req=unspecified
19221
19222 # Check whether --with-xshm-ext was given.
19223 if test "${with_xshm_ext+set}" = set; then
19224   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19225 else
19226   with_xshm=yes
19227 fi
19228
19229
19230
19231    case "$with_xshm" in
19232     yes) ;;
19233     no)  ;;
19234
19235     /*)
19236      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19237 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19238      d=$with_xshm/include
19239      if test -d $d; then
19240        X_CFLAGS="-I$d $X_CFLAGS"
19241        { echo "$as_me:$LINENO: result: $d" >&5
19242 echo "${ECHO_T}$d" >&6; }
19243      else
19244        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19245 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19246      fi
19247
19248      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19249 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19250      d=$with_xshm/lib
19251      if test -d $d; then
19252        X_LIBS="-L$d $X_LIBS"
19253        { echo "$as_me:$LINENO: result: $d" >&5
19254 echo "${ECHO_T}$d" >&6; }
19255      else
19256        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19257 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19258      fi
19259
19260      # replace the directory string with "yes".
19261      with_xshm_req="yes"
19262      with_xshm=$with_xshm_req
19263      ;;
19264
19265     *)
19266      echo ""
19267      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19268      echo "       If it is a directory, then \`DIR/include' will be added to"
19269      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19270      exit 1
19271      ;;
19272    esac
19273
19274
19275 if test "$with_xshm" = yes; then
19276
19277   # first check for Xshm.h.
19278
19279   ac_save_CPPFLAGS="$CPPFLAGS"
19280   if test \! -z "$includedir" ; then
19281     CPPFLAGS="$CPPFLAGS -I$includedir"
19282   fi
19283   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19284   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19285   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19286 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19287 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19288   echo $ECHO_N "(cached) $ECHO_C" >&6
19289 else
19290   cat >conftest.$ac_ext <<_ACEOF
19291 /* confdefs.h.  */
19292 _ACEOF
19293 cat confdefs.h >>conftest.$ac_ext
19294 cat >>conftest.$ac_ext <<_ACEOF
19295 /* end confdefs.h.  */
19296 #include <X11/Xlib.h>
19297
19298 #include <X11/extensions/XShm.h>
19299 _ACEOF
19300 rm -f conftest.$ac_objext
19301 if { (ac_try="$ac_compile"
19302 case "(($ac_try" in
19303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19304   *) ac_try_echo=$ac_try;;
19305 esac
19306 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19307   (eval "$ac_compile") 2>conftest.er1
19308   ac_status=$?
19309   grep -v '^ *+' conftest.er1 >conftest.err
19310   rm -f conftest.er1
19311   cat conftest.err >&5
19312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313   (exit $ac_status); } && {
19314          test -z "$ac_c_werror_flag" ||
19315          test ! -s conftest.err
19316        } && test -s conftest.$ac_objext; then
19317   ac_cv_header_X11_extensions_XShm_h=yes
19318 else
19319   echo "$as_me: failed program was:" >&5
19320 sed 's/^/| /' conftest.$ac_ext >&5
19321
19322         ac_cv_header_X11_extensions_XShm_h=no
19323 fi
19324
19325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19326 fi
19327 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19328 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19329 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19330   have_xshm=yes
19331 fi
19332
19333
19334   CPPFLAGS="$ac_save_CPPFLAGS"
19335
19336   # if that succeeded, then check for sys/ipc.h.
19337   if test "$have_xshm" = yes; then
19338     have_xshm=no
19339
19340   ac_save_CPPFLAGS="$CPPFLAGS"
19341   if test \! -z "$includedir" ; then
19342     CPPFLAGS="$CPPFLAGS -I$includedir"
19343   fi
19344   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19345   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19346   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19347   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19348 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19349 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19350   echo $ECHO_N "(cached) $ECHO_C" >&6
19351 fi
19352 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19353 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19354 else
19355   # Is the header compilable?
19356 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19357 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19358 cat >conftest.$ac_ext <<_ACEOF
19359 /* confdefs.h.  */
19360 _ACEOF
19361 cat confdefs.h >>conftest.$ac_ext
19362 cat >>conftest.$ac_ext <<_ACEOF
19363 /* end confdefs.h.  */
19364 $ac_includes_default
19365 #include <sys/ipc.h>
19366 _ACEOF
19367 rm -f conftest.$ac_objext
19368 if { (ac_try="$ac_compile"
19369 case "(($ac_try" in
19370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19371   *) ac_try_echo=$ac_try;;
19372 esac
19373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19374   (eval "$ac_compile") 2>conftest.er1
19375   ac_status=$?
19376   grep -v '^ *+' conftest.er1 >conftest.err
19377   rm -f conftest.er1
19378   cat conftest.err >&5
19379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19380   (exit $ac_status); } && {
19381          test -z "$ac_c_werror_flag" ||
19382          test ! -s conftest.err
19383        } && test -s conftest.$ac_objext; then
19384   ac_header_compiler=yes
19385 else
19386   echo "$as_me: failed program was:" >&5
19387 sed 's/^/| /' conftest.$ac_ext >&5
19388
19389         ac_header_compiler=no
19390 fi
19391
19392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19393 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19394 echo "${ECHO_T}$ac_header_compiler" >&6; }
19395
19396 # Is the header present?
19397 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19398 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19399 cat >conftest.$ac_ext <<_ACEOF
19400 /* confdefs.h.  */
19401 _ACEOF
19402 cat confdefs.h >>conftest.$ac_ext
19403 cat >>conftest.$ac_ext <<_ACEOF
19404 /* end confdefs.h.  */
19405 #include <sys/ipc.h>
19406 _ACEOF
19407 if { (ac_try="$ac_cpp conftest.$ac_ext"
19408 case "(($ac_try" in
19409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19410   *) ac_try_echo=$ac_try;;
19411 esac
19412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19413   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19414   ac_status=$?
19415   grep -v '^ *+' conftest.er1 >conftest.err
19416   rm -f conftest.er1
19417   cat conftest.err >&5
19418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419   (exit $ac_status); } >/dev/null && {
19420          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19421          test ! -s conftest.err
19422        }; then
19423   ac_header_preproc=yes
19424 else
19425   echo "$as_me: failed program was:" >&5
19426 sed 's/^/| /' conftest.$ac_ext >&5
19427
19428   ac_header_preproc=no
19429 fi
19430
19431 rm -f conftest.err conftest.$ac_ext
19432 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19433 echo "${ECHO_T}$ac_header_preproc" >&6; }
19434
19435 # So?  What about this header?
19436 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19437   yes:no: )
19438     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19439 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19440     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19441 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19442     ac_header_preproc=yes
19443     ;;
19444   no:yes:* )
19445     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19446 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19447     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19448 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19449     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19450 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19451     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19452 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19453     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19454 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19455     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19456 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19457
19458     ;;
19459 esac
19460 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19461 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19462 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19463   echo $ECHO_N "(cached) $ECHO_C" >&6
19464 else
19465   ac_cv_header_sys_ipc_h=$ac_header_preproc
19466 fi
19467 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19468 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19469
19470 fi
19471 if test $ac_cv_header_sys_ipc_h = yes; then
19472   have_xshm=yes
19473 fi
19474
19475
19476   CPPFLAGS="$ac_save_CPPFLAGS"
19477   fi
19478
19479   # if that succeeded, then check for sys/shm.h.
19480   if test "$have_xshm" = yes; then
19481     have_xshm=no
19482
19483   ac_save_CPPFLAGS="$CPPFLAGS"
19484   if test \! -z "$includedir" ; then
19485     CPPFLAGS="$CPPFLAGS -I$includedir"
19486   fi
19487   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19488   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19489   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19490   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19491 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19492 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19493   echo $ECHO_N "(cached) $ECHO_C" >&6
19494 fi
19495 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19496 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19497 else
19498   # Is the header compilable?
19499 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19500 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19501 cat >conftest.$ac_ext <<_ACEOF
19502 /* confdefs.h.  */
19503 _ACEOF
19504 cat confdefs.h >>conftest.$ac_ext
19505 cat >>conftest.$ac_ext <<_ACEOF
19506 /* end confdefs.h.  */
19507 $ac_includes_default
19508 #include <sys/shm.h>
19509 _ACEOF
19510 rm -f conftest.$ac_objext
19511 if { (ac_try="$ac_compile"
19512 case "(($ac_try" in
19513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19514   *) ac_try_echo=$ac_try;;
19515 esac
19516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19517   (eval "$ac_compile") 2>conftest.er1
19518   ac_status=$?
19519   grep -v '^ *+' conftest.er1 >conftest.err
19520   rm -f conftest.er1
19521   cat conftest.err >&5
19522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19523   (exit $ac_status); } && {
19524          test -z "$ac_c_werror_flag" ||
19525          test ! -s conftest.err
19526        } && test -s conftest.$ac_objext; then
19527   ac_header_compiler=yes
19528 else
19529   echo "$as_me: failed program was:" >&5
19530 sed 's/^/| /' conftest.$ac_ext >&5
19531
19532         ac_header_compiler=no
19533 fi
19534
19535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19536 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19537 echo "${ECHO_T}$ac_header_compiler" >&6; }
19538
19539 # Is the header present?
19540 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19541 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19542 cat >conftest.$ac_ext <<_ACEOF
19543 /* confdefs.h.  */
19544 _ACEOF
19545 cat confdefs.h >>conftest.$ac_ext
19546 cat >>conftest.$ac_ext <<_ACEOF
19547 /* end confdefs.h.  */
19548 #include <sys/shm.h>
19549 _ACEOF
19550 if { (ac_try="$ac_cpp conftest.$ac_ext"
19551 case "(($ac_try" in
19552   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19553   *) ac_try_echo=$ac_try;;
19554 esac
19555 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19556   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19557   ac_status=$?
19558   grep -v '^ *+' conftest.er1 >conftest.err
19559   rm -f conftest.er1
19560   cat conftest.err >&5
19561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19562   (exit $ac_status); } >/dev/null && {
19563          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19564          test ! -s conftest.err
19565        }; then
19566   ac_header_preproc=yes
19567 else
19568   echo "$as_me: failed program was:" >&5
19569 sed 's/^/| /' conftest.$ac_ext >&5
19570
19571   ac_header_preproc=no
19572 fi
19573
19574 rm -f conftest.err conftest.$ac_ext
19575 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19576 echo "${ECHO_T}$ac_header_preproc" >&6; }
19577
19578 # So?  What about this header?
19579 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19580   yes:no: )
19581     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19582 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19583     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19584 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19585     ac_header_preproc=yes
19586     ;;
19587   no:yes:* )
19588     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19589 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19590     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19591 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19592     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19593 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19594     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19595 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19596     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19597 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19598     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19599 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19600
19601     ;;
19602 esac
19603 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19604 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19605 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19606   echo $ECHO_N "(cached) $ECHO_C" >&6
19607 else
19608   ac_cv_header_sys_shm_h=$ac_header_preproc
19609 fi
19610 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19611 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19612
19613 fi
19614 if test $ac_cv_header_sys_shm_h = yes; then
19615   have_xshm=yes
19616 fi
19617
19618
19619   CPPFLAGS="$ac_save_CPPFLAGS"
19620   fi
19621
19622   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19623   # to exist, but the library code to not exist.  And even better, the library
19624   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19625   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19626   # that's not quite right, but close enough.)
19627   #
19628   case "$host" in
19629     *-aix*)
19630       if  `uname -v` -eq 3 ; then
19631         have_xshm=no
19632
19633   ac_save_CPPFLAGS="$CPPFLAGS"
19634   ac_save_LDFLAGS="$LDFLAGS"
19635 #  ac_save_LIBS="$LIBS"
19636
19637   if test \! -z "$includedir" ; then
19638     CPPFLAGS="$CPPFLAGS -I$includedir"
19639   fi
19640   # note: $X_CFLAGS includes $x_includes
19641   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19642
19643   if test \! -z "$libdir" ; then
19644     LDFLAGS="$LDFLAGS -L$libdir"
19645   fi
19646   # note: $X_LIBS includes $x_libraries
19647   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19648
19649   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19650   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19651   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19652 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19653 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19654   echo $ECHO_N "(cached) $ECHO_C" >&6
19655 else
19656   ac_check_lib_save_LIBS=$LIBS
19657 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19658 cat >conftest.$ac_ext <<_ACEOF
19659 /* confdefs.h.  */
19660 _ACEOF
19661 cat confdefs.h >>conftest.$ac_ext
19662 cat >>conftest.$ac_ext <<_ACEOF
19663 /* end confdefs.h.  */
19664
19665 /* Override any GCC internal prototype to avoid an error.
19666    Use char because int might match the return type of a GCC
19667    builtin and then its argument prototype would still apply.  */
19668 #ifdef __cplusplus
19669 extern "C"
19670 #endif
19671 char XShmQueryExtension ();
19672 int
19673 main ()
19674 {
19675 return XShmQueryExtension ();
19676   ;
19677   return 0;
19678 }
19679 _ACEOF
19680 rm -f conftest.$ac_objext conftest$ac_exeext
19681 if { (ac_try="$ac_link"
19682 case "(($ac_try" in
19683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19684   *) ac_try_echo=$ac_try;;
19685 esac
19686 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19687   (eval "$ac_link") 2>conftest.er1
19688   ac_status=$?
19689   grep -v '^ *+' conftest.er1 >conftest.err
19690   rm -f conftest.er1
19691   cat conftest.err >&5
19692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19693   (exit $ac_status); } && {
19694          test -z "$ac_c_werror_flag" ||
19695          test ! -s conftest.err
19696        } && test -s conftest$ac_exeext &&
19697        $as_test_x conftest$ac_exeext; then
19698   ac_cv_lib_XextSam_XShmQueryExtension=yes
19699 else
19700   echo "$as_me: failed program was:" >&5
19701 sed 's/^/| /' conftest.$ac_ext >&5
19702
19703         ac_cv_lib_XextSam_XShmQueryExtension=no
19704 fi
19705
19706 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19707       conftest$ac_exeext conftest.$ac_ext
19708 LIBS=$ac_check_lib_save_LIBS
19709 fi
19710 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19711 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19712 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19713   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19714 else
19715   true
19716 fi
19717
19718   CPPFLAGS="$ac_save_CPPFLAGS"
19719   LDFLAGS="$ac_save_LDFLAGS"
19720 #  LIBS="$ac_save_LIBS"
19721
19722       fi
19723     ;;
19724   esac
19725
19726   # if that succeeded, then we've really got it.
19727   if test "$have_xshm" = yes; then
19728     cat >>confdefs.h <<\_ACEOF
19729 #define HAVE_XSHM_EXTENSION 1
19730 _ACEOF
19731
19732   fi
19733
19734 elif test "$with_xshm" != no; then
19735   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19736   exit 1
19737 fi
19738
19739
19740 ###############################################################################
19741 #
19742 #       Check for the DOUBLE-BUFFER server extension.
19743 #
19744 ###############################################################################
19745
19746 have_xdbe=no
19747 with_xdbe_req=unspecified
19748
19749 # Check whether --with-xdbe-ext was given.
19750 if test "${with_xdbe_ext+set}" = set; then
19751   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19752 else
19753   with_xdbe=yes
19754 fi
19755
19756
19757
19758    case "$with_xdbe" in
19759     yes) ;;
19760     no)  ;;
19761
19762     /*)
19763      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19764 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19765      d=$with_xdbe/include
19766      if test -d $d; then
19767        X_CFLAGS="-I$d $X_CFLAGS"
19768        { echo "$as_me:$LINENO: result: $d" >&5
19769 echo "${ECHO_T}$d" >&6; }
19770      else
19771        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19772 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19773      fi
19774
19775      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19776 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19777      d=$with_xdbe/lib
19778      if test -d $d; then
19779        X_LIBS="-L$d $X_LIBS"
19780        { echo "$as_me:$LINENO: result: $d" >&5
19781 echo "${ECHO_T}$d" >&6; }
19782      else
19783        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19784 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19785      fi
19786
19787      # replace the directory string with "yes".
19788      with_xdbe_req="yes"
19789      with_xdbe=$with_xdbe_req
19790      ;;
19791
19792     *)
19793      echo ""
19794      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19795      echo "       If it is a directory, then \`DIR/include' will be added to"
19796      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19797      exit 1
19798      ;;
19799    esac
19800
19801
19802 if test "$with_xdbe" = yes; then
19803
19804
19805   ac_save_CPPFLAGS="$CPPFLAGS"
19806   if test \! -z "$includedir" ; then
19807     CPPFLAGS="$CPPFLAGS -I$includedir"
19808   fi
19809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19810   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19811   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19812 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19813 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19814   echo $ECHO_N "(cached) $ECHO_C" >&6
19815 else
19816   cat >conftest.$ac_ext <<_ACEOF
19817 /* confdefs.h.  */
19818 _ACEOF
19819 cat confdefs.h >>conftest.$ac_ext
19820 cat >>conftest.$ac_ext <<_ACEOF
19821 /* end confdefs.h.  */
19822 #include <X11/Xlib.h>
19823
19824 #include <X11/extensions/Xdbe.h>
19825 _ACEOF
19826 rm -f conftest.$ac_objext
19827 if { (ac_try="$ac_compile"
19828 case "(($ac_try" in
19829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19830   *) ac_try_echo=$ac_try;;
19831 esac
19832 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19833   (eval "$ac_compile") 2>conftest.er1
19834   ac_status=$?
19835   grep -v '^ *+' conftest.er1 >conftest.err
19836   rm -f conftest.er1
19837   cat conftest.err >&5
19838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19839   (exit $ac_status); } && {
19840          test -z "$ac_c_werror_flag" ||
19841          test ! -s conftest.err
19842        } && test -s conftest.$ac_objext; then
19843   ac_cv_header_X11_extensions_Xdbe_h=yes
19844 else
19845   echo "$as_me: failed program was:" >&5
19846 sed 's/^/| /' conftest.$ac_ext >&5
19847
19848         ac_cv_header_X11_extensions_Xdbe_h=no
19849 fi
19850
19851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19852 fi
19853 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19854 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19855 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19856   have_xdbe=yes
19857 fi
19858
19859
19860   CPPFLAGS="$ac_save_CPPFLAGS"
19861   if test "$have_xdbe" = yes; then
19862     cat >>confdefs.h <<\_ACEOF
19863 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19864 _ACEOF
19865
19866   fi
19867
19868 elif test "$with_xdbe" != no; then
19869   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19870   exit 1
19871 fi
19872
19873
19874 ###############################################################################
19875 #
19876 #       Check for the SGI XReadDisplay server extension.
19877 #
19878 #       Note: this has to be down here, rather than up with the other server
19879 #       extension tests, so that the output of `configure --help' is in the
19880 #       right order.  Arrgh!
19881 #
19882 ###############################################################################
19883
19884 have_readdisplay=no
19885 with_readdisplay_req=unspecified
19886
19887 # Check whether --with-readdisplay was given.
19888 if test "${with_readdisplay+set}" = set; then
19889   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19890 else
19891   with_readdisplay=yes
19892 fi
19893
19894
19895
19896    case "$with_readdisplay" in
19897     yes) ;;
19898     no)  ;;
19899
19900     /*)
19901      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19902 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19903      d=$with_readdisplay/include
19904      if test -d $d; then
19905        X_CFLAGS="-I$d $X_CFLAGS"
19906        { echo "$as_me:$LINENO: result: $d" >&5
19907 echo "${ECHO_T}$d" >&6; }
19908      else
19909        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19910 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19911      fi
19912
19913      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19914 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19915      d=$with_readdisplay/lib
19916      if test -d $d; then
19917        X_LIBS="-L$d $X_LIBS"
19918        { echo "$as_me:$LINENO: result: $d" >&5
19919 echo "${ECHO_T}$d" >&6; }
19920      else
19921        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19922 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19923      fi
19924
19925      # replace the directory string with "yes".
19926      with_readdisplay_req="yes"
19927      with_readdisplay=$with_readdisplay_req
19928      ;;
19929
19930     *)
19931      echo ""
19932      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19933      echo "       If it is a directory, then \`DIR/include' will be added to"
19934      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19935      exit 1
19936      ;;
19937    esac
19938
19939
19940 if test "$with_readdisplay" = yes; then
19941
19942   ac_save_CPPFLAGS="$CPPFLAGS"
19943   if test \! -z "$includedir" ; then
19944     CPPFLAGS="$CPPFLAGS -I$includedir"
19945   fi
19946   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19947   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19948   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19949 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19950 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19951   echo $ECHO_N "(cached) $ECHO_C" >&6
19952 else
19953   cat >conftest.$ac_ext <<_ACEOF
19954 /* confdefs.h.  */
19955 _ACEOF
19956 cat confdefs.h >>conftest.$ac_ext
19957 cat >>conftest.$ac_ext <<_ACEOF
19958 /* end confdefs.h.  */
19959 #include <X11/Xlib.h>
19960
19961 #include <X11/extensions/readdisplay.h>
19962 _ACEOF
19963 rm -f conftest.$ac_objext
19964 if { (ac_try="$ac_compile"
19965 case "(($ac_try" in
19966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19967   *) ac_try_echo=$ac_try;;
19968 esac
19969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19970   (eval "$ac_compile") 2>conftest.er1
19971   ac_status=$?
19972   grep -v '^ *+' conftest.er1 >conftest.err
19973   rm -f conftest.er1
19974   cat conftest.err >&5
19975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19976   (exit $ac_status); } && {
19977          test -z "$ac_c_werror_flag" ||
19978          test ! -s conftest.err
19979        } && test -s conftest.$ac_objext; then
19980   ac_cv_header_X11_extensions_readdisplay_h=yes
19981 else
19982   echo "$as_me: failed program was:" >&5
19983 sed 's/^/| /' conftest.$ac_ext >&5
19984
19985         ac_cv_header_X11_extensions_readdisplay_h=no
19986 fi
19987
19988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19989 fi
19990 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19991 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19992 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19993   cat >>confdefs.h <<\_ACEOF
19994 #define HAVE_READ_DISPLAY_EXTENSION 1
19995 _ACEOF
19996
19997 fi
19998
19999
20000   CPPFLAGS="$ac_save_CPPFLAGS"
20001 elif test "$with_readdisplay" != no; then
20002   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20003   exit 1
20004 fi
20005
20006
20007 ###############################################################################
20008 #
20009 #       Check for a directory full of images to use as the default value
20010 #       of the "imageDirectory" preference.
20011 #
20012 ###############################################################################
20013
20014 have_imagedir=no
20015 with_imagedir_req=unspecified
20016
20017
20018 # Check whether --with-image-directory was given.
20019 if test "${with_image_directory+set}" = set; then
20020   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
20021 else
20022   with_imagedir=yes
20023 fi
20024
20025 # no HANDLE_X_PATH_ARG for this one
20026
20027 case "$with_imagedir" in
20028   /*)
20029     # absolute path
20030     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20031 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
20032     if test -d "$with_imagedir" ; then
20033       { echo "$as_me:$LINENO: result: yes" >&5
20034 echo "${ECHO_T}yes" >&6; }
20035     else
20036       { echo "$as_me:$LINENO: result: no" >&5
20037 echo "${ECHO_T}no" >&6; }
20038       with_imagedir=""
20039     fi
20040   ;;
20041   yes)
20042     with_imagedir=""
20043
20044     #### Could use some more defaults here...
20045     for dd in \
20046       "/usr/share/backgrounds/images/"          \
20047       "/usr/share/wallpapers/"                  \
20048       "/Library/Desktop Pictures/"              \
20049     ; do
20050       if test -z "$with_imagedir"; then
20051         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
20052 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
20053         if test -d "$dd" ; then
20054           { echo "$as_me:$LINENO: result: yes" >&5
20055 echo "${ECHO_T}yes" >&6; }
20056           with_imagedir="$dd"
20057         else
20058           { echo "$as_me:$LINENO: result: no" >&5
20059 echo "${ECHO_T}no" >&6; }
20060         fi
20061       fi
20062     done
20063
20064   ;;
20065   no)
20066     with_imagedir=""
20067   ;;
20068
20069   *)
20070     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20071     exit 1
20072   ;;
20073 esac
20074 ac_cv_imagedir="$with_imagedir"
20075
20076 DEFAULT_IMAGES_P='True'
20077 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20078
20079 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20080   DEFAULT_IMAGES_P='False'
20081 fi
20082
20083
20084 ###############################################################################
20085 #
20086 #       Pick a text file to use as the default of the "textFile" preference.
20087 #       Any old file will do, but preferably one that will make interesting
20088 #       shapes when displayed by "starwars" and "fontglide".
20089 #
20090 ###############################################################################
20091
20092 have_textfile=no
20093 with_textfile_req=unspecified
20094
20095
20096 # Check whether --with-text-file was given.
20097 if test "${with_text_file+set}" = set; then
20098   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20099 else
20100   with_textfile=yes
20101 fi
20102
20103 # no HANDLE_X_PATH_ARG for this one
20104
20105 case "$with_textfile" in
20106   /*)
20107     # absolute path
20108     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20109 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
20110     if test -f "$with_textfile" ; then
20111       { echo "$as_me:$LINENO: result: yes" >&5
20112 echo "${ECHO_T}yes" >&6; }
20113     else
20114       { echo "$as_me:$LINENO: result: no" >&5
20115 echo "${ECHO_T}no" >&6; }
20116       with_textfile=""
20117     fi
20118   ;;
20119   yes)
20120     with_textfile=""
20121
20122     #### Could use some more defaults here...
20123     for f in \
20124       "/usr/X11R6/lib/X11/doc/README"              \
20125       "/usr/share/doc/xserver-common/copyright"    \
20126       "/usr/share/doc/xserver-xorg-core/copyright" \
20127       "/usr/X11R6/README"                          \
20128       "/usr/share/doc/debian/debian-manifesto"     \
20129     ; do
20130       if test -z "$with_textfile"; then
20131         { echo "$as_me:$LINENO: checking for text file $f" >&5
20132 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
20133         if test -f "$f" ; then
20134           { echo "$as_me:$LINENO: result: yes" >&5
20135 echo "${ECHO_T}yes" >&6; }
20136           with_textfile="$f"
20137         else
20138           { echo "$as_me:$LINENO: result: no" >&5
20139 echo "${ECHO_T}no" >&6; }
20140         fi
20141       fi
20142     done
20143
20144   ;;
20145   no)
20146     with_textfile=""
20147   ;;
20148
20149   *)
20150     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20151     exit 1
20152   ;;
20153 esac
20154 ac_cv_textfile="$with_textfile"
20155
20156 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20157
20158
20159 ###############################################################################
20160 #
20161 #       Check the browser to see help URL
20162 #
20163 ###############################################################################
20164
20165 have_browser=no
20166 with_browser_req=unspecified
20167
20168
20169 # Check whether --with-browser was given.
20170 if test "${with_browser+set}" = set; then
20171   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20172 else
20173   with_browser=no
20174 fi
20175
20176 # no HANDLE_X_PATH_ARG for this one
20177
20178 case "$with_browser" in
20179   no )
20180   ;;
20181   * )
20182     WITH_BROWSER=$with_browser
20183     gnome_open_program=$with_browser
20184     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20185 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20186     with_browser_fullpath=`which $with_browser 2>/dev/null`
20187     case $with_browser_fullpath in
20188          /* )
20189                 { echo "$as_me:$LINENO: result: yes" >&5
20190 echo "${ECHO_T}yes" >&6; }
20191                  have_browser=yes
20192                  ;;
20193         * )
20194                { echo "$as_me:$LINENO: result: no" >&5
20195 echo "${ECHO_T}no" >&6; }
20196 # Only warning: we don't want to install all packages for the
20197 # dependency of the browser in building stage...
20198                echo "WARNING: browser not found: --with-browser=$with_browser"
20199                ;;
20200     esac
20201   ;;
20202 esac
20203 ac_cv_browser="$with_browser"
20204
20205 ###############################################################################
20206 #
20207 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20208 #       This should be safe, but let's give people the option.
20209 #
20210 ###############################################################################
20211
20212 setuid_hacks_default=no
20213 setuid_hacks="$setuid_hacks_default"
20214
20215 # Check whether --with-setuid-hacks was given.
20216 if test "${with_setuid_hacks+set}" = set; then
20217   withval=$with_setuid_hacks; setuid_hacks="$withval"
20218 else
20219   setuid_hacks="$setuid_hacks_default"
20220 fi
20221
20222
20223
20224    case "$setuid_hacks" in
20225     yes) ;;
20226     no)  ;;
20227
20228     /*)
20229      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20230 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20231      d=$setuid_hacks/include
20232      if test -d $d; then
20233        X_CFLAGS="-I$d $X_CFLAGS"
20234        { echo "$as_me:$LINENO: result: $d" >&5
20235 echo "${ECHO_T}$d" >&6; }
20236      else
20237        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20238 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20239      fi
20240
20241      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20242 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20243      d=$setuid_hacks/lib
20244      if test -d $d; then
20245        X_LIBS="-L$d $X_LIBS"
20246        { echo "$as_me:$LINENO: result: $d" >&5
20247 echo "${ECHO_T}$d" >&6; }
20248      else
20249        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20250 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20251      fi
20252
20253      # replace the directory string with "yes".
20254      setuid_hacks_req="yes"
20255      setuid_hacks=$setuid_hacks_req
20256      ;;
20257
20258     *)
20259      echo ""
20260      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20261      echo "       If it is a directory, then \`DIR/include' will be added to"
20262      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20263      exit 1
20264      ;;
20265    esac
20266
20267
20268 if test "$setuid_hacks" = yes; then
20269   true
20270 elif test "$setuid_hacks" != no; then
20271   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20272   exit 1
20273 fi
20274
20275
20276 ###############################################################################
20277 #
20278 #       Done testing.  Now, set up the various -I and -L variables,
20279 #       and decide which GUI program to build by default.
20280 #
20281 ###############################################################################
20282
20283 DEPEND=makedepend
20284 DEPEND_FLAGS=
20285 DEPEND_DEFINES=
20286
20287
20288 if test \! -z "$includedir" ; then
20289   INCLUDES="$INCLUDES -I$includedir"
20290 fi
20291
20292 if test \! -z "$libdir" ; then
20293   LDFLAGS="$LDFLAGS -L$libdir"
20294 fi
20295
20296
20297 PREFERRED_DEMO_PROGRAM=''
20298 ALL_DEMO_PROGRAMS=
20299 if test "$have_motif" = yes; then
20300   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20301   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20302 fi
20303 if test "$have_gtk" = yes; then
20304   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20305   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20306 fi
20307
20308
20309 if test "$have_kerberos" = yes; then
20310   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20311   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20312 fi
20313 if test "$have_pam" = yes; then
20314   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20315   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20316   INSTALL_PAM="install-pam"
20317 fi
20318 if test "$have_passwd_helper" = yes; then
20319   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20320   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20321 fi
20322   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20323   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20324
20325
20326 if test "$enable_locking" = yes; then
20327   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20328   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20329 else
20330   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20331   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20332 fi
20333
20334 if test "$ac_macosx" = yes; then
20335   EXES_OSX='$(EXES_OSX)'
20336   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20337   MEN_OSX='$(MEN_OSX)'
20338 else
20339   EXES_OSX=
20340   SCRIPTS_OSX=
20341   MEN_OSX=
20342 fi
20343
20344
20345 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20346
20347 if test "$need_setuid" = yes; then
20348   NEED_SETUID=yes
20349 else
20350   NEED_SETUID=no
20351 fi
20352
20353 if test "$setuid_hacks" = yes; then
20354   SETUID_HACKS=yes
20355 else
20356   SETUID_HACKS=no
20357 fi
20358
20359 tab='   '
20360 if test "$have_gl" = yes; then
20361   GL_EXES='$(GL_EXES)'
20362   SUID_EXES='$(SUID_EXES)'
20363   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
20364   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20365   GL_MEN='$(GL_MEN)'
20366   GL_KLUDGE=" "
20367 else
20368   GL_KLUDGE="-"
20369 fi
20370
20371 if test "$have_gle" = yes; then
20372   GLE_EXES='$(GLE_EXES)'
20373   GLE_KLUDGE=" "
20374 else
20375   GLE_KLUDGE="-"
20376 fi
20377
20378 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20379  JPEG_EXES='$(JPEG_EXES)'
20380 fi
20381
20382
20383 # Another substitution in the XScreenSaver.ad.in file:
20384 #
20385 if test "$gnome_open_program" != ''; then
20386   GNOME24=''
20387   GNOME22='!    '
20388   NOGNOME='!    '
20389 elif test "$gnome_url_show_program" != ''; then
20390   GNOME24='!    '
20391   GNOME22=''
20392   NOGNOME='!    '
20393 else
20394   GNOME24='!    '
20395   GNOME22='!    '
20396   NOGNOME=''
20397 fi
20398
20399
20400 # Set PO_DATADIR to something sensible.
20401 #
20402 { echo "$as_me:$LINENO: checking for locale directory" >&5
20403 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20404 if test -n "$GTK_DATADIR" ; then
20405   PO_DATADIR="$GTK_DATADIR"
20406 elif test "$have_gtk" = yes; then
20407   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20408   PO_DATADIR="$PO_DATADIR/share"
20409 fi
20410
20411 if test -z "$PO_DATADIR" ; then
20412   #
20413   # #### Total fucking kludge --
20414   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20415   # but of course we need to expand all the nested variables to do that...
20416   #
20417   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20418   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20419 fi
20420
20421 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20422 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20423
20424
20425 # canonicalize slashes.
20426 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20427
20428 # gcc 3.0 likes to issue this warning for every file:
20429 #
20430 # cc1: warning: changing search order for system directory "/usr/local/include"
20431 # cc1: warning:   as it has already been specified as a non-system directory
20432 #
20433 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20434 # Which *should* be totally redundant, and thus an ok thing to delete?
20435 #
20436 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20437
20438
20439 ###############################################################################
20440 #
20441 #       Perform substitutions and write Makefiles.
20442 #
20443 ###############################################################################
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510 APPDEFAULTS=$ac_x_app_defaults
20511
20512
20513
20514
20515
20516
20517
20518 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20519
20520 cat >confcache <<\_ACEOF
20521 # This file is a shell script that caches the results of configure
20522 # tests run on this system so they can be shared between configure
20523 # scripts and configure runs, see configure's option --config-cache.
20524 # It is not useful on other systems.  If it contains results you don't
20525 # want to keep, you may remove or edit it.
20526 #
20527 # config.status only pays attention to the cache file if you give it
20528 # the --recheck option to rerun configure.
20529 #
20530 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20531 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20532 # following values.
20533
20534 _ACEOF
20535
20536 # The following way of writing the cache mishandles newlines in values,
20537 # but we know of no workaround that is simple, portable, and efficient.
20538 # So, we kill variables containing newlines.
20539 # Ultrix sh set writes to stderr and can't be redirected directly,
20540 # and sets the high bit in the cache file unless we assign to the vars.
20541 (
20542   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20543     eval ac_val=\$$ac_var
20544     case $ac_val in #(
20545     *${as_nl}*)
20546       case $ac_var in #(
20547       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20548 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20549       esac
20550       case $ac_var in #(
20551       _ | IFS | as_nl) ;; #(
20552       *) $as_unset $ac_var ;;
20553       esac ;;
20554     esac
20555   done
20556
20557   (set) 2>&1 |
20558     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20559     *${as_nl}ac_space=\ *)
20560       # `set' does not quote correctly, so add quotes (double-quote
20561       # substitution turns \\\\ into \\, and sed turns \\ into \).
20562       sed -n \
20563         "s/'/'\\\\''/g;
20564           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20565       ;; #(
20566     *)
20567       # `set' quotes correctly as required by POSIX, so do not add quotes.
20568       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20569       ;;
20570     esac |
20571     sort
20572 ) |
20573   sed '
20574      /^ac_cv_env_/b end
20575      t clear
20576      :clear
20577      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20578      t end
20579      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20580      :end' >>confcache
20581 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20582   if test -w "$cache_file"; then
20583     test "x$cache_file" != "x/dev/null" &&
20584       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20585 echo "$as_me: updating cache $cache_file" >&6;}
20586     cat confcache >$cache_file
20587   else
20588     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20589 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20590   fi
20591 fi
20592 rm -f confcache
20593
20594 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20595 # Let make expand exec_prefix.
20596 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20597
20598 DEFS=-DHAVE_CONFIG_H
20599
20600 ac_libobjs=
20601 ac_ltlibobjs=
20602 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20603   # 1. Remove the extension, and $U if already installed.
20604   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20605   ac_i=`echo "$ac_i" | sed "$ac_script"`
20606   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20607   #    will be set to the directory where LIBOBJS objects are built.
20608   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20609   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20610 done
20611 LIBOBJS=$ac_libobjs
20612
20613 LTLIBOBJS=$ac_ltlibobjs
20614
20615
20616
20617
20618         mv -f po/POTFILES po/POTFILES.tmp
20619         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20620         rm -f po/POTFILES.tmp
20621
20622
20623
20624 : ${CONFIG_STATUS=./config.status}
20625 ac_clean_files_save=$ac_clean_files
20626 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20627 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20628 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20629 cat >$CONFIG_STATUS <<_ACEOF
20630 #! $SHELL
20631 # Generated by $as_me.
20632 # Run this file to recreate the current configuration.
20633 # Compiler output produced by configure, useful for debugging
20634 # configure, is in config.log if it exists.
20635
20636 debug=false
20637 ac_cs_recheck=false
20638 ac_cs_silent=false
20639 SHELL=\${CONFIG_SHELL-$SHELL}
20640 _ACEOF
20641
20642 cat >>$CONFIG_STATUS <<\_ACEOF
20643 ## --------------------- ##
20644 ## M4sh Initialization.  ##
20645 ## --------------------- ##
20646
20647 # Be more Bourne compatible
20648 DUALCASE=1; export DUALCASE # for MKS sh
20649 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20650   emulate sh
20651   NULLCMD=:
20652   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20653   # is contrary to our usage.  Disable this feature.
20654   alias -g '${1+"$@"}'='"$@"'
20655   setopt NO_GLOB_SUBST
20656 else
20657   case `(set -o) 2>/dev/null` in
20658   *posix*) set -o posix ;;
20659 esac
20660
20661 fi
20662
20663
20664
20665
20666 # PATH needs CR
20667 # Avoid depending upon Character Ranges.
20668 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20669 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20670 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20671 as_cr_digits='0123456789'
20672 as_cr_alnum=$as_cr_Letters$as_cr_digits
20673
20674 # The user is always right.
20675 if test "${PATH_SEPARATOR+set}" != set; then
20676   echo "#! /bin/sh" >conf$$.sh
20677   echo  "exit 0"   >>conf$$.sh
20678   chmod +x conf$$.sh
20679   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20680     PATH_SEPARATOR=';'
20681   else
20682     PATH_SEPARATOR=:
20683   fi
20684   rm -f conf$$.sh
20685 fi
20686
20687 # Support unset when possible.
20688 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20689   as_unset=unset
20690 else
20691   as_unset=false
20692 fi
20693
20694
20695 # IFS
20696 # We need space, tab and new line, in precisely that order.  Quoting is
20697 # there to prevent editors from complaining about space-tab.
20698 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20699 # splitting by setting IFS to empty value.)
20700 as_nl='
20701 '
20702 IFS=" ""        $as_nl"
20703
20704 # Find who we are.  Look in the path if we contain no directory separator.
20705 case $0 in
20706   *[\\/]* ) as_myself=$0 ;;
20707   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20708 for as_dir in $PATH
20709 do
20710   IFS=$as_save_IFS
20711   test -z "$as_dir" && as_dir=.
20712   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20713 done
20714 IFS=$as_save_IFS
20715
20716      ;;
20717 esac
20718 # We did not find ourselves, most probably we were run as `sh COMMAND'
20719 # in which case we are not to be found in the path.
20720 if test "x$as_myself" = x; then
20721   as_myself=$0
20722 fi
20723 if test ! -f "$as_myself"; then
20724   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20725   { (exit 1); exit 1; }
20726 fi
20727
20728 # Work around bugs in pre-3.0 UWIN ksh.
20729 for as_var in ENV MAIL MAILPATH
20730 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20731 done
20732 PS1='$ '
20733 PS2='> '
20734 PS4='+ '
20735
20736 # NLS nuisances.
20737 for as_var in \
20738   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20739   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20740   LC_TELEPHONE LC_TIME
20741 do
20742   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20743     eval $as_var=C; export $as_var
20744   else
20745     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20746   fi
20747 done
20748
20749 # Required to use basename.
20750 if expr a : '\(a\)' >/dev/null 2>&1 &&
20751    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20752   as_expr=expr
20753 else
20754   as_expr=false
20755 fi
20756
20757 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20758   as_basename=basename
20759 else
20760   as_basename=false
20761 fi
20762
20763
20764 # Name of the executable.
20765 as_me=`$as_basename -- "$0" ||
20766 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20767          X"$0" : 'X\(//\)$' \| \
20768          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20769 echo X/"$0" |
20770     sed '/^.*\/\([^/][^/]*\)\/*$/{
20771             s//\1/
20772             q
20773           }
20774           /^X\/\(\/\/\)$/{
20775             s//\1/
20776             q
20777           }
20778           /^X\/\(\/\).*/{
20779             s//\1/
20780             q
20781           }
20782           s/.*/./; q'`
20783
20784 # CDPATH.
20785 $as_unset CDPATH
20786
20787
20788
20789   as_lineno_1=$LINENO
20790   as_lineno_2=$LINENO
20791   test "x$as_lineno_1" != "x$as_lineno_2" &&
20792   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20793
20794   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20795   # uniformly replaced by the line number.  The first 'sed' inserts a
20796   # line-number line after each line using $LINENO; the second 'sed'
20797   # does the real work.  The second script uses 'N' to pair each
20798   # line-number line with the line containing $LINENO, and appends
20799   # trailing '-' during substitution so that $LINENO is not a special
20800   # case at line end.
20801   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20802   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20803   # E. McMahon (1931-1989) for sed's syntax.  :-)
20804   sed -n '
20805     p
20806     /[$]LINENO/=
20807   ' <$as_myself |
20808     sed '
20809       s/[$]LINENO.*/&-/
20810       t lineno
20811       b
20812       :lineno
20813       N
20814       :loop
20815       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20816       t loop
20817       s/-\n.*//
20818     ' >$as_me.lineno &&
20819   chmod +x "$as_me.lineno" ||
20820     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20821    { (exit 1); exit 1; }; }
20822
20823   # Don't try to exec as it changes $[0], causing all sort of problems
20824   # (the dirname of $[0] is not the place where we might find the
20825   # original and so on.  Autoconf is especially sensitive to this).
20826   . "./$as_me.lineno"
20827   # Exit status is that of the last command.
20828   exit
20829 }
20830
20831
20832 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20833   as_dirname=dirname
20834 else
20835   as_dirname=false
20836 fi
20837
20838 ECHO_C= ECHO_N= ECHO_T=
20839 case `echo -n x` in
20840 -n*)
20841   case `echo 'x\c'` in
20842   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20843   *)   ECHO_C='\c';;
20844   esac;;
20845 *)
20846   ECHO_N='-n';;
20847 esac
20848
20849 if expr a : '\(a\)' >/dev/null 2>&1 &&
20850    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20851   as_expr=expr
20852 else
20853   as_expr=false
20854 fi
20855
20856 rm -f conf$$ conf$$.exe conf$$.file
20857 if test -d conf$$.dir; then
20858   rm -f conf$$.dir/conf$$.file
20859 else
20860   rm -f conf$$.dir
20861   mkdir conf$$.dir
20862 fi
20863 echo >conf$$.file
20864 if ln -s conf$$.file conf$$ 2>/dev/null; then
20865   as_ln_s='ln -s'
20866   # ... but there are two gotchas:
20867   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20868   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20869   # In both cases, we have to default to `cp -p'.
20870   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20871     as_ln_s='cp -p'
20872 elif ln conf$$.file conf$$ 2>/dev/null; then
20873   as_ln_s=ln
20874 else
20875   as_ln_s='cp -p'
20876 fi
20877 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20878 rmdir conf$$.dir 2>/dev/null
20879
20880 if mkdir -p . 2>/dev/null; then
20881   as_mkdir_p=:
20882 else
20883   test -d ./-p && rmdir ./-p
20884   as_mkdir_p=false
20885 fi
20886
20887 if test -x / >/dev/null 2>&1; then
20888   as_test_x='test -x'
20889 else
20890   if ls -dL / >/dev/null 2>&1; then
20891     as_ls_L_option=L
20892   else
20893     as_ls_L_option=
20894   fi
20895   as_test_x='
20896     eval sh -c '\''
20897       if test -d "$1"; then
20898         test -d "$1/.";
20899       else
20900         case $1 in
20901         -*)set "./$1";;
20902         esac;
20903         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20904         ???[sx]*):;;*)false;;esac;fi
20905     '\'' sh
20906   '
20907 fi
20908 as_executable_p=$as_test_x
20909
20910 # Sed expression to map a string onto a valid CPP name.
20911 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20912
20913 # Sed expression to map a string onto a valid variable name.
20914 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20915
20916
20917 exec 6>&1
20918
20919 # Save the log message, to keep $[0] and so on meaningful, and to
20920 # report actual input values of CONFIG_FILES etc. instead of their
20921 # values after options handling.
20922 ac_log="
20923 This file was extended by $as_me, which was
20924 generated by GNU Autoconf 2.61.  Invocation command line was
20925
20926   CONFIG_FILES    = $CONFIG_FILES
20927   CONFIG_HEADERS  = $CONFIG_HEADERS
20928   CONFIG_LINKS    = $CONFIG_LINKS
20929   CONFIG_COMMANDS = $CONFIG_COMMANDS
20930   $ $0 $@
20931
20932 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20933 "
20934
20935 _ACEOF
20936
20937 cat >>$CONFIG_STATUS <<_ACEOF
20938 # Files that config.status was made for.
20939 config_files="$ac_config_files"
20940 config_headers="$ac_config_headers"
20941 config_commands="$ac_config_commands"
20942
20943 _ACEOF
20944
20945 cat >>$CONFIG_STATUS <<\_ACEOF
20946 ac_cs_usage="\
20947 \`$as_me' instantiates files from templates according to the
20948 current configuration.
20949
20950 Usage: $0 [OPTIONS] [FILE]...
20951
20952   -h, --help       print this help, then exit
20953   -V, --version    print version number and configuration settings, then exit
20954   -q, --quiet      do not print progress messages
20955   -d, --debug      don't remove temporary files
20956       --recheck    update $as_me by reconfiguring in the same conditions
20957   --file=FILE[:TEMPLATE]
20958                    instantiate the configuration file FILE
20959   --header=FILE[:TEMPLATE]
20960                    instantiate the configuration header FILE
20961
20962 Configuration files:
20963 $config_files
20964
20965 Configuration headers:
20966 $config_headers
20967
20968 Configuration commands:
20969 $config_commands
20970
20971 Report bugs to <bug-autoconf@gnu.org>."
20972
20973 _ACEOF
20974 cat >>$CONFIG_STATUS <<_ACEOF
20975 ac_cs_version="\\
20976 config.status
20977 configured by $0, generated by GNU Autoconf 2.61,
20978   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20979
20980 Copyright (C) 2006 Free Software Foundation, Inc.
20981 This config.status script is free software; the Free Software Foundation
20982 gives unlimited permission to copy, distribute and modify it."
20983
20984 ac_pwd='$ac_pwd'
20985 srcdir='$srcdir'
20986 INSTALL='$INSTALL'
20987 _ACEOF
20988
20989 cat >>$CONFIG_STATUS <<\_ACEOF
20990 # If no file are specified by the user, then we need to provide default
20991 # value.  By we need to know if files were specified by the user.
20992 ac_need_defaults=:
20993 while test $# != 0
20994 do
20995   case $1 in
20996   --*=*)
20997     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20998     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20999     ac_shift=:
21000     ;;
21001   *)
21002     ac_option=$1
21003     ac_optarg=$2
21004     ac_shift=shift
21005     ;;
21006   esac
21007
21008   case $ac_option in
21009   # Handling of the options.
21010   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21011     ac_cs_recheck=: ;;
21012   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21013     echo "$ac_cs_version"; exit ;;
21014   --debug | --debu | --deb | --de | --d | -d )
21015     debug=: ;;
21016   --file | --fil | --fi | --f )
21017     $ac_shift
21018     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21019     ac_need_defaults=false;;
21020   --header | --heade | --head | --hea )
21021     $ac_shift
21022     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21023     ac_need_defaults=false;;
21024   --he | --h)
21025     # Conflict between --help and --header
21026     { echo "$as_me: error: ambiguous option: $1
21027 Try \`$0 --help' for more information." >&2
21028    { (exit 1); exit 1; }; };;
21029   --help | --hel | -h )
21030     echo "$ac_cs_usage"; exit ;;
21031   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21032   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21033     ac_cs_silent=: ;;
21034
21035   # This is an error.
21036   -*) { echo "$as_me: error: unrecognized option: $1
21037 Try \`$0 --help' for more information." >&2
21038    { (exit 1); exit 1; }; } ;;
21039
21040   *) ac_config_targets="$ac_config_targets $1"
21041      ac_need_defaults=false ;;
21042
21043   esac
21044   shift
21045 done
21046
21047 ac_configure_extra_args=
21048
21049 if $ac_cs_silent; then
21050   exec 6>/dev/null
21051   ac_configure_extra_args="$ac_configure_extra_args --silent"
21052 fi
21053
21054 _ACEOF
21055 cat >>$CONFIG_STATUS <<_ACEOF
21056 if \$ac_cs_recheck; then
21057   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21058   CONFIG_SHELL=$SHELL
21059   export CONFIG_SHELL
21060   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21061 fi
21062
21063 _ACEOF
21064 cat >>$CONFIG_STATUS <<\_ACEOF
21065 exec 5>>config.log
21066 {
21067   echo
21068   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21069 ## Running $as_me. ##
21070 _ASBOX
21071   echo "$ac_log"
21072 } >&5
21073
21074 _ACEOF
21075 cat >>$CONFIG_STATUS <<_ACEOF
21076 #
21077 # INIT-COMMANDS
21078 #
21079 INTLTOOL_PERL=${INTLTOOL_PERL}
21080
21081
21082 _ACEOF
21083
21084 cat >>$CONFIG_STATUS <<\_ACEOF
21085
21086 # Handling of arguments.
21087 for ac_config_target in $ac_config_targets
21088 do
21089   case $ac_config_target in
21090     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21091     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21092     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21093     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21094     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21095     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21096     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21097     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21098     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21099     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21100
21101   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21102 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21103    { (exit 1); exit 1; }; };;
21104   esac
21105 done
21106
21107
21108 # If the user did not use the arguments to specify the items to instantiate,
21109 # then the envvar interface is used.  Set only those that are not.
21110 # We use the long form for the default assignment because of an extremely
21111 # bizarre bug on SunOS 4.1.3.
21112 if $ac_need_defaults; then
21113   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21114   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21115   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21116 fi
21117
21118 # Have a temporary directory for convenience.  Make it in the build tree
21119 # simply because there is no reason against having it here, and in addition,
21120 # creating and moving files from /tmp can sometimes cause problems.
21121 # Hook for its removal unless debugging.
21122 # Note that there is a small window in which the directory will not be cleaned:
21123 # after its creation but before its name has been assigned to `$tmp'.
21124 $debug ||
21125 {
21126   tmp=
21127   trap 'exit_status=$?
21128   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21129 ' 0
21130   trap '{ (exit 1); exit 1; }' 1 2 13 15
21131 }
21132 # Create a (secure) tmp directory for tmp files.
21133
21134 {
21135   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21136   test -n "$tmp" && test -d "$tmp"
21137 }  ||
21138 {
21139   tmp=./conf$$-$RANDOM
21140   (umask 077 && mkdir "$tmp")
21141 } ||
21142 {
21143    echo "$me: cannot create a temporary directory in ." >&2
21144    { (exit 1); exit 1; }
21145 }
21146
21147 #
21148 # Set up the sed scripts for CONFIG_FILES section.
21149 #
21150
21151 # No need to generate the scripts if there are no CONFIG_FILES.
21152 # This happens for instance when ./config.status config.h
21153 if test -n "$CONFIG_FILES"; then
21154
21155 _ACEOF
21156
21157
21158
21159 ac_delim='%!_!# '
21160 for ac_last_try in false false false false false :; do
21161   cat >conf$$subs.sed <<_ACEOF
21162 SHELL!$SHELL$ac_delim
21163 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21164 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21165 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21166 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21167 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21168 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21169 exec_prefix!$exec_prefix$ac_delim
21170 prefix!$prefix$ac_delim
21171 program_transform_name!$program_transform_name$ac_delim
21172 bindir!$bindir$ac_delim
21173 sbindir!$sbindir$ac_delim
21174 libexecdir!$libexecdir$ac_delim
21175 datarootdir!$datarootdir$ac_delim
21176 datadir!$datadir$ac_delim
21177 sysconfdir!$sysconfdir$ac_delim
21178 sharedstatedir!$sharedstatedir$ac_delim
21179 localstatedir!$localstatedir$ac_delim
21180 includedir!$includedir$ac_delim
21181 oldincludedir!$oldincludedir$ac_delim
21182 docdir!$docdir$ac_delim
21183 infodir!$infodir$ac_delim
21184 htmldir!$htmldir$ac_delim
21185 dvidir!$dvidir$ac_delim
21186 pdfdir!$pdfdir$ac_delim
21187 psdir!$psdir$ac_delim
21188 libdir!$libdir$ac_delim
21189 localedir!$localedir$ac_delim
21190 mandir!$mandir$ac_delim
21191 DEFS!$DEFS$ac_delim
21192 ECHO_C!$ECHO_C$ac_delim
21193 ECHO_N!$ECHO_N$ac_delim
21194 ECHO_T!$ECHO_T$ac_delim
21195 LIBS!$LIBS$ac_delim
21196 build_alias!$build_alias$ac_delim
21197 host_alias!$host_alias$ac_delim
21198 target_alias!$target_alias$ac_delim
21199 build!$build$ac_delim
21200 build_cpu!$build_cpu$ac_delim
21201 build_vendor!$build_vendor$ac_delim
21202 build_os!$build_os$ac_delim
21203 host!$host$ac_delim
21204 host_cpu!$host_cpu$ac_delim
21205 host_vendor!$host_vendor$ac_delim
21206 host_os!$host_os$ac_delim
21207 CC!$CC$ac_delim
21208 CFLAGS!$CFLAGS$ac_delim
21209 LDFLAGS!$LDFLAGS$ac_delim
21210 CPPFLAGS!$CPPFLAGS$ac_delim
21211 ac_ct_CC!$ac_ct_CC$ac_delim
21212 EXEEXT!$EXEEXT$ac_delim
21213 OBJEXT!$OBJEXT$ac_delim
21214 CPP!$CPP$ac_delim
21215 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21216 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21217 INSTALL_DATA!$INSTALL_DATA$ac_delim
21218 SET_MAKE!$SET_MAKE$ac_delim
21219 GREP!$GREP$ac_delim
21220 EGREP!$EGREP$ac_delim
21221 PERL!$PERL$ac_delim
21222 XMKMF!$XMKMF$ac_delim
21223 X_CFLAGS!$X_CFLAGS$ac_delim
21224 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21225 X_LIBS!$X_LIBS$ac_delim
21226 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21227 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21228 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21229 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21230 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21231 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21232 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21233 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21234 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21235 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21236 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21237 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21238 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21239 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21240 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21241 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21242 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21243 RANLIB!$RANLIB$ac_delim
21244 ALLOCA!$ALLOCA$ac_delim
21245 USE_NLS!$USE_NLS$ac_delim
21246 MSGFMT!$MSGFMT$ac_delim
21247 GMSGFMT!$GMSGFMT$ac_delim
21248 XGETTEXT!$XGETTEXT$ac_delim
21249 CATALOGS!$CATALOGS$ac_delim
21250 CATOBJEXT!$CATOBJEXT$ac_delim
21251 DATADIRNAME!$DATADIRNAME$ac_delim
21252 GMOFILES!$GMOFILES$ac_delim
21253 INSTOBJEXT!$INSTOBJEXT$ac_delim
21254 INTLDEPS!$INTLDEPS$ac_delim
21255 INTLLIBS!$INTLLIBS$ac_delim
21256 INTLOBJS!$INTLOBJS$ac_delim
21257 POFILES!$POFILES$ac_delim
21258 POSUB!$POSUB$ac_delim
21259 _ACEOF
21260
21261   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21262     break
21263   elif $ac_last_try; then
21264     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21265 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21266    { (exit 1); exit 1; }; }
21267   else
21268     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21269   fi
21270 done
21271
21272 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21273 if test -n "$ac_eof"; then
21274   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21275   ac_eof=`expr $ac_eof + 1`
21276 fi
21277
21278 cat >>$CONFIG_STATUS <<_ACEOF
21279 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21280 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21281 _ACEOF
21282 sed '
21283 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21284 s/^/s,@/; s/!/@,|#_!!_#|/
21285 :n
21286 t n
21287 s/'"$ac_delim"'$/,g/; t
21288 s/$/\\/; p
21289 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21290 ' >>$CONFIG_STATUS <conf$$subs.sed
21291 rm -f conf$$subs.sed
21292 cat >>$CONFIG_STATUS <<_ACEOF
21293 CEOF$ac_eof
21294 _ACEOF
21295
21296
21297 ac_delim='%!_!# '
21298 for ac_last_try in false false false false false :; do
21299   cat >conf$$subs.sed <<_ACEOF
21300 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21301 login_manager_tmp!$login_manager_tmp$ac_delim
21302 pkg_config!$pkg_config$ac_delim
21303 gnome_open_program!$gnome_open_program$ac_delim
21304 gnome_url_show_program!$gnome_url_show_program$ac_delim
21305 INCLUDES!$INCLUDES$ac_delim
21306 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21307 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21308 SAVER_LIBS!$SAVER_LIBS$ac_delim
21309 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21310 GTK_LIBS!$GTK_LIBS$ac_delim
21311 XML_LIBS!$XML_LIBS$ac_delim
21312 JPEG_LIBS!$JPEG_LIBS$ac_delim
21313 HACK_LIBS!$HACK_LIBS$ac_delim
21314 XPM_LIBS!$XPM_LIBS$ac_delim
21315 PTY_LIBS!$PTY_LIBS$ac_delim
21316 GL_LIBS!$GL_LIBS$ac_delim
21317 DBUS_LIBS!$DBUS_LIBS$ac_delim
21318 GLE_LIBS!$GLE_LIBS$ac_delim
21319 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21320 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21321 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21322 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21323 SETUID_HACKS!$SETUID_HACKS$ac_delim
21324 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21325 NEED_SETUID!$NEED_SETUID$ac_delim
21326 INSTALL_PAM!$INSTALL_PAM$ac_delim
21327 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21328 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21329 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21330 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21331 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21332 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21333 WITH_BROWSER!$WITH_BROWSER$ac_delim
21334 OBJCC!$OBJCC$ac_delim
21335 EXES_OSX!$EXES_OSX$ac_delim
21336 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21337 MEN_OSX!$MEN_OSX$ac_delim
21338 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21339 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21340 XMU_SRCS!$XMU_SRCS$ac_delim
21341 XMU_OBJS!$XMU_OBJS$ac_delim
21342 XMU_LIBS!$XMU_LIBS$ac_delim
21343 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21344 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21345 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21346 LOCK_SRCS!$LOCK_SRCS$ac_delim
21347 LOCK_OBJS!$LOCK_OBJS$ac_delim
21348 JPEG_EXES!$JPEG_EXES$ac_delim
21349 GL_EXES!$GL_EXES$ac_delim
21350 RETIRED_GL_EXES!$RETIRED_GL_EXES$ac_delim
21351 SUID_EXES!$SUID_EXES$ac_delim
21352 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21353 GL_MEN!$GL_MEN$ac_delim
21354 GL_KLUDGE!$GL_KLUDGE$ac_delim
21355 GLE_EXES!$GLE_EXES$ac_delim
21356 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21357 GNOME24!$GNOME24$ac_delim
21358 GNOME22!$GNOME22$ac_delim
21359 NOGNOME!$NOGNOME$ac_delim
21360 HACKDIR!$HACKDIR$ac_delim
21361 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21362 GTK_DATADIR!$GTK_DATADIR$ac_delim
21363 PO_DATADIR!$PO_DATADIR$ac_delim
21364 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21365 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21366 APPDEFAULTS!$APPDEFAULTS$ac_delim
21367 DEPEND!$DEPEND$ac_delim
21368 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21369 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21370 LIBOBJS!$LIBOBJS$ac_delim
21371 LTLIBOBJS!$LTLIBOBJS$ac_delim
21372 _ACEOF
21373
21374   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then
21375     break
21376   elif $ac_last_try; then
21377     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21378 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21379    { (exit 1); exit 1; }; }
21380   else
21381     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21382   fi
21383 done
21384
21385 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21386 if test -n "$ac_eof"; then
21387   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21388   ac_eof=`expr $ac_eof + 1`
21389 fi
21390
21391 cat >>$CONFIG_STATUS <<_ACEOF
21392 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21393 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21394 _ACEOF
21395 sed '
21396 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21397 s/^/s,@/; s/!/@,|#_!!_#|/
21398 :n
21399 t n
21400 s/'"$ac_delim"'$/,g/; t
21401 s/$/\\/; p
21402 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21403 ' >>$CONFIG_STATUS <conf$$subs.sed
21404 rm -f conf$$subs.sed
21405 cat >>$CONFIG_STATUS <<_ACEOF
21406 :end
21407 s/|#_!!_#|//g
21408 CEOF$ac_eof
21409 _ACEOF
21410
21411
21412 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21413 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21414 # trailing colons and then remove the whole line if VPATH becomes empty
21415 # (actually we leave an empty line to preserve line numbers).
21416 if test "x$srcdir" = x.; then
21417   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21418 s/:*\$(srcdir):*/:/
21419 s/:*\${srcdir}:*/:/
21420 s/:*@srcdir@:*/:/
21421 s/^\([^=]*=[     ]*\):*/\1/
21422 s/:*$//
21423 s/^[^=]*=[       ]*$//
21424 }'
21425 fi
21426
21427 cat >>$CONFIG_STATUS <<\_ACEOF
21428 fi # test -n "$CONFIG_FILES"
21429
21430
21431 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21432 do
21433   case $ac_tag in
21434   :[FHLC]) ac_mode=$ac_tag; continue;;
21435   esac
21436   case $ac_mode$ac_tag in
21437   :[FHL]*:*);;
21438   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21439 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21440    { (exit 1); exit 1; }; };;
21441   :[FH]-) ac_tag=-:-;;
21442   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21443   esac
21444   ac_save_IFS=$IFS
21445   IFS=:
21446   set x $ac_tag
21447   IFS=$ac_save_IFS
21448   shift
21449   ac_file=$1
21450   shift
21451
21452   case $ac_mode in
21453   :L) ac_source=$1;;
21454   :[FH])
21455     ac_file_inputs=
21456     for ac_f
21457     do
21458       case $ac_f in
21459       -) ac_f="$tmp/stdin";;
21460       *) # Look for the file first in the build tree, then in the source tree
21461          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21462          # because $ac_f cannot contain `:'.
21463          test -f "$ac_f" ||
21464            case $ac_f in
21465            [\\/$]*) false;;
21466            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21467            esac ||
21468            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21469 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21470    { (exit 1); exit 1; }; };;
21471       esac
21472       ac_file_inputs="$ac_file_inputs $ac_f"
21473     done
21474
21475     # Let's still pretend it is `configure' which instantiates (i.e., don't
21476     # use $as_me), people would be surprised to read:
21477     #    /* config.h.  Generated by config.status.  */
21478     configure_input="Generated from "`IFS=:
21479           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21480     if test x"$ac_file" != x-; then
21481       configure_input="$ac_file.  $configure_input"
21482       { echo "$as_me:$LINENO: creating $ac_file" >&5
21483 echo "$as_me: creating $ac_file" >&6;}
21484     fi
21485
21486     case $ac_tag in
21487     *:-:* | *:-) cat >"$tmp/stdin";;
21488     esac
21489     ;;
21490   esac
21491
21492   ac_dir=`$as_dirname -- "$ac_file" ||
21493 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21494          X"$ac_file" : 'X\(//\)[^/]' \| \
21495          X"$ac_file" : 'X\(//\)$' \| \
21496          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21497 echo X"$ac_file" |
21498     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21499             s//\1/
21500             q
21501           }
21502           /^X\(\/\/\)[^/].*/{
21503             s//\1/
21504             q
21505           }
21506           /^X\(\/\/\)$/{
21507             s//\1/
21508             q
21509           }
21510           /^X\(\/\).*/{
21511             s//\1/
21512             q
21513           }
21514           s/.*/./; q'`
21515   { as_dir="$ac_dir"
21516   case $as_dir in #(
21517   -*) as_dir=./$as_dir;;
21518   esac
21519   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21520     as_dirs=
21521     while :; do
21522       case $as_dir in #(
21523       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21524       *) as_qdir=$as_dir;;
21525       esac
21526       as_dirs="'$as_qdir' $as_dirs"
21527       as_dir=`$as_dirname -- "$as_dir" ||
21528 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21529          X"$as_dir" : 'X\(//\)[^/]' \| \
21530          X"$as_dir" : 'X\(//\)$' \| \
21531          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21532 echo X"$as_dir" |
21533     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21534             s//\1/
21535             q
21536           }
21537           /^X\(\/\/\)[^/].*/{
21538             s//\1/
21539             q
21540           }
21541           /^X\(\/\/\)$/{
21542             s//\1/
21543             q
21544           }
21545           /^X\(\/\).*/{
21546             s//\1/
21547             q
21548           }
21549           s/.*/./; q'`
21550       test -d "$as_dir" && break
21551     done
21552     test -z "$as_dirs" || eval "mkdir $as_dirs"
21553   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21554 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21555    { (exit 1); exit 1; }; }; }
21556   ac_builddir=.
21557
21558 case "$ac_dir" in
21559 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21560 *)
21561   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21562   # A ".." for each directory in $ac_dir_suffix.
21563   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21564   case $ac_top_builddir_sub in
21565   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21566   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21567   esac ;;
21568 esac
21569 ac_abs_top_builddir=$ac_pwd
21570 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21571 # for backward compatibility:
21572 ac_top_builddir=$ac_top_build_prefix
21573
21574 case $srcdir in
21575   .)  # We are building in place.
21576     ac_srcdir=.
21577     ac_top_srcdir=$ac_top_builddir_sub
21578     ac_abs_top_srcdir=$ac_pwd ;;
21579   [\\/]* | ?:[\\/]* )  # Absolute name.
21580     ac_srcdir=$srcdir$ac_dir_suffix;
21581     ac_top_srcdir=$srcdir
21582     ac_abs_top_srcdir=$srcdir ;;
21583   *) # Relative name.
21584     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21585     ac_top_srcdir=$ac_top_build_prefix$srcdir
21586     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21587 esac
21588 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21589
21590
21591   case $ac_mode in
21592   :F)
21593   #
21594   # CONFIG_FILE
21595   #
21596
21597   case $INSTALL in
21598   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21599   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21600   esac
21601 _ACEOF
21602
21603 cat >>$CONFIG_STATUS <<\_ACEOF
21604 # If the template does not know about datarootdir, expand it.
21605 # FIXME: This hack should be removed a few years after 2.60.
21606 ac_datarootdir_hack=; ac_datarootdir_seen=
21607
21608 case `sed -n '/datarootdir/ {
21609   p
21610   q
21611 }
21612 /@datadir@/p
21613 /@docdir@/p
21614 /@infodir@/p
21615 /@localedir@/p
21616 /@mandir@/p
21617 ' $ac_file_inputs` in
21618 *datarootdir*) ac_datarootdir_seen=yes;;
21619 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21620   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21621 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21622 _ACEOF
21623 cat >>$CONFIG_STATUS <<_ACEOF
21624   ac_datarootdir_hack='
21625   s&@datadir@&$datadir&g
21626   s&@docdir@&$docdir&g
21627   s&@infodir@&$infodir&g
21628   s&@localedir@&$localedir&g
21629   s&@mandir@&$mandir&g
21630     s&\\\${datarootdir}&$datarootdir&g' ;;
21631 esac
21632 _ACEOF
21633
21634 # Neutralize VPATH when `$srcdir' = `.'.
21635 # Shell code in configure.ac might set extrasub.
21636 # FIXME: do we really want to maintain this feature?
21637 cat >>$CONFIG_STATUS <<_ACEOF
21638   sed "$ac_vpsub
21639 $extrasub
21640 _ACEOF
21641 cat >>$CONFIG_STATUS <<\_ACEOF
21642 :t
21643 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21644 s&@configure_input@&$configure_input&;t t
21645 s&@top_builddir@&$ac_top_builddir_sub&;t t
21646 s&@srcdir@&$ac_srcdir&;t t
21647 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21648 s&@top_srcdir@&$ac_top_srcdir&;t t
21649 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21650 s&@builddir@&$ac_builddir&;t t
21651 s&@abs_builddir@&$ac_abs_builddir&;t t
21652 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21653 s&@INSTALL@&$ac_INSTALL&;t t
21654 $ac_datarootdir_hack
21655 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21656
21657 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21658   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21659   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21660   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21661 which seems to be undefined.  Please make sure it is defined." >&5
21662 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21663 which seems to be undefined.  Please make sure it is defined." >&2;}
21664
21665   rm -f "$tmp/stdin"
21666   case $ac_file in
21667   -) cat "$tmp/out"; rm -f "$tmp/out";;
21668   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21669   esac
21670  ;;
21671   :H)
21672   #
21673   # CONFIG_HEADER
21674   #
21675 _ACEOF
21676
21677 # Transform confdefs.h into a sed script `conftest.defines', that
21678 # substitutes the proper values into config.h.in to produce config.h.
21679 rm -f conftest.defines conftest.tail
21680 # First, append a space to every undef/define line, to ease matching.
21681 echo 's/$/ /' >conftest.defines
21682 # Then, protect against being on the right side of a sed subst, or in
21683 # an unquoted here document, in config.status.  If some macros were
21684 # called several times there might be several #defines for the same
21685 # symbol, which is useless.  But do not sort them, since the last
21686 # AC_DEFINE must be honored.
21687 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21688 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21689 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21690 # PARAMS is the parameter list in the macro definition--in most cases, it's
21691 # just an empty string.
21692 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21693 ac_dB='\\)[      (].*,\\1define\\2'
21694 ac_dC=' '
21695 ac_dD=' ,'
21696
21697 uniq confdefs.h |
21698   sed -n '
21699         t rset
21700         :rset
21701         s/^[     ]*#[    ]*define[       ][      ]*//
21702         t ok
21703         d
21704         :ok
21705         s/[\\&,]/\\&/g
21706         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21707         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21708   ' >>conftest.defines
21709
21710 # Remove the space that was appended to ease matching.
21711 # Then replace #undef with comments.  This is necessary, for
21712 # example, in the case of _POSIX_SOURCE, which is predefined and required
21713 # on some systems where configure will not decide to define it.
21714 # (The regexp can be short, since the line contains either #define or #undef.)
21715 echo 's/ $//
21716 s,^[     #]*u.*,/* & */,' >>conftest.defines
21717
21718 # Break up conftest.defines:
21719 ac_max_sed_lines=50
21720
21721 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21722 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21723 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21724 # et cetera.
21725 ac_in='$ac_file_inputs'
21726 ac_out='"$tmp/out1"'
21727 ac_nxt='"$tmp/out2"'
21728
21729 while :
21730 do
21731   # Write a here document:
21732     cat >>$CONFIG_STATUS <<_ACEOF
21733     # First, check the format of the line:
21734     cat >"\$tmp/defines.sed" <<\\CEOF
21735 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21736 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21737 b
21738 :def
21739 _ACEOF
21740   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21741   echo 'CEOF
21742     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21743   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21744   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21745   grep . conftest.tail >/dev/null || break
21746   rm -f conftest.defines
21747   mv conftest.tail conftest.defines
21748 done
21749 rm -f conftest.defines conftest.tail
21750
21751 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21752 cat >>$CONFIG_STATUS <<\_ACEOF
21753   if test x"$ac_file" != x-; then
21754     echo "/* $configure_input  */" >"$tmp/config.h"
21755     cat "$ac_result" >>"$tmp/config.h"
21756     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21757       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21758 echo "$as_me: $ac_file is unchanged" >&6;}
21759     else
21760       rm -f $ac_file
21761       mv "$tmp/config.h" $ac_file
21762     fi
21763   else
21764     echo "/* $configure_input  */"
21765     cat "$ac_result"
21766   fi
21767   rm -f "$tmp/out12"
21768  ;;
21769
21770   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21771 echo "$as_me: executing $ac_file commands" >&6;}
21772  ;;
21773   esac
21774
21775
21776   case $ac_file$ac_mode in
21777     "default-1":C)
21778
21779 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21780 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21781   rm -f intltool-extract.out
21782 else
21783   mv -f intltool-extract.out intltool-extract
21784 fi
21785 chmod ugo+x intltool-extract
21786 chmod u+w intltool-extract
21787
21788 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21789 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21790   rm -f intltool-merge.out
21791 else
21792   mv -f intltool-merge.out intltool-merge
21793 fi
21794 chmod ugo+x intltool-merge
21795 chmod u+w intltool-merge
21796
21797 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21798 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21799   rm -f intltool-update.out
21800 else
21801   mv -f intltool-update.out intltool-update
21802 fi
21803 chmod ugo+x intltool-update
21804 chmod u+w intltool-update
21805
21806  ;;
21807     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21808         rm -f po/stamp-it po/stamp-it.tmp
21809         > po/stamp-it.tmp
21810         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21811         mv po/stamp-it.tmp po/stamp-it
21812       esac ;;
21813
21814   esac
21815 done # for ac_tag
21816
21817
21818 { (exit 0); exit 0; }
21819 _ACEOF
21820 chmod +x $CONFIG_STATUS
21821 ac_clean_files=$ac_clean_files_save
21822
21823
21824 # configure is writing to config.log, and then calls config.status.
21825 # config.status does its own redirection, appending to config.log.
21826 # Unfortunately, on DOS this fails, as config.log is still kept open
21827 # by configure, so config.status won't be able to write to it; its
21828 # output is simply discarded.  So we exec the FD to /dev/null,
21829 # effectively closing config.log, so it can be properly (re)opened and
21830 # appended to by config.status.  When coming back to configure, we
21831 # need to make the FD available again.
21832 if test "$no_create" != yes; then
21833   ac_cs_success=:
21834   ac_config_status_args=
21835   test "$silent" = yes &&
21836     ac_config_status_args="$ac_config_status_args --quiet"
21837   exec 5>/dev/null
21838   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21839   exec 5>>config.log
21840   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21841   # would make configure fail if this is the last instruction.
21842   $ac_cs_success || { (exit 1); exit 1; }
21843 fi
21844
21845
21846 ###############################################################################
21847 #
21848 #       Print some warnings at the end.
21849 #
21850 ###############################################################################
21851
21852 warn_prefix_1="    Warning:"
21853 warn_prefix_2="       Note:"
21854 warn_prefix="$warn_prefix_1"
21855
21856 warning=no
21857 warnsep='    #################################################################'
21858
21859 warnpre() {
21860   if test "$warning" = no ; then
21861     echo '' ; echo "$warnsep" ; echo ''
21862     warning=yes
21863   fi
21864 }
21865
21866 warn() {
21867   warnpre
21868   if test "$warning" = long ; then echo '' ; fi
21869   warning=yes
21870   rest="$@"
21871   echo "$warn_prefix $rest"
21872 }
21873
21874 warnL() {
21875   was=$warning
21876   warnpre
21877   warning=yes
21878   if test "$was" != no ; then echo '' ; fi
21879   rest="$@"
21880   echo "$warn_prefix $rest"
21881 }
21882
21883 warn2() {
21884   rest="$@"
21885   echo "             $rest"
21886   warning=long
21887 }
21888
21889 note() {
21890   warn_prefix="$warn_prefix_2"
21891   warn $@
21892   warn_prefix="$warn_prefix_1"
21893 }
21894
21895 noteL() {
21896   warn_prefix="$warn_prefix_2"
21897   warnL $@
21898   warn_prefix="$warn_prefix_1"
21899 }
21900
21901
21902 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21903   warn 'The SGI saver extension was requested, but was not found.'
21904 fi
21905
21906 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21907   warn 'The XIdle extension was requested, but was not found.'
21908 fi
21909
21910 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21911   warn 'The XSHM extension was requested, but was not found.'
21912 fi
21913
21914 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21915   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21916 fi
21917
21918 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21919   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21920 fi
21921
21922 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21923   warn 'The DPMS extension was requested, but was not found.'
21924 fi
21925
21926 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21927   warn 'The Xinerama extension was requested, but was not found.'
21928 fi
21929
21930 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21931   warn 'The XF86VMODE extension was requested, but was not found.'
21932 fi
21933
21934 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21935   warn 'The RANDR extension was requested, but was not found.'
21936 fi
21937
21938 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21939   warn "Checking of /proc/interrupts was requested, but it's bogus."
21940 fi
21941
21942 if test "$pkg_config" = false ; then
21943   warnL 'The "pkg-config" program was not found.  Without that,'
21944   warn2 "detection of the various GTK libraries won't work."
21945 else
21946   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21947   if test "x$pkgerr" != "x" ; then
21948     warnL 'The "pkg-config" program produces errors.  This often causes'
21949     warn2 "detection of the various GTK libraries to malfunction."
21950     warn2 "The errors are:"
21951     echo ''
21952     echo "$pkgerr" | sed 's/^/             > /g'
21953   fi
21954 fi
21955
21956 if test "$gtk_halfassed" != no ; then
21957   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21958   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21959   warn2 "Perhaps some of the development packages are not installed?"
21960   if test "$have_gtk" = yes ; then
21961     v="$ac_gtk_version_string"
21962     warn2 "GTK $v is also installed, so it will be used instead."
21963     warn2 "Please read the above output and the \`config.log' file"
21964     warn2 "for more details."
21965   fi
21966 fi
21967
21968 motif_warn2() {
21969   warn2 'Though the Motif front-end to xscreensaver is still'
21970   warn2 'maintained, it is no longer being updated with new'
21971   warn2 'features: all new development on the xscreensaver-demo'
21972   warn2 'program is happening in the GTK version, and not in the'
21973   warn2 'Motif version.  It is recommended that you build against'
21974   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21975 }
21976
21977 if test "$have_motif" = no -a "$have_gtk" = no; then
21978
21979   if test "$with_motif" = yes; then
21980     warnL "Neither the GTK nor Motif libraries were found; the"
21981     warn2 "\`xscreensaver-demo' program requires one of these."
21982     echo ''
21983     motif_warn2
21984   else
21985     warnL "The GTK libraries do not seem to be available; the"
21986     warn2 "\`xscreensaver-demo' program requires them."
21987 #   echo ''
21988 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21989 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21990 #   motif_warn2
21991   fi
21992
21993 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21994   warnL "Use of Motif was requested, but it wasn't found;"
21995   warn2 "Gtk will be used instead."
21996
21997 elif test "$jurassic_gtk" = yes ; then
21998
21999   pref_gtk=2.0
22000
22001   v="$ac_gtk_version_string"
22002   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22003     warnL "Use of Gtk was requested, but its version number is unknown;"
22004   elif test "$with_gtk_req" = yes ; then
22005     warnL "Use of Gtk was requested, but it is version $v;"
22006   else
22007     warnL "Gtk was found on this system, but it is version $v;"
22008   fi
22009
22010   warn2 "Gtk $pref_gtk or newer is required."
22011
22012 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22013   warnL "Use of Gtk was requested, but it wasn't found."
22014 fi
22015
22016
22017 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22018   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22019   warn2 "headers were not found.  That can't be good.  Please"
22020   warn2 "install the GDK-Pixbuf development kit and re-configure."
22021 fi
22022
22023 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22024
22025   preferred_lesstif=0.92
22026
22027   if test "$lesstif_version" = unknown; then
22028     warnL "Unable to determine the LessTif version number!"
22029     warn2 "Make sure you are using version $preferred_lesstif or newer."
22030     warn2 "See <http://www.lesstif.org/>."
22031
22032   elif test \! $lesstif_version -gt 82; then
22033     warnL "LessTif version $lesstif_version_string is being used."
22034     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22035     warn2 "use with XScreenSaver; it is strongly recommended"
22036     warn2 "that you upgrade to at least version $preferred_lesstif!"
22037     warn2 "See <http://www.lesstif.org/>."
22038   fi
22039 fi
22040
22041
22042 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22043   warn  'Motif is being used, and GTK is not.'
22044   echo  ''
22045   motif_warn2
22046 fi
22047
22048
22049 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22050   warnL 'Use of XPM was requested, but it was not found.'
22051 fi
22052
22053 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22054   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22055 fi
22056
22057 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22058    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22059
22060   if test "$with_gdk_pixbuf_req" = yes ; then
22061     true
22062   elif test "$with_gdk_pixbuf_req" = no ; then
22063     warnL 'The GDK-Pixbuf library is not being used.'
22064   else
22065     warnL 'The GDK-Pixbuf library was not found.'
22066   fi
22067
22068   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22069     true
22070   elif test "$with_xpm_req" = no ; then
22071     warnL 'The XPM library is not being used.'
22072   else
22073     warnL 'The XPM library was not found.'
22074   fi
22075
22076   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22077     warn2 'The XPM library is being used instead.'
22078   fi
22079
22080   if test "$gdk_pixbuf_halfassed" = yes ; then
22081     echo ''
22082     warn2 'More specifically, we found the headers, but not the'
22083     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22084     warn2 "system, or something else went wrong.  The \`config.log'"
22085     warn2 'file might contain some clues.'
22086   fi
22087
22088   echo ''
22089   warn2 'Some of the demos will not use images as much as they could.'
22090   warn2 'You should consider installing GDK-Pixbuf and re-running'
22091   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22092   warn2 'provides support for more image formats.)'
22093 fi
22094
22095
22096 if test "$have_jpeg" = no ; then
22097   if test "$with_jpeg_req" = yes ; then
22098     warnL 'Use of libjpeg was requested, but it was not found.'
22099   elif test "$with_jpeg_req" = no ; then
22100     noteL 'The JPEG library is not being used.'
22101   else
22102     noteL 'The JPEG library was not found.'
22103   fi
22104
22105   if test "$jpeg_halfassed" = yes ; then
22106     echo ''
22107     warn2 'More specifically, we found the headers, but not the'
22108     warn2 'library; so either JPEG is half-installed on this'
22109     warn2 "system, or something else went wrong.  The \`config.log'"
22110     warn2 'file might contain some clues.'
22111     echo ''
22112   fi
22113
22114   if test "$have_gdk_pixbuf" = no ; then
22115     warn2 "This means that it won't be possible for the image-manipulating"
22116     warn2 "display modes to load files from disk; and it also means that"
22117     warn2 "the \`webcollage' program will be much slower."
22118   else
22119     warn2 "This means the \`webcollage' program will be much slower."
22120   fi
22121 fi
22122
22123
22124 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22125   preferred_mesagl=3.4
22126   mgv="$ac_mesagl_version_string"
22127   pgl="$preferred_mesagl"
22128
22129   if test "$ac_mesagl_version" = unknown; then
22130     true
22131     # warnL "Unable to determine the MesaGL version number!"
22132     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22133
22134   elif test \! "$ac_mesagl_version" -gt 2006; then
22135     warnL "MesaGL version number is $mgv --"
22136     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22137     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22138
22139   elif test \! "$ac_mesagl_version" -gt 3003; then
22140     warnL "MesaGL version number is $mgv --"
22141     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22142     warn2 "that you upgrade to $pgl or newer."
22143   fi
22144 fi
22145
22146 if test "$have_gl" = no ; then
22147   if test "$with_gl_req" = yes ; then
22148     warnL 'Use of GL was requested, but it was not found.'
22149   elif test "$with_gl_req" = no ; then
22150     noteL 'The OpenGL 3D library is not being used.'
22151   else
22152     noteL 'The OpenGL 3D library was not found.'
22153   fi
22154
22155   if test "$gl_halfassed" = yes ; then
22156     echo ''
22157     warn2 'More specifically, we found the headers, but not the'
22158     warn2 'libraries; so either GL is half-installed on this'
22159     warn2 "system, or something else went wrong.  The \`config.log'"
22160     warn2 'file might contain some clues.'
22161   fi
22162
22163   echo ''
22164   warn2 'Those demos which use 3D will not be built or installed.'
22165   warn2 'You might want to consider installing OpenGL and'
22166   warn2 "re-running configure.  If your vendor doesn't ship"
22167   warn2 'their own implementation of OpenGL, you can get a free'
22168   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22169   warn2 'info, see <http://www.opengl.org/>.'
22170
22171 fi
22172
22173
22174 if test "$have_gl" = yes -a "$have_gle" = no ; then
22175
22176  # nobody cares about this; don't print the warning unless it was
22177  # requested and not found, or halfway-found.
22178  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22179
22180   if test "$with_gle_req" = yes ; then
22181     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22182     warn2 'it was not found (though the OpenGL library was found, and'
22183     warn2 'is being used.)'
22184   elif test "$with_gle_req" = no ; then
22185     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22186     warn2 'library is not.'
22187   else
22188     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22189     warn2 'was not.'
22190   fi
22191
22192   if test "$gle_halfassed" = yes ; then
22193     echo ''
22194     warn2 'More specifically, we found the headers, but not the'
22195     warn2 'libraries; so either GLE is half-installed on this'
22196     warn2 "system, or something else went wrong.  The \`config.log'"
22197     warn2 'file might contain some clues.'
22198   fi
22199
22200   echo ''
22201   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22202   warn2 'will not be built or installed.  You might want to consider'
22203   warn2 'installing GLE and re-running configure.  You can find the'
22204   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22205   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22206
22207  fi
22208 fi
22209
22210
22211 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22212   warn 'Use of XReadDisplay was requested, but it was not found.'
22213 fi
22214
22215 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22216   warn 'Use of Kerberos was requested, but it was not found.'
22217 fi
22218
22219 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22220   warn 'Use of PAM was requested, but it was not found.'
22221 fi
22222
22223 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22224   warn 'Use of shadow passwords was requested, but they were not found.'
22225 fi
22226
22227 if test "$ac_macosx" = yes ; then
22228   if test "$enable_locking" = yes ; then
22229     warn  "You have specified --enable-locking on MacOS X."
22230     warn2 "THIS DOES NOT WORK!  Don't do this!"
22231   fi
22232 fi
22233
22234
22235 # You are in a twisty maze of namespaces and syntaxes, all alike.
22236 # Fuck the skull of Unix.
22237 #
22238 bindir=`eval eval eval eval eval eval eval echo $bindir`
22239 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22240 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22241
22242 # canonicalize slashes.
22243 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22244 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22245 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22246
22247
22248 # Sanity check the hackdir
22249 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22250   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22251     echo ""
22252     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22253                    There will be an executable installed with that name, so
22254                    that can't be the name of a directory as well.  Please
22255                    re-configure with a different directory name." >&5
22256 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22257                    There will be an executable installed with that name, so
22258                    that can't be the name of a directory as well.  Please
22259                    re-configure with a different directory name." >&2;}
22260    { (exit 1); exit 1; }; }
22261   fi
22262 done
22263
22264
22265 do_dir_warning=no
22266
22267 # Now let's warn if there's a previous RPM version already installed.
22268 # But don't bother with this test if we are currently *building* an RPM.
22269
22270 if test -z "$RPM_PACKAGE_VERSION" ; then
22271
22272   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22273
22274   # M4 sucks!!
22275
22276   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22277         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22278         head -1`
22279
22280
22281   if test \! -z "$rpmv" ; then
22282     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22283     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22284
22285     warning=no
22286     warnL "There is already an installed RPM of xscreensaver $rpmv"
22287     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22288     warn2 'before running "make install" in this directory.'
22289     echo ""
22290     warn2 "Alternately, you could build this version of xscreensaver"
22291     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22292     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22293     warn2 "See the RPM documentation for more info."
22294     echo ""
22295
22296     if test "$rpmbdir" = "$rpmhdir" ; then
22297       warn2 "The RPM version was installed in $rpmbdir/."
22298       do_dir_warning=yes
22299     else
22300       warn2 "The RPM version was installed in $rpmbdir/,"
22301       warn2 "with demos in $rpmhdir/."
22302     fi
22303   fi
22304 fi
22305
22306 # Also warn if there's a Debian package installed.
22307 #
22308 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22309 debv=''
22310 for dpkg in $debnames ; do
22311   if test -z "$debv"; then
22312     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22313   fi
22314 done
22315
22316 if test \! -z "$debv" ; then
22317   debbdir=`dpkg -L $debnames 2>/dev/null | \
22318             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22319   debhdir=`dpkg -L $debnames 2>/dev/null | \
22320             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22321   if test -z "$debbdir" ; then debbdir='???'; fi
22322   if test -z "$debhdir" ; then debhdir='???'; fi
22323
22324   warning=no
22325   warnL "There is already an installed dpkg of xscreensaver"
22326   warn2 "version \"$debv\" on this system."
22327   echo ""
22328   warn2 "The dpkg was installed in $debbdir,"
22329   warn2 "with demos in $debhdir."
22330 fi
22331
22332
22333 if test "${bindir}" = "${HACKDIR}" ; then
22334   do_dir_warning=yes
22335 fi
22336
22337 if test "$do_dir_warning" = yes; then
22338   echo ""
22339   echo "$warnsep"
22340   echo ""
22341   echo '      When you run "make install", the "xscreensaver",'
22342   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22343   echo "      will be installed in ${bindir}/."
22344   echo ""
22345   echo "      The various graphics demos (190+ different executables) will"
22346   echo "      be installed in ${HACKDIR}/."
22347   echo ""
22348   echo "      If you would prefer the demos to be installed elsewhere,"
22349   echo "      you should re-run configure with the --with-hackdir=DIR"
22350   echo "      option.  For more information, run \`./configure --help'."
22351   warning=yes
22352 fi
22353
22354 if test "$warning" != no; then
22355   echo '' ; echo "$warnsep" ; echo ''
22356 fi
22357
22358 if test "$do_dir_warning" = no; then
22359   if test "$warning" = no; then
22360     echo ''
22361   fi
22362   echo "User programs will be installed in ${bindir}/"
22363   echo "Screen savers will be installed in ${HACKDIR}/"
22364   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22365   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22366   echo ''
22367 fi