added supported 9 views
[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 PERL=/usr/bin/perl
6117
6118 { echo "$as_me:$LINENO: checking for X" >&5
6119 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6120
6121
6122 # Check whether --with-x was given.
6123 if test "${with_x+set}" = set; then
6124   withval=$with_x;
6125 fi
6126
6127 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6128 if test "x$with_x" = xno; then
6129   # The user explicitly disabled X.
6130   have_x=disabled
6131 else
6132   case $x_includes,$x_libraries in #(
6133     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6134 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6135    { (exit 1); exit 1; }; };; #(
6136     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6137   echo $ECHO_N "(cached) $ECHO_C" >&6
6138 else
6139   # One or both of the vars are not set, and there is no cached value.
6140 ac_x_includes=no ac_x_libraries=no
6141 rm -f -r conftest.dir
6142 if mkdir conftest.dir; then
6143   cd conftest.dir
6144   cat >Imakefile <<'_ACEOF'
6145 incroot:
6146         @echo incroot='${INCROOT}'
6147 usrlibdir:
6148         @echo usrlibdir='${USRLIBDIR}'
6149 libdir:
6150         @echo libdir='${LIBDIR}'
6151 _ACEOF
6152   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6153     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6154     for ac_var in incroot usrlibdir libdir; do
6155       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6156     done
6157     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6158     for ac_extension in a so sl; do
6159       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6160          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6161         ac_im_usrlibdir=$ac_im_libdir; break
6162       fi
6163     done
6164     # Screen out bogus values from the imake configuration.  They are
6165     # bogus both because they are the default anyway, and because
6166     # using them would break gcc on systems where it needs fixed includes.
6167     case $ac_im_incroot in
6168         /usr/include) ac_x_includes= ;;
6169         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6170     esac
6171     case $ac_im_usrlibdir in
6172         /usr/lib | /lib) ;;
6173         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6174     esac
6175   fi
6176   cd ..
6177   rm -f -r conftest.dir
6178 fi
6179
6180 # Standard set of common directories for X headers.
6181 # Check X11 before X11Rn because it is often a symlink to the current release.
6182 ac_x_header_dirs='
6183 /usr/X11/include
6184 /usr/X11R6/include
6185 /usr/X11R5/include
6186 /usr/X11R4/include
6187
6188 /usr/include/X11
6189 /usr/include/X11R6
6190 /usr/include/X11R5
6191 /usr/include/X11R4
6192
6193 /usr/local/X11/include
6194 /usr/local/X11R6/include
6195 /usr/local/X11R5/include
6196 /usr/local/X11R4/include
6197
6198 /usr/local/include/X11
6199 /usr/local/include/X11R6
6200 /usr/local/include/X11R5
6201 /usr/local/include/X11R4
6202
6203 /usr/X386/include
6204 /usr/x386/include
6205 /usr/XFree86/include/X11
6206
6207 /usr/include
6208 /usr/local/include
6209 /usr/unsupported/include
6210 /usr/athena/include
6211 /usr/local/x11r5/include
6212 /usr/lpp/Xamples/include
6213
6214 /usr/openwin/include
6215 /usr/openwin/share/include'
6216
6217 if test "$ac_x_includes" = no; then
6218   # Guess where to find include files, by looking for Xlib.h.
6219   # First, try using that file with no special directory specified.
6220   cat >conftest.$ac_ext <<_ACEOF
6221 /* confdefs.h.  */
6222 _ACEOF
6223 cat confdefs.h >>conftest.$ac_ext
6224 cat >>conftest.$ac_ext <<_ACEOF
6225 /* end confdefs.h.  */
6226 #include <X11/Xlib.h>
6227 _ACEOF
6228 if { (ac_try="$ac_cpp conftest.$ac_ext"
6229 case "(($ac_try" in
6230   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6231   *) ac_try_echo=$ac_try;;
6232 esac
6233 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6234   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6235   ac_status=$?
6236   grep -v '^ *+' conftest.er1 >conftest.err
6237   rm -f conftest.er1
6238   cat conftest.err >&5
6239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240   (exit $ac_status); } >/dev/null && {
6241          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6242          test ! -s conftest.err
6243        }; then
6244   # We can compile using X headers with no special include directory.
6245 ac_x_includes=
6246 else
6247   echo "$as_me: failed program was:" >&5
6248 sed 's/^/| /' conftest.$ac_ext >&5
6249
6250   for ac_dir in $ac_x_header_dirs; do
6251   if test -r "$ac_dir/X11/Xlib.h"; then
6252     ac_x_includes=$ac_dir
6253     break
6254   fi
6255 done
6256 fi
6257
6258 rm -f conftest.err conftest.$ac_ext
6259 fi # $ac_x_includes = no
6260
6261 if test "$ac_x_libraries" = no; then
6262   # Check for the libraries.
6263   # See if we find them without any special options.
6264   # Don't add to $LIBS permanently.
6265   ac_save_LIBS=$LIBS
6266   LIBS="-lX11 $LIBS"
6267   cat >conftest.$ac_ext <<_ACEOF
6268 /* confdefs.h.  */
6269 _ACEOF
6270 cat confdefs.h >>conftest.$ac_ext
6271 cat >>conftest.$ac_ext <<_ACEOF
6272 /* end confdefs.h.  */
6273 #include <X11/Xlib.h>
6274 int
6275 main ()
6276 {
6277 XrmInitialize ()
6278   ;
6279   return 0;
6280 }
6281 _ACEOF
6282 rm -f conftest.$ac_objext conftest$ac_exeext
6283 if { (ac_try="$ac_link"
6284 case "(($ac_try" in
6285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6286   *) ac_try_echo=$ac_try;;
6287 esac
6288 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6289   (eval "$ac_link") 2>conftest.er1
6290   ac_status=$?
6291   grep -v '^ *+' conftest.er1 >conftest.err
6292   rm -f conftest.er1
6293   cat conftest.err >&5
6294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6295   (exit $ac_status); } && {
6296          test -z "$ac_c_werror_flag" ||
6297          test ! -s conftest.err
6298        } && test -s conftest$ac_exeext &&
6299        $as_test_x conftest$ac_exeext; then
6300   LIBS=$ac_save_LIBS
6301 # We can link X programs with no special library path.
6302 ac_x_libraries=
6303 else
6304   echo "$as_me: failed program was:" >&5
6305 sed 's/^/| /' conftest.$ac_ext >&5
6306
6307         LIBS=$ac_save_LIBS
6308 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6309 do
6310   # Don't even attempt the hair of trying to link an X program!
6311   for ac_extension in a so sl; do
6312     if test -r "$ac_dir/libX11.$ac_extension"; then
6313       ac_x_libraries=$ac_dir
6314       break 2
6315     fi
6316   done
6317 done
6318 fi
6319
6320 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6321       conftest$ac_exeext conftest.$ac_ext
6322 fi # $ac_x_libraries = no
6323
6324 case $ac_x_includes,$ac_x_libraries in #(
6325   no,* | *,no | *\'*)
6326     # Didn't find X, or a directory has "'" in its name.
6327     ac_cv_have_x="have_x=no";; #(
6328   *)
6329     # Record where we found X for the cache.
6330     ac_cv_have_x="have_x=yes\
6331         ac_x_includes='$ac_x_includes'\
6332         ac_x_libraries='$ac_x_libraries'"
6333 esac
6334 fi
6335 ;; #(
6336     *) have_x=yes;;
6337   esac
6338   eval "$ac_cv_have_x"
6339 fi # $with_x != no
6340
6341 if test "$have_x" != yes; then
6342   { echo "$as_me:$LINENO: result: $have_x" >&5
6343 echo "${ECHO_T}$have_x" >&6; }
6344   no_x=yes
6345 else
6346   # If each of the values was on the command line, it overrides each guess.
6347   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6348   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6349   # Update the cache value to reflect the command line values.
6350   ac_cv_have_x="have_x=yes\
6351         ac_x_includes='$x_includes'\
6352         ac_x_libraries='$x_libraries'"
6353   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6354 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6355 fi
6356
6357 if test "$no_x" = yes; then
6358   # Not all programs may use this symbol, but it does not hurt to define it.
6359
6360 cat >>confdefs.h <<\_ACEOF
6361 #define X_DISPLAY_MISSING 1
6362 _ACEOF
6363
6364   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6365 else
6366   if test -n "$x_includes"; then
6367     X_CFLAGS="$X_CFLAGS -I$x_includes"
6368   fi
6369
6370   # It would also be nice to do this for all -L options, not just this one.
6371   if test -n "$x_libraries"; then
6372     X_LIBS="$X_LIBS -L$x_libraries"
6373     # For Solaris; some versions of Sun CC require a space after -R and
6374     # others require no space.  Words are not sufficient . . . .
6375     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6376 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6377     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6378     ac_xsave_c_werror_flag=$ac_c_werror_flag
6379     ac_c_werror_flag=yes
6380     cat >conftest.$ac_ext <<_ACEOF
6381 /* confdefs.h.  */
6382 _ACEOF
6383 cat confdefs.h >>conftest.$ac_ext
6384 cat >>conftest.$ac_ext <<_ACEOF
6385 /* end confdefs.h.  */
6386
6387 int
6388 main ()
6389 {
6390
6391   ;
6392   return 0;
6393 }
6394 _ACEOF
6395 rm -f conftest.$ac_objext conftest$ac_exeext
6396 if { (ac_try="$ac_link"
6397 case "(($ac_try" in
6398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399   *) ac_try_echo=$ac_try;;
6400 esac
6401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6402   (eval "$ac_link") 2>conftest.er1
6403   ac_status=$?
6404   grep -v '^ *+' conftest.er1 >conftest.err
6405   rm -f conftest.er1
6406   cat conftest.err >&5
6407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408   (exit $ac_status); } && {
6409          test -z "$ac_c_werror_flag" ||
6410          test ! -s conftest.err
6411        } && test -s conftest$ac_exeext &&
6412        $as_test_x conftest$ac_exeext; then
6413   { echo "$as_me:$LINENO: result: no" >&5
6414 echo "${ECHO_T}no" >&6; }
6415        X_LIBS="$X_LIBS -R$x_libraries"
6416 else
6417   echo "$as_me: failed program was:" >&5
6418 sed 's/^/| /' conftest.$ac_ext >&5
6419
6420         LIBS="$ac_xsave_LIBS -R $x_libraries"
6421        cat >conftest.$ac_ext <<_ACEOF
6422 /* confdefs.h.  */
6423 _ACEOF
6424 cat confdefs.h >>conftest.$ac_ext
6425 cat >>conftest.$ac_ext <<_ACEOF
6426 /* end confdefs.h.  */
6427
6428 int
6429 main ()
6430 {
6431
6432   ;
6433   return 0;
6434 }
6435 _ACEOF
6436 rm -f conftest.$ac_objext conftest$ac_exeext
6437 if { (ac_try="$ac_link"
6438 case "(($ac_try" in
6439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6440   *) ac_try_echo=$ac_try;;
6441 esac
6442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6443   (eval "$ac_link") 2>conftest.er1
6444   ac_status=$?
6445   grep -v '^ *+' conftest.er1 >conftest.err
6446   rm -f conftest.er1
6447   cat conftest.err >&5
6448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449   (exit $ac_status); } && {
6450          test -z "$ac_c_werror_flag" ||
6451          test ! -s conftest.err
6452        } && test -s conftest$ac_exeext &&
6453        $as_test_x conftest$ac_exeext; then
6454   { echo "$as_me:$LINENO: result: yes" >&5
6455 echo "${ECHO_T}yes" >&6; }
6456           X_LIBS="$X_LIBS -R $x_libraries"
6457 else
6458   echo "$as_me: failed program was:" >&5
6459 sed 's/^/| /' conftest.$ac_ext >&5
6460
6461         { echo "$as_me:$LINENO: result: neither works" >&5
6462 echo "${ECHO_T}neither works" >&6; }
6463 fi
6464
6465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6466       conftest$ac_exeext conftest.$ac_ext
6467 fi
6468
6469 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6470       conftest$ac_exeext conftest.$ac_ext
6471     ac_c_werror_flag=$ac_xsave_c_werror_flag
6472     LIBS=$ac_xsave_LIBS
6473   fi
6474
6475   # Check for system-dependent libraries X programs must link with.
6476   # Do this before checking for the system-independent R6 libraries
6477   # (-lICE), since we may need -lsocket or whatever for X linking.
6478
6479   if test "$ISC" = yes; then
6480     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6481   else
6482     # Martyn Johnson says this is needed for Ultrix, if the X
6483     # libraries were built with DECnet support.  And Karl Berry says
6484     # the Alpha needs dnet_stub (dnet does not exist).
6485     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6486     cat >conftest.$ac_ext <<_ACEOF
6487 /* confdefs.h.  */
6488 _ACEOF
6489 cat confdefs.h >>conftest.$ac_ext
6490 cat >>conftest.$ac_ext <<_ACEOF
6491 /* end confdefs.h.  */
6492
6493 /* Override any GCC internal prototype to avoid an error.
6494    Use char because int might match the return type of a GCC
6495    builtin and then its argument prototype would still apply.  */
6496 #ifdef __cplusplus
6497 extern "C"
6498 #endif
6499 char XOpenDisplay ();
6500 int
6501 main ()
6502 {
6503 return XOpenDisplay ();
6504   ;
6505   return 0;
6506 }
6507 _ACEOF
6508 rm -f conftest.$ac_objext conftest$ac_exeext
6509 if { (ac_try="$ac_link"
6510 case "(($ac_try" in
6511   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6512   *) ac_try_echo=$ac_try;;
6513 esac
6514 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6515   (eval "$ac_link") 2>conftest.er1
6516   ac_status=$?
6517   grep -v '^ *+' conftest.er1 >conftest.err
6518   rm -f conftest.er1
6519   cat conftest.err >&5
6520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521   (exit $ac_status); } && {
6522          test -z "$ac_c_werror_flag" ||
6523          test ! -s conftest.err
6524        } && test -s conftest$ac_exeext &&
6525        $as_test_x conftest$ac_exeext; then
6526   :
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 sed 's/^/| /' conftest.$ac_ext >&5
6530
6531         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6532 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6533 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6534   echo $ECHO_N "(cached) $ECHO_C" >&6
6535 else
6536   ac_check_lib_save_LIBS=$LIBS
6537 LIBS="-ldnet  $LIBS"
6538 cat >conftest.$ac_ext <<_ACEOF
6539 /* confdefs.h.  */
6540 _ACEOF
6541 cat confdefs.h >>conftest.$ac_ext
6542 cat >>conftest.$ac_ext <<_ACEOF
6543 /* end confdefs.h.  */
6544
6545 /* Override any GCC internal prototype to avoid an error.
6546    Use char because int might match the return type of a GCC
6547    builtin and then its argument prototype would still apply.  */
6548 #ifdef __cplusplus
6549 extern "C"
6550 #endif
6551 char dnet_ntoa ();
6552 int
6553 main ()
6554 {
6555 return dnet_ntoa ();
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext conftest$ac_exeext
6561 if { (ac_try="$ac_link"
6562 case "(($ac_try" in
6563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6564   *) ac_try_echo=$ac_try;;
6565 esac
6566 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6567   (eval "$ac_link") 2>conftest.er1
6568   ac_status=$?
6569   grep -v '^ *+' conftest.er1 >conftest.err
6570   rm -f conftest.er1
6571   cat conftest.err >&5
6572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573   (exit $ac_status); } && {
6574          test -z "$ac_c_werror_flag" ||
6575          test ! -s conftest.err
6576        } && test -s conftest$ac_exeext &&
6577        $as_test_x conftest$ac_exeext; then
6578   ac_cv_lib_dnet_dnet_ntoa=yes
6579 else
6580   echo "$as_me: failed program was:" >&5
6581 sed 's/^/| /' conftest.$ac_ext >&5
6582
6583         ac_cv_lib_dnet_dnet_ntoa=no
6584 fi
6585
6586 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6587       conftest$ac_exeext conftest.$ac_ext
6588 LIBS=$ac_check_lib_save_LIBS
6589 fi
6590 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6591 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6592 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6593   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6594 fi
6595
6596     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6597       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6598 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6599 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6600   echo $ECHO_N "(cached) $ECHO_C" >&6
6601 else
6602   ac_check_lib_save_LIBS=$LIBS
6603 LIBS="-ldnet_stub  $LIBS"
6604 cat >conftest.$ac_ext <<_ACEOF
6605 /* confdefs.h.  */
6606 _ACEOF
6607 cat confdefs.h >>conftest.$ac_ext
6608 cat >>conftest.$ac_ext <<_ACEOF
6609 /* end confdefs.h.  */
6610
6611 /* Override any GCC internal prototype to avoid an error.
6612    Use char because int might match the return type of a GCC
6613    builtin and then its argument prototype would still apply.  */
6614 #ifdef __cplusplus
6615 extern "C"
6616 #endif
6617 char dnet_ntoa ();
6618 int
6619 main ()
6620 {
6621 return dnet_ntoa ();
6622   ;
6623   return 0;
6624 }
6625 _ACEOF
6626 rm -f conftest.$ac_objext conftest$ac_exeext
6627 if { (ac_try="$ac_link"
6628 case "(($ac_try" in
6629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6630   *) ac_try_echo=$ac_try;;
6631 esac
6632 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6633   (eval "$ac_link") 2>conftest.er1
6634   ac_status=$?
6635   grep -v '^ *+' conftest.er1 >conftest.err
6636   rm -f conftest.er1
6637   cat conftest.err >&5
6638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639   (exit $ac_status); } && {
6640          test -z "$ac_c_werror_flag" ||
6641          test ! -s conftest.err
6642        } && test -s conftest$ac_exeext &&
6643        $as_test_x conftest$ac_exeext; then
6644   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6645 else
6646   echo "$as_me: failed program was:" >&5
6647 sed 's/^/| /' conftest.$ac_ext >&5
6648
6649         ac_cv_lib_dnet_stub_dnet_ntoa=no
6650 fi
6651
6652 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6653       conftest$ac_exeext conftest.$ac_ext
6654 LIBS=$ac_check_lib_save_LIBS
6655 fi
6656 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6657 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6658 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6659   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6660 fi
6661
6662     fi
6663 fi
6664
6665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6666       conftest$ac_exeext conftest.$ac_ext
6667     LIBS="$ac_xsave_LIBS"
6668
6669     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6670     # to get the SysV transport functions.
6671     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6672     # needs -lnsl.
6673     # The nsl library prevents programs from opening the X display
6674     # on Irix 5.2, according to T.E. Dickey.
6675     # The functions gethostbyname, getservbyname, and inet_addr are
6676     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6677     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6678 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6679 if test "${ac_cv_func_gethostbyname+set}" = set; then
6680   echo $ECHO_N "(cached) $ECHO_C" >&6
6681 else
6682   cat >conftest.$ac_ext <<_ACEOF
6683 /* confdefs.h.  */
6684 _ACEOF
6685 cat confdefs.h >>conftest.$ac_ext
6686 cat >>conftest.$ac_ext <<_ACEOF
6687 /* end confdefs.h.  */
6688 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6689    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6690 #define gethostbyname innocuous_gethostbyname
6691
6692 /* System header to define __stub macros and hopefully few prototypes,
6693     which can conflict with char gethostbyname (); below.
6694     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6695     <limits.h> exists even on freestanding compilers.  */
6696
6697 #ifdef __STDC__
6698 # include <limits.h>
6699 #else
6700 # include <assert.h>
6701 #endif
6702
6703 #undef gethostbyname
6704
6705 /* Override any GCC internal prototype to avoid an error.
6706    Use char because int might match the return type of a GCC
6707    builtin and then its argument prototype would still apply.  */
6708 #ifdef __cplusplus
6709 extern "C"
6710 #endif
6711 char gethostbyname ();
6712 /* The GNU C library defines this for functions which it implements
6713     to always fail with ENOSYS.  Some functions are actually named
6714     something starting with __ and the normal name is an alias.  */
6715 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6716 choke me
6717 #endif
6718
6719 int
6720 main ()
6721 {
6722 return gethostbyname ();
6723   ;
6724   return 0;
6725 }
6726 _ACEOF
6727 rm -f conftest.$ac_objext conftest$ac_exeext
6728 if { (ac_try="$ac_link"
6729 case "(($ac_try" in
6730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6731   *) ac_try_echo=$ac_try;;
6732 esac
6733 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6734   (eval "$ac_link") 2>conftest.er1
6735   ac_status=$?
6736   grep -v '^ *+' conftest.er1 >conftest.err
6737   rm -f conftest.er1
6738   cat conftest.err >&5
6739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740   (exit $ac_status); } && {
6741          test -z "$ac_c_werror_flag" ||
6742          test ! -s conftest.err
6743        } && test -s conftest$ac_exeext &&
6744        $as_test_x conftest$ac_exeext; then
6745   ac_cv_func_gethostbyname=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 sed 's/^/| /' conftest.$ac_ext >&5
6749
6750         ac_cv_func_gethostbyname=no
6751 fi
6752
6753 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6754       conftest$ac_exeext conftest.$ac_ext
6755 fi
6756 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6757 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6758
6759     if test $ac_cv_func_gethostbyname = no; then
6760       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6761 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6762 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6763   echo $ECHO_N "(cached) $ECHO_C" >&6
6764 else
6765   ac_check_lib_save_LIBS=$LIBS
6766 LIBS="-lnsl  $LIBS"
6767 cat >conftest.$ac_ext <<_ACEOF
6768 /* confdefs.h.  */
6769 _ACEOF
6770 cat confdefs.h >>conftest.$ac_ext
6771 cat >>conftest.$ac_ext <<_ACEOF
6772 /* end confdefs.h.  */
6773
6774 /* Override any GCC internal prototype to avoid an error.
6775    Use char because int might match the return type of a GCC
6776    builtin and then its argument prototype would still apply.  */
6777 #ifdef __cplusplus
6778 extern "C"
6779 #endif
6780 char gethostbyname ();
6781 int
6782 main ()
6783 {
6784 return gethostbyname ();
6785   ;
6786   return 0;
6787 }
6788 _ACEOF
6789 rm -f conftest.$ac_objext conftest$ac_exeext
6790 if { (ac_try="$ac_link"
6791 case "(($ac_try" in
6792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6793   *) ac_try_echo=$ac_try;;
6794 esac
6795 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6796   (eval "$ac_link") 2>conftest.er1
6797   ac_status=$?
6798   grep -v '^ *+' conftest.er1 >conftest.err
6799   rm -f conftest.er1
6800   cat conftest.err >&5
6801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6802   (exit $ac_status); } && {
6803          test -z "$ac_c_werror_flag" ||
6804          test ! -s conftest.err
6805        } && test -s conftest$ac_exeext &&
6806        $as_test_x conftest$ac_exeext; then
6807   ac_cv_lib_nsl_gethostbyname=yes
6808 else
6809   echo "$as_me: failed program was:" >&5
6810 sed 's/^/| /' conftest.$ac_ext >&5
6811
6812         ac_cv_lib_nsl_gethostbyname=no
6813 fi
6814
6815 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6816       conftest$ac_exeext conftest.$ac_ext
6817 LIBS=$ac_check_lib_save_LIBS
6818 fi
6819 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6820 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6821 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6822   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6823 fi
6824
6825       if test $ac_cv_lib_nsl_gethostbyname = no; then
6826         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6827 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6828 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6829   echo $ECHO_N "(cached) $ECHO_C" >&6
6830 else
6831   ac_check_lib_save_LIBS=$LIBS
6832 LIBS="-lbsd  $LIBS"
6833 cat >conftest.$ac_ext <<_ACEOF
6834 /* confdefs.h.  */
6835 _ACEOF
6836 cat confdefs.h >>conftest.$ac_ext
6837 cat >>conftest.$ac_ext <<_ACEOF
6838 /* end confdefs.h.  */
6839
6840 /* Override any GCC internal prototype to avoid an error.
6841    Use char because int might match the return type of a GCC
6842    builtin and then its argument prototype would still apply.  */
6843 #ifdef __cplusplus
6844 extern "C"
6845 #endif
6846 char gethostbyname ();
6847 int
6848 main ()
6849 {
6850 return gethostbyname ();
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 rm -f conftest.$ac_objext conftest$ac_exeext
6856 if { (ac_try="$ac_link"
6857 case "(($ac_try" in
6858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6859   *) ac_try_echo=$ac_try;;
6860 esac
6861 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6862   (eval "$ac_link") 2>conftest.er1
6863   ac_status=$?
6864   grep -v '^ *+' conftest.er1 >conftest.err
6865   rm -f conftest.er1
6866   cat conftest.err >&5
6867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868   (exit $ac_status); } && {
6869          test -z "$ac_c_werror_flag" ||
6870          test ! -s conftest.err
6871        } && test -s conftest$ac_exeext &&
6872        $as_test_x conftest$ac_exeext; then
6873   ac_cv_lib_bsd_gethostbyname=yes
6874 else
6875   echo "$as_me: failed program was:" >&5
6876 sed 's/^/| /' conftest.$ac_ext >&5
6877
6878         ac_cv_lib_bsd_gethostbyname=no
6879 fi
6880
6881 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6882       conftest$ac_exeext conftest.$ac_ext
6883 LIBS=$ac_check_lib_save_LIBS
6884 fi
6885 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6886 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6887 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6888   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6889 fi
6890
6891       fi
6892     fi
6893
6894     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6895     # socket/setsockopt and other routines are undefined under SCO ODT
6896     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6897     # on later versions), says Simon Leinen: it contains gethostby*
6898     # variants that don't use the name server (or something).  -lsocket
6899     # must be given before -lnsl if both are needed.  We assume that
6900     # if connect needs -lnsl, so does gethostbyname.
6901     { echo "$as_me:$LINENO: checking for connect" >&5
6902 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6903 if test "${ac_cv_func_connect+set}" = set; then
6904   echo $ECHO_N "(cached) $ECHO_C" >&6
6905 else
6906   cat >conftest.$ac_ext <<_ACEOF
6907 /* confdefs.h.  */
6908 _ACEOF
6909 cat confdefs.h >>conftest.$ac_ext
6910 cat >>conftest.$ac_ext <<_ACEOF
6911 /* end confdefs.h.  */
6912 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6913    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6914 #define connect innocuous_connect
6915
6916 /* System header to define __stub macros and hopefully few prototypes,
6917     which can conflict with char connect (); below.
6918     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6919     <limits.h> exists even on freestanding compilers.  */
6920
6921 #ifdef __STDC__
6922 # include <limits.h>
6923 #else
6924 # include <assert.h>
6925 #endif
6926
6927 #undef connect
6928
6929 /* Override any GCC internal prototype to avoid an error.
6930    Use char because int might match the return type of a GCC
6931    builtin and then its argument prototype would still apply.  */
6932 #ifdef __cplusplus
6933 extern "C"
6934 #endif
6935 char connect ();
6936 /* The GNU C library defines this for functions which it implements
6937     to always fail with ENOSYS.  Some functions are actually named
6938     something starting with __ and the normal name is an alias.  */
6939 #if defined __stub_connect || defined __stub___connect
6940 choke me
6941 #endif
6942
6943 int
6944 main ()
6945 {
6946 return connect ();
6947   ;
6948   return 0;
6949 }
6950 _ACEOF
6951 rm -f conftest.$ac_objext conftest$ac_exeext
6952 if { (ac_try="$ac_link"
6953 case "(($ac_try" in
6954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6955   *) ac_try_echo=$ac_try;;
6956 esac
6957 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6958   (eval "$ac_link") 2>conftest.er1
6959   ac_status=$?
6960   grep -v '^ *+' conftest.er1 >conftest.err
6961   rm -f conftest.er1
6962   cat conftest.err >&5
6963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964   (exit $ac_status); } && {
6965          test -z "$ac_c_werror_flag" ||
6966          test ! -s conftest.err
6967        } && test -s conftest$ac_exeext &&
6968        $as_test_x conftest$ac_exeext; then
6969   ac_cv_func_connect=yes
6970 else
6971   echo "$as_me: failed program was:" >&5
6972 sed 's/^/| /' conftest.$ac_ext >&5
6973
6974         ac_cv_func_connect=no
6975 fi
6976
6977 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6978       conftest$ac_exeext conftest.$ac_ext
6979 fi
6980 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6981 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6982
6983     if test $ac_cv_func_connect = no; then
6984       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6985 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6986 if test "${ac_cv_lib_socket_connect+set}" = set; then
6987   echo $ECHO_N "(cached) $ECHO_C" >&6
6988 else
6989   ac_check_lib_save_LIBS=$LIBS
6990 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6991 cat >conftest.$ac_ext <<_ACEOF
6992 /* confdefs.h.  */
6993 _ACEOF
6994 cat confdefs.h >>conftest.$ac_ext
6995 cat >>conftest.$ac_ext <<_ACEOF
6996 /* end confdefs.h.  */
6997
6998 /* Override any GCC internal prototype to avoid an error.
6999    Use char because int might match the return type of a GCC
7000    builtin and then its argument prototype would still apply.  */
7001 #ifdef __cplusplus
7002 extern "C"
7003 #endif
7004 char connect ();
7005 int
7006 main ()
7007 {
7008 return connect ();
7009   ;
7010   return 0;
7011 }
7012 _ACEOF
7013 rm -f conftest.$ac_objext conftest$ac_exeext
7014 if { (ac_try="$ac_link"
7015 case "(($ac_try" in
7016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7017   *) ac_try_echo=$ac_try;;
7018 esac
7019 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7020   (eval "$ac_link") 2>conftest.er1
7021   ac_status=$?
7022   grep -v '^ *+' conftest.er1 >conftest.err
7023   rm -f conftest.er1
7024   cat conftest.err >&5
7025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026   (exit $ac_status); } && {
7027          test -z "$ac_c_werror_flag" ||
7028          test ! -s conftest.err
7029        } && test -s conftest$ac_exeext &&
7030        $as_test_x conftest$ac_exeext; then
7031   ac_cv_lib_socket_connect=yes
7032 else
7033   echo "$as_me: failed program was:" >&5
7034 sed 's/^/| /' conftest.$ac_ext >&5
7035
7036         ac_cv_lib_socket_connect=no
7037 fi
7038
7039 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7040       conftest$ac_exeext conftest.$ac_ext
7041 LIBS=$ac_check_lib_save_LIBS
7042 fi
7043 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7044 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7045 if test $ac_cv_lib_socket_connect = yes; then
7046   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7047 fi
7048
7049     fi
7050
7051     # Guillermo Gomez says -lposix is necessary on A/UX.
7052     { echo "$as_me:$LINENO: checking for remove" >&5
7053 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7054 if test "${ac_cv_func_remove+set}" = set; then
7055   echo $ECHO_N "(cached) $ECHO_C" >&6
7056 else
7057   cat >conftest.$ac_ext <<_ACEOF
7058 /* confdefs.h.  */
7059 _ACEOF
7060 cat confdefs.h >>conftest.$ac_ext
7061 cat >>conftest.$ac_ext <<_ACEOF
7062 /* end confdefs.h.  */
7063 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7064    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7065 #define remove innocuous_remove
7066
7067 /* System header to define __stub macros and hopefully few prototypes,
7068     which can conflict with char remove (); below.
7069     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7070     <limits.h> exists even on freestanding compilers.  */
7071
7072 #ifdef __STDC__
7073 # include <limits.h>
7074 #else
7075 # include <assert.h>
7076 #endif
7077
7078 #undef remove
7079
7080 /* Override any GCC internal prototype to avoid an error.
7081    Use char because int might match the return type of a GCC
7082    builtin and then its argument prototype would still apply.  */
7083 #ifdef __cplusplus
7084 extern "C"
7085 #endif
7086 char remove ();
7087 /* The GNU C library defines this for functions which it implements
7088     to always fail with ENOSYS.  Some functions are actually named
7089     something starting with __ and the normal name is an alias.  */
7090 #if defined __stub_remove || defined __stub___remove
7091 choke me
7092 #endif
7093
7094 int
7095 main ()
7096 {
7097 return remove ();
7098   ;
7099   return 0;
7100 }
7101 _ACEOF
7102 rm -f conftest.$ac_objext conftest$ac_exeext
7103 if { (ac_try="$ac_link"
7104 case "(($ac_try" in
7105   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7106   *) ac_try_echo=$ac_try;;
7107 esac
7108 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7109   (eval "$ac_link") 2>conftest.er1
7110   ac_status=$?
7111   grep -v '^ *+' conftest.er1 >conftest.err
7112   rm -f conftest.er1
7113   cat conftest.err >&5
7114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7115   (exit $ac_status); } && {
7116          test -z "$ac_c_werror_flag" ||
7117          test ! -s conftest.err
7118        } && test -s conftest$ac_exeext &&
7119        $as_test_x conftest$ac_exeext; then
7120   ac_cv_func_remove=yes
7121 else
7122   echo "$as_me: failed program was:" >&5
7123 sed 's/^/| /' conftest.$ac_ext >&5
7124
7125         ac_cv_func_remove=no
7126 fi
7127
7128 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7129       conftest$ac_exeext conftest.$ac_ext
7130 fi
7131 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7132 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7133
7134     if test $ac_cv_func_remove = no; then
7135       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7136 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7137 if test "${ac_cv_lib_posix_remove+set}" = set; then
7138   echo $ECHO_N "(cached) $ECHO_C" >&6
7139 else
7140   ac_check_lib_save_LIBS=$LIBS
7141 LIBS="-lposix  $LIBS"
7142 cat >conftest.$ac_ext <<_ACEOF
7143 /* confdefs.h.  */
7144 _ACEOF
7145 cat confdefs.h >>conftest.$ac_ext
7146 cat >>conftest.$ac_ext <<_ACEOF
7147 /* end confdefs.h.  */
7148
7149 /* Override any GCC internal prototype to avoid an error.
7150    Use char because int might match the return type of a GCC
7151    builtin and then its argument prototype would still apply.  */
7152 #ifdef __cplusplus
7153 extern "C"
7154 #endif
7155 char remove ();
7156 int
7157 main ()
7158 {
7159 return remove ();
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 rm -f conftest.$ac_objext conftest$ac_exeext
7165 if { (ac_try="$ac_link"
7166 case "(($ac_try" in
7167   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7168   *) ac_try_echo=$ac_try;;
7169 esac
7170 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7171   (eval "$ac_link") 2>conftest.er1
7172   ac_status=$?
7173   grep -v '^ *+' conftest.er1 >conftest.err
7174   rm -f conftest.er1
7175   cat conftest.err >&5
7176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177   (exit $ac_status); } && {
7178          test -z "$ac_c_werror_flag" ||
7179          test ! -s conftest.err
7180        } && test -s conftest$ac_exeext &&
7181        $as_test_x conftest$ac_exeext; then
7182   ac_cv_lib_posix_remove=yes
7183 else
7184   echo "$as_me: failed program was:" >&5
7185 sed 's/^/| /' conftest.$ac_ext >&5
7186
7187         ac_cv_lib_posix_remove=no
7188 fi
7189
7190 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7191       conftest$ac_exeext conftest.$ac_ext
7192 LIBS=$ac_check_lib_save_LIBS
7193 fi
7194 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7195 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7196 if test $ac_cv_lib_posix_remove = yes; then
7197   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7198 fi
7199
7200     fi
7201
7202     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7203     { echo "$as_me:$LINENO: checking for shmat" >&5
7204 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7205 if test "${ac_cv_func_shmat+set}" = set; then
7206   echo $ECHO_N "(cached) $ECHO_C" >&6
7207 else
7208   cat >conftest.$ac_ext <<_ACEOF
7209 /* confdefs.h.  */
7210 _ACEOF
7211 cat confdefs.h >>conftest.$ac_ext
7212 cat >>conftest.$ac_ext <<_ACEOF
7213 /* end confdefs.h.  */
7214 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7215    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7216 #define shmat innocuous_shmat
7217
7218 /* System header to define __stub macros and hopefully few prototypes,
7219     which can conflict with char shmat (); below.
7220     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7221     <limits.h> exists even on freestanding compilers.  */
7222
7223 #ifdef __STDC__
7224 # include <limits.h>
7225 #else
7226 # include <assert.h>
7227 #endif
7228
7229 #undef shmat
7230
7231 /* Override any GCC internal prototype to avoid an error.
7232    Use char because int might match the return type of a GCC
7233    builtin and then its argument prototype would still apply.  */
7234 #ifdef __cplusplus
7235 extern "C"
7236 #endif
7237 char shmat ();
7238 /* The GNU C library defines this for functions which it implements
7239     to always fail with ENOSYS.  Some functions are actually named
7240     something starting with __ and the normal name is an alias.  */
7241 #if defined __stub_shmat || defined __stub___shmat
7242 choke me
7243 #endif
7244
7245 int
7246 main ()
7247 {
7248 return shmat ();
7249   ;
7250   return 0;
7251 }
7252 _ACEOF
7253 rm -f conftest.$ac_objext conftest$ac_exeext
7254 if { (ac_try="$ac_link"
7255 case "(($ac_try" in
7256   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7257   *) ac_try_echo=$ac_try;;
7258 esac
7259 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7260   (eval "$ac_link") 2>conftest.er1
7261   ac_status=$?
7262   grep -v '^ *+' conftest.er1 >conftest.err
7263   rm -f conftest.er1
7264   cat conftest.err >&5
7265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266   (exit $ac_status); } && {
7267          test -z "$ac_c_werror_flag" ||
7268          test ! -s conftest.err
7269        } && test -s conftest$ac_exeext &&
7270        $as_test_x conftest$ac_exeext; then
7271   ac_cv_func_shmat=yes
7272 else
7273   echo "$as_me: failed program was:" >&5
7274 sed 's/^/| /' conftest.$ac_ext >&5
7275
7276         ac_cv_func_shmat=no
7277 fi
7278
7279 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7280       conftest$ac_exeext conftest.$ac_ext
7281 fi
7282 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7283 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7284
7285     if test $ac_cv_func_shmat = no; then
7286       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7287 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7288 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7289   echo $ECHO_N "(cached) $ECHO_C" >&6
7290 else
7291   ac_check_lib_save_LIBS=$LIBS
7292 LIBS="-lipc  $LIBS"
7293 cat >conftest.$ac_ext <<_ACEOF
7294 /* confdefs.h.  */
7295 _ACEOF
7296 cat confdefs.h >>conftest.$ac_ext
7297 cat >>conftest.$ac_ext <<_ACEOF
7298 /* end confdefs.h.  */
7299
7300 /* Override any GCC internal prototype to avoid an error.
7301    Use char because int might match the return type of a GCC
7302    builtin and then its argument prototype would still apply.  */
7303 #ifdef __cplusplus
7304 extern "C"
7305 #endif
7306 char shmat ();
7307 int
7308 main ()
7309 {
7310 return shmat ();
7311   ;
7312   return 0;
7313 }
7314 _ACEOF
7315 rm -f conftest.$ac_objext conftest$ac_exeext
7316 if { (ac_try="$ac_link"
7317 case "(($ac_try" in
7318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7319   *) ac_try_echo=$ac_try;;
7320 esac
7321 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7322   (eval "$ac_link") 2>conftest.er1
7323   ac_status=$?
7324   grep -v '^ *+' conftest.er1 >conftest.err
7325   rm -f conftest.er1
7326   cat conftest.err >&5
7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); } && {
7329          test -z "$ac_c_werror_flag" ||
7330          test ! -s conftest.err
7331        } && test -s conftest$ac_exeext &&
7332        $as_test_x conftest$ac_exeext; then
7333   ac_cv_lib_ipc_shmat=yes
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 sed 's/^/| /' conftest.$ac_ext >&5
7337
7338         ac_cv_lib_ipc_shmat=no
7339 fi
7340
7341 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7342       conftest$ac_exeext conftest.$ac_ext
7343 LIBS=$ac_check_lib_save_LIBS
7344 fi
7345 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7346 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7347 if test $ac_cv_lib_ipc_shmat = yes; then
7348   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7349 fi
7350
7351     fi
7352   fi
7353
7354   # Check for libraries that X11R6 Xt/Xaw programs need.
7355   ac_save_LDFLAGS=$LDFLAGS
7356   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7357   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7358   # check for ICE first), but we must link in the order -lSM -lICE or
7359   # we get undefined symbols.  So assume we have SM if we have ICE.
7360   # These have to be linked with before -lX11, unlike the other
7361   # libraries we check for below, so use a different variable.
7362   # John Interrante, Karl Berry
7363   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7364 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7365 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7366   echo $ECHO_N "(cached) $ECHO_C" >&6
7367 else
7368   ac_check_lib_save_LIBS=$LIBS
7369 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7370 cat >conftest.$ac_ext <<_ACEOF
7371 /* confdefs.h.  */
7372 _ACEOF
7373 cat confdefs.h >>conftest.$ac_ext
7374 cat >>conftest.$ac_ext <<_ACEOF
7375 /* end confdefs.h.  */
7376
7377 /* Override any GCC internal prototype to avoid an error.
7378    Use char because int might match the return type of a GCC
7379    builtin and then its argument prototype would still apply.  */
7380 #ifdef __cplusplus
7381 extern "C"
7382 #endif
7383 char IceConnectionNumber ();
7384 int
7385 main ()
7386 {
7387 return IceConnectionNumber ();
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 rm -f conftest.$ac_objext conftest$ac_exeext
7393 if { (ac_try="$ac_link"
7394 case "(($ac_try" in
7395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7396   *) ac_try_echo=$ac_try;;
7397 esac
7398 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7399   (eval "$ac_link") 2>conftest.er1
7400   ac_status=$?
7401   grep -v '^ *+' conftest.er1 >conftest.err
7402   rm -f conftest.er1
7403   cat conftest.err >&5
7404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405   (exit $ac_status); } && {
7406          test -z "$ac_c_werror_flag" ||
7407          test ! -s conftest.err
7408        } && test -s conftest$ac_exeext &&
7409        $as_test_x conftest$ac_exeext; then
7410   ac_cv_lib_ICE_IceConnectionNumber=yes
7411 else
7412   echo "$as_me: failed program was:" >&5
7413 sed 's/^/| /' conftest.$ac_ext >&5
7414
7415         ac_cv_lib_ICE_IceConnectionNumber=no
7416 fi
7417
7418 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7419       conftest$ac_exeext conftest.$ac_ext
7420 LIBS=$ac_check_lib_save_LIBS
7421 fi
7422 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7423 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7424 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7425   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7426 fi
7427
7428   LDFLAGS=$ac_save_LDFLAGS
7429
7430 fi
7431
7432
7433 if test "$have_x" != yes; then
7434   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7435 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7436    { (exit 1); exit 1; }; }
7437 fi
7438
7439
7440     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7441 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7442 if test "${ac_cv_x_app_defaults+set}" = set; then
7443   echo $ECHO_N "(cached) $ECHO_C" >&6
7444 else
7445
7446   rm -fr conftestdir
7447   if mkdir conftestdir; then
7448     cd conftestdir 2>/dev/null
7449     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7450     cat > Imakefile <<'EOF'
7451 acfindx:
7452         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7453 EOF
7454     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7455       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7456       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7457     fi
7458     cd .. 2>/dev/null
7459     rm -fr conftestdir
7460   fi
7461       if test x"$ac_x_app_defaults" = x; then
7462
7463   # Look for the directory under a standard set of common directories.
7464   # Check X11 before X11Rn because it's often a symlink to the current release.
7465   for ac_dir in                                 \
7466     /usr/X11/lib/app-defaults                   \
7467     /usr/X11R6/lib/app-defaults                 \
7468     /usr/X11R6/lib/X11/app-defaults             \
7469     /usr/X11R5/lib/app-defaults                 \
7470     /usr/X11R5/lib/X11/app-defaults             \
7471     /usr/X11R4/lib/app-defaults                 \
7472     /usr/X11R4/lib/X11/app-defaults             \
7473                                                 \
7474     /usr/lib/X11/app-defaults                   \
7475     /usr/lib/X11R6/app-defaults                 \
7476     /usr/lib/X11R5/app-defaults                 \
7477     /usr/lib/X11R4/app-defaults                 \
7478                                                 \
7479     /usr/local/X11/lib/app-defaults             \
7480     /usr/local/X11R6/lib/app-defaults           \
7481     /usr/local/X11R5/lib/app-defaults           \
7482     /usr/local/X11R4/lib/app-defaults           \
7483                                                 \
7484     /usr/local/lib/X11/app-defaults             \
7485     /usr/local/lib/X11R6/app-defaults           \
7486     /usr/local/lib/X11R6/X11/app-defaults       \
7487     /usr/local/lib/X11R5/app-defaults           \
7488     /usr/local/lib/X11R5/X11/app-defaults       \
7489     /usr/local/lib/X11R4/app-defaults           \
7490     /usr/local/lib/X11R4/X11/app-defaults       \
7491                                                 \
7492     /usr/X386/lib/X11/app-defaults              \
7493     /usr/x386/lib/X11/app-defaults              \
7494     /usr/XFree86/lib/X11/app-defaults           \
7495                                                 \
7496     /usr/lib/X11/app-defaults                   \
7497     /usr/local/lib/X11/app-defaults             \
7498     /usr/unsupported/lib/X11/app-defaults       \
7499     /usr/athena/lib/X11/app-defaults            \
7500     /usr/local/x11r5/lib/X11/app-defaults       \
7501     /usr/lpp/Xamples/lib/X11/app-defaults       \
7502     /lib/usr/lib/X11/app-defaults               \
7503                                                 \
7504     /usr/openwin/lib/app-defaults               \
7505     /usr/openwin/lib/X11/app-defaults           \
7506     /usr/openwin/share/lib/app-defaults         \
7507     /usr/openwin/share/lib/X11/app-defaults     \
7508                                                 \
7509     /X11R6/lib/app-defaults                     \
7510     /X11R5/lib/app-defaults                     \
7511     /X11R4/lib/app-defaults                     \
7512     ; \
7513   do
7514     if test -d "$ac_dir"; then
7515       ac_x_app_defaults=$ac_dir
7516       break
7517     fi
7518   done
7519
7520       fi
7521       if test x"$ac_x_app_defaults" = x; then
7522         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7523       else
7524         # Record where we found app-defaults for the cache.
7525         ac_cv_x_app_defaults="$ac_x_app_defaults"
7526       fi
7527 fi
7528 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7529 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7530     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7531 case "$host" in
7532     *-hpux*)
7533
7534       # The following arcana was gleaned from conversations with
7535       # Eric Schwartz <erics@col.hp.com>:
7536       #
7537       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7538       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7539       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7540       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7541       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7542       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7543       # you don't need any -I or -L arguments.
7544       #
7545       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7546       # are the same division as 10.x.  However, there are no symlinks to
7547       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7548       # arguments are always necessary.
7549       #
7550       # However, X11R6 was available on HPUX 9.x as a patch: if that
7551       # patch was installed, then all of X11R6 went in to
7552       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7553       #
7554       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7555       # whether R5 was available as a patch; R6 undoubtedly was not.)
7556       #
7557       # So.  We try and use the highest numbered pair of
7558       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7559       # that are available.  We do not mix and match different versions
7560       # of X.
7561       #
7562       # Question I still don't know the answer to: (do you?)
7563       #
7564       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7565       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7566       #     that contrib directory?  Did it contain so-called "standard"
7567       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7568       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7569       #     be a situation where one had to reach into the R5 headers and
7570       #     libs to find Xmu?  That is, must both R6 and R5 directories
7571       #     be on the -I and -L lists in that case?
7572       #
7573       for version in X11R6 X11R5 X11R4 ; do
7574         # if either pair of directories exists...
7575         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7576         then
7577            # if contrib exists, use it...
7578            if test -d /usr/contrib/$version/include ; then
7579              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7580              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7581            fi
7582            # if the "standard" one exists, use it.
7583            if test -d /usr/include/$version ; then
7584              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7585              X_LIBS="$X_LIBS -L/usr/lib/$version"
7586            fi
7587            # since at least one of the pair exists, go no farther.
7588            break
7589         fi
7590       done
7591
7592       # Now find Motif.  Thanks for not making xmkmf find this by
7593       # default, you losers.
7594       #
7595       if test -d /usr/include/Motif2.1 ; then
7596         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7597         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7598       elif test -d /usr/include/Motif1.2 ; then
7599         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7600         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7601       elif test -d /usr/include/Motif1.1 ; then
7602         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7603         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7604       fi
7605
7606       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7607       #
7608       if test -d /opt/graphics/OpenGL/include ; then
7609         # HP-UX 10.20 puts it here
7610         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7611         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7612       elif test -d /opt/Mesa/lib ; then
7613         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7614         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7615       fi
7616
7617
7618       if test -d /opt/xpm/lib/X11 ; then
7619         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7620         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7621       fi
7622
7623       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7624       # in /usr/local/, unless there is already an xscreensaver in
7625       # /usr/local/bin/.  This can be overridden with the --prefix arg
7626       # to configure.  I'm not sure this is the right thing to do, but
7627       # Richard Lloyd says so...
7628       #
7629       if test \! -x /usr/local/bin/xscreensaver ; then
7630         ac_default_prefix=/opt/xscreensaver
7631       fi
7632
7633     ;;
7634     *-solaris*)
7635
7636       # Thanks for not making xmkmf find this by default, pinheads.
7637       # And thanks for moving things around again, too.  Is this
7638       # really the standard location now?  What happened to the
7639       # joke that this kind of thing went in /opt?
7640       # cthomp says "answer: CDE (Common Disorganized Environment)"
7641       #
7642       if test -f /usr/dt/include/Xm/Xm.h ; then
7643         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7644         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7645
7646         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7647         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7648 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7649 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7650   echo $ECHO_N "(cached) $ECHO_C" >&6
7651 else
7652   ac_check_lib_save_LIBS=$LIBS
7653 LIBS="-lgen  $LIBS"
7654 cat >conftest.$ac_ext <<_ACEOF
7655 /* confdefs.h.  */
7656 _ACEOF
7657 cat confdefs.h >>conftest.$ac_ext
7658 cat >>conftest.$ac_ext <<_ACEOF
7659 /* end confdefs.h.  */
7660
7661 /* Override any GCC internal prototype to avoid an error.
7662    Use char because int might match the return type of a GCC
7663    builtin and then its argument prototype would still apply.  */
7664 #ifdef __cplusplus
7665 extern "C"
7666 #endif
7667 char regcmp ();
7668 int
7669 main ()
7670 {
7671 return regcmp ();
7672   ;
7673   return 0;
7674 }
7675 _ACEOF
7676 rm -f conftest.$ac_objext conftest$ac_exeext
7677 if { (ac_try="$ac_link"
7678 case "(($ac_try" in
7679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7680   *) ac_try_echo=$ac_try;;
7681 esac
7682 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7683   (eval "$ac_link") 2>conftest.er1
7684   ac_status=$?
7685   grep -v '^ *+' conftest.er1 >conftest.err
7686   rm -f conftest.er1
7687   cat conftest.err >&5
7688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689   (exit $ac_status); } && {
7690          test -z "$ac_c_werror_flag" ||
7691          test ! -s conftest.err
7692        } && test -s conftest$ac_exeext &&
7693        $as_test_x conftest$ac_exeext; then
7694   ac_cv_lib_gen_regcmp=yes
7695 else
7696   echo "$as_me: failed program was:" >&5
7697 sed 's/^/| /' conftest.$ac_ext >&5
7698
7699         ac_cv_lib_gen_regcmp=no
7700 fi
7701
7702 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7703       conftest$ac_exeext conftest.$ac_ext
7704 LIBS=$ac_check_lib_save_LIBS
7705 fi
7706 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7707 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7708 if test $ac_cv_lib_gen_regcmp = yes; then
7709   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7710 fi
7711
7712       fi
7713
7714     ;;
7715     *-darwin*)
7716
7717       # On MacOS X (10.x with "fink"), many things are under /sw/.
7718       #
7719       if test -d /sw/include ; then
7720         X_CFLAGS="-I/sw/include $X_CFLAGS"
7721         X_LIBS="-L/sw/lib $X_LIBS"
7722       fi
7723     ;;
7724   esac
7725 { echo "$as_me:$LINENO: checking for XPointer" >&5
7726 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7727 if test "${ac_cv_xpointer+set}" = set; then
7728   echo $ECHO_N "(cached) $ECHO_C" >&6
7729 else
7730
7731   ac_save_CPPFLAGS="$CPPFLAGS"
7732   if test \! -z "$includedir" ; then
7733     CPPFLAGS="$CPPFLAGS -I$includedir"
7734   fi
7735   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7736   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7737   cat >conftest.$ac_ext <<_ACEOF
7738 /* confdefs.h.  */
7739 _ACEOF
7740 cat confdefs.h >>conftest.$ac_ext
7741 cat >>conftest.$ac_ext <<_ACEOF
7742 /* end confdefs.h.  */
7743 #include <X11/Xlib.h>
7744 int
7745 main ()
7746 {
7747 XPointer foo = (XPointer) 0;
7748   ;
7749   return 0;
7750 }
7751 _ACEOF
7752 rm -f conftest.$ac_objext
7753 if { (ac_try="$ac_compile"
7754 case "(($ac_try" in
7755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7756   *) ac_try_echo=$ac_try;;
7757 esac
7758 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7759   (eval "$ac_compile") 2>conftest.er1
7760   ac_status=$?
7761   grep -v '^ *+' conftest.er1 >conftest.err
7762   rm -f conftest.er1
7763   cat conftest.err >&5
7764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765   (exit $ac_status); } && {
7766          test -z "$ac_c_werror_flag" ||
7767          test ! -s conftest.err
7768        } && test -s conftest.$ac_objext; then
7769   ac_cv_xpointer=yes
7770 else
7771   echo "$as_me: failed program was:" >&5
7772 sed 's/^/| /' conftest.$ac_ext >&5
7773
7774         ac_cv_xpointer=no
7775 fi
7776
7777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7778   CPPFLAGS="$ac_save_CPPFLAGS"
7779 fi
7780 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7781 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7782   if test "$ac_cv_xpointer" != yes; then
7783    cat >>confdefs.h <<\_ACEOF
7784 #define XPointer char*
7785 _ACEOF
7786
7787   fi
7788
7789 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7790 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7791   ac_macosx=no
7792   case "$host" in
7793     *-apple-darwin* )
7794       ac_macosx=yes
7795     ;;
7796   esac
7797 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7798 echo "${ECHO_T}$ac_macosx" >&6; }
7799
7800
7801 ###############################################################################
7802 #
7803 #       Gettext support
7804 #
7805 ###############################################################################
7806
7807
7808
7809 if test -n ""; then
7810     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7811 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7812
7813     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7814     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7815
7816     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7817
7818
7819     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7820         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7821 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7822     else
7823         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7824 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7825         exit 1
7826     fi
7827 fi
7828
7829   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'
7830 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'
7831      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'
7832       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7833      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'
7834    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'
7835     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'
7836 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'
7837        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'
7838       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'
7839     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'
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853 # Use the tools built into the package, not the ones that are installed.
7854
7855 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7856 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7857 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7858
7859
7860
7861
7862
7863 # Extract the first word of "perl", so it can be a program name with args.
7864 set dummy perl; ac_word=$2
7865 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7867 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7868   echo $ECHO_N "(cached) $ECHO_C" >&6
7869 else
7870   case $INTLTOOL_PERL in
7871   [\\/]* | ?:[\\/]*)
7872   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7873   ;;
7874   *)
7875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876 for as_dir in $PATH
7877 do
7878   IFS=$as_save_IFS
7879   test -z "$as_dir" && as_dir=.
7880   for ac_exec_ext in '' $ac_executable_extensions; do
7881   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7882     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7883     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7884     break 2
7885   fi
7886 done
7887 done
7888 IFS=$as_save_IFS
7889
7890   ;;
7891 esac
7892 fi
7893 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7894 if test -n "$INTLTOOL_PERL"; then
7895   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7896 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7897 else
7898   { echo "$as_me:$LINENO: result: no" >&5
7899 echo "${ECHO_T}no" >&6; }
7900 fi
7901
7902
7903 if test -z "$INTLTOOL_PERL"; then
7904    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7905 echo "$as_me: error: perl not found; required for intltool" >&2;}
7906    { (exit 1); exit 1; }; }
7907 fi
7908 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7909    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7910 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7911    { (exit 1); exit 1; }; }
7912 fi
7913
7914 # Remove file type tags (using []) from po/POTFILES.
7915
7916
7917
7918
7919
7920
7921
7922 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7923
7924 ac_config_commands="$ac_config_commands default-1"
7925
7926
7927
7928 GETTEXT_PACKAGE=xscreensaver
7929
7930 cat >>confdefs.h <<_ACEOF
7931 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7932 _ACEOF
7933
7934
7935 cat >>confdefs.h <<_ACEOF
7936 #define PACKAGE "$GETTEXT_PACKAGE"
7937 _ACEOF
7938
7939
7940
7941 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"
7942 if test -n "$ac_tool_prefix"; then
7943   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7944 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7945 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7947 if test "${ac_cv_prog_RANLIB+set}" = set; then
7948   echo $ECHO_N "(cached) $ECHO_C" >&6
7949 else
7950   if test -n "$RANLIB"; then
7951   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7952 else
7953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954 for as_dir in $PATH
7955 do
7956   IFS=$as_save_IFS
7957   test -z "$as_dir" && as_dir=.
7958   for ac_exec_ext in '' $ac_executable_extensions; do
7959   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7960     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7961     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7962     break 2
7963   fi
7964 done
7965 done
7966 IFS=$as_save_IFS
7967
7968 fi
7969 fi
7970 RANLIB=$ac_cv_prog_RANLIB
7971 if test -n "$RANLIB"; then
7972   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7973 echo "${ECHO_T}$RANLIB" >&6; }
7974 else
7975   { echo "$as_me:$LINENO: result: no" >&5
7976 echo "${ECHO_T}no" >&6; }
7977 fi
7978
7979
7980 fi
7981 if test -z "$ac_cv_prog_RANLIB"; then
7982   ac_ct_RANLIB=$RANLIB
7983   # Extract the first word of "ranlib", so it can be a program name with args.
7984 set dummy ranlib; ac_word=$2
7985 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7987 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7988   echo $ECHO_N "(cached) $ECHO_C" >&6
7989 else
7990   if test -n "$ac_ct_RANLIB"; then
7991   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7992 else
7993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994 for as_dir in $PATH
7995 do
7996   IFS=$as_save_IFS
7997   test -z "$as_dir" && as_dir=.
7998   for ac_exec_ext in '' $ac_executable_extensions; do
7999   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8000     ac_cv_prog_ac_ct_RANLIB="ranlib"
8001     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8002     break 2
8003   fi
8004 done
8005 done
8006 IFS=$as_save_IFS
8007
8008 fi
8009 fi
8010 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8011 if test -n "$ac_ct_RANLIB"; then
8012   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8013 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8014 else
8015   { echo "$as_me:$LINENO: result: no" >&5
8016 echo "${ECHO_T}no" >&6; }
8017 fi
8018
8019   if test "x$ac_ct_RANLIB" = x; then
8020     RANLIB=":"
8021   else
8022     case $cross_compiling:$ac_tool_warned in
8023 yes:)
8024 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8025 whose name does not start with the host triplet.  If you think this
8026 configuration is useful to you, please write to autoconf@gnu.org." >&5
8027 echo "$as_me: 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." >&2;}
8030 ac_tool_warned=yes ;;
8031 esac
8032     RANLIB=$ac_ct_RANLIB
8033   fi
8034 else
8035   RANLIB="$ac_cv_prog_RANLIB"
8036 fi
8037
8038 { echo "$as_me:$LINENO: checking for off_t" >&5
8039 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8040 if test "${ac_cv_type_off_t+set}" = set; then
8041   echo $ECHO_N "(cached) $ECHO_C" >&6
8042 else
8043   cat >conftest.$ac_ext <<_ACEOF
8044 /* confdefs.h.  */
8045 _ACEOF
8046 cat confdefs.h >>conftest.$ac_ext
8047 cat >>conftest.$ac_ext <<_ACEOF
8048 /* end confdefs.h.  */
8049 $ac_includes_default
8050 typedef off_t ac__type_new_;
8051 int
8052 main ()
8053 {
8054 if ((ac__type_new_ *) 0)
8055   return 0;
8056 if (sizeof (ac__type_new_))
8057   return 0;
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 rm -f conftest.$ac_objext
8063 if { (ac_try="$ac_compile"
8064 case "(($ac_try" in
8065   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8066   *) ac_try_echo=$ac_try;;
8067 esac
8068 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8069   (eval "$ac_compile") 2>conftest.er1
8070   ac_status=$?
8071   grep -v '^ *+' conftest.er1 >conftest.err
8072   rm -f conftest.er1
8073   cat conftest.err >&5
8074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075   (exit $ac_status); } && {
8076          test -z "$ac_c_werror_flag" ||
8077          test ! -s conftest.err
8078        } && test -s conftest.$ac_objext; then
8079   ac_cv_type_off_t=yes
8080 else
8081   echo "$as_me: failed program was:" >&5
8082 sed 's/^/| /' conftest.$ac_ext >&5
8083
8084         ac_cv_type_off_t=no
8085 fi
8086
8087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8088 fi
8089 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8090 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8091 if test $ac_cv_type_off_t = yes; then
8092   :
8093 else
8094
8095 cat >>confdefs.h <<_ACEOF
8096 #define off_t long int
8097 _ACEOF
8098
8099 fi
8100
8101 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8102 # for constant arguments.  Useless!
8103 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8104 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8105 if test "${ac_cv_working_alloca_h+set}" = set; then
8106   echo $ECHO_N "(cached) $ECHO_C" >&6
8107 else
8108   cat >conftest.$ac_ext <<_ACEOF
8109 /* confdefs.h.  */
8110 _ACEOF
8111 cat confdefs.h >>conftest.$ac_ext
8112 cat >>conftest.$ac_ext <<_ACEOF
8113 /* end confdefs.h.  */
8114 #include <alloca.h>
8115 int
8116 main ()
8117 {
8118 char *p = (char *) alloca (2 * sizeof (int));
8119                           if (p) return 0;
8120   ;
8121   return 0;
8122 }
8123 _ACEOF
8124 rm -f conftest.$ac_objext conftest$ac_exeext
8125 if { (ac_try="$ac_link"
8126 case "(($ac_try" in
8127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8128   *) ac_try_echo=$ac_try;;
8129 esac
8130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8131   (eval "$ac_link") 2>conftest.er1
8132   ac_status=$?
8133   grep -v '^ *+' conftest.er1 >conftest.err
8134   rm -f conftest.er1
8135   cat conftest.err >&5
8136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8137   (exit $ac_status); } && {
8138          test -z "$ac_c_werror_flag" ||
8139          test ! -s conftest.err
8140        } && test -s conftest$ac_exeext &&
8141        $as_test_x conftest$ac_exeext; then
8142   ac_cv_working_alloca_h=yes
8143 else
8144   echo "$as_me: failed program was:" >&5
8145 sed 's/^/| /' conftest.$ac_ext >&5
8146
8147         ac_cv_working_alloca_h=no
8148 fi
8149
8150 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8151       conftest$ac_exeext conftest.$ac_ext
8152 fi
8153 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8154 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8155 if test $ac_cv_working_alloca_h = yes; then
8156
8157 cat >>confdefs.h <<\_ACEOF
8158 #define HAVE_ALLOCA_H 1
8159 _ACEOF
8160
8161 fi
8162
8163 { echo "$as_me:$LINENO: checking for alloca" >&5
8164 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8165 if test "${ac_cv_func_alloca_works+set}" = set; then
8166   echo $ECHO_N "(cached) $ECHO_C" >&6
8167 else
8168   cat >conftest.$ac_ext <<_ACEOF
8169 /* confdefs.h.  */
8170 _ACEOF
8171 cat confdefs.h >>conftest.$ac_ext
8172 cat >>conftest.$ac_ext <<_ACEOF
8173 /* end confdefs.h.  */
8174 #ifdef __GNUC__
8175 # define alloca __builtin_alloca
8176 #else
8177 # ifdef _MSC_VER
8178 #  include <malloc.h>
8179 #  define alloca _alloca
8180 # else
8181 #  ifdef HAVE_ALLOCA_H
8182 #   include <alloca.h>
8183 #  else
8184 #   ifdef _AIX
8185  #pragma alloca
8186 #   else
8187 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8188 char *alloca ();
8189 #    endif
8190 #   endif
8191 #  endif
8192 # endif
8193 #endif
8194
8195 int
8196 main ()
8197 {
8198 char *p = (char *) alloca (1);
8199                                     if (p) return 0;
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 rm -f conftest.$ac_objext conftest$ac_exeext
8205 if { (ac_try="$ac_link"
8206 case "(($ac_try" in
8207   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8208   *) ac_try_echo=$ac_try;;
8209 esac
8210 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8211   (eval "$ac_link") 2>conftest.er1
8212   ac_status=$?
8213   grep -v '^ *+' conftest.er1 >conftest.err
8214   rm -f conftest.er1
8215   cat conftest.err >&5
8216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217   (exit $ac_status); } && {
8218          test -z "$ac_c_werror_flag" ||
8219          test ! -s conftest.err
8220        } && test -s conftest$ac_exeext &&
8221        $as_test_x conftest$ac_exeext; then
8222   ac_cv_func_alloca_works=yes
8223 else
8224   echo "$as_me: failed program was:" >&5
8225 sed 's/^/| /' conftest.$ac_ext >&5
8226
8227         ac_cv_func_alloca_works=no
8228 fi
8229
8230 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8231       conftest$ac_exeext conftest.$ac_ext
8232 fi
8233 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8234 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8235
8236 if test $ac_cv_func_alloca_works = yes; then
8237
8238 cat >>confdefs.h <<\_ACEOF
8239 #define HAVE_ALLOCA 1
8240 _ACEOF
8241
8242 else
8243   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8244 # that cause trouble.  Some versions do not even contain alloca or
8245 # contain a buggy version.  If you still want to use their alloca,
8246 # use ar to extract alloca.o from them instead of compiling alloca.c.
8247
8248 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8249
8250 cat >>confdefs.h <<\_ACEOF
8251 #define C_ALLOCA 1
8252 _ACEOF
8253
8254
8255 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8256 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8257 if test "${ac_cv_os_cray+set}" = set; then
8258   echo $ECHO_N "(cached) $ECHO_C" >&6
8259 else
8260   cat >conftest.$ac_ext <<_ACEOF
8261 /* confdefs.h.  */
8262 _ACEOF
8263 cat confdefs.h >>conftest.$ac_ext
8264 cat >>conftest.$ac_ext <<_ACEOF
8265 /* end confdefs.h.  */
8266 #if defined CRAY && ! defined CRAY2
8267 webecray
8268 #else
8269 wenotbecray
8270 #endif
8271
8272 _ACEOF
8273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8274   $EGREP "webecray" >/dev/null 2>&1; then
8275   ac_cv_os_cray=yes
8276 else
8277   ac_cv_os_cray=no
8278 fi
8279 rm -f conftest*
8280
8281 fi
8282 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8283 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8284 if test $ac_cv_os_cray = yes; then
8285   for ac_func in _getb67 GETB67 getb67; do
8286     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8287 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8288 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8289 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8290   echo $ECHO_N "(cached) $ECHO_C" >&6
8291 else
8292   cat >conftest.$ac_ext <<_ACEOF
8293 /* confdefs.h.  */
8294 _ACEOF
8295 cat confdefs.h >>conftest.$ac_ext
8296 cat >>conftest.$ac_ext <<_ACEOF
8297 /* end confdefs.h.  */
8298 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8299    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8300 #define $ac_func innocuous_$ac_func
8301
8302 /* System header to define __stub macros and hopefully few prototypes,
8303     which can conflict with char $ac_func (); below.
8304     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8305     <limits.h> exists even on freestanding compilers.  */
8306
8307 #ifdef __STDC__
8308 # include <limits.h>
8309 #else
8310 # include <assert.h>
8311 #endif
8312
8313 #undef $ac_func
8314
8315 /* Override any GCC internal prototype to avoid an error.
8316    Use char because int might match the return type of a GCC
8317    builtin and then its argument prototype would still apply.  */
8318 #ifdef __cplusplus
8319 extern "C"
8320 #endif
8321 char $ac_func ();
8322 /* The GNU C library defines this for functions which it implements
8323     to always fail with ENOSYS.  Some functions are actually named
8324     something starting with __ and the normal name is an alias.  */
8325 #if defined __stub_$ac_func || defined __stub___$ac_func
8326 choke me
8327 #endif
8328
8329 int
8330 main ()
8331 {
8332 return $ac_func ();
8333   ;
8334   return 0;
8335 }
8336 _ACEOF
8337 rm -f conftest.$ac_objext conftest$ac_exeext
8338 if { (ac_try="$ac_link"
8339 case "(($ac_try" in
8340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8341   *) ac_try_echo=$ac_try;;
8342 esac
8343 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8344   (eval "$ac_link") 2>conftest.er1
8345   ac_status=$?
8346   grep -v '^ *+' conftest.er1 >conftest.err
8347   rm -f conftest.er1
8348   cat conftest.err >&5
8349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350   (exit $ac_status); } && {
8351          test -z "$ac_c_werror_flag" ||
8352          test ! -s conftest.err
8353        } && test -s conftest$ac_exeext &&
8354        $as_test_x conftest$ac_exeext; then
8355   eval "$as_ac_var=yes"
8356 else
8357   echo "$as_me: failed program was:" >&5
8358 sed 's/^/| /' conftest.$ac_ext >&5
8359
8360         eval "$as_ac_var=no"
8361 fi
8362
8363 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8364       conftest$ac_exeext conftest.$ac_ext
8365 fi
8366 ac_res=`eval echo '${'$as_ac_var'}'`
8367                { echo "$as_me:$LINENO: result: $ac_res" >&5
8368 echo "${ECHO_T}$ac_res" >&6; }
8369 if test `eval echo '${'$as_ac_var'}'` = yes; then
8370
8371 cat >>confdefs.h <<_ACEOF
8372 #define CRAY_STACKSEG_END $ac_func
8373 _ACEOF
8374
8375     break
8376 fi
8377
8378   done
8379 fi
8380
8381 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8382 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8383 if test "${ac_cv_c_stack_direction+set}" = set; then
8384   echo $ECHO_N "(cached) $ECHO_C" >&6
8385 else
8386   if test "$cross_compiling" = yes; then
8387   ac_cv_c_stack_direction=0
8388 else
8389   cat >conftest.$ac_ext <<_ACEOF
8390 /* confdefs.h.  */
8391 _ACEOF
8392 cat confdefs.h >>conftest.$ac_ext
8393 cat >>conftest.$ac_ext <<_ACEOF
8394 /* end confdefs.h.  */
8395 $ac_includes_default
8396 int
8397 find_stack_direction ()
8398 {
8399   static char *addr = 0;
8400   auto char dummy;
8401   if (addr == 0)
8402     {
8403       addr = &dummy;
8404       return find_stack_direction ();
8405     }
8406   else
8407     return (&dummy > addr) ? 1 : -1;
8408 }
8409
8410 int
8411 main ()
8412 {
8413   return find_stack_direction () < 0;
8414 }
8415 _ACEOF
8416 rm -f conftest$ac_exeext
8417 if { (ac_try="$ac_link"
8418 case "(($ac_try" in
8419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420   *) ac_try_echo=$ac_try;;
8421 esac
8422 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423   (eval "$ac_link") 2>&5
8424   ac_status=$?
8425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8427   { (case "(($ac_try" in
8428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8429   *) ac_try_echo=$ac_try;;
8430 esac
8431 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8432   (eval "$ac_try") 2>&5
8433   ac_status=$?
8434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8435   (exit $ac_status); }; }; then
8436   ac_cv_c_stack_direction=1
8437 else
8438   echo "$as_me: program exited with status $ac_status" >&5
8439 echo "$as_me: failed program was:" >&5
8440 sed 's/^/| /' conftest.$ac_ext >&5
8441
8442 ( exit $ac_status )
8443 ac_cv_c_stack_direction=-1
8444 fi
8445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8446 fi
8447
8448
8449 fi
8450 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8451 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8452
8453 cat >>confdefs.h <<_ACEOF
8454 #define STACK_DIRECTION $ac_cv_c_stack_direction
8455 _ACEOF
8456
8457
8458 fi
8459
8460
8461
8462 for ac_header in stdlib.h unistd.h
8463 do
8464 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8465 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8466   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8467 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8468 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8469   echo $ECHO_N "(cached) $ECHO_C" >&6
8470 fi
8471 ac_res=`eval echo '${'$as_ac_Header'}'`
8472                { echo "$as_me:$LINENO: result: $ac_res" >&5
8473 echo "${ECHO_T}$ac_res" >&6; }
8474 else
8475   # Is the header compilable?
8476 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8477 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8478 cat >conftest.$ac_ext <<_ACEOF
8479 /* confdefs.h.  */
8480 _ACEOF
8481 cat confdefs.h >>conftest.$ac_ext
8482 cat >>conftest.$ac_ext <<_ACEOF
8483 /* end confdefs.h.  */
8484 $ac_includes_default
8485 #include <$ac_header>
8486 _ACEOF
8487 rm -f conftest.$ac_objext
8488 if { (ac_try="$ac_compile"
8489 case "(($ac_try" in
8490   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8491   *) ac_try_echo=$ac_try;;
8492 esac
8493 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8494   (eval "$ac_compile") 2>conftest.er1
8495   ac_status=$?
8496   grep -v '^ *+' conftest.er1 >conftest.err
8497   rm -f conftest.er1
8498   cat conftest.err >&5
8499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500   (exit $ac_status); } && {
8501          test -z "$ac_c_werror_flag" ||
8502          test ! -s conftest.err
8503        } && test -s conftest.$ac_objext; then
8504   ac_header_compiler=yes
8505 else
8506   echo "$as_me: failed program was:" >&5
8507 sed 's/^/| /' conftest.$ac_ext >&5
8508
8509         ac_header_compiler=no
8510 fi
8511
8512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8513 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8514 echo "${ECHO_T}$ac_header_compiler" >&6; }
8515
8516 # Is the header present?
8517 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8518 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8519 cat >conftest.$ac_ext <<_ACEOF
8520 /* confdefs.h.  */
8521 _ACEOF
8522 cat confdefs.h >>conftest.$ac_ext
8523 cat >>conftest.$ac_ext <<_ACEOF
8524 /* end confdefs.h.  */
8525 #include <$ac_header>
8526 _ACEOF
8527 if { (ac_try="$ac_cpp conftest.$ac_ext"
8528 case "(($ac_try" in
8529   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8530   *) ac_try_echo=$ac_try;;
8531 esac
8532 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8533   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8534   ac_status=$?
8535   grep -v '^ *+' conftest.er1 >conftest.err
8536   rm -f conftest.er1
8537   cat conftest.err >&5
8538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539   (exit $ac_status); } >/dev/null && {
8540          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8541          test ! -s conftest.err
8542        }; then
8543   ac_header_preproc=yes
8544 else
8545   echo "$as_me: failed program was:" >&5
8546 sed 's/^/| /' conftest.$ac_ext >&5
8547
8548   ac_header_preproc=no
8549 fi
8550
8551 rm -f conftest.err conftest.$ac_ext
8552 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8553 echo "${ECHO_T}$ac_header_preproc" >&6; }
8554
8555 # So?  What about this header?
8556 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8557   yes:no: )
8558     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8559 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8560     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8561 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8562     ac_header_preproc=yes
8563     ;;
8564   no:yes:* )
8565     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8566 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8567     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8568 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8569     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8570 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8571     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8572 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8573     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8574 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8575     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8576 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8577
8578     ;;
8579 esac
8580 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8581 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8582 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8583   echo $ECHO_N "(cached) $ECHO_C" >&6
8584 else
8585   eval "$as_ac_Header=\$ac_header_preproc"
8586 fi
8587 ac_res=`eval echo '${'$as_ac_Header'}'`
8588                { echo "$as_me:$LINENO: result: $ac_res" >&5
8589 echo "${ECHO_T}$ac_res" >&6; }
8590
8591 fi
8592 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8593   cat >>confdefs.h <<_ACEOF
8594 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8595 _ACEOF
8596
8597 fi
8598
8599 done
8600
8601
8602 for ac_func in getpagesize
8603 do
8604 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8605 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8606 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8607 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8608   echo $ECHO_N "(cached) $ECHO_C" >&6
8609 else
8610   cat >conftest.$ac_ext <<_ACEOF
8611 /* confdefs.h.  */
8612 _ACEOF
8613 cat confdefs.h >>conftest.$ac_ext
8614 cat >>conftest.$ac_ext <<_ACEOF
8615 /* end confdefs.h.  */
8616 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8617    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8618 #define $ac_func innocuous_$ac_func
8619
8620 /* System header to define __stub macros and hopefully few prototypes,
8621     which can conflict with char $ac_func (); below.
8622     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8623     <limits.h> exists even on freestanding compilers.  */
8624
8625 #ifdef __STDC__
8626 # include <limits.h>
8627 #else
8628 # include <assert.h>
8629 #endif
8630
8631 #undef $ac_func
8632
8633 /* Override any GCC internal prototype to avoid an error.
8634    Use char because int might match the return type of a GCC
8635    builtin and then its argument prototype would still apply.  */
8636 #ifdef __cplusplus
8637 extern "C"
8638 #endif
8639 char $ac_func ();
8640 /* The GNU C library defines this for functions which it implements
8641     to always fail with ENOSYS.  Some functions are actually named
8642     something starting with __ and the normal name is an alias.  */
8643 #if defined __stub_$ac_func || defined __stub___$ac_func
8644 choke me
8645 #endif
8646
8647 int
8648 main ()
8649 {
8650 return $ac_func ();
8651   ;
8652   return 0;
8653 }
8654 _ACEOF
8655 rm -f conftest.$ac_objext conftest$ac_exeext
8656 if { (ac_try="$ac_link"
8657 case "(($ac_try" in
8658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8659   *) ac_try_echo=$ac_try;;
8660 esac
8661 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8662   (eval "$ac_link") 2>conftest.er1
8663   ac_status=$?
8664   grep -v '^ *+' conftest.er1 >conftest.err
8665   rm -f conftest.er1
8666   cat conftest.err >&5
8667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668   (exit $ac_status); } && {
8669          test -z "$ac_c_werror_flag" ||
8670          test ! -s conftest.err
8671        } && test -s conftest$ac_exeext &&
8672        $as_test_x conftest$ac_exeext; then
8673   eval "$as_ac_var=yes"
8674 else
8675   echo "$as_me: failed program was:" >&5
8676 sed 's/^/| /' conftest.$ac_ext >&5
8677
8678         eval "$as_ac_var=no"
8679 fi
8680
8681 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8682       conftest$ac_exeext conftest.$ac_ext
8683 fi
8684 ac_res=`eval echo '${'$as_ac_var'}'`
8685                { echo "$as_me:$LINENO: result: $ac_res" >&5
8686 echo "${ECHO_T}$ac_res" >&6; }
8687 if test `eval echo '${'$as_ac_var'}'` = yes; then
8688   cat >>confdefs.h <<_ACEOF
8689 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8690 _ACEOF
8691
8692 fi
8693 done
8694
8695 { echo "$as_me:$LINENO: checking for working mmap" >&5
8696 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8697 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8698   echo $ECHO_N "(cached) $ECHO_C" >&6
8699 else
8700   if test "$cross_compiling" = yes; then
8701   ac_cv_func_mmap_fixed_mapped=no
8702 else
8703   cat >conftest.$ac_ext <<_ACEOF
8704 /* confdefs.h.  */
8705 _ACEOF
8706 cat confdefs.h >>conftest.$ac_ext
8707 cat >>conftest.$ac_ext <<_ACEOF
8708 /* end confdefs.h.  */
8709 $ac_includes_default
8710 /* malloc might have been renamed as rpl_malloc. */
8711 #undef malloc
8712
8713 /* Thanks to Mike Haertel and Jim Avera for this test.
8714    Here is a matrix of mmap possibilities:
8715         mmap private not fixed
8716         mmap private fixed at somewhere currently unmapped
8717         mmap private fixed at somewhere already mapped
8718         mmap shared not fixed
8719         mmap shared fixed at somewhere currently unmapped
8720         mmap shared fixed at somewhere already mapped
8721    For private mappings, we should verify that changes cannot be read()
8722    back from the file, nor mmap's back from the file at a different
8723    address.  (There have been systems where private was not correctly
8724    implemented like the infamous i386 svr4.0, and systems where the
8725    VM page cache was not coherent with the file system buffer cache
8726    like early versions of FreeBSD and possibly contemporary NetBSD.)
8727    For shared mappings, we should conversely verify that changes get
8728    propagated back to all the places they're supposed to be.
8729
8730    Grep wants private fixed already mapped.
8731    The main things grep needs to know about mmap are:
8732    * does it exist and is it safe to write into the mmap'd area
8733    * how to use it (BSD variants)  */
8734
8735 #include <fcntl.h>
8736 #include <sys/mman.h>
8737
8738 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8739 char *malloc ();
8740 #endif
8741
8742 /* This mess was copied from the GNU getpagesize.h.  */
8743 #ifndef HAVE_GETPAGESIZE
8744 /* Assume that all systems that can run configure have sys/param.h.  */
8745 # ifndef HAVE_SYS_PARAM_H
8746 #  define HAVE_SYS_PARAM_H 1
8747 # endif
8748
8749 # ifdef _SC_PAGESIZE
8750 #  define getpagesize() sysconf(_SC_PAGESIZE)
8751 # else /* no _SC_PAGESIZE */
8752 #  ifdef HAVE_SYS_PARAM_H
8753 #   include <sys/param.h>
8754 #   ifdef EXEC_PAGESIZE
8755 #    define getpagesize() EXEC_PAGESIZE
8756 #   else /* no EXEC_PAGESIZE */
8757 #    ifdef NBPG
8758 #     define getpagesize() NBPG * CLSIZE
8759 #     ifndef CLSIZE
8760 #      define CLSIZE 1
8761 #     endif /* no CLSIZE */
8762 #    else /* no NBPG */
8763 #     ifdef NBPC
8764 #      define getpagesize() NBPC
8765 #     else /* no NBPC */
8766 #      ifdef PAGESIZE
8767 #       define getpagesize() PAGESIZE
8768 #      endif /* PAGESIZE */
8769 #     endif /* no NBPC */
8770 #    endif /* no NBPG */
8771 #   endif /* no EXEC_PAGESIZE */
8772 #  else /* no HAVE_SYS_PARAM_H */
8773 #   define getpagesize() 8192   /* punt totally */
8774 #  endif /* no HAVE_SYS_PARAM_H */
8775 # endif /* no _SC_PAGESIZE */
8776
8777 #endif /* no HAVE_GETPAGESIZE */
8778
8779 int
8780 main ()
8781 {
8782   char *data, *data2, *data3;
8783   int i, pagesize;
8784   int fd;
8785
8786   pagesize = getpagesize ();
8787
8788   /* First, make a file with some known garbage in it. */
8789   data = (char *) malloc (pagesize);
8790   if (!data)
8791     return 1;
8792   for (i = 0; i < pagesize; ++i)
8793     *(data + i) = rand ();
8794   umask (0);
8795   fd = creat ("conftest.mmap", 0600);
8796   if (fd < 0)
8797     return 1;
8798   if (write (fd, data, pagesize) != pagesize)
8799     return 1;
8800   close (fd);
8801
8802   /* Next, try to mmap the file at a fixed address which already has
8803      something else allocated at it.  If we can, also make sure that
8804      we see the same garbage.  */
8805   fd = open ("conftest.mmap", O_RDWR);
8806   if (fd < 0)
8807     return 1;
8808   data2 = (char *) malloc (2 * pagesize);
8809   if (!data2)
8810     return 1;
8811   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8812   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8813                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8814     return 1;
8815   for (i = 0; i < pagesize; ++i)
8816     if (*(data + i) != *(data2 + i))
8817       return 1;
8818
8819   /* Finally, make sure that changes to the mapped area do not
8820      percolate back to the file as seen by read().  (This is a bug on
8821      some variants of i386 svr4.0.)  */
8822   for (i = 0; i < pagesize; ++i)
8823     *(data2 + i) = *(data2 + i) + 1;
8824   data3 = (char *) malloc (pagesize);
8825   if (!data3)
8826     return 1;
8827   if (read (fd, data3, pagesize) != pagesize)
8828     return 1;
8829   for (i = 0; i < pagesize; ++i)
8830     if (*(data + i) != *(data3 + i))
8831       return 1;
8832   close (fd);
8833   return 0;
8834 }
8835 _ACEOF
8836 rm -f conftest$ac_exeext
8837 if { (ac_try="$ac_link"
8838 case "(($ac_try" in
8839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8840   *) ac_try_echo=$ac_try;;
8841 esac
8842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8843   (eval "$ac_link") 2>&5
8844   ac_status=$?
8845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8846   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8847   { (case "(($ac_try" in
8848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8849   *) ac_try_echo=$ac_try;;
8850 esac
8851 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8852   (eval "$ac_try") 2>&5
8853   ac_status=$?
8854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8855   (exit $ac_status); }; }; then
8856   ac_cv_func_mmap_fixed_mapped=yes
8857 else
8858   echo "$as_me: program exited with status $ac_status" >&5
8859 echo "$as_me: failed program was:" >&5
8860 sed 's/^/| /' conftest.$ac_ext >&5
8861
8862 ( exit $ac_status )
8863 ac_cv_func_mmap_fixed_mapped=no
8864 fi
8865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8866 fi
8867
8868
8869 fi
8870 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8871 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8872 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8873
8874 cat >>confdefs.h <<\_ACEOF
8875 #define HAVE_MMAP 1
8876 _ACEOF
8877
8878 fi
8879 rm -f conftest.mmap
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8891 unistd.h sys/param.h
8892 do
8893 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8894 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8895   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8897 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8898   echo $ECHO_N "(cached) $ECHO_C" >&6
8899 fi
8900 ac_res=`eval echo '${'$as_ac_Header'}'`
8901                { echo "$as_me:$LINENO: result: $ac_res" >&5
8902 echo "${ECHO_T}$ac_res" >&6; }
8903 else
8904   # Is the header compilable?
8905 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8906 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8907 cat >conftest.$ac_ext <<_ACEOF
8908 /* confdefs.h.  */
8909 _ACEOF
8910 cat confdefs.h >>conftest.$ac_ext
8911 cat >>conftest.$ac_ext <<_ACEOF
8912 /* end confdefs.h.  */
8913 $ac_includes_default
8914 #include <$ac_header>
8915 _ACEOF
8916 rm -f conftest.$ac_objext
8917 if { (ac_try="$ac_compile"
8918 case "(($ac_try" in
8919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920   *) ac_try_echo=$ac_try;;
8921 esac
8922 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8923   (eval "$ac_compile") 2>conftest.er1
8924   ac_status=$?
8925   grep -v '^ *+' conftest.er1 >conftest.err
8926   rm -f conftest.er1
8927   cat conftest.err >&5
8928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8929   (exit $ac_status); } && {
8930          test -z "$ac_c_werror_flag" ||
8931          test ! -s conftest.err
8932        } && test -s conftest.$ac_objext; then
8933   ac_header_compiler=yes
8934 else
8935   echo "$as_me: failed program was:" >&5
8936 sed 's/^/| /' conftest.$ac_ext >&5
8937
8938         ac_header_compiler=no
8939 fi
8940
8941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8942 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8943 echo "${ECHO_T}$ac_header_compiler" >&6; }
8944
8945 # Is the header present?
8946 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8947 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8948 cat >conftest.$ac_ext <<_ACEOF
8949 /* confdefs.h.  */
8950 _ACEOF
8951 cat confdefs.h >>conftest.$ac_ext
8952 cat >>conftest.$ac_ext <<_ACEOF
8953 /* end confdefs.h.  */
8954 #include <$ac_header>
8955 _ACEOF
8956 if { (ac_try="$ac_cpp conftest.$ac_ext"
8957 case "(($ac_try" in
8958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8959   *) ac_try_echo=$ac_try;;
8960 esac
8961 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8962   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8963   ac_status=$?
8964   grep -v '^ *+' conftest.er1 >conftest.err
8965   rm -f conftest.er1
8966   cat conftest.err >&5
8967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968   (exit $ac_status); } >/dev/null && {
8969          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8970          test ! -s conftest.err
8971        }; then
8972   ac_header_preproc=yes
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977   ac_header_preproc=no
8978 fi
8979
8980 rm -f conftest.err conftest.$ac_ext
8981 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8982 echo "${ECHO_T}$ac_header_preproc" >&6; }
8983
8984 # So?  What about this header?
8985 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8986   yes:no: )
8987     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8988 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8989     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8990 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8991     ac_header_preproc=yes
8992     ;;
8993   no:yes:* )
8994     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8995 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8996     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8997 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8998     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8999 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9000     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9001 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9002     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9003 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9004     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9005 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9006
9007     ;;
9008 esac
9009 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9010 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9011 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9012   echo $ECHO_N "(cached) $ECHO_C" >&6
9013 else
9014   eval "$as_ac_Header=\$ac_header_preproc"
9015 fi
9016 ac_res=`eval echo '${'$as_ac_Header'}'`
9017                { echo "$as_me:$LINENO: result: $ac_res" >&5
9018 echo "${ECHO_T}$ac_res" >&6; }
9019
9020 fi
9021 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9022   cat >>confdefs.h <<_ACEOF
9023 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9024 _ACEOF
9025
9026 fi
9027
9028 done
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9042 strdup __argz_count __argz_stringify __argz_next
9043 do
9044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9045 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9047 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9048   echo $ECHO_N "(cached) $ECHO_C" >&6
9049 else
9050   cat >conftest.$ac_ext <<_ACEOF
9051 /* confdefs.h.  */
9052 _ACEOF
9053 cat confdefs.h >>conftest.$ac_ext
9054 cat >>conftest.$ac_ext <<_ACEOF
9055 /* end confdefs.h.  */
9056 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9057    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9058 #define $ac_func innocuous_$ac_func
9059
9060 /* System header to define __stub macros and hopefully few prototypes,
9061     which can conflict with char $ac_func (); below.
9062     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9063     <limits.h> exists even on freestanding compilers.  */
9064
9065 #ifdef __STDC__
9066 # include <limits.h>
9067 #else
9068 # include <assert.h>
9069 #endif
9070
9071 #undef $ac_func
9072
9073 /* Override any GCC internal prototype to avoid an error.
9074    Use char because int might match the return type of a GCC
9075    builtin and then its argument prototype would still apply.  */
9076 #ifdef __cplusplus
9077 extern "C"
9078 #endif
9079 char $ac_func ();
9080 /* The GNU C library defines this for functions which it implements
9081     to always fail with ENOSYS.  Some functions are actually named
9082     something starting with __ and the normal name is an alias.  */
9083 #if defined __stub_$ac_func || defined __stub___$ac_func
9084 choke me
9085 #endif
9086
9087 int
9088 main ()
9089 {
9090 return $ac_func ();
9091   ;
9092   return 0;
9093 }
9094 _ACEOF
9095 rm -f conftest.$ac_objext conftest$ac_exeext
9096 if { (ac_try="$ac_link"
9097 case "(($ac_try" in
9098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099   *) ac_try_echo=$ac_try;;
9100 esac
9101 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9102   (eval "$ac_link") 2>conftest.er1
9103   ac_status=$?
9104   grep -v '^ *+' conftest.er1 >conftest.err
9105   rm -f conftest.er1
9106   cat conftest.err >&5
9107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108   (exit $ac_status); } && {
9109          test -z "$ac_c_werror_flag" ||
9110          test ! -s conftest.err
9111        } && test -s conftest$ac_exeext &&
9112        $as_test_x conftest$ac_exeext; then
9113   eval "$as_ac_var=yes"
9114 else
9115   echo "$as_me: failed program was:" >&5
9116 sed 's/^/| /' conftest.$ac_ext >&5
9117
9118         eval "$as_ac_var=no"
9119 fi
9120
9121 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9122       conftest$ac_exeext conftest.$ac_ext
9123 fi
9124 ac_res=`eval echo '${'$as_ac_var'}'`
9125                { echo "$as_me:$LINENO: result: $ac_res" >&5
9126 echo "${ECHO_T}$ac_res" >&6; }
9127 if test `eval echo '${'$as_ac_var'}'` = yes; then
9128   cat >>confdefs.h <<_ACEOF
9129 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9130 _ACEOF
9131
9132 fi
9133 done
9134
9135
9136    if test $ac_cv_header_locale_h = yes; then
9137     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9138 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9139 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9140   echo $ECHO_N "(cached) $ECHO_C" >&6
9141 else
9142   cat >conftest.$ac_ext <<_ACEOF
9143 /* confdefs.h.  */
9144 _ACEOF
9145 cat confdefs.h >>conftest.$ac_ext
9146 cat >>conftest.$ac_ext <<_ACEOF
9147 /* end confdefs.h.  */
9148 #include <locale.h>
9149 int
9150 main ()
9151 {
9152 return LC_MESSAGES
9153   ;
9154   return 0;
9155 }
9156 _ACEOF
9157 rm -f conftest.$ac_objext conftest$ac_exeext
9158 if { (ac_try="$ac_link"
9159 case "(($ac_try" in
9160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9161   *) ac_try_echo=$ac_try;;
9162 esac
9163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9164   (eval "$ac_link") 2>conftest.er1
9165   ac_status=$?
9166   grep -v '^ *+' conftest.er1 >conftest.err
9167   rm -f conftest.er1
9168   cat conftest.err >&5
9169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170   (exit $ac_status); } && {
9171          test -z "$ac_c_werror_flag" ||
9172          test ! -s conftest.err
9173        } && test -s conftest$ac_exeext &&
9174        $as_test_x conftest$ac_exeext; then
9175   am_cv_val_LC_MESSAGES=yes
9176 else
9177   echo "$as_me: failed program was:" >&5
9178 sed 's/^/| /' conftest.$ac_ext >&5
9179
9180         am_cv_val_LC_MESSAGES=no
9181 fi
9182
9183 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9184       conftest$ac_exeext conftest.$ac_ext
9185 fi
9186 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9187 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9188     if test $am_cv_val_LC_MESSAGES = yes; then
9189
9190 cat >>confdefs.h <<\_ACEOF
9191 #define HAVE_LC_MESSAGES 1
9192 _ACEOF
9193
9194     fi
9195   fi
9196      USE_NLS=yes
9197
9198
9199         nls_cv_force_use_gnu_gettext="no"
9200
9201     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9202     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9203                               nls_cv_header_intl=
9204       nls_cv_header_libgt=
9205       CATOBJEXT=NONE
9206
9207       if test "${ac_cv_header_libintl_h+set}" = set; then
9208   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9209 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9210 if test "${ac_cv_header_libintl_h+set}" = set; then
9211   echo $ECHO_N "(cached) $ECHO_C" >&6
9212 fi
9213 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9214 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9215 else
9216   # Is the header compilable?
9217 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9218 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9219 cat >conftest.$ac_ext <<_ACEOF
9220 /* confdefs.h.  */
9221 _ACEOF
9222 cat confdefs.h >>conftest.$ac_ext
9223 cat >>conftest.$ac_ext <<_ACEOF
9224 /* end confdefs.h.  */
9225 $ac_includes_default
9226 #include <libintl.h>
9227 _ACEOF
9228 rm -f conftest.$ac_objext
9229 if { (ac_try="$ac_compile"
9230 case "(($ac_try" in
9231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9232   *) ac_try_echo=$ac_try;;
9233 esac
9234 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9235   (eval "$ac_compile") 2>conftest.er1
9236   ac_status=$?
9237   grep -v '^ *+' conftest.er1 >conftest.err
9238   rm -f conftest.er1
9239   cat conftest.err >&5
9240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241   (exit $ac_status); } && {
9242          test -z "$ac_c_werror_flag" ||
9243          test ! -s conftest.err
9244        } && test -s conftest.$ac_objext; then
9245   ac_header_compiler=yes
9246 else
9247   echo "$as_me: failed program was:" >&5
9248 sed 's/^/| /' conftest.$ac_ext >&5
9249
9250         ac_header_compiler=no
9251 fi
9252
9253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9254 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9255 echo "${ECHO_T}$ac_header_compiler" >&6; }
9256
9257 # Is the header present?
9258 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9259 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9260 cat >conftest.$ac_ext <<_ACEOF
9261 /* confdefs.h.  */
9262 _ACEOF
9263 cat confdefs.h >>conftest.$ac_ext
9264 cat >>conftest.$ac_ext <<_ACEOF
9265 /* end confdefs.h.  */
9266 #include <libintl.h>
9267 _ACEOF
9268 if { (ac_try="$ac_cpp conftest.$ac_ext"
9269 case "(($ac_try" in
9270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271   *) ac_try_echo=$ac_try;;
9272 esac
9273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9274   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9275   ac_status=$?
9276   grep -v '^ *+' conftest.er1 >conftest.err
9277   rm -f conftest.er1
9278   cat conftest.err >&5
9279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280   (exit $ac_status); } >/dev/null && {
9281          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9282          test ! -s conftest.err
9283        }; then
9284   ac_header_preproc=yes
9285 else
9286   echo "$as_me: failed program was:" >&5
9287 sed 's/^/| /' conftest.$ac_ext >&5
9288
9289   ac_header_preproc=no
9290 fi
9291
9292 rm -f conftest.err conftest.$ac_ext
9293 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9294 echo "${ECHO_T}$ac_header_preproc" >&6; }
9295
9296 # So?  What about this header?
9297 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9298   yes:no: )
9299     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9300 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9301     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9302 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9303     ac_header_preproc=yes
9304     ;;
9305   no:yes:* )
9306     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9307 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9308     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9309 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9310     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9311 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9312     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9313 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9314     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9315 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9317 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9318
9319     ;;
9320 esac
9321 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9322 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9323 if test "${ac_cv_header_libintl_h+set}" = set; then
9324   echo $ECHO_N "(cached) $ECHO_C" >&6
9325 else
9326   ac_cv_header_libintl_h=$ac_header_preproc
9327 fi
9328 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9329 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9330
9331 fi
9332 if test $ac_cv_header_libintl_h = yes; then
9333   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9334 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9335 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9336   echo $ECHO_N "(cached) $ECHO_C" >&6
9337 else
9338   cat >conftest.$ac_ext <<_ACEOF
9339 /* confdefs.h.  */
9340 _ACEOF
9341 cat confdefs.h >>conftest.$ac_ext
9342 cat >>conftest.$ac_ext <<_ACEOF
9343 /* end confdefs.h.  */
9344 #include <libintl.h>
9345 int
9346 main ()
9347 {
9348 return (int) dgettext ("","")
9349   ;
9350   return 0;
9351 }
9352 _ACEOF
9353 rm -f conftest.$ac_objext conftest$ac_exeext
9354 if { (ac_try="$ac_link"
9355 case "(($ac_try" in
9356   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9357   *) ac_try_echo=$ac_try;;
9358 esac
9359 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9360   (eval "$ac_link") 2>conftest.er1
9361   ac_status=$?
9362   grep -v '^ *+' conftest.er1 >conftest.err
9363   rm -f conftest.er1
9364   cat conftest.err >&5
9365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9366   (exit $ac_status); } && {
9367          test -z "$ac_c_werror_flag" ||
9368          test ! -s conftest.err
9369        } && test -s conftest$ac_exeext &&
9370        $as_test_x conftest$ac_exeext; then
9371   gt_cv_func_dgettext_libc=yes
9372 else
9373   echo "$as_me: failed program was:" >&5
9374 sed 's/^/| /' conftest.$ac_ext >&5
9375
9376         gt_cv_func_dgettext_libc=no
9377 fi
9378
9379 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9380       conftest$ac_exeext conftest.$ac_ext
9381 fi
9382 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9383 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9384
9385           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9386             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9387 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9388 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9389   echo $ECHO_N "(cached) $ECHO_C" >&6
9390 else
9391   ac_check_lib_save_LIBS=$LIBS
9392 LIBS="-lintl  $LIBS"
9393 cat >conftest.$ac_ext <<_ACEOF
9394 /* confdefs.h.  */
9395 _ACEOF
9396 cat confdefs.h >>conftest.$ac_ext
9397 cat >>conftest.$ac_ext <<_ACEOF
9398 /* end confdefs.h.  */
9399
9400 /* Override any GCC internal prototype to avoid an error.
9401    Use char because int might match the return type of a GCC
9402    builtin and then its argument prototype would still apply.  */
9403 #ifdef __cplusplus
9404 extern "C"
9405 #endif
9406 char bindtextdomain ();
9407 int
9408 main ()
9409 {
9410 return bindtextdomain ();
9411   ;
9412   return 0;
9413 }
9414 _ACEOF
9415 rm -f conftest.$ac_objext conftest$ac_exeext
9416 if { (ac_try="$ac_link"
9417 case "(($ac_try" in
9418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9419   *) ac_try_echo=$ac_try;;
9420 esac
9421 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9422   (eval "$ac_link") 2>conftest.er1
9423   ac_status=$?
9424   grep -v '^ *+' conftest.er1 >conftest.err
9425   rm -f conftest.er1
9426   cat conftest.err >&5
9427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428   (exit $ac_status); } && {
9429          test -z "$ac_c_werror_flag" ||
9430          test ! -s conftest.err
9431        } && test -s conftest$ac_exeext &&
9432        $as_test_x conftest$ac_exeext; then
9433   ac_cv_lib_intl_bindtextdomain=yes
9434 else
9435   echo "$as_me: failed program was:" >&5
9436 sed 's/^/| /' conftest.$ac_ext >&5
9437
9438         ac_cv_lib_intl_bindtextdomain=no
9439 fi
9440
9441 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9442       conftest$ac_exeext conftest.$ac_ext
9443 LIBS=$ac_check_lib_save_LIBS
9444 fi
9445 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9446 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9447 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9448   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9449 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9450 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9451   echo $ECHO_N "(cached) $ECHO_C" >&6
9452 else
9453   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9454 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9455 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9456   echo $ECHO_N "(cached) $ECHO_C" >&6
9457 else
9458   ac_check_lib_save_LIBS=$LIBS
9459 LIBS="-lintl  $LIBS"
9460 cat >conftest.$ac_ext <<_ACEOF
9461 /* confdefs.h.  */
9462 _ACEOF
9463 cat confdefs.h >>conftest.$ac_ext
9464 cat >>conftest.$ac_ext <<_ACEOF
9465 /* end confdefs.h.  */
9466
9467 /* Override any GCC internal prototype to avoid an error.
9468    Use char because int might match the return type of a GCC
9469    builtin and then its argument prototype would still apply.  */
9470 #ifdef __cplusplus
9471 extern "C"
9472 #endif
9473 char dgettext ();
9474 int
9475 main ()
9476 {
9477 return dgettext ();
9478   ;
9479   return 0;
9480 }
9481 _ACEOF
9482 rm -f conftest.$ac_objext conftest$ac_exeext
9483 if { (ac_try="$ac_link"
9484 case "(($ac_try" in
9485   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9486   *) ac_try_echo=$ac_try;;
9487 esac
9488 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9489   (eval "$ac_link") 2>conftest.er1
9490   ac_status=$?
9491   grep -v '^ *+' conftest.er1 >conftest.err
9492   rm -f conftest.er1
9493   cat conftest.err >&5
9494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9495   (exit $ac_status); } && {
9496          test -z "$ac_c_werror_flag" ||
9497          test ! -s conftest.err
9498        } && test -s conftest$ac_exeext &&
9499        $as_test_x conftest$ac_exeext; then
9500   ac_cv_lib_intl_dgettext=yes
9501 else
9502   echo "$as_me: failed program was:" >&5
9503 sed 's/^/| /' conftest.$ac_ext >&5
9504
9505         ac_cv_lib_intl_dgettext=no
9506 fi
9507
9508 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9509       conftest$ac_exeext conftest.$ac_ext
9510 LIBS=$ac_check_lib_save_LIBS
9511 fi
9512 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9513 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9514 if test $ac_cv_lib_intl_dgettext = yes; then
9515   gt_cv_func_dgettext_libintl=yes
9516 else
9517   gt_cv_func_dgettext_libintl=no
9518 fi
9519
9520 fi
9521 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9522 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9523 fi
9524
9525           fi
9526
9527           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9528             LIBS="$LIBS -lintl";
9529           fi
9530
9531           if test "$gt_cv_func_dgettext_libc" = "yes" \
9532             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9533
9534 cat >>confdefs.h <<\_ACEOF
9535 #define HAVE_GETTEXT 1
9536 _ACEOF
9537
9538             # Extract the first word of "msgfmt", so it can be a program name with args.
9539 set dummy msgfmt; ac_word=$2
9540 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9542 if test "${ac_cv_path_MSGFMT+set}" = set; then
9543   echo $ECHO_N "(cached) $ECHO_C" >&6
9544 else
9545   case "$MSGFMT" in
9546   /*)
9547   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9548   ;;
9549   *)
9550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9551   for ac_dir in $PATH; do
9552     test -z "$ac_dir" && ac_dir=.
9553     if test -f $ac_dir/$ac_word; then
9554       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9555         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9556         break
9557       fi
9558     fi
9559   done
9560   IFS="$ac_save_ifs"
9561   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9562   ;;
9563 esac
9564 fi
9565 MSGFMT="$ac_cv_path_MSGFMT"
9566 if test -n "$MSGFMT"; then
9567   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9568 echo "${ECHO_T}$MSGFMT" >&6; }
9569 else
9570   { echo "$as_me:$LINENO: result: no" >&5
9571 echo "${ECHO_T}no" >&6; }
9572 fi
9573             if test "$MSGFMT" != "no"; then
9574
9575 for ac_func in dcgettext
9576 do
9577 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9578 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9579 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9580 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9581   echo $ECHO_N "(cached) $ECHO_C" >&6
9582 else
9583   cat >conftest.$ac_ext <<_ACEOF
9584 /* confdefs.h.  */
9585 _ACEOF
9586 cat confdefs.h >>conftest.$ac_ext
9587 cat >>conftest.$ac_ext <<_ACEOF
9588 /* end confdefs.h.  */
9589 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9590    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9591 #define $ac_func innocuous_$ac_func
9592
9593 /* System header to define __stub macros and hopefully few prototypes,
9594     which can conflict with char $ac_func (); below.
9595     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9596     <limits.h> exists even on freestanding compilers.  */
9597
9598 #ifdef __STDC__
9599 # include <limits.h>
9600 #else
9601 # include <assert.h>
9602 #endif
9603
9604 #undef $ac_func
9605
9606 /* Override any GCC internal prototype to avoid an error.
9607    Use char because int might match the return type of a GCC
9608    builtin and then its argument prototype would still apply.  */
9609 #ifdef __cplusplus
9610 extern "C"
9611 #endif
9612 char $ac_func ();
9613 /* The GNU C library defines this for functions which it implements
9614     to always fail with ENOSYS.  Some functions are actually named
9615     something starting with __ and the normal name is an alias.  */
9616 #if defined __stub_$ac_func || defined __stub___$ac_func
9617 choke me
9618 #endif
9619
9620 int
9621 main ()
9622 {
9623 return $ac_func ();
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f conftest.$ac_objext conftest$ac_exeext
9629 if { (ac_try="$ac_link"
9630 case "(($ac_try" in
9631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632   *) ac_try_echo=$ac_try;;
9633 esac
9634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635   (eval "$ac_link") 2>conftest.er1
9636   ac_status=$?
9637   grep -v '^ *+' conftest.er1 >conftest.err
9638   rm -f conftest.er1
9639   cat conftest.err >&5
9640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9641   (exit $ac_status); } && {
9642          test -z "$ac_c_werror_flag" ||
9643          test ! -s conftest.err
9644        } && test -s conftest$ac_exeext &&
9645        $as_test_x conftest$ac_exeext; then
9646   eval "$as_ac_var=yes"
9647 else
9648   echo "$as_me: failed program was:" >&5
9649 sed 's/^/| /' conftest.$ac_ext >&5
9650
9651         eval "$as_ac_var=no"
9652 fi
9653
9654 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9655       conftest$ac_exeext conftest.$ac_ext
9656 fi
9657 ac_res=`eval echo '${'$as_ac_var'}'`
9658                { echo "$as_me:$LINENO: result: $ac_res" >&5
9659 echo "${ECHO_T}$ac_res" >&6; }
9660 if test `eval echo '${'$as_ac_var'}'` = yes; then
9661   cat >>confdefs.h <<_ACEOF
9662 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9663 _ACEOF
9664
9665 fi
9666 done
9667
9668               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9669 set dummy gmsgfmt; ac_word=$2
9670 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9672 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675   case $GMSGFMT in
9676   [\\/]* | ?:[\\/]*)
9677   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9678   ;;
9679   *)
9680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681 for as_dir in $PATH
9682 do
9683   IFS=$as_save_IFS
9684   test -z "$as_dir" && as_dir=.
9685   for ac_exec_ext in '' $ac_executable_extensions; do
9686   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9687     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9688     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9689     break 2
9690   fi
9691 done
9692 done
9693 IFS=$as_save_IFS
9694
9695   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9696   ;;
9697 esac
9698 fi
9699 GMSGFMT=$ac_cv_path_GMSGFMT
9700 if test -n "$GMSGFMT"; then
9701   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9702 echo "${ECHO_T}$GMSGFMT" >&6; }
9703 else
9704   { echo "$as_me:$LINENO: result: no" >&5
9705 echo "${ECHO_T}no" >&6; }
9706 fi
9707
9708
9709               # Extract the first word of "xgettext", so it can be a program name with args.
9710 set dummy xgettext; ac_word=$2
9711 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9713 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9714   echo $ECHO_N "(cached) $ECHO_C" >&6
9715 else
9716   case "$XGETTEXT" in
9717   /*)
9718   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9719   ;;
9720   *)
9721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9722   for ac_dir in $PATH; do
9723     test -z "$ac_dir" && ac_dir=.
9724     if test -f $ac_dir/$ac_word; then
9725       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9726         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9727         break
9728       fi
9729     fi
9730   done
9731   IFS="$ac_save_ifs"
9732   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9733   ;;
9734 esac
9735 fi
9736 XGETTEXT="$ac_cv_path_XGETTEXT"
9737 if test -n "$XGETTEXT"; then
9738   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9739 echo "${ECHO_T}$XGETTEXT" >&6; }
9740 else
9741   { echo "$as_me:$LINENO: result: no" >&5
9742 echo "${ECHO_T}no" >&6; }
9743 fi
9744
9745               cat >conftest.$ac_ext <<_ACEOF
9746 /* confdefs.h.  */
9747 _ACEOF
9748 cat confdefs.h >>conftest.$ac_ext
9749 cat >>conftest.$ac_ext <<_ACEOF
9750 /* end confdefs.h.  */
9751
9752 int
9753 main ()
9754 {
9755 extern int _nl_msg_cat_cntr;
9756                              return _nl_msg_cat_cntr
9757   ;
9758   return 0;
9759 }
9760 _ACEOF
9761 rm -f conftest.$ac_objext conftest$ac_exeext
9762 if { (ac_try="$ac_link"
9763 case "(($ac_try" in
9764   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9765   *) ac_try_echo=$ac_try;;
9766 esac
9767 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9768   (eval "$ac_link") 2>conftest.er1
9769   ac_status=$?
9770   grep -v '^ *+' conftest.er1 >conftest.err
9771   rm -f conftest.er1
9772   cat conftest.err >&5
9773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9774   (exit $ac_status); } && {
9775          test -z "$ac_c_werror_flag" ||
9776          test ! -s conftest.err
9777        } && test -s conftest$ac_exeext &&
9778        $as_test_x conftest$ac_exeext; then
9779   CATOBJEXT=.gmo
9780                  DATADIRNAME=share
9781 else
9782   echo "$as_me: failed program was:" >&5
9783 sed 's/^/| /' conftest.$ac_ext >&5
9784
9785         CATOBJEXT=.mo
9786                  DATADIRNAME=lib
9787 fi
9788
9789 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9790       conftest$ac_exeext conftest.$ac_ext
9791               INSTOBJEXT=.mo
9792             fi
9793           fi
9794
9795           # Added by Martin Baulig 12/15/98 for libc5 systems
9796           if test "$gt_cv_func_dgettext_libc" != "yes" \
9797             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9798             INTLLIBS=-lintl
9799             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9800           fi
9801
9802 fi
9803
9804
9805
9806       if test "$CATOBJEXT" = "NONE"; then
9807                         nls_cv_use_gnu_gettext=yes
9808       fi
9809     fi
9810
9811     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9812
9813 cat >>confdefs.h <<\_ACEOF
9814 #define ENABLE_NLS 1
9815 _ACEOF
9816
9817     else
9818             CATOBJEXT=
9819     fi
9820
9821         if test "$XGETTEXT" != ":"; then
9822                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9823         : ;
9824       else
9825         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9826 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9827         XGETTEXT=":"
9828       fi
9829     fi
9830
9831     # We need to process the po/ directory.
9832     POSUB=po
9833
9834     ac_config_commands="$ac_config_commands default-2"
9835
9836
9837                 for lang in $ALL_LINGUAS; do
9838       GMOFILES="$GMOFILES $lang.gmo"
9839       POFILES="$POFILES $lang.po"
9840     done
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854    if test "x$CATOBJEXT" != "x"; then
9855      if test "x$ALL_LINGUAS" = "x"; then
9856        LINGUAS=
9857      else
9858        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9859 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9860        NEW_LINGUAS=
9861        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9862          case "$ALL_LINGUAS" in
9863           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9864          esac
9865        done
9866        LINGUAS=$NEW_LINGUAS
9867        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9868 echo "${ECHO_T}$LINGUAS" >&6; }
9869      fi
9870
9871           if test -n "$LINGUAS"; then
9872        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9873      fi
9874    fi
9875
9876             test -d po || mkdir po
9877    if test "$CATOBJEXT" = ".cat"; then
9878      if test "${ac_cv_header_linux_version_h+set}" = set; then
9879   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9880 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9881 if test "${ac_cv_header_linux_version_h+set}" = set; then
9882   echo $ECHO_N "(cached) $ECHO_C" >&6
9883 fi
9884 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9885 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9886 else
9887   # Is the header compilable?
9888 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9889 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9890 cat >conftest.$ac_ext <<_ACEOF
9891 /* confdefs.h.  */
9892 _ACEOF
9893 cat confdefs.h >>conftest.$ac_ext
9894 cat >>conftest.$ac_ext <<_ACEOF
9895 /* end confdefs.h.  */
9896 $ac_includes_default
9897 #include <linux/version.h>
9898 _ACEOF
9899 rm -f conftest.$ac_objext
9900 if { (ac_try="$ac_compile"
9901 case "(($ac_try" in
9902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9903   *) ac_try_echo=$ac_try;;
9904 esac
9905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9906   (eval "$ac_compile") 2>conftest.er1
9907   ac_status=$?
9908   grep -v '^ *+' conftest.er1 >conftest.err
9909   rm -f conftest.er1
9910   cat conftest.err >&5
9911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9912   (exit $ac_status); } && {
9913          test -z "$ac_c_werror_flag" ||
9914          test ! -s conftest.err
9915        } && test -s conftest.$ac_objext; then
9916   ac_header_compiler=yes
9917 else
9918   echo "$as_me: failed program was:" >&5
9919 sed 's/^/| /' conftest.$ac_ext >&5
9920
9921         ac_header_compiler=no
9922 fi
9923
9924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9925 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9926 echo "${ECHO_T}$ac_header_compiler" >&6; }
9927
9928 # Is the header present?
9929 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9930 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9931 cat >conftest.$ac_ext <<_ACEOF
9932 /* confdefs.h.  */
9933 _ACEOF
9934 cat confdefs.h >>conftest.$ac_ext
9935 cat >>conftest.$ac_ext <<_ACEOF
9936 /* end confdefs.h.  */
9937 #include <linux/version.h>
9938 _ACEOF
9939 if { (ac_try="$ac_cpp conftest.$ac_ext"
9940 case "(($ac_try" in
9941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9942   *) ac_try_echo=$ac_try;;
9943 esac
9944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9945   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9946   ac_status=$?
9947   grep -v '^ *+' conftest.er1 >conftest.err
9948   rm -f conftest.er1
9949   cat conftest.err >&5
9950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951   (exit $ac_status); } >/dev/null && {
9952          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9953          test ! -s conftest.err
9954        }; then
9955   ac_header_preproc=yes
9956 else
9957   echo "$as_me: failed program was:" >&5
9958 sed 's/^/| /' conftest.$ac_ext >&5
9959
9960   ac_header_preproc=no
9961 fi
9962
9963 rm -f conftest.err conftest.$ac_ext
9964 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9965 echo "${ECHO_T}$ac_header_preproc" >&6; }
9966
9967 # So?  What about this header?
9968 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9969   yes:no: )
9970     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9971 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9972     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9973 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9974     ac_header_preproc=yes
9975     ;;
9976   no:yes:* )
9977     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9978 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9979     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9980 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9981     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9982 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9983     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9984 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9985     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9986 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9987     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9988 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9989
9990     ;;
9991 esac
9992 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9993 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9994 if test "${ac_cv_header_linux_version_h+set}" = set; then
9995   echo $ECHO_N "(cached) $ECHO_C" >&6
9996 else
9997   ac_cv_header_linux_version_h=$ac_header_preproc
9998 fi
9999 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10000 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
10001
10002 fi
10003 if test $ac_cv_header_linux_version_h = yes; then
10004   msgformat=linux
10005 else
10006   msgformat=xopen
10007 fi
10008
10009
10010
10011                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10012    fi
10013
10014             MKINSTALLDIRS=
10015 #
10016 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10017 #
10018 #   if test -n "$ac_aux_dir"; then
10019 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10020 #   fi
10021    if test -z "$MKINSTALLDIRS"; then
10022      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10023    fi
10024
10025    # jwz: you know what, screw it.  Let's just use the version that I
10026    # already computed in configure.in, instead of this version that came
10027    # with the i18n crud, ok?
10028    MKINSTALLDIRS="$INSTALL_DIRS"
10029
10030
10031
10032
10033          test -d po || mkdir po
10034    if test "x$srcdir" != "x."; then
10035      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10036        posrcprefix="$srcdir/"
10037      else
10038        posrcprefix="../$srcdir/"
10039      fi
10040    else
10041      posrcprefix="../"
10042    fi
10043    rm -f po/POTFILES
10044    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10045         < $srcdir/po/POTFILES.in > po/POTFILES
10046
10047 MKINSTALLDIRS="$INSTALL_DIRS"
10048
10049
10050 ###############################################################################
10051 #
10052 #       Check for -lXmu (some fucked up vendors don't ship it...)
10053 #
10054 ###############################################################################
10055
10056 have_xmu=no
10057
10058   ac_save_CPPFLAGS="$CPPFLAGS"
10059   if test \! -z "$includedir" ; then
10060     CPPFLAGS="$CPPFLAGS -I$includedir"
10061   fi
10062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10063   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10064   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10065 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10066 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10067   echo $ECHO_N "(cached) $ECHO_C" >&6
10068 else
10069   cat >conftest.$ac_ext <<_ACEOF
10070 /* confdefs.h.  */
10071 _ACEOF
10072 cat confdefs.h >>conftest.$ac_ext
10073 cat >>conftest.$ac_ext <<_ACEOF
10074 /* end confdefs.h.  */
10075 #include <stdlib.h>
10076                    #include <stdio.h>
10077                    #include <X11/Intrinsic.h>
10078
10079 #include <X11/Xmu/Error.h>
10080 _ACEOF
10081 rm -f conftest.$ac_objext
10082 if { (ac_try="$ac_compile"
10083 case "(($ac_try" in
10084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10085   *) ac_try_echo=$ac_try;;
10086 esac
10087 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10088   (eval "$ac_compile") 2>conftest.er1
10089   ac_status=$?
10090   grep -v '^ *+' conftest.er1 >conftest.err
10091   rm -f conftest.er1
10092   cat conftest.err >&5
10093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094   (exit $ac_status); } && {
10095          test -z "$ac_c_werror_flag" ||
10096          test ! -s conftest.err
10097        } && test -s conftest.$ac_objext; then
10098   ac_cv_header_X11_Xmu_Error_h=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 sed 's/^/| /' conftest.$ac_ext >&5
10102
10103         ac_cv_header_X11_Xmu_Error_h=no
10104 fi
10105
10106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10107 fi
10108 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10109 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10110 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10111   have_xmu=yes
10112 fi
10113
10114
10115   CPPFLAGS="$ac_save_CPPFLAGS"
10116 if test "$have_xmu" = no ; then
10117   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10118   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10119   XMU_LIBS=''
10120 else
10121   XMU_SRCS=''
10122   XMU_OBJS=''
10123   XMU_LIBS='-lXmu'
10124   cat >>confdefs.h <<\_ACEOF
10125 #define HAVE_XMU 1
10126 _ACEOF
10127
10128 fi
10129
10130
10131 ###############################################################################
10132 #
10133 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10134 #       See comp.windows.x FAQ question 124.  The right fix is to
10135 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10136 #
10137 ###############################################################################
10138
10139 if test "$have_xmu" = yes ; then
10140   case "$host" in
10141     *-sunos4*)
10142     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10143 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10144 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10145   echo $ECHO_N "(cached) $ECHO_C" >&6
10146 else
10147   ac_save_LDFLAGS="$LDFLAGS"
10148                     if test \! -z "$x_libraries" ; then
10149                       LDFLAGS="$LDFLAGS -L$x_libraries"
10150                     fi
10151                     # Note: this trick never works!  (Generally.)
10152                     # We're only getting away with using AC_TRY_LINK
10153                     # with X libraries because we know it's SunOS.
10154                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10155                     cat >conftest.$ac_ext <<_ACEOF
10156 /* confdefs.h.  */
10157 _ACEOF
10158 cat confdefs.h >>conftest.$ac_ext
10159 cat >>conftest.$ac_ext <<_ACEOF
10160 /* end confdefs.h.  */
10161
10162 int
10163 main ()
10164 {
10165
10166   ;
10167   return 0;
10168 }
10169 _ACEOF
10170 rm -f conftest.$ac_objext conftest$ac_exeext
10171 if { (ac_try="$ac_link"
10172 case "(($ac_try" in
10173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10174   *) ac_try_echo=$ac_try;;
10175 esac
10176 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10177   (eval "$ac_link") 2>conftest.er1
10178   ac_status=$?
10179   grep -v '^ *+' conftest.er1 >conftest.err
10180   rm -f conftest.er1
10181   cat conftest.err >&5
10182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10183   (exit $ac_status); } && {
10184          test -z "$ac_c_werror_flag" ||
10185          test ! -s conftest.err
10186        } && test -s conftest$ac_exeext &&
10187        $as_test_x conftest$ac_exeext; then
10188   ac_cv_sunos_xmu_bug=no
10189 else
10190   echo "$as_me: failed program was:" >&5
10191 sed 's/^/| /' conftest.$ac_ext >&5
10192
10193         ac_cv_sunos_xmu_bug=yes
10194 fi
10195
10196 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10197       conftest$ac_exeext conftest.$ac_ext
10198                     LDFLAGS="$ac_save_LDFLAGS"
10199 fi
10200 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10201 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10202     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10203       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10204 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10205 if test "${ac_cv_ld_static+set}" = set; then
10206   echo $ECHO_N "(cached) $ECHO_C" >&6
10207 else
10208   ac_save_LDFLAGS="$LDFLAGS"
10209                       LDFLAGS="$LDFLAGS -static"
10210                       cat >conftest.$ac_ext <<_ACEOF
10211 /* confdefs.h.  */
10212 _ACEOF
10213 cat confdefs.h >>conftest.$ac_ext
10214 cat >>conftest.$ac_ext <<_ACEOF
10215 /* end confdefs.h.  */
10216
10217 int
10218 main ()
10219 {
10220
10221   ;
10222   return 0;
10223 }
10224 _ACEOF
10225 rm -f conftest.$ac_objext conftest$ac_exeext
10226 if { (ac_try="$ac_link"
10227 case "(($ac_try" in
10228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10229   *) ac_try_echo=$ac_try;;
10230 esac
10231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10232   (eval "$ac_link") 2>conftest.er1
10233   ac_status=$?
10234   grep -v '^ *+' conftest.er1 >conftest.err
10235   rm -f conftest.er1
10236   cat conftest.err >&5
10237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238   (exit $ac_status); } && {
10239          test -z "$ac_c_werror_flag" ||
10240          test ! -s conftest.err
10241        } && test -s conftest$ac_exeext &&
10242        $as_test_x conftest$ac_exeext; then
10243   ac_cv_ld_static=yes
10244 else
10245   echo "$as_me: failed program was:" >&5
10246 sed 's/^/| /' conftest.$ac_ext >&5
10247
10248         ac_cv_ld_static=no
10249 fi
10250
10251 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10252       conftest$ac_exeext conftest.$ac_ext
10253                     LDFLAGS="$ac_save_LDFLAGS"
10254 fi
10255 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10256 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10257       if test "$ac_cv_ld_static" = yes ; then
10258         LDFLAGS="$LDFLAGS -static"
10259       else
10260         LDFLAGS="$LDFLAGS -Bstatic"
10261       fi
10262     fi
10263     ;;
10264   esac
10265 fi
10266
10267
10268 ###############################################################################
10269 #
10270 #       Handle the --with-hackdir option
10271 #
10272 ###############################################################################
10273
10274 have_hackdir=yes
10275 with_hackdir_req=unspecified
10276
10277 # Check whether --with-hackdir was given.
10278 if test "${with_hackdir+set}" = set; then
10279   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10280 else
10281   with_hackdir=yes
10282 fi
10283
10284
10285 if test x"$with_hackdir" = xyes; then
10286   HACKDIR='${libexecdir}/xscreensaver'
10287 elif test x"$with_hackdir" = xno; then
10288   HACKDIR='${bindir}'
10289 else
10290   HACKDIR=$with_hackdir
10291 fi
10292
10293 # canonicalize slashes.
10294 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10295
10296 # Expand HACKDIR as HACKDIR_FULL
10297 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10298
10299 # This option used to be called --enable-subdir; make sure that is no longer
10300 # used, since configure brain-damagedly ignores unknown --enable options.
10301
10302 obsolete_enable=
10303 # Check whether --enable-subdir was given.
10304 if test "${enable_subdir+set}" = set; then
10305   enableval=$enable_subdir; obsolete_enable=yes
10306 fi
10307
10308 if test -n "$obsolete_enable"; then
10309   echo "error: the --enable-subdir option has been replaced with"
10310   echo "       the new --with-hackdir option; see \`configure --help'"
10311   echo "       for more information."
10312   exit 1
10313 fi
10314
10315
10316 ###############################################################################
10317 #
10318 #       Handle the --with-configdir option
10319 #       Help for --with-x-app-defaults option added..
10320 #
10321 ###############################################################################
10322
10323 have_configdir=yes
10324 with_configdir_req=unspecified
10325
10326 # Check whether --with-configdir was given.
10327 if test "${with_configdir+set}" = set; then
10328   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10329 else
10330   with_configdir=yes
10331 fi
10332
10333
10334 if test x"$with_configdir" = xyes; then
10335   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10336 elif test x"$with_configdir" = xno; then
10337   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10338   exit 1
10339 else
10340   # there must be a better way than this...
10341   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10342     # absolute path
10343     HACK_CONF_DIR=$with_configdir
10344   else
10345     # relative path
10346     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10347   fi
10348 fi
10349
10350
10351
10352
10353 ###############################################################################
10354 #
10355 #       Check for the SGI SCREEN_SAVER server extension.
10356 #
10357 ###############################################################################
10358
10359 have_sgi=no
10360 with_sgi_req=unspecified
10361
10362 # Check whether --with-sgi-ext was given.
10363 if test "${with_sgi_ext+set}" = set; then
10364   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10365 else
10366   with_sgi=yes
10367 fi
10368
10369
10370
10371    case "$with_sgi" in
10372     yes) ;;
10373     no)  ;;
10374
10375     /*)
10376      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10377 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10378      d=$with_sgi/include
10379      if test -d $d; then
10380        X_CFLAGS="-I$d $X_CFLAGS"
10381        { echo "$as_me:$LINENO: result: $d" >&5
10382 echo "${ECHO_T}$d" >&6; }
10383      else
10384        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10385 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10386      fi
10387
10388      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10389 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10390      d=$with_sgi/lib
10391      if test -d $d; then
10392        X_LIBS="-L$d $X_LIBS"
10393        { echo "$as_me:$LINENO: result: $d" >&5
10394 echo "${ECHO_T}$d" >&6; }
10395      else
10396        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10397 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10398      fi
10399
10400      # replace the directory string with "yes".
10401      with_sgi_req="yes"
10402      with_sgi=$with_sgi_req
10403      ;;
10404
10405     *)
10406      echo ""
10407      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10408      echo "       If it is a directory, then \`DIR/include' will be added to"
10409      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10410      exit 1
10411      ;;
10412    esac
10413
10414
10415 if test "$with_sgi" = yes; then
10416
10417   ac_save_CPPFLAGS="$CPPFLAGS"
10418   if test \! -z "$includedir" ; then
10419     CPPFLAGS="$CPPFLAGS -I$includedir"
10420   fi
10421   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10422   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10423   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10424 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10425 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10426   echo $ECHO_N "(cached) $ECHO_C" >&6
10427 else
10428   cat >conftest.$ac_ext <<_ACEOF
10429 /* confdefs.h.  */
10430 _ACEOF
10431 cat confdefs.h >>conftest.$ac_ext
10432 cat >>conftest.$ac_ext <<_ACEOF
10433 /* end confdefs.h.  */
10434 #include <X11/Xlib.h>
10435
10436 #include <X11/extensions/XScreenSaver.h>
10437 _ACEOF
10438 rm -f conftest.$ac_objext
10439 if { (ac_try="$ac_compile"
10440 case "(($ac_try" in
10441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442   *) ac_try_echo=$ac_try;;
10443 esac
10444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445   (eval "$ac_compile") 2>conftest.er1
10446   ac_status=$?
10447   grep -v '^ *+' conftest.er1 >conftest.err
10448   rm -f conftest.er1
10449   cat conftest.err >&5
10450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451   (exit $ac_status); } && {
10452          test -z "$ac_c_werror_flag" ||
10453          test ! -s conftest.err
10454        } && test -s conftest.$ac_objext; then
10455   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 sed 's/^/| /' conftest.$ac_ext >&5
10459
10460         ac_cv_header_X11_extensions_XScreenSaver_h=no
10461 fi
10462
10463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10464 fi
10465 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10466 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10467 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10468   have_sgi=yes
10469                      cat >>confdefs.h <<\_ACEOF
10470 #define HAVE_SGI_SAVER_EXTENSION 1
10471 _ACEOF
10472
10473 fi
10474
10475
10476   CPPFLAGS="$ac_save_CPPFLAGS"
10477
10478 elif test "$with_sgi" != no; then
10479   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10480   exit 1
10481 fi
10482
10483
10484 ###############################################################################
10485 #
10486 #       Check for the XIDLE server extension.
10487 #
10488 ###############################################################################
10489
10490 have_xidle=no
10491 with_xidle_req=unspecified
10492
10493 # Check whether --with-xidle-ext was given.
10494 if test "${with_xidle_ext+set}" = set; then
10495   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10496 else
10497   with_xidle=yes
10498 fi
10499
10500
10501
10502    case "$with_xidle" in
10503     yes) ;;
10504     no)  ;;
10505
10506     /*)
10507      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10508 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10509      d=$with_xidle/include
10510      if test -d $d; then
10511        X_CFLAGS="-I$d $X_CFLAGS"
10512        { echo "$as_me:$LINENO: result: $d" >&5
10513 echo "${ECHO_T}$d" >&6; }
10514      else
10515        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10516 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10517      fi
10518
10519      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10520 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10521      d=$with_xidle/lib
10522      if test -d $d; then
10523        X_LIBS="-L$d $X_LIBS"
10524        { echo "$as_me:$LINENO: result: $d" >&5
10525 echo "${ECHO_T}$d" >&6; }
10526      else
10527        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10528 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10529      fi
10530
10531      # replace the directory string with "yes".
10532      with_xidle_req="yes"
10533      with_xidle=$with_xidle_req
10534      ;;
10535
10536     *)
10537      echo ""
10538      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10539      echo "       If it is a directory, then \`DIR/include' will be added to"
10540      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10541      exit 1
10542      ;;
10543    esac
10544
10545
10546 if test "$with_xidle" = yes; then
10547
10548   ac_save_CPPFLAGS="$CPPFLAGS"
10549   if test \! -z "$includedir" ; then
10550     CPPFLAGS="$CPPFLAGS -I$includedir"
10551   fi
10552   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10553   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10554   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10555 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10556 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10557   echo $ECHO_N "(cached) $ECHO_C" >&6
10558 else
10559   cat >conftest.$ac_ext <<_ACEOF
10560 /* confdefs.h.  */
10561 _ACEOF
10562 cat confdefs.h >>conftest.$ac_ext
10563 cat >>conftest.$ac_ext <<_ACEOF
10564 /* end confdefs.h.  */
10565 #include <X11/Xlib.h>
10566
10567 #include <X11/extensions/xidle.h>
10568 _ACEOF
10569 rm -f conftest.$ac_objext
10570 if { (ac_try="$ac_compile"
10571 case "(($ac_try" in
10572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10573   *) ac_try_echo=$ac_try;;
10574 esac
10575 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10576   (eval "$ac_compile") 2>conftest.er1
10577   ac_status=$?
10578   grep -v '^ *+' conftest.er1 >conftest.err
10579   rm -f conftest.er1
10580   cat conftest.err >&5
10581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10582   (exit $ac_status); } && {
10583          test -z "$ac_c_werror_flag" ||
10584          test ! -s conftest.err
10585        } && test -s conftest.$ac_objext; then
10586   ac_cv_header_X11_extensions_xidle_h=yes
10587 else
10588   echo "$as_me: failed program was:" >&5
10589 sed 's/^/| /' conftest.$ac_ext >&5
10590
10591         ac_cv_header_X11_extensions_xidle_h=no
10592 fi
10593
10594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10595 fi
10596 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10597 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10598 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10599   have_xidle=yes
10600                      cat >>confdefs.h <<\_ACEOF
10601 #define HAVE_XIDLE_EXTENSION 1
10602 _ACEOF
10603
10604 fi
10605
10606
10607   CPPFLAGS="$ac_save_CPPFLAGS"
10608 elif test "$with_xidle" != no; then
10609   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10610   exit 1
10611 fi
10612
10613
10614 ###############################################################################
10615 #
10616 #       Check for the SGI-VIDEO-CONTROL server extension.
10617 #
10618 ###############################################################################
10619
10620 have_sgivc=no
10621 with_sgivc_req=unspecified
10622
10623 # Check whether --with-sgivc-ext was given.
10624 if test "${with_sgivc_ext+set}" = set; then
10625   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10626 else
10627   with_sgivc=yes
10628 fi
10629
10630
10631
10632    case "$with_sgivc" in
10633     yes) ;;
10634     no)  ;;
10635
10636     /*)
10637      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10638 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10639      d=$with_sgivc/include
10640      if test -d $d; then
10641        X_CFLAGS="-I$d $X_CFLAGS"
10642        { echo "$as_me:$LINENO: result: $d" >&5
10643 echo "${ECHO_T}$d" >&6; }
10644      else
10645        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10646 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10647      fi
10648
10649      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10650 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10651      d=$with_sgivc/lib
10652      if test -d $d; then
10653        X_LIBS="-L$d $X_LIBS"
10654        { echo "$as_me:$LINENO: result: $d" >&5
10655 echo "${ECHO_T}$d" >&6; }
10656      else
10657        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10658 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10659      fi
10660
10661      # replace the directory string with "yes".
10662      with_sgivc_req="yes"
10663      with_sgivc=$with_sgivc_req
10664      ;;
10665
10666     *)
10667      echo ""
10668      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10669      echo "       If it is a directory, then \`DIR/include' will be added to"
10670      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10671      exit 1
10672      ;;
10673    esac
10674
10675
10676 if test "$with_sgivc" = yes; then
10677
10678   # first check for XSGIvc.h
10679
10680   ac_save_CPPFLAGS="$CPPFLAGS"
10681   if test \! -z "$includedir" ; then
10682     CPPFLAGS="$CPPFLAGS -I$includedir"
10683   fi
10684   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10685   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10686   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10687 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10688 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10689   echo $ECHO_N "(cached) $ECHO_C" >&6
10690 else
10691   cat >conftest.$ac_ext <<_ACEOF
10692 /* confdefs.h.  */
10693 _ACEOF
10694 cat confdefs.h >>conftest.$ac_ext
10695 cat >>conftest.$ac_ext <<_ACEOF
10696 /* end confdefs.h.  */
10697 #include <X11/Xlib.h>
10698
10699 #include <X11/extensions/XSGIvc.h>
10700 _ACEOF
10701 rm -f conftest.$ac_objext
10702 if { (ac_try="$ac_compile"
10703 case "(($ac_try" in
10704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10705   *) ac_try_echo=$ac_try;;
10706 esac
10707 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10708   (eval "$ac_compile") 2>conftest.er1
10709   ac_status=$?
10710   grep -v '^ *+' conftest.er1 >conftest.err
10711   rm -f conftest.er1
10712   cat conftest.err >&5
10713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714   (exit $ac_status); } && {
10715          test -z "$ac_c_werror_flag" ||
10716          test ! -s conftest.err
10717        } && test -s conftest.$ac_objext; then
10718   ac_cv_header_X11_extensions_XSGIvc_h=yes
10719 else
10720   echo "$as_me: failed program was:" >&5
10721 sed 's/^/| /' conftest.$ac_ext >&5
10722
10723         ac_cv_header_X11_extensions_XSGIvc_h=no
10724 fi
10725
10726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10727 fi
10728 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10729 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10730 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10731   have_sgivc=yes
10732 fi
10733
10734
10735   CPPFLAGS="$ac_save_CPPFLAGS"
10736
10737   # if that succeeded, then check for the -lXsgivc
10738   if test "$have_sgivc" = yes; then
10739     have_sgivc=no
10740
10741   ac_save_CPPFLAGS="$CPPFLAGS"
10742   ac_save_LDFLAGS="$LDFLAGS"
10743 #  ac_save_LIBS="$LIBS"
10744
10745   if test \! -z "$includedir" ; then
10746     CPPFLAGS="$CPPFLAGS -I$includedir"
10747   fi
10748   # note: $X_CFLAGS includes $x_includes
10749   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10750
10751   if test \! -z "$libdir" ; then
10752     LDFLAGS="$LDFLAGS -L$libdir"
10753   fi
10754   # note: $X_LIBS includes $x_libraries
10755   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10756
10757   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10758   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10759   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10760 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10761 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10762   echo $ECHO_N "(cached) $ECHO_C" >&6
10763 else
10764   ac_check_lib_save_LIBS=$LIBS
10765 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10766 cat >conftest.$ac_ext <<_ACEOF
10767 /* confdefs.h.  */
10768 _ACEOF
10769 cat confdefs.h >>conftest.$ac_ext
10770 cat >>conftest.$ac_ext <<_ACEOF
10771 /* end confdefs.h.  */
10772
10773 /* Override any GCC internal prototype to avoid an error.
10774    Use char because int might match the return type of a GCC
10775    builtin and then its argument prototype would still apply.  */
10776 #ifdef __cplusplus
10777 extern "C"
10778 #endif
10779 char XSGIvcQueryGammaMap ();
10780 int
10781 main ()
10782 {
10783 return XSGIvcQueryGammaMap ();
10784   ;
10785   return 0;
10786 }
10787 _ACEOF
10788 rm -f conftest.$ac_objext conftest$ac_exeext
10789 if { (ac_try="$ac_link"
10790 case "(($ac_try" in
10791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10792   *) ac_try_echo=$ac_try;;
10793 esac
10794 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10795   (eval "$ac_link") 2>conftest.er1
10796   ac_status=$?
10797   grep -v '^ *+' conftest.er1 >conftest.err
10798   rm -f conftest.er1
10799   cat conftest.err >&5
10800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801   (exit $ac_status); } && {
10802          test -z "$ac_c_werror_flag" ||
10803          test ! -s conftest.err
10804        } && test -s conftest$ac_exeext &&
10805        $as_test_x conftest$ac_exeext; then
10806   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10807 else
10808   echo "$as_me: failed program was:" >&5
10809 sed 's/^/| /' conftest.$ac_ext >&5
10810
10811         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10812 fi
10813
10814 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10815       conftest$ac_exeext conftest.$ac_ext
10816 LIBS=$ac_check_lib_save_LIBS
10817 fi
10818 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10819 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10820 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10821   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10822 else
10823   true
10824 fi
10825
10826   CPPFLAGS="$ac_save_CPPFLAGS"
10827   LDFLAGS="$ac_save_LDFLAGS"
10828 #  LIBS="$ac_save_LIBS"
10829
10830   fi
10831
10832   # if that succeeded, then we've really got it.
10833   if test "$have_sgivc" = yes; then
10834     cat >>confdefs.h <<\_ACEOF
10835 #define HAVE_SGI_VC_EXTENSION 1
10836 _ACEOF
10837
10838   fi
10839
10840 elif test "$with_sgivc" != no; then
10841   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10842   exit 1
10843 fi
10844
10845
10846 ###############################################################################
10847 #
10848 #       Check for the DPMS server extension.
10849 #
10850 ###############################################################################
10851
10852 have_dpms=no
10853 with_dpms_req=unspecified
10854
10855 # Check whether --with-dpms-ext was given.
10856 if test "${with_dpms_ext+set}" = set; then
10857   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10858 else
10859   with_dpms=yes
10860 fi
10861
10862
10863
10864    case "$with_dpms" in
10865     yes) ;;
10866     no)  ;;
10867
10868     /*)
10869      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10870 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10871      d=$with_dpms/include
10872      if test -d $d; then
10873        X_CFLAGS="-I$d $X_CFLAGS"
10874        { echo "$as_me:$LINENO: result: $d" >&5
10875 echo "${ECHO_T}$d" >&6; }
10876      else
10877        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10878 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10879      fi
10880
10881      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10882 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10883      d=$with_dpms/lib
10884      if test -d $d; then
10885        X_LIBS="-L$d $X_LIBS"
10886        { echo "$as_me:$LINENO: result: $d" >&5
10887 echo "${ECHO_T}$d" >&6; }
10888      else
10889        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10890 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10891      fi
10892
10893      # replace the directory string with "yes".
10894      with_dpms_req="yes"
10895      with_dpms=$with_dpms_req
10896      ;;
10897
10898     *)
10899      echo ""
10900      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10901      echo "       If it is a directory, then \`DIR/include' will be added to"
10902      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10903      exit 1
10904      ;;
10905    esac
10906
10907
10908 if test "$with_dpms" = yes; then
10909
10910   # first check for dpms.h
10911
10912   ac_save_CPPFLAGS="$CPPFLAGS"
10913   if test \! -z "$includedir" ; then
10914     CPPFLAGS="$CPPFLAGS -I$includedir"
10915   fi
10916   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10917   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10918   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10919 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10920 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10921   echo $ECHO_N "(cached) $ECHO_C" >&6
10922 else
10923   cat >conftest.$ac_ext <<_ACEOF
10924 /* confdefs.h.  */
10925 _ACEOF
10926 cat confdefs.h >>conftest.$ac_ext
10927 cat >>conftest.$ac_ext <<_ACEOF
10928 /* end confdefs.h.  */
10929 #include <X11/Xlib.h>
10930                      #include <X11/Xmd.h>
10931
10932 #include <X11/extensions/dpms.h>
10933 _ACEOF
10934 rm -f conftest.$ac_objext
10935 if { (ac_try="$ac_compile"
10936 case "(($ac_try" in
10937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10938   *) ac_try_echo=$ac_try;;
10939 esac
10940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10941   (eval "$ac_compile") 2>conftest.er1
10942   ac_status=$?
10943   grep -v '^ *+' conftest.er1 >conftest.err
10944   rm -f conftest.er1
10945   cat conftest.err >&5
10946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947   (exit $ac_status); } && {
10948          test -z "$ac_c_werror_flag" ||
10949          test ! -s conftest.err
10950        } && test -s conftest.$ac_objext; then
10951   ac_cv_header_X11_extensions_dpms_h=yes
10952 else
10953   echo "$as_me: failed program was:" >&5
10954 sed 's/^/| /' conftest.$ac_ext >&5
10955
10956         ac_cv_header_X11_extensions_dpms_h=no
10957 fi
10958
10959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960 fi
10961 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10962 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10963 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10964   have_dpms=yes
10965 fi
10966
10967
10968   CPPFLAGS="$ac_save_CPPFLAGS"
10969
10970   # if that succeeded, then check for the DPMS code in the libraries
10971   if test "$have_dpms" = yes; then
10972
10973     # first look in -lXext (this is where it is with XFree86 4.0)
10974     have_dpms=no
10975
10976   ac_save_CPPFLAGS="$CPPFLAGS"
10977   ac_save_LDFLAGS="$LDFLAGS"
10978 #  ac_save_LIBS="$LIBS"
10979
10980   if test \! -z "$includedir" ; then
10981     CPPFLAGS="$CPPFLAGS -I$includedir"
10982   fi
10983   # note: $X_CFLAGS includes $x_includes
10984   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10985
10986   if test \! -z "$libdir" ; then
10987     LDFLAGS="$LDFLAGS -L$libdir"
10988   fi
10989   # note: $X_LIBS includes $x_libraries
10990   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10991
10992   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10993   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10994   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10995 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10996 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10997   echo $ECHO_N "(cached) $ECHO_C" >&6
10998 else
10999   ac_check_lib_save_LIBS=$LIBS
11000 LIBS="-lXext -lXext -lX11 $LIBS"
11001 cat >conftest.$ac_ext <<_ACEOF
11002 /* confdefs.h.  */
11003 _ACEOF
11004 cat confdefs.h >>conftest.$ac_ext
11005 cat >>conftest.$ac_ext <<_ACEOF
11006 /* end confdefs.h.  */
11007
11008 /* Override any GCC internal prototype to avoid an error.
11009    Use char because int might match the return type of a GCC
11010    builtin and then its argument prototype would still apply.  */
11011 #ifdef __cplusplus
11012 extern "C"
11013 #endif
11014 char DPMSInfo ();
11015 int
11016 main ()
11017 {
11018 return DPMSInfo ();
11019   ;
11020   return 0;
11021 }
11022 _ACEOF
11023 rm -f conftest.$ac_objext conftest$ac_exeext
11024 if { (ac_try="$ac_link"
11025 case "(($ac_try" in
11026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11027   *) ac_try_echo=$ac_try;;
11028 esac
11029 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11030   (eval "$ac_link") 2>conftest.er1
11031   ac_status=$?
11032   grep -v '^ *+' conftest.er1 >conftest.err
11033   rm -f conftest.er1
11034   cat conftest.err >&5
11035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11036   (exit $ac_status); } && {
11037          test -z "$ac_c_werror_flag" ||
11038          test ! -s conftest.err
11039        } && test -s conftest$ac_exeext &&
11040        $as_test_x conftest$ac_exeext; then
11041   ac_cv_lib_Xext_DPMSInfo=yes
11042 else
11043   echo "$as_me: failed program was:" >&5
11044 sed 's/^/| /' conftest.$ac_ext >&5
11045
11046         ac_cv_lib_Xext_DPMSInfo=no
11047 fi
11048
11049 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11050       conftest$ac_exeext conftest.$ac_ext
11051 LIBS=$ac_check_lib_save_LIBS
11052 fi
11053 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11054 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11055 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11056   have_dpms=yes
11057 else
11058   true
11059 fi
11060
11061   CPPFLAGS="$ac_save_CPPFLAGS"
11062   LDFLAGS="$ac_save_LDFLAGS"
11063 #  LIBS="$ac_save_LIBS"
11064
11065
11066     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11067     if test "$have_dpms" = no; then
11068
11069   ac_save_CPPFLAGS="$CPPFLAGS"
11070   ac_save_LDFLAGS="$LDFLAGS"
11071 #  ac_save_LIBS="$LIBS"
11072
11073   if test \! -z "$includedir" ; then
11074     CPPFLAGS="$CPPFLAGS -I$includedir"
11075   fi
11076   # note: $X_CFLAGS includes $x_includes
11077   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11078
11079   if test \! -z "$libdir" ; then
11080     LDFLAGS="$LDFLAGS -L$libdir"
11081   fi
11082   # note: $X_LIBS includes $x_libraries
11083   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11084
11085   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11086   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11087   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11088 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11089 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11090   echo $ECHO_N "(cached) $ECHO_C" >&6
11091 else
11092   ac_check_lib_save_LIBS=$LIBS
11093 LIBS="-lXdpms -lXext -lX11 $LIBS"
11094 cat >conftest.$ac_ext <<_ACEOF
11095 /* confdefs.h.  */
11096 _ACEOF
11097 cat confdefs.h >>conftest.$ac_ext
11098 cat >>conftest.$ac_ext <<_ACEOF
11099 /* end confdefs.h.  */
11100
11101 /* Override any GCC internal prototype to avoid an error.
11102    Use char because int might match the return type of a GCC
11103    builtin and then its argument prototype would still apply.  */
11104 #ifdef __cplusplus
11105 extern "C"
11106 #endif
11107 char DPMSInfo ();
11108 int
11109 main ()
11110 {
11111 return DPMSInfo ();
11112   ;
11113   return 0;
11114 }
11115 _ACEOF
11116 rm -f conftest.$ac_objext conftest$ac_exeext
11117 if { (ac_try="$ac_link"
11118 case "(($ac_try" in
11119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120   *) ac_try_echo=$ac_try;;
11121 esac
11122 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11123   (eval "$ac_link") 2>conftest.er1
11124   ac_status=$?
11125   grep -v '^ *+' conftest.er1 >conftest.err
11126   rm -f conftest.er1
11127   cat conftest.err >&5
11128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129   (exit $ac_status); } && {
11130          test -z "$ac_c_werror_flag" ||
11131          test ! -s conftest.err
11132        } && test -s conftest$ac_exeext &&
11133        $as_test_x conftest$ac_exeext; then
11134   ac_cv_lib_Xdpms_DPMSInfo=yes
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 sed 's/^/| /' conftest.$ac_ext >&5
11138
11139         ac_cv_lib_Xdpms_DPMSInfo=no
11140 fi
11141
11142 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11143       conftest$ac_exeext conftest.$ac_ext
11144 LIBS=$ac_check_lib_save_LIBS
11145 fi
11146 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11147 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11148 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11149   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11150 else
11151   true
11152 fi
11153
11154   CPPFLAGS="$ac_save_CPPFLAGS"
11155   LDFLAGS="$ac_save_LDFLAGS"
11156 #  LIBS="$ac_save_LIBS"
11157
11158     fi
11159   fi
11160
11161
11162   # if that succeeded, then we've really got it.
11163   if test "$have_dpms" = yes; then
11164     cat >>confdefs.h <<\_ACEOF
11165 #define HAVE_DPMS_EXTENSION 1
11166 _ACEOF
11167
11168   fi
11169
11170 elif test "$with_dpms" != no; then
11171   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11172   exit 1
11173 fi
11174
11175
11176 ###############################################################################
11177 #
11178 #       Check for the XINERAMA server extension.
11179 #
11180 ###############################################################################
11181
11182 have_xinerama=no
11183 with_xinerama_req=unspecified
11184
11185 # Check whether --with-xinerama-ext was given.
11186 if test "${with_xinerama_ext+set}" = set; then
11187   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11188 else
11189   with_xinerama=yes
11190 fi
11191
11192
11193
11194    case "$with_xinerama" in
11195     yes) ;;
11196     no)  ;;
11197
11198     /*)
11199      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11200 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11201      d=$with_xinerama/include
11202      if test -d $d; then
11203        X_CFLAGS="-I$d $X_CFLAGS"
11204        { echo "$as_me:$LINENO: result: $d" >&5
11205 echo "${ECHO_T}$d" >&6; }
11206      else
11207        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11208 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11209      fi
11210
11211      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11212 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11213      d=$with_xinerama/lib
11214      if test -d $d; then
11215        X_LIBS="-L$d $X_LIBS"
11216        { echo "$as_me:$LINENO: result: $d" >&5
11217 echo "${ECHO_T}$d" >&6; }
11218      else
11219        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11220 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11221      fi
11222
11223      # replace the directory string with "yes".
11224      with_xinerama_req="yes"
11225      with_xinerama=$with_xinerama_req
11226      ;;
11227
11228     *)
11229      echo ""
11230      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11231      echo "       If it is a directory, then \`DIR/include' will be added to"
11232      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11233      exit 1
11234      ;;
11235    esac
11236
11237
11238 if test "$with_xinerama" = yes; then
11239
11240   # first check for Xinerama.h
11241
11242   ac_save_CPPFLAGS="$CPPFLAGS"
11243   if test \! -z "$includedir" ; then
11244     CPPFLAGS="$CPPFLAGS -I$includedir"
11245   fi
11246   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11247   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11248   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11249 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11250 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11251   echo $ECHO_N "(cached) $ECHO_C" >&6
11252 else
11253   cat >conftest.$ac_ext <<_ACEOF
11254 /* confdefs.h.  */
11255 _ACEOF
11256 cat confdefs.h >>conftest.$ac_ext
11257 cat >>conftest.$ac_ext <<_ACEOF
11258 /* end confdefs.h.  */
11259 #include <X11/Xlib.h>
11260
11261 #include <X11/extensions/Xinerama.h>
11262 _ACEOF
11263 rm -f conftest.$ac_objext
11264 if { (ac_try="$ac_compile"
11265 case "(($ac_try" in
11266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11267   *) ac_try_echo=$ac_try;;
11268 esac
11269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11270   (eval "$ac_compile") 2>conftest.er1
11271   ac_status=$?
11272   grep -v '^ *+' conftest.er1 >conftest.err
11273   rm -f conftest.er1
11274   cat conftest.err >&5
11275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276   (exit $ac_status); } && {
11277          test -z "$ac_c_werror_flag" ||
11278          test ! -s conftest.err
11279        } && test -s conftest.$ac_objext; then
11280   ac_cv_header_X11_extensions_Xinerama_h=yes
11281 else
11282   echo "$as_me: failed program was:" >&5
11283 sed 's/^/| /' conftest.$ac_ext >&5
11284
11285         ac_cv_header_X11_extensions_Xinerama_h=no
11286 fi
11287
11288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11291 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11292 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11293   have_xinerama=yes
11294 fi
11295
11296
11297   CPPFLAGS="$ac_save_CPPFLAGS"
11298
11299   # if that succeeded, then check for the XINERAMA code in the libraries
11300   if test "$have_xinerama" = yes; then
11301
11302     # first look in -lXext
11303     have_xinerama=no
11304
11305   ac_save_CPPFLAGS="$CPPFLAGS"
11306   ac_save_LDFLAGS="$LDFLAGS"
11307 #  ac_save_LIBS="$LIBS"
11308
11309   if test \! -z "$includedir" ; then
11310     CPPFLAGS="$CPPFLAGS -I$includedir"
11311   fi
11312   # note: $X_CFLAGS includes $x_includes
11313   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11314
11315   if test \! -z "$libdir" ; then
11316     LDFLAGS="$LDFLAGS -L$libdir"
11317   fi
11318   # note: $X_LIBS includes $x_libraries
11319   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11320
11321   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11322   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11323   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11324 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11325 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11326   echo $ECHO_N "(cached) $ECHO_C" >&6
11327 else
11328   ac_check_lib_save_LIBS=$LIBS
11329 LIBS="-lXext -lXext -lX11 $LIBS"
11330 cat >conftest.$ac_ext <<_ACEOF
11331 /* confdefs.h.  */
11332 _ACEOF
11333 cat confdefs.h >>conftest.$ac_ext
11334 cat >>conftest.$ac_ext <<_ACEOF
11335 /* end confdefs.h.  */
11336
11337 /* Override any GCC internal prototype to avoid an error.
11338    Use char because int might match the return type of a GCC
11339    builtin and then its argument prototype would still apply.  */
11340 #ifdef __cplusplus
11341 extern "C"
11342 #endif
11343 char XineramaQueryScreens ();
11344 int
11345 main ()
11346 {
11347 return XineramaQueryScreens ();
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext conftest$ac_exeext
11353 if { (ac_try="$ac_link"
11354 case "(($ac_try" in
11355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11356   *) ac_try_echo=$ac_try;;
11357 esac
11358 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11359   (eval "$ac_link") 2>conftest.er1
11360   ac_status=$?
11361   grep -v '^ *+' conftest.er1 >conftest.err
11362   rm -f conftest.er1
11363   cat conftest.err >&5
11364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11365   (exit $ac_status); } && {
11366          test -z "$ac_c_werror_flag" ||
11367          test ! -s conftest.err
11368        } && test -s conftest$ac_exeext &&
11369        $as_test_x conftest$ac_exeext; then
11370   ac_cv_lib_Xext_XineramaQueryScreens=yes
11371 else
11372   echo "$as_me: failed program was:" >&5
11373 sed 's/^/| /' conftest.$ac_ext >&5
11374
11375         ac_cv_lib_Xext_XineramaQueryScreens=no
11376 fi
11377
11378 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11379       conftest$ac_exeext conftest.$ac_ext
11380 LIBS=$ac_check_lib_save_LIBS
11381 fi
11382 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11383 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11384 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11385   have_xinerama=yes
11386 else
11387   true
11388 fi
11389
11390   CPPFLAGS="$ac_save_CPPFLAGS"
11391   LDFLAGS="$ac_save_LDFLAGS"
11392 #  LIBS="$ac_save_LIBS"
11393
11394
11395     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11396     if test "$have_xinerama" = no; then
11397
11398   ac_save_CPPFLAGS="$CPPFLAGS"
11399   ac_save_LDFLAGS="$LDFLAGS"
11400 #  ac_save_LIBS="$LIBS"
11401
11402   if test \! -z "$includedir" ; then
11403     CPPFLAGS="$CPPFLAGS -I$includedir"
11404   fi
11405   # note: $X_CFLAGS includes $x_includes
11406   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11407
11408   if test \! -z "$libdir" ; then
11409     LDFLAGS="$LDFLAGS -L$libdir"
11410   fi
11411   # note: $X_LIBS includes $x_libraries
11412   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11413
11414   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11415   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11416   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11417 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11418 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   ac_check_lib_save_LIBS=$LIBS
11422 LIBS="-lXinerama -lXext -lX11 $LIBS"
11423 cat >conftest.$ac_ext <<_ACEOF
11424 /* confdefs.h.  */
11425 _ACEOF
11426 cat confdefs.h >>conftest.$ac_ext
11427 cat >>conftest.$ac_ext <<_ACEOF
11428 /* end confdefs.h.  */
11429
11430 /* Override any GCC internal prototype to avoid an error.
11431    Use char because int might match the return type of a GCC
11432    builtin and then its argument prototype would still apply.  */
11433 #ifdef __cplusplus
11434 extern "C"
11435 #endif
11436 char XineramaQueryScreens ();
11437 int
11438 main ()
11439 {
11440 return XineramaQueryScreens ();
11441   ;
11442   return 0;
11443 }
11444 _ACEOF
11445 rm -f conftest.$ac_objext conftest$ac_exeext
11446 if { (ac_try="$ac_link"
11447 case "(($ac_try" in
11448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11449   *) ac_try_echo=$ac_try;;
11450 esac
11451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11452   (eval "$ac_link") 2>conftest.er1
11453   ac_status=$?
11454   grep -v '^ *+' conftest.er1 >conftest.err
11455   rm -f conftest.er1
11456   cat conftest.err >&5
11457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11458   (exit $ac_status); } && {
11459          test -z "$ac_c_werror_flag" ||
11460          test ! -s conftest.err
11461        } && test -s conftest$ac_exeext &&
11462        $as_test_x conftest$ac_exeext; then
11463   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 sed 's/^/| /' conftest.$ac_ext >&5
11467
11468         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11469 fi
11470
11471 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11472       conftest$ac_exeext conftest.$ac_ext
11473 LIBS=$ac_check_lib_save_LIBS
11474 fi
11475 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11476 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11477 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11478   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11479 else
11480   true
11481 fi
11482
11483   CPPFLAGS="$ac_save_CPPFLAGS"
11484   LDFLAGS="$ac_save_LDFLAGS"
11485 #  LIBS="$ac_save_LIBS"
11486
11487     fi
11488   fi
11489
11490   # if that succeeded, then we've really got it.
11491   if test "$have_xinerama" = yes; then
11492     cat >>confdefs.h <<\_ACEOF
11493 #define HAVE_XINERAMA 1
11494 _ACEOF
11495
11496   fi
11497
11498 elif test "$with_xinerama" != no; then
11499   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11500   exit 1
11501 fi
11502
11503
11504 ###############################################################################
11505 #
11506 #       Check for the XF86VMODE server extension (for virtual screens.)
11507 #
11508 ###############################################################################
11509
11510 have_xf86vmode=no
11511 with_xf86vmode_req=unspecified
11512
11513 # Check whether --with-xf86vmode-ext was given.
11514 if test "${with_xf86vmode_ext+set}" = set; then
11515   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11516 else
11517   with_xf86vmode=yes
11518 fi
11519
11520
11521
11522    case "$with_xf86vmode" in
11523     yes) ;;
11524     no)  ;;
11525
11526     /*)
11527      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11528 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11529      d=$with_xf86vmode/include
11530      if test -d $d; then
11531        X_CFLAGS="-I$d $X_CFLAGS"
11532        { echo "$as_me:$LINENO: result: $d" >&5
11533 echo "${ECHO_T}$d" >&6; }
11534      else
11535        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11536 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11537      fi
11538
11539      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11540 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11541      d=$with_xf86vmode/lib
11542      if test -d $d; then
11543        X_LIBS="-L$d $X_LIBS"
11544        { echo "$as_me:$LINENO: result: $d" >&5
11545 echo "${ECHO_T}$d" >&6; }
11546      else
11547        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11548 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11549      fi
11550
11551      # replace the directory string with "yes".
11552      with_xf86vmode_req="yes"
11553      with_xf86vmode=$with_xf86vmode_req
11554      ;;
11555
11556     *)
11557      echo ""
11558      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11559      echo "       If it is a directory, then \`DIR/include' will be added to"
11560      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11561      exit 1
11562      ;;
11563    esac
11564
11565
11566 VIDMODE_LIBS=""
11567
11568 if test "$with_xf86vmode" = yes; then
11569
11570   # first check for xf86vmode.h
11571
11572   ac_save_CPPFLAGS="$CPPFLAGS"
11573   if test \! -z "$includedir" ; then
11574     CPPFLAGS="$CPPFLAGS -I$includedir"
11575   fi
11576   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11577   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11578   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11579 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11580 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11581   echo $ECHO_N "(cached) $ECHO_C" >&6
11582 else
11583   cat >conftest.$ac_ext <<_ACEOF
11584 /* confdefs.h.  */
11585 _ACEOF
11586 cat confdefs.h >>conftest.$ac_ext
11587 cat >>conftest.$ac_ext <<_ACEOF
11588 /* end confdefs.h.  */
11589 #include <X11/Xlib.h>
11590
11591 #include <X11/extensions/xf86vmode.h>
11592 _ACEOF
11593 rm -f conftest.$ac_objext
11594 if { (ac_try="$ac_compile"
11595 case "(($ac_try" in
11596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11597   *) ac_try_echo=$ac_try;;
11598 esac
11599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11600   (eval "$ac_compile") 2>conftest.er1
11601   ac_status=$?
11602   grep -v '^ *+' conftest.er1 >conftest.err
11603   rm -f conftest.er1
11604   cat conftest.err >&5
11605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606   (exit $ac_status); } && {
11607          test -z "$ac_c_werror_flag" ||
11608          test ! -s conftest.err
11609        } && test -s conftest.$ac_objext; then
11610   ac_cv_header_X11_extensions_xf86vmode_h=yes
11611 else
11612   echo "$as_me: failed program was:" >&5
11613 sed 's/^/| /' conftest.$ac_ext >&5
11614
11615         ac_cv_header_X11_extensions_xf86vmode_h=no
11616 fi
11617
11618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11619 fi
11620 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11621 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11622 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11623   have_xf86vmode=yes
11624 fi
11625
11626
11627   CPPFLAGS="$ac_save_CPPFLAGS"
11628
11629   # if that succeeded, then check for the -lXxf86vm
11630   if test "$have_xf86vmode" = yes; then
11631     have_xf86vmode=no
11632
11633   ac_save_CPPFLAGS="$CPPFLAGS"
11634   ac_save_LDFLAGS="$LDFLAGS"
11635 #  ac_save_LIBS="$LIBS"
11636
11637   if test \! -z "$includedir" ; then
11638     CPPFLAGS="$CPPFLAGS -I$includedir"
11639   fi
11640   # note: $X_CFLAGS includes $x_includes
11641   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11642
11643   if test \! -z "$libdir" ; then
11644     LDFLAGS="$LDFLAGS -L$libdir"
11645   fi
11646   # note: $X_LIBS includes $x_libraries
11647   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11648
11649   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11650   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11651   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11652 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11653 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11654   echo $ECHO_N "(cached) $ECHO_C" >&6
11655 else
11656   ac_check_lib_save_LIBS=$LIBS
11657 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11658 cat >conftest.$ac_ext <<_ACEOF
11659 /* confdefs.h.  */
11660 _ACEOF
11661 cat confdefs.h >>conftest.$ac_ext
11662 cat >>conftest.$ac_ext <<_ACEOF
11663 /* end confdefs.h.  */
11664
11665 /* Override any GCC internal prototype to avoid an error.
11666    Use char because int might match the return type of a GCC
11667    builtin and then its argument prototype would still apply.  */
11668 #ifdef __cplusplus
11669 extern "C"
11670 #endif
11671 char XF86VidModeGetViewPort ();
11672 int
11673 main ()
11674 {
11675 return XF86VidModeGetViewPort ();
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f conftest.$ac_objext conftest$ac_exeext
11681 if { (ac_try="$ac_link"
11682 case "(($ac_try" in
11683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11684   *) ac_try_echo=$ac_try;;
11685 esac
11686 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11687   (eval "$ac_link") 2>conftest.er1
11688   ac_status=$?
11689   grep -v '^ *+' conftest.er1 >conftest.err
11690   rm -f conftest.er1
11691   cat conftest.err >&5
11692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693   (exit $ac_status); } && {
11694          test -z "$ac_c_werror_flag" ||
11695          test ! -s conftest.err
11696        } && test -s conftest$ac_exeext &&
11697        $as_test_x conftest$ac_exeext; then
11698   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701 sed 's/^/| /' conftest.$ac_ext >&5
11702
11703         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11704 fi
11705
11706 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11707       conftest$ac_exeext conftest.$ac_ext
11708 LIBS=$ac_check_lib_save_LIBS
11709 fi
11710 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11711 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11712 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11713   have_xf86vmode=yes;
11714                    VIDMODE_LIBS="-lXxf86vm";
11715                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11716 else
11717   true
11718 fi
11719
11720   CPPFLAGS="$ac_save_CPPFLAGS"
11721   LDFLAGS="$ac_save_LDFLAGS"
11722 #  LIBS="$ac_save_LIBS"
11723
11724   fi
11725
11726   # if that succeeded, then we've really got it.
11727   if test "$have_xf86vmode" = yes; then
11728     cat >>confdefs.h <<\_ACEOF
11729 #define HAVE_XF86VMODE 1
11730 _ACEOF
11731
11732   fi
11733
11734 elif test "$with_xf86vmode" != no; then
11735   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11736   exit 1
11737 fi
11738
11739
11740 ###############################################################################
11741 #
11742 #       Check for the XF86VMODE server extension (for gamma fading.)
11743 #
11744 ###############################################################################
11745
11746 have_xf86gamma=no
11747 have_xf86gamma_ramp=no
11748 with_xf86gamma_req=unspecified
11749
11750 # Check whether --with-xf86gamma-ext was given.
11751 if test "${with_xf86gamma_ext+set}" = set; then
11752   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11753 else
11754   with_xf86gamma=yes
11755 fi
11756
11757
11758
11759    case "$with_xf86gamma" in
11760     yes) ;;
11761     no)  ;;
11762
11763     /*)
11764      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11765 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11766      d=$with_xf86gamma/include
11767      if test -d $d; then
11768        X_CFLAGS="-I$d $X_CFLAGS"
11769        { echo "$as_me:$LINENO: result: $d" >&5
11770 echo "${ECHO_T}$d" >&6; }
11771      else
11772        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11773 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11774      fi
11775
11776      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11777 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11778      d=$with_xf86gamma/lib
11779      if test -d $d; then
11780        X_LIBS="-L$d $X_LIBS"
11781        { echo "$as_me:$LINENO: result: $d" >&5
11782 echo "${ECHO_T}$d" >&6; }
11783      else
11784        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11785 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11786      fi
11787
11788      # replace the directory string with "yes".
11789      with_xf86gamma_req="yes"
11790      with_xf86gamma=$with_xf86gamma_req
11791      ;;
11792
11793     *)
11794      echo ""
11795      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11796      echo "       If it is a directory, then \`DIR/include' will be added to"
11797      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11798      exit 1
11799      ;;
11800    esac
11801
11802
11803 if test "$with_xf86gamma" = yes; then
11804
11805   # first check for xf86vmode.h, if we haven't already
11806   if test "$have_xf86vmode" = yes; then
11807     have_xf86gamma=yes
11808   else
11809
11810   ac_save_CPPFLAGS="$CPPFLAGS"
11811   if test \! -z "$includedir" ; then
11812     CPPFLAGS="$CPPFLAGS -I$includedir"
11813   fi
11814   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11815   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11816   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11817 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11818 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11819   echo $ECHO_N "(cached) $ECHO_C" >&6
11820 else
11821   cat >conftest.$ac_ext <<_ACEOF
11822 /* confdefs.h.  */
11823 _ACEOF
11824 cat confdefs.h >>conftest.$ac_ext
11825 cat >>conftest.$ac_ext <<_ACEOF
11826 /* end confdefs.h.  */
11827 #include <X11/Xlib.h>
11828
11829 #include <X11/extensions/xf86vmode.h>
11830 _ACEOF
11831 rm -f conftest.$ac_objext
11832 if { (ac_try="$ac_compile"
11833 case "(($ac_try" in
11834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11835   *) ac_try_echo=$ac_try;;
11836 esac
11837 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11838   (eval "$ac_compile") 2>conftest.er1
11839   ac_status=$?
11840   grep -v '^ *+' conftest.er1 >conftest.err
11841   rm -f conftest.er1
11842   cat conftest.err >&5
11843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11844   (exit $ac_status); } && {
11845          test -z "$ac_c_werror_flag" ||
11846          test ! -s conftest.err
11847        } && test -s conftest.$ac_objext; then
11848   ac_cv_header_X11_extensions_xf86vmode_h=yes
11849 else
11850   echo "$as_me: failed program was:" >&5
11851 sed 's/^/| /' conftest.$ac_ext >&5
11852
11853         ac_cv_header_X11_extensions_xf86vmode_h=no
11854 fi
11855
11856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11857 fi
11858 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11859 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11860 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11861   have_xf86gamma=yes
11862 fi
11863
11864
11865   CPPFLAGS="$ac_save_CPPFLAGS"
11866   fi
11867
11868   # if that succeeded, then check for the -lXxf86vm
11869   if test "$have_xf86gamma" = yes; then
11870     have_xf86gamma=no
11871
11872   ac_save_CPPFLAGS="$CPPFLAGS"
11873   ac_save_LDFLAGS="$LDFLAGS"
11874 #  ac_save_LIBS="$LIBS"
11875
11876   if test \! -z "$includedir" ; then
11877     CPPFLAGS="$CPPFLAGS -I$includedir"
11878   fi
11879   # note: $X_CFLAGS includes $x_includes
11880   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11881
11882   if test \! -z "$libdir" ; then
11883     LDFLAGS="$LDFLAGS -L$libdir"
11884   fi
11885   # note: $X_LIBS includes $x_libraries
11886   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11887
11888   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11889   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11890   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11891 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11892 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11893   echo $ECHO_N "(cached) $ECHO_C" >&6
11894 else
11895   ac_check_lib_save_LIBS=$LIBS
11896 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11897 cat >conftest.$ac_ext <<_ACEOF
11898 /* confdefs.h.  */
11899 _ACEOF
11900 cat confdefs.h >>conftest.$ac_ext
11901 cat >>conftest.$ac_ext <<_ACEOF
11902 /* end confdefs.h.  */
11903
11904 /* Override any GCC internal prototype to avoid an error.
11905    Use char because int might match the return type of a GCC
11906    builtin and then its argument prototype would still apply.  */
11907 #ifdef __cplusplus
11908 extern "C"
11909 #endif
11910 char XF86VidModeSetGamma ();
11911 int
11912 main ()
11913 {
11914 return XF86VidModeSetGamma ();
11915   ;
11916   return 0;
11917 }
11918 _ACEOF
11919 rm -f conftest.$ac_objext conftest$ac_exeext
11920 if { (ac_try="$ac_link"
11921 case "(($ac_try" in
11922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11923   *) ac_try_echo=$ac_try;;
11924 esac
11925 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11926   (eval "$ac_link") 2>conftest.er1
11927   ac_status=$?
11928   grep -v '^ *+' conftest.er1 >conftest.err
11929   rm -f conftest.er1
11930   cat conftest.err >&5
11931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932   (exit $ac_status); } && {
11933          test -z "$ac_c_werror_flag" ||
11934          test ! -s conftest.err
11935        } && test -s conftest$ac_exeext &&
11936        $as_test_x conftest$ac_exeext; then
11937   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11938 else
11939   echo "$as_me: failed program was:" >&5
11940 sed 's/^/| /' conftest.$ac_ext >&5
11941
11942         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11943 fi
11944
11945 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11946       conftest$ac_exeext conftest.$ac_ext
11947 LIBS=$ac_check_lib_save_LIBS
11948 fi
11949 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11950 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11951 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11952   have_xf86gamma=yes
11953 else
11954   true
11955 fi
11956
11957   CPPFLAGS="$ac_save_CPPFLAGS"
11958   LDFLAGS="$ac_save_LDFLAGS"
11959 #  LIBS="$ac_save_LIBS"
11960
11961   fi
11962
11963   # check for the Ramp versions of the functions too.
11964   if test "$have_xf86gamma" = yes; then
11965     have_xf86gamma_ramp=no
11966
11967   ac_save_CPPFLAGS="$CPPFLAGS"
11968   ac_save_LDFLAGS="$LDFLAGS"
11969 #  ac_save_LIBS="$LIBS"
11970
11971   if test \! -z "$includedir" ; then
11972     CPPFLAGS="$CPPFLAGS -I$includedir"
11973   fi
11974   # note: $X_CFLAGS includes $x_includes
11975   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11976
11977   if test \! -z "$libdir" ; then
11978     LDFLAGS="$LDFLAGS -L$libdir"
11979   fi
11980   # note: $X_LIBS includes $x_libraries
11981   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11982
11983   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11984   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11985   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11986 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11987 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11988   echo $ECHO_N "(cached) $ECHO_C" >&6
11989 else
11990   ac_check_lib_save_LIBS=$LIBS
11991 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11992 cat >conftest.$ac_ext <<_ACEOF
11993 /* confdefs.h.  */
11994 _ACEOF
11995 cat confdefs.h >>conftest.$ac_ext
11996 cat >>conftest.$ac_ext <<_ACEOF
11997 /* end confdefs.h.  */
11998
11999 /* Override any GCC internal prototype to avoid an error.
12000    Use char because int might match the return type of a GCC
12001    builtin and then its argument prototype would still apply.  */
12002 #ifdef __cplusplus
12003 extern "C"
12004 #endif
12005 char XF86VidModeSetGammaRamp ();
12006 int
12007 main ()
12008 {
12009 return XF86VidModeSetGammaRamp ();
12010   ;
12011   return 0;
12012 }
12013 _ACEOF
12014 rm -f conftest.$ac_objext conftest$ac_exeext
12015 if { (ac_try="$ac_link"
12016 case "(($ac_try" in
12017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12018   *) ac_try_echo=$ac_try;;
12019 esac
12020 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12021   (eval "$ac_link") 2>conftest.er1
12022   ac_status=$?
12023   grep -v '^ *+' conftest.er1 >conftest.err
12024   rm -f conftest.er1
12025   cat conftest.err >&5
12026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12027   (exit $ac_status); } && {
12028          test -z "$ac_c_werror_flag" ||
12029          test ! -s conftest.err
12030        } && test -s conftest$ac_exeext &&
12031        $as_test_x conftest$ac_exeext; then
12032   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12033 else
12034   echo "$as_me: failed program was:" >&5
12035 sed 's/^/| /' conftest.$ac_ext >&5
12036
12037         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12038 fi
12039
12040 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12041       conftest$ac_exeext conftest.$ac_ext
12042 LIBS=$ac_check_lib_save_LIBS
12043 fi
12044 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12045 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12046 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12047   have_xf86gamma_ramp=yes
12048 else
12049   true
12050 fi
12051
12052   CPPFLAGS="$ac_save_CPPFLAGS"
12053   LDFLAGS="$ac_save_LDFLAGS"
12054 #  LIBS="$ac_save_LIBS"
12055
12056   fi
12057
12058   # if those tests succeeded, then we've really got the functions.
12059   if test "$have_xf86gamma" = yes; then
12060     cat >>confdefs.h <<\_ACEOF
12061 #define HAVE_XF86VMODE_GAMMA 1
12062 _ACEOF
12063
12064   fi
12065
12066   if test "$have_xf86gamma_ramp" = yes; then
12067     cat >>confdefs.h <<\_ACEOF
12068 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12069 _ACEOF
12070
12071   fi
12072
12073   # pull in the lib, if we haven't already
12074   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12075     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12076   fi
12077
12078 elif test "$with_xf86gamma" != no; then
12079   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12080   exit 1
12081 fi
12082
12083
12084 ###############################################################################
12085 #
12086 #       Check for the RANDR (Resize and Rotate) server extension.
12087 #
12088 #       We need this to detect when the resolution of the desktop
12089 #       has changed out from under us (this is a newer, different
12090 #       mechanism than the XF86VMODE virtual viewports.)
12091 #
12092 ###############################################################################
12093
12094 have_randr=no
12095 with_randr_req=unspecified
12096
12097 # Check whether --with-randr-ext was given.
12098 if test "${with_randr_ext+set}" = set; then
12099   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12100 else
12101   with_randr=yes
12102 fi
12103
12104
12105
12106    case "$with_randr" in
12107     yes) ;;
12108     no)  ;;
12109
12110     /*)
12111      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12112 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12113      d=$with_randr/include
12114      if test -d $d; then
12115        X_CFLAGS="-I$d $X_CFLAGS"
12116        { echo "$as_me:$LINENO: result: $d" >&5
12117 echo "${ECHO_T}$d" >&6; }
12118      else
12119        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12120 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12121      fi
12122
12123      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12124 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12125      d=$with_randr/lib
12126      if test -d $d; then
12127        X_LIBS="-L$d $X_LIBS"
12128        { echo "$as_me:$LINENO: result: $d" >&5
12129 echo "${ECHO_T}$d" >&6; }
12130      else
12131        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12132 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12133      fi
12134
12135      # replace the directory string with "yes".
12136      with_randr_req="yes"
12137      with_randr=$with_randr_req
12138      ;;
12139
12140     *)
12141      echo ""
12142      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12143      echo "       If it is a directory, then \`DIR/include' will be added to"
12144      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12145      exit 1
12146      ;;
12147    esac
12148
12149
12150 if test "$with_randr" = yes; then
12151
12152   # first check for Xrandr.h
12153
12154   ac_save_CPPFLAGS="$CPPFLAGS"
12155   if test \! -z "$includedir" ; then
12156     CPPFLAGS="$CPPFLAGS -I$includedir"
12157   fi
12158   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12159   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12160   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12161 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12162 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12163   echo $ECHO_N "(cached) $ECHO_C" >&6
12164 else
12165   cat >conftest.$ac_ext <<_ACEOF
12166 /* confdefs.h.  */
12167 _ACEOF
12168 cat confdefs.h >>conftest.$ac_ext
12169 cat >>conftest.$ac_ext <<_ACEOF
12170 /* end confdefs.h.  */
12171 #include <X11/Xlib.h>
12172
12173 #include <X11/extensions/Xrandr.h>
12174 _ACEOF
12175 rm -f conftest.$ac_objext
12176 if { (ac_try="$ac_compile"
12177 case "(($ac_try" in
12178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12179   *) ac_try_echo=$ac_try;;
12180 esac
12181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12182   (eval "$ac_compile") 2>conftest.er1
12183   ac_status=$?
12184   grep -v '^ *+' conftest.er1 >conftest.err
12185   rm -f conftest.er1
12186   cat conftest.err >&5
12187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188   (exit $ac_status); } && {
12189          test -z "$ac_c_werror_flag" ||
12190          test ! -s conftest.err
12191        } && test -s conftest.$ac_objext; then
12192   ac_cv_header_X11_extensions_Xrandr_h=yes
12193 else
12194   echo "$as_me: failed program was:" >&5
12195 sed 's/^/| /' conftest.$ac_ext >&5
12196
12197         ac_cv_header_X11_extensions_Xrandr_h=no
12198 fi
12199
12200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12201 fi
12202 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12203 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12204 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12205   have_randr=yes
12206 fi
12207
12208
12209   CPPFLAGS="$ac_save_CPPFLAGS"
12210
12211   # if that succeeded, then check for the XRR code in the libraries
12212   if test "$have_randr" = yes; then
12213
12214     # RANDR probably needs -lXrender
12215     xrender_libs=
12216
12217   ac_save_CPPFLAGS="$CPPFLAGS"
12218   ac_save_LDFLAGS="$LDFLAGS"
12219 #  ac_save_LIBS="$LIBS"
12220
12221   if test \! -z "$includedir" ; then
12222     CPPFLAGS="$CPPFLAGS -I$includedir"
12223   fi
12224   # note: $X_CFLAGS includes $x_includes
12225   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12226
12227   if test \! -z "$libdir" ; then
12228     LDFLAGS="$LDFLAGS -L$libdir"
12229   fi
12230   # note: $X_LIBS includes $x_libraries
12231   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12232
12233   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12234   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12235   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12236 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12237 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12238   echo $ECHO_N "(cached) $ECHO_C" >&6
12239 else
12240   ac_check_lib_save_LIBS=$LIBS
12241 LIBS="-lXrender -lXext -lX11 $LIBS"
12242 cat >conftest.$ac_ext <<_ACEOF
12243 /* confdefs.h.  */
12244 _ACEOF
12245 cat confdefs.h >>conftest.$ac_ext
12246 cat >>conftest.$ac_ext <<_ACEOF
12247 /* end confdefs.h.  */
12248
12249 /* Override any GCC internal prototype to avoid an error.
12250    Use char because int might match the return type of a GCC
12251    builtin and then its argument prototype would still apply.  */
12252 #ifdef __cplusplus
12253 extern "C"
12254 #endif
12255 char XRenderSetSubpixelOrder ();
12256 int
12257 main ()
12258 {
12259 return XRenderSetSubpixelOrder ();
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 rm -f conftest.$ac_objext conftest$ac_exeext
12265 if { (ac_try="$ac_link"
12266 case "(($ac_try" in
12267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12268   *) ac_try_echo=$ac_try;;
12269 esac
12270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12271   (eval "$ac_link") 2>conftest.er1
12272   ac_status=$?
12273   grep -v '^ *+' conftest.er1 >conftest.err
12274   rm -f conftest.er1
12275   cat conftest.err >&5
12276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277   (exit $ac_status); } && {
12278          test -z "$ac_c_werror_flag" ||
12279          test ! -s conftest.err
12280        } && test -s conftest$ac_exeext &&
12281        $as_test_x conftest$ac_exeext; then
12282   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12283 else
12284   echo "$as_me: failed program was:" >&5
12285 sed 's/^/| /' conftest.$ac_ext >&5
12286
12287         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12288 fi
12289
12290 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12291       conftest$ac_exeext conftest.$ac_ext
12292 LIBS=$ac_check_lib_save_LIBS
12293 fi
12294 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12295 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12296 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12297   xrender_libs="-lXrender"
12298 else
12299   true
12300 fi
12301
12302   CPPFLAGS="$ac_save_CPPFLAGS"
12303   LDFLAGS="$ac_save_LDFLAGS"
12304 #  LIBS="$ac_save_LIBS"
12305
12306
12307     # first look for RANDR in -lXext
12308     have_randr=no
12309
12310   ac_save_CPPFLAGS="$CPPFLAGS"
12311   ac_save_LDFLAGS="$LDFLAGS"
12312 #  ac_save_LIBS="$LIBS"
12313
12314   if test \! -z "$includedir" ; then
12315     CPPFLAGS="$CPPFLAGS -I$includedir"
12316   fi
12317   # note: $X_CFLAGS includes $x_includes
12318   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12319
12320   if test \! -z "$libdir" ; then
12321     LDFLAGS="$LDFLAGS -L$libdir"
12322   fi
12323   # note: $X_LIBS includes $x_libraries
12324   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12325
12326   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12327   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12328   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12329 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12330 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12331   echo $ECHO_N "(cached) $ECHO_C" >&6
12332 else
12333   ac_check_lib_save_LIBS=$LIBS
12334 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12335 cat >conftest.$ac_ext <<_ACEOF
12336 /* confdefs.h.  */
12337 _ACEOF
12338 cat confdefs.h >>conftest.$ac_ext
12339 cat >>conftest.$ac_ext <<_ACEOF
12340 /* end confdefs.h.  */
12341
12342 /* Override any GCC internal prototype to avoid an error.
12343    Use char because int might match the return type of a GCC
12344    builtin and then its argument prototype would still apply.  */
12345 #ifdef __cplusplus
12346 extern "C"
12347 #endif
12348 char XRRGetScreenInfo ();
12349 int
12350 main ()
12351 {
12352 return XRRGetScreenInfo ();
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 rm -f conftest.$ac_objext conftest$ac_exeext
12358 if { (ac_try="$ac_link"
12359 case "(($ac_try" in
12360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12361   *) ac_try_echo=$ac_try;;
12362 esac
12363 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12364   (eval "$ac_link") 2>conftest.er1
12365   ac_status=$?
12366   grep -v '^ *+' conftest.er1 >conftest.err
12367   rm -f conftest.er1
12368   cat conftest.err >&5
12369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370   (exit $ac_status); } && {
12371          test -z "$ac_c_werror_flag" ||
12372          test ! -s conftest.err
12373        } && test -s conftest$ac_exeext &&
12374        $as_test_x conftest$ac_exeext; then
12375   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 sed 's/^/| /' conftest.$ac_ext >&5
12379
12380         ac_cv_lib_Xext_XRRGetScreenInfo=no
12381 fi
12382
12383 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12384       conftest$ac_exeext conftest.$ac_ext
12385 LIBS=$ac_check_lib_save_LIBS
12386 fi
12387 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12388 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12389 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12390   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12391 else
12392   true
12393 fi
12394
12395   CPPFLAGS="$ac_save_CPPFLAGS"
12396   LDFLAGS="$ac_save_LDFLAGS"
12397 #  LIBS="$ac_save_LIBS"
12398
12399
12400     # if that failed, look in -lXrandr
12401     if test "$have_randr" = no; then
12402
12403   ac_save_CPPFLAGS="$CPPFLAGS"
12404   ac_save_LDFLAGS="$LDFLAGS"
12405 #  ac_save_LIBS="$LIBS"
12406
12407   if test \! -z "$includedir" ; then
12408     CPPFLAGS="$CPPFLAGS -I$includedir"
12409   fi
12410   # note: $X_CFLAGS includes $x_includes
12411   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12412
12413   if test \! -z "$libdir" ; then
12414     LDFLAGS="$LDFLAGS -L$libdir"
12415   fi
12416   # note: $X_LIBS includes $x_libraries
12417   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12418
12419   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12420   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12421   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12422 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12423 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12424   echo $ECHO_N "(cached) $ECHO_C" >&6
12425 else
12426   ac_check_lib_save_LIBS=$LIBS
12427 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12428 cat >conftest.$ac_ext <<_ACEOF
12429 /* confdefs.h.  */
12430 _ACEOF
12431 cat confdefs.h >>conftest.$ac_ext
12432 cat >>conftest.$ac_ext <<_ACEOF
12433 /* end confdefs.h.  */
12434
12435 /* Override any GCC internal prototype to avoid an error.
12436    Use char because int might match the return type of a GCC
12437    builtin and then its argument prototype would still apply.  */
12438 #ifdef __cplusplus
12439 extern "C"
12440 #endif
12441 char XRRGetScreenInfo ();
12442 int
12443 main ()
12444 {
12445 return XRRGetScreenInfo ();
12446   ;
12447   return 0;
12448 }
12449 _ACEOF
12450 rm -f conftest.$ac_objext conftest$ac_exeext
12451 if { (ac_try="$ac_link"
12452 case "(($ac_try" in
12453   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454   *) ac_try_echo=$ac_try;;
12455 esac
12456 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12457   (eval "$ac_link") 2>conftest.er1
12458   ac_status=$?
12459   grep -v '^ *+' conftest.er1 >conftest.err
12460   rm -f conftest.er1
12461   cat conftest.err >&5
12462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463   (exit $ac_status); } && {
12464          test -z "$ac_c_werror_flag" ||
12465          test ! -s conftest.err
12466        } && test -s conftest$ac_exeext &&
12467        $as_test_x conftest$ac_exeext; then
12468   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12469 else
12470   echo "$as_me: failed program was:" >&5
12471 sed 's/^/| /' conftest.$ac_ext >&5
12472
12473         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12474 fi
12475
12476 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12477       conftest$ac_exeext conftest.$ac_ext
12478 LIBS=$ac_check_lib_save_LIBS
12479 fi
12480 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12481 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12482 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12483   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12484 else
12485   true
12486 fi
12487
12488   CPPFLAGS="$ac_save_CPPFLAGS"
12489   LDFLAGS="$ac_save_LDFLAGS"
12490 #  LIBS="$ac_save_LIBS"
12491
12492     fi
12493   fi
12494
12495   # if that succeeded, then we've really got it.
12496   if test "$have_randr" = yes; then
12497     cat >>confdefs.h <<\_ACEOF
12498 #define HAVE_RANDR 1
12499 _ACEOF
12500
12501
12502     # Now check for version 1.2 in the same libs.
12503     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12504     { echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12505 echo $ECHO_N "checking for XRRGetScreenResources... $ECHO_C" >&6; }
12506 if test "${ac_cv_randr_12+set}" = set; then
12507   echo $ECHO_N "(cached) $ECHO_C" >&6
12508 else
12509   ac_cv_randr_12=no
12510
12511   ac_save_CPPFLAGS="$CPPFLAGS"
12512   if test \! -z "$includedir" ; then
12513     CPPFLAGS="$CPPFLAGS -I$includedir"
12514   fi
12515   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12516   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12517   cat >conftest.$ac_ext <<_ACEOF
12518 /* confdefs.h.  */
12519 _ACEOF
12520 cat confdefs.h >>conftest.$ac_ext
12521 cat >>conftest.$ac_ext <<_ACEOF
12522 /* end confdefs.h.  */
12523 #include <stdlib.h>
12524                          #include <X11/Xlib.h>
12525                          #include <X11/extensions/Xrandr.h>
12526 int
12527 main ()
12528 {
12529 XRRScreenResources *res =
12530                            XRRGetScreenResources (0, 0);
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (ac_try="$ac_compile"
12537 case "(($ac_try" in
12538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12539   *) ac_try_echo=$ac_try;;
12540 esac
12541 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12542   (eval "$ac_compile") 2>conftest.er1
12543   ac_status=$?
12544   grep -v '^ *+' conftest.er1 >conftest.err
12545   rm -f conftest.er1
12546   cat conftest.err >&5
12547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548   (exit $ac_status); } && {
12549          test -z "$ac_c_werror_flag" ||
12550          test ! -s conftest.err
12551        } && test -s conftest.$ac_objext; then
12552   ac_cv_randr_12=yes
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 sed 's/^/| /' conftest.$ac_ext >&5
12556
12557         ac_cv_randr_12=no
12558 fi
12559
12560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561   CPPFLAGS="$ac_save_CPPFLAGS"
12562 fi
12563 { echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12564 echo "${ECHO_T}$ac_cv_randr_12" >&6; }
12565     if test "$ac_cv_randr_12" = yes ; then
12566       cat >>confdefs.h <<\_ACEOF
12567 #define HAVE_RANDR_12 1
12568 _ACEOF
12569
12570     fi
12571 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
12572 #                  [true], $SAVER_LIBS)
12573   fi
12574
12575
12576 elif test "$with_randr" != no; then
12577   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12578   exit 1
12579 fi
12580
12581
12582 ###############################################################################
12583 #
12584 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12585 #       using other XF86 stuff.)
12586 #
12587 ###############################################################################
12588
12589 have_xf86miscsetgrabkeysstate=no
12590 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12591
12592   ac_save_CPPFLAGS="$CPPFLAGS"
12593   ac_save_LDFLAGS="$LDFLAGS"
12594 #  ac_save_LIBS="$LIBS"
12595
12596   if test \! -z "$includedir" ; then
12597     CPPFLAGS="$CPPFLAGS -I$includedir"
12598   fi
12599   # note: $X_CFLAGS includes $x_includes
12600   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12601
12602   if test \! -z "$libdir" ; then
12603     LDFLAGS="$LDFLAGS -L$libdir"
12604   fi
12605   # note: $X_LIBS includes $x_libraries
12606   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12607
12608   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12609   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12610   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12611 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12612 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12613   echo $ECHO_N "(cached) $ECHO_C" >&6
12614 else
12615   ac_check_lib_save_LIBS=$LIBS
12616 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12617 cat >conftest.$ac_ext <<_ACEOF
12618 /* confdefs.h.  */
12619 _ACEOF
12620 cat confdefs.h >>conftest.$ac_ext
12621 cat >>conftest.$ac_ext <<_ACEOF
12622 /* end confdefs.h.  */
12623
12624 /* Override any GCC internal prototype to avoid an error.
12625    Use char because int might match the return type of a GCC
12626    builtin and then its argument prototype would still apply.  */
12627 #ifdef __cplusplus
12628 extern "C"
12629 #endif
12630 char XF86MiscSetGrabKeysState ();
12631 int
12632 main ()
12633 {
12634 return XF86MiscSetGrabKeysState ();
12635   ;
12636   return 0;
12637 }
12638 _ACEOF
12639 rm -f conftest.$ac_objext conftest$ac_exeext
12640 if { (ac_try="$ac_link"
12641 case "(($ac_try" in
12642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643   *) ac_try_echo=$ac_try;;
12644 esac
12645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12646   (eval "$ac_link") 2>conftest.er1
12647   ac_status=$?
12648   grep -v '^ *+' conftest.er1 >conftest.err
12649   rm -f conftest.er1
12650   cat conftest.err >&5
12651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652   (exit $ac_status); } && {
12653          test -z "$ac_c_werror_flag" ||
12654          test ! -s conftest.err
12655        } && test -s conftest$ac_exeext &&
12656        $as_test_x conftest$ac_exeext; then
12657   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12658 else
12659   echo "$as_me: failed program was:" >&5
12660 sed 's/^/| /' conftest.$ac_ext >&5
12661
12662         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12663 fi
12664
12665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12666       conftest$ac_exeext conftest.$ac_ext
12667 LIBS=$ac_check_lib_save_LIBS
12668 fi
12669 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12670 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12671 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12672   have_xf86miscsetgrabkeysstate=yes
12673 else
12674   true
12675 fi
12676
12677   CPPFLAGS="$ac_save_CPPFLAGS"
12678   LDFLAGS="$ac_save_LDFLAGS"
12679 #  LIBS="$ac_save_LIBS"
12680
12681   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12682     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12683     cat >>confdefs.h <<\_ACEOF
12684 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12685 _ACEOF
12686
12687   fi
12688 fi
12689
12690
12691 ###############################################################################
12692 #
12693 #       Check for HP XHPDisableReset and XHPEnableReset.
12694 #
12695 ###############################################################################
12696
12697 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12698 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12699
12700   ac_save_CPPFLAGS="$CPPFLAGS"
12701   if test \! -z "$includedir" ; then
12702     CPPFLAGS="$CPPFLAGS -I$includedir"
12703   fi
12704   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12705   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12706   cat >conftest.$ac_ext <<_ACEOF
12707 /* confdefs.h.  */
12708 _ACEOF
12709 cat confdefs.h >>conftest.$ac_ext
12710 cat >>conftest.$ac_ext <<_ACEOF
12711 /* end confdefs.h.  */
12712 #include <X11/XHPlib.h>
12713
12714 _ACEOF
12715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12716   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12717   cat >>confdefs.h <<\_ACEOF
12718 #define HAVE_XHPDISABLERESET 1
12719 _ACEOF
12720
12721                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12722                    { echo "$as_me:$LINENO: result: yes" >&5
12723 echo "${ECHO_T}yes" >&6; }
12724 else
12725   { echo "$as_me:$LINENO: result: no" >&5
12726 echo "${ECHO_T}no" >&6; }
12727 fi
12728 rm -f conftest*
12729
12730   CPPFLAGS="$ac_save_CPPFLAGS"
12731
12732
12733 ###############################################################################
12734 #
12735 #       Check for /proc/interrupts.
12736 #
12737 ###############################################################################
12738
12739 have_proc_interrupts=no
12740 with_proc_interrupts_req=unspecified
12741
12742 # Check whether --with-proc-interrupts was given.
12743 if test "${with_proc_interrupts+set}" = set; then
12744   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12745 else
12746   with_proc_interrupts=yes
12747 fi
12748
12749
12750 if test "$with_proc_interrupts" = yes; then
12751
12752   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12753   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12754   # check that it has the bits we need, but otherwise we'll just go on faith.
12755   #
12756   have_proc_interrupts=yes
12757
12758   if test -f /proc/interrupts; then
12759    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12760 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12761 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12762   echo $ECHO_N "(cached) $ECHO_C" >&6
12763 else
12764   ac_cv_have_proc_interrupts=no
12765      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12766        ac_cv_have_proc_interrupts=yes
12767      fi
12768
12769 fi
12770 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12771 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12772    have_proc_interrupts=$ac_cv_have_proc_interrupts
12773   fi
12774
12775   if test "$have_proc_interrupts" = yes; then
12776     cat >>confdefs.h <<\_ACEOF
12777 #define HAVE_PROC_INTERRUPTS 1
12778 _ACEOF
12779
12780   fi
12781
12782 elif test "$with_proc_interrupts" != no; then
12783   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12784   exit 1
12785 fi
12786
12787
12788 ###############################################################################
12789 #
12790 #       The --enable-locking option
12791 #
12792 ###############################################################################
12793
12794 # Check whether --enable-locking was given.
12795 if test "${enable_locking+set}" = set; then
12796   enableval=$enable_locking; enable_locking="$enableval"
12797 else
12798   if test "$ac_macosx" = yes; then
12799     # We can't lock on MacOS X, so default to not compiling in support for it.
12800     # But allow --enable-locking to override that, so I can debug Linux locking
12801     # under MacOS X11.
12802     enable_locking=no
12803    else
12804     enable_locking=yes
12805    fi
12806 fi
12807
12808 if test "$enable_locking" = yes; then
12809   true
12810 elif test "$enable_locking" = no; then
12811   cat >>confdefs.h <<\_ACEOF
12812 #define NO_LOCKING 1
12813 _ACEOF
12814
12815 else
12816   echo "error: must be yes or no: --enable-locking=$enable_locking"
12817   exit 1
12818 fi
12819
12820
12821 ###############################################################################
12822 #
12823 #       Whether to allow root password to unblank.
12824 #
12825 ###############################################################################
12826 # Check whether --enable-root-passwd was given.
12827 if test "${enable_root_passwd+set}" = set; then
12828   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12829 else
12830   enable_root_passwd=yes
12831 fi
12832
12833 if test "$enable_root_passwd" = yes; then
12834   cat >>confdefs.h <<\_ACEOF
12835 #define ALLOW_ROOT_PASSWD 1
12836 _ACEOF
12837
12838   true
12839 elif test "$enable_root_passwd" != no; then
12840   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12841   exit 1
12842 fi
12843
12844 ###############################################################################
12845 #
12846 #       Check for PAM.
12847 #
12848 ###############################################################################
12849
12850 case "$host" in
12851   *-solaris*)
12852    # Solaris systems tend to come with PAM misconfigured.
12853    #  Don't build it by default, even if the headers exist.
12854    with_pam_default=no
12855    ;;
12856   *)
12857    # Default to building PAM support on all other systems, if it exists.
12858    with_pam_default=yes
12859   ;;
12860 esac
12861
12862 have_pam=no
12863 with_pam_req=unspecified
12864
12865
12866 # Check whether --with-pam was given.
12867 if test "${with_pam+set}" = set; then
12868   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12869 else
12870   with_pam=$with_pam_default
12871 fi
12872
12873
12874
12875 # Check whether --with-pam_service_name was given.
12876 if test "${with_pam_service_name+set}" = set; then
12877   withval=$with_pam_service_name; pam_service_name="$withval"
12878 else
12879   pam_service_name="xscreensaver"
12880 fi
12881
12882
12883
12884    case "$with_pam" in
12885     yes) ;;
12886     no)  ;;
12887
12888     /*)
12889      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12890 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12891      d=$with_pam/include
12892      if test -d $d; then
12893        X_CFLAGS="-I$d $X_CFLAGS"
12894        { echo "$as_me:$LINENO: result: $d" >&5
12895 echo "${ECHO_T}$d" >&6; }
12896      else
12897        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12898 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12899      fi
12900
12901      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12902 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12903      d=$with_pam/lib
12904      if test -d $d; then
12905        X_LIBS="-L$d $X_LIBS"
12906        { echo "$as_me:$LINENO: result: $d" >&5
12907 echo "${ECHO_T}$d" >&6; }
12908      else
12909        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12910 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12911      fi
12912
12913      # replace the directory string with "yes".
12914      with_pam_req="yes"
12915      with_pam=$with_pam_req
12916      ;;
12917
12918     *)
12919      echo ""
12920      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12921      echo "       If it is a directory, then \`DIR/include' will be added to"
12922      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12923      exit 1
12924      ;;
12925    esac
12926
12927
12928 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12929   { echo "$as_me:$LINENO: checking for PAM" >&5
12930 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12931 if test "${ac_cv_pam+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934
12935   ac_save_CPPFLAGS="$CPPFLAGS"
12936   if test \! -z "$includedir" ; then
12937     CPPFLAGS="$CPPFLAGS -I$includedir"
12938   fi
12939   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12940   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12941   cat >conftest.$ac_ext <<_ACEOF
12942 /* confdefs.h.  */
12943 _ACEOF
12944 cat confdefs.h >>conftest.$ac_ext
12945 cat >>conftest.$ac_ext <<_ACEOF
12946 /* end confdefs.h.  */
12947 #include <security/pam_appl.h>
12948 int
12949 main ()
12950 {
12951
12952   ;
12953   return 0;
12954 }
12955 _ACEOF
12956 rm -f conftest.$ac_objext
12957 if { (ac_try="$ac_compile"
12958 case "(($ac_try" in
12959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12960   *) ac_try_echo=$ac_try;;
12961 esac
12962 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12963   (eval "$ac_compile") 2>conftest.er1
12964   ac_status=$?
12965   grep -v '^ *+' conftest.er1 >conftest.err
12966   rm -f conftest.er1
12967   cat conftest.err >&5
12968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969   (exit $ac_status); } && {
12970          test -z "$ac_c_werror_flag" ||
12971          test ! -s conftest.err
12972        } && test -s conftest.$ac_objext; then
12973   ac_cv_pam=yes
12974 else
12975   echo "$as_me: failed program was:" >&5
12976 sed 's/^/| /' conftest.$ac_ext >&5
12977
12978         ac_cv_pam=no
12979 fi
12980
12981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12982   CPPFLAGS="$ac_save_CPPFLAGS"
12983 fi
12984 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12985 echo "${ECHO_T}$ac_cv_pam" >&6; }
12986   if test "$ac_cv_pam" = yes ; then
12987     have_pam=yes
12988     cat >>confdefs.h <<\_ACEOF
12989 #define HAVE_PAM 1
12990 _ACEOF
12991
12992     cat >>confdefs.h <<_ACEOF
12993 #define PAM_SERVICE_NAME "$pam_service_name"
12994 _ACEOF
12995
12996
12997     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12998
12999     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13000     # those are in libc.  On Linux and Solaris, they're in libdl.
13001     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13002 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13003 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13004   echo $ECHO_N "(cached) $ECHO_C" >&6
13005 else
13006   ac_check_lib_save_LIBS=$LIBS
13007 LIBS="-ldl  $LIBS"
13008 cat >conftest.$ac_ext <<_ACEOF
13009 /* confdefs.h.  */
13010 _ACEOF
13011 cat confdefs.h >>conftest.$ac_ext
13012 cat >>conftest.$ac_ext <<_ACEOF
13013 /* end confdefs.h.  */
13014
13015 /* Override any GCC internal prototype to avoid an error.
13016    Use char because int might match the return type of a GCC
13017    builtin and then its argument prototype would still apply.  */
13018 #ifdef __cplusplus
13019 extern "C"
13020 #endif
13021 char dlopen ();
13022 int
13023 main ()
13024 {
13025 return dlopen ();
13026   ;
13027   return 0;
13028 }
13029 _ACEOF
13030 rm -f conftest.$ac_objext conftest$ac_exeext
13031 if { (ac_try="$ac_link"
13032 case "(($ac_try" in
13033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13034   *) ac_try_echo=$ac_try;;
13035 esac
13036 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13037   (eval "$ac_link") 2>conftest.er1
13038   ac_status=$?
13039   grep -v '^ *+' conftest.er1 >conftest.err
13040   rm -f conftest.er1
13041   cat conftest.err >&5
13042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043   (exit $ac_status); } && {
13044          test -z "$ac_c_werror_flag" ||
13045          test ! -s conftest.err
13046        } && test -s conftest$ac_exeext &&
13047        $as_test_x conftest$ac_exeext; then
13048   ac_cv_lib_dl_dlopen=yes
13049 else
13050   echo "$as_me: failed program was:" >&5
13051 sed 's/^/| /' conftest.$ac_ext >&5
13052
13053         ac_cv_lib_dl_dlopen=no
13054 fi
13055
13056 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13057       conftest$ac_exeext conftest.$ac_ext
13058 LIBS=$ac_check_lib_save_LIBS
13059 fi
13060 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13061 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13062 if test $ac_cv_lib_dl_dlopen = yes; then
13063   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13064 fi
13065
13066
13067     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13068     have_timedwait=no
13069     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13070 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13071 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13072   echo $ECHO_N "(cached) $ECHO_C" >&6
13073 else
13074   ac_check_lib_save_LIBS=$LIBS
13075 LIBS="-lc  $LIBS"
13076 cat >conftest.$ac_ext <<_ACEOF
13077 /* confdefs.h.  */
13078 _ACEOF
13079 cat confdefs.h >>conftest.$ac_ext
13080 cat >>conftest.$ac_ext <<_ACEOF
13081 /* end confdefs.h.  */
13082
13083 /* Override any GCC internal prototype to avoid an error.
13084    Use char because int might match the return type of a GCC
13085    builtin and then its argument prototype would still apply.  */
13086 #ifdef __cplusplus
13087 extern "C"
13088 #endif
13089 char sigtimedwait ();
13090 int
13091 main ()
13092 {
13093 return sigtimedwait ();
13094   ;
13095   return 0;
13096 }
13097 _ACEOF
13098 rm -f conftest.$ac_objext conftest$ac_exeext
13099 if { (ac_try="$ac_link"
13100 case "(($ac_try" in
13101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13102   *) ac_try_echo=$ac_try;;
13103 esac
13104 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13105   (eval "$ac_link") 2>conftest.er1
13106   ac_status=$?
13107   grep -v '^ *+' conftest.er1 >conftest.err
13108   rm -f conftest.er1
13109   cat conftest.err >&5
13110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111   (exit $ac_status); } && {
13112          test -z "$ac_c_werror_flag" ||
13113          test ! -s conftest.err
13114        } && test -s conftest$ac_exeext &&
13115        $as_test_x conftest$ac_exeext; then
13116   ac_cv_lib_c_sigtimedwait=yes
13117 else
13118   echo "$as_me: failed program was:" >&5
13119 sed 's/^/| /' conftest.$ac_ext >&5
13120
13121         ac_cv_lib_c_sigtimedwait=no
13122 fi
13123
13124 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13125       conftest$ac_exeext conftest.$ac_ext
13126 LIBS=$ac_check_lib_save_LIBS
13127 fi
13128 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13129 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13130 if test $ac_cv_lib_c_sigtimedwait = yes; then
13131   have_timedwait=yes
13132                   cat >>confdefs.h <<\_ACEOF
13133 #define HAVE_SIGTIMEDWAIT 1
13134 _ACEOF
13135
13136 fi
13137
13138     if test "$have_timedwait" = no ; then
13139       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13140 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13141 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13142   echo $ECHO_N "(cached) $ECHO_C" >&6
13143 else
13144   ac_check_lib_save_LIBS=$LIBS
13145 LIBS="-lrt  $LIBS"
13146 cat >conftest.$ac_ext <<_ACEOF
13147 /* confdefs.h.  */
13148 _ACEOF
13149 cat confdefs.h >>conftest.$ac_ext
13150 cat >>conftest.$ac_ext <<_ACEOF
13151 /* end confdefs.h.  */
13152
13153 /* Override any GCC internal prototype to avoid an error.
13154    Use char because int might match the return type of a GCC
13155    builtin and then its argument prototype would still apply.  */
13156 #ifdef __cplusplus
13157 extern "C"
13158 #endif
13159 char sigtimedwait ();
13160 int
13161 main ()
13162 {
13163 return sigtimedwait ();
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext conftest$ac_exeext
13169 if { (ac_try="$ac_link"
13170 case "(($ac_try" in
13171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13172   *) ac_try_echo=$ac_try;;
13173 esac
13174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13175   (eval "$ac_link") 2>conftest.er1
13176   ac_status=$?
13177   grep -v '^ *+' conftest.er1 >conftest.err
13178   rm -f conftest.er1
13179   cat conftest.err >&5
13180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181   (exit $ac_status); } && {
13182          test -z "$ac_c_werror_flag" ||
13183          test ! -s conftest.err
13184        } && test -s conftest$ac_exeext &&
13185        $as_test_x conftest$ac_exeext; then
13186   ac_cv_lib_rt_sigtimedwait=yes
13187 else
13188   echo "$as_me: failed program was:" >&5
13189 sed 's/^/| /' conftest.$ac_ext >&5
13190
13191         ac_cv_lib_rt_sigtimedwait=no
13192 fi
13193
13194 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13195       conftest$ac_exeext conftest.$ac_ext
13196 LIBS=$ac_check_lib_save_LIBS
13197 fi
13198 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13199 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13200 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13201   have_timedwait=yes
13202                                       cat >>confdefs.h <<\_ACEOF
13203 #define HAVE_SIGTIMEDWAIT 1
13204 _ACEOF
13205
13206                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13207 fi
13208
13209     fi
13210
13211     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13212 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13213     if test "${ac_cv_pam_strerror_args+set}" = set; then
13214   echo $ECHO_N "(cached) $ECHO_C" >&6
13215 else
13216
13217   ac_save_CPPFLAGS="$CPPFLAGS"
13218   if test \! -z "$includedir" ; then
13219     CPPFLAGS="$CPPFLAGS -I$includedir"
13220   fi
13221   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13222   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13223   cat >conftest.$ac_ext <<_ACEOF
13224 /* confdefs.h.  */
13225 _ACEOF
13226 cat confdefs.h >>conftest.$ac_ext
13227 cat >>conftest.$ac_ext <<_ACEOF
13228 /* end confdefs.h.  */
13229 #include <stdio.h>
13230                         #include <stdlib.h>
13231                         #include <security/pam_appl.h>
13232 int
13233 main ()
13234 {
13235 pam_handle_t *pamh = 0;
13236                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13237   ;
13238   return 0;
13239 }
13240 _ACEOF
13241 rm -f conftest.$ac_objext
13242 if { (ac_try="$ac_compile"
13243 case "(($ac_try" in
13244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13245   *) ac_try_echo=$ac_try;;
13246 esac
13247 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13248   (eval "$ac_compile") 2>conftest.er1
13249   ac_status=$?
13250   grep -v '^ *+' conftest.er1 >conftest.err
13251   rm -f conftest.er1
13252   cat conftest.err >&5
13253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13254   (exit $ac_status); } && {
13255          test -z "$ac_c_werror_flag" ||
13256          test ! -s conftest.err
13257        } && test -s conftest.$ac_objext; then
13258   ac_pam_strerror_args=2
13259 else
13260   echo "$as_me: failed program was:" >&5
13261 sed 's/^/| /' conftest.$ac_ext >&5
13262
13263
13264   ac_save_CPPFLAGS="$CPPFLAGS"
13265   if test \! -z "$includedir" ; then
13266     CPPFLAGS="$CPPFLAGS -I$includedir"
13267   fi
13268   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13269   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13270   cat >conftest.$ac_ext <<_ACEOF
13271 /* confdefs.h.  */
13272 _ACEOF
13273 cat confdefs.h >>conftest.$ac_ext
13274 cat >>conftest.$ac_ext <<_ACEOF
13275 /* end confdefs.h.  */
13276 #include <stdio.h>
13277                                           #include <stdlib.h>
13278                                           #include <security/pam_appl.h>
13279 int
13280 main ()
13281 {
13282 char *s =
13283                                            pam_strerror(PAM_SUCCESS);
13284   ;
13285   return 0;
13286 }
13287 _ACEOF
13288 rm -f conftest.$ac_objext
13289 if { (ac_try="$ac_compile"
13290 case "(($ac_try" in
13291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13292   *) ac_try_echo=$ac_try;;
13293 esac
13294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13295   (eval "$ac_compile") 2>conftest.er1
13296   ac_status=$?
13297   grep -v '^ *+' conftest.er1 >conftest.err
13298   rm -f conftest.er1
13299   cat conftest.err >&5
13300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13301   (exit $ac_status); } && {
13302          test -z "$ac_c_werror_flag" ||
13303          test ! -s conftest.err
13304        } && test -s conftest.$ac_objext; then
13305   ac_pam_strerror_args=1
13306 else
13307   echo "$as_me: failed program was:" >&5
13308 sed 's/^/| /' conftest.$ac_ext >&5
13309
13310         ac_pam_strerror_args=0
13311 fi
13312
13313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13314   CPPFLAGS="$ac_save_CPPFLAGS"
13315 fi
13316
13317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318   CPPFLAGS="$ac_save_CPPFLAGS"
13319       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13320 fi
13321
13322     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13323     if test "$ac_pam_strerror_args" = 1 ; then
13324       { echo "$as_me:$LINENO: result: one argument" >&5
13325 echo "${ECHO_T}one argument" >&6; }
13326     elif test "$ac_pam_strerror_args" = 2 ; then
13327       cat >>confdefs.h <<\_ACEOF
13328 #define PAM_STRERROR_TWO_ARGS 1
13329 _ACEOF
13330
13331       { echo "$as_me:$LINENO: result: two arguments" >&5
13332 echo "${ECHO_T}two arguments" >&6; }
13333     else
13334       { echo "$as_me:$LINENO: result: unknown" >&5
13335 echo "${ECHO_T}unknown" >&6; }
13336     fi
13337
13338 # Check pam_fail_delay
13339     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13340 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13341     if test "${ac_cv_pam_fail_delay+set}" = set; then
13342   echo $ECHO_N "(cached) $ECHO_C" >&6
13343 else
13344   ac_save_LDFLAGS="$LDFLAGS"
13345       LDFLAGS="-lpam"
13346       cat >conftest.$ac_ext <<_ACEOF
13347 /* confdefs.h.  */
13348 _ACEOF
13349 cat confdefs.h >>conftest.$ac_ext
13350 cat >>conftest.$ac_ext <<_ACEOF
13351 /* end confdefs.h.  */
13352 #include <security/pam_appl.h>
13353 int
13354 main ()
13355 {
13356 pam_handle_t *pamh = 0;
13357                    unsigned int usec = 1;
13358                    int status = pam_fail_delay (pamh, usec);
13359   ;
13360   return 0;
13361 }
13362 _ACEOF
13363 rm -f conftest.$ac_objext conftest$ac_exeext
13364 if { (ac_try="$ac_link"
13365 case "(($ac_try" in
13366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13367   *) ac_try_echo=$ac_try;;
13368 esac
13369 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13370   (eval "$ac_link") 2>conftest.er1
13371   ac_status=$?
13372   grep -v '^ *+' conftest.er1 >conftest.err
13373   rm -f conftest.er1
13374   cat conftest.err >&5
13375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376   (exit $ac_status); } && {
13377          test -z "$ac_c_werror_flag" ||
13378          test ! -s conftest.err
13379        } && test -s conftest$ac_exeext &&
13380        $as_test_x conftest$ac_exeext; then
13381   ac_pam_fail_delay=yes
13382 else
13383   echo "$as_me: failed program was:" >&5
13384 sed 's/^/| /' conftest.$ac_ext >&5
13385
13386         ac_pam_fail_delay=no
13387 fi
13388
13389 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13390       conftest$ac_exeext conftest.$ac_ext
13391       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13392       LDFLAGS=$ac_save_LDFLAGS
13393 fi
13394
13395
13396       if test "$ac_pam_fail_delay" = yes ; then
13397         { echo "$as_me:$LINENO: result: yes" >&5
13398 echo "${ECHO_T}yes" >&6; }
13399         cat >>confdefs.h <<\_ACEOF
13400 #define HAVE_PAM_FAIL_DELAY 1
13401 _ACEOF
13402
13403       else
13404         { echo "$as_me:$LINENO: result: no" >&5
13405 echo "${ECHO_T}no" >&6; }
13406       fi
13407
13408   fi
13409 fi
13410
13411
13412 ###############################################################################
13413 #
13414 #       Check for Kerberos.
13415 #
13416 ###############################################################################
13417
13418 have_kerberos=no
13419 have_kerberos5=no
13420 with_kerberos_req=unspecified
13421
13422
13423 # Check whether --with-kerberos was given.
13424 if test "${with_kerberos+set}" = set; then
13425   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13426 else
13427   with_kerberos=yes
13428 fi
13429
13430
13431
13432    case "$with_kerberos" in
13433     yes) ;;
13434     no)  ;;
13435
13436     /*)
13437      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13438 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13439      d=$with_kerberos/include
13440      if test -d $d; then
13441        X_CFLAGS="-I$d $X_CFLAGS"
13442        { echo "$as_me:$LINENO: result: $d" >&5
13443 echo "${ECHO_T}$d" >&6; }
13444      else
13445        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13446 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13447      fi
13448
13449      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13450 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13451      d=$with_kerberos/lib
13452      if test -d $d; then
13453        X_LIBS="-L$d $X_LIBS"
13454        { echo "$as_me:$LINENO: result: $d" >&5
13455 echo "${ECHO_T}$d" >&6; }
13456      else
13457        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13458 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13459      fi
13460
13461      # replace the directory string with "yes".
13462      with_kerberos_req="yes"
13463      with_kerberos=$with_kerberos_req
13464      ;;
13465
13466     *)
13467      echo ""
13468      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13469      echo "       If it is a directory, then \`DIR/include' will be added to"
13470      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13471      exit 1
13472      ;;
13473    esac
13474
13475
13476 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13477   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13478 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13479 if test "${ac_cv_kerberos+set}" = set; then
13480   echo $ECHO_N "(cached) $ECHO_C" >&6
13481 else
13482
13483   ac_save_CPPFLAGS="$CPPFLAGS"
13484   if test \! -z "$includedir" ; then
13485     CPPFLAGS="$CPPFLAGS -I$includedir"
13486   fi
13487   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13488   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13489   cat >conftest.$ac_ext <<_ACEOF
13490 /* confdefs.h.  */
13491 _ACEOF
13492 cat confdefs.h >>conftest.$ac_ext
13493 cat >>conftest.$ac_ext <<_ACEOF
13494 /* end confdefs.h.  */
13495 #include <krb.h>
13496 int
13497 main ()
13498 {
13499
13500   ;
13501   return 0;
13502 }
13503 _ACEOF
13504 rm -f conftest.$ac_objext
13505 if { (ac_try="$ac_compile"
13506 case "(($ac_try" in
13507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13508   *) ac_try_echo=$ac_try;;
13509 esac
13510 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13511   (eval "$ac_compile") 2>conftest.er1
13512   ac_status=$?
13513   grep -v '^ *+' conftest.er1 >conftest.err
13514   rm -f conftest.er1
13515   cat conftest.err >&5
13516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517   (exit $ac_status); } && {
13518          test -z "$ac_c_werror_flag" ||
13519          test ! -s conftest.err
13520        } && test -s conftest.$ac_objext; then
13521   ac_cv_kerberos=yes
13522 else
13523   echo "$as_me: failed program was:" >&5
13524 sed 's/^/| /' conftest.$ac_ext >&5
13525
13526         ac_cv_kerberos=no
13527 fi
13528
13529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530   CPPFLAGS="$ac_save_CPPFLAGS"
13531 fi
13532 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13533 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13534   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13535 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13536 if test "${ac_cv_kerberos5+set}" = set; then
13537   echo $ECHO_N "(cached) $ECHO_C" >&6
13538 else
13539
13540   ac_save_CPPFLAGS="$CPPFLAGS"
13541   if test \! -z "$includedir" ; then
13542     CPPFLAGS="$CPPFLAGS -I$includedir"
13543   fi
13544   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13545   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13546   cat >conftest.$ac_ext <<_ACEOF
13547 /* confdefs.h.  */
13548 _ACEOF
13549 cat confdefs.h >>conftest.$ac_ext
13550 cat >>conftest.$ac_ext <<_ACEOF
13551 /* end confdefs.h.  */
13552 #include <kerberosIV/krb.h>
13553 int
13554 main ()
13555 {
13556
13557   ;
13558   return 0;
13559 }
13560 _ACEOF
13561 rm -f conftest.$ac_objext
13562 if { (ac_try="$ac_compile"
13563 case "(($ac_try" in
13564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13565   *) ac_try_echo=$ac_try;;
13566 esac
13567 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13568   (eval "$ac_compile") 2>conftest.er1
13569   ac_status=$?
13570   grep -v '^ *+' conftest.er1 >conftest.err
13571   rm -f conftest.er1
13572   cat conftest.err >&5
13573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574   (exit $ac_status); } && {
13575          test -z "$ac_c_werror_flag" ||
13576          test ! -s conftest.err
13577        } && test -s conftest.$ac_objext; then
13578   ac_cv_kerberos5=yes
13579 else
13580   echo "$as_me: failed program was:" >&5
13581 sed 's/^/| /' conftest.$ac_ext >&5
13582
13583         ac_cv_kerberos5=no
13584 fi
13585
13586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13587   CPPFLAGS="$ac_save_CPPFLAGS"
13588 fi
13589 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13590 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13591
13592   if test "$ac_cv_kerberos" = yes ; then
13593     have_kerberos=yes
13594     cat >>confdefs.h <<\_ACEOF
13595 #define HAVE_KERBEROS 1
13596 _ACEOF
13597
13598   fi
13599
13600   if test "$ac_cv_kerberos5" = yes ; then
13601
13602     # Andrew Snare <ajs@pigpond.com> wrote:
13603     #
13604     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13605     # (krb4) was also available.  This turns out not to be the case with
13606     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13607     # is optional.
13608     #
13609     # So, disable kerberosV support if libkrb4 can't be found.
13610     # This is not the best solution, but it makes the compile not fail.
13611     #
13612
13613   ac_save_CPPFLAGS="$CPPFLAGS"
13614   ac_save_LDFLAGS="$LDFLAGS"
13615 #  ac_save_LIBS="$LIBS"
13616
13617   if test \! -z "$includedir" ; then
13618     CPPFLAGS="$CPPFLAGS -I$includedir"
13619   fi
13620   # note: $X_CFLAGS includes $x_includes
13621   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13622
13623   if test \! -z "$libdir" ; then
13624     LDFLAGS="$LDFLAGS -L$libdir"
13625   fi
13626   # note: $X_LIBS includes $x_libraries
13627   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13628
13629   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13630   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13631   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13632 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13633 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13634   echo $ECHO_N "(cached) $ECHO_C" >&6
13635 else
13636   ac_check_lib_save_LIBS=$LIBS
13637 LIBS="-lkrb4  $LIBS"
13638 cat >conftest.$ac_ext <<_ACEOF
13639 /* confdefs.h.  */
13640 _ACEOF
13641 cat confdefs.h >>conftest.$ac_ext
13642 cat >>conftest.$ac_ext <<_ACEOF
13643 /* end confdefs.h.  */
13644
13645 /* Override any GCC internal prototype to avoid an error.
13646    Use char because int might match the return type of a GCC
13647    builtin and then its argument prototype would still apply.  */
13648 #ifdef __cplusplus
13649 extern "C"
13650 #endif
13651 char krb_get_tf_realm ();
13652 int
13653 main ()
13654 {
13655 return krb_get_tf_realm ();
13656   ;
13657   return 0;
13658 }
13659 _ACEOF
13660 rm -f conftest.$ac_objext conftest$ac_exeext
13661 if { (ac_try="$ac_link"
13662 case "(($ac_try" in
13663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13664   *) ac_try_echo=$ac_try;;
13665 esac
13666 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13667   (eval "$ac_link") 2>conftest.er1
13668   ac_status=$?
13669   grep -v '^ *+' conftest.er1 >conftest.err
13670   rm -f conftest.er1
13671   cat conftest.err >&5
13672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673   (exit $ac_status); } && {
13674          test -z "$ac_c_werror_flag" ||
13675          test ! -s conftest.err
13676        } && test -s conftest$ac_exeext &&
13677        $as_test_x conftest$ac_exeext; then
13678   ac_cv_lib_krb4_krb_get_tf_realm=yes
13679 else
13680   echo "$as_me: failed program was:" >&5
13681 sed 's/^/| /' conftest.$ac_ext >&5
13682
13683         ac_cv_lib_krb4_krb_get_tf_realm=no
13684 fi
13685
13686 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13687       conftest$ac_exeext conftest.$ac_ext
13688 LIBS=$ac_check_lib_save_LIBS
13689 fi
13690 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13691 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13692 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13693   have_kerberos=yes
13694 else
13695   have_kerberos=no
13696 fi
13697
13698   CPPFLAGS="$ac_save_CPPFLAGS"
13699   LDFLAGS="$ac_save_LDFLAGS"
13700 #  LIBS="$ac_save_LIBS"
13701
13702     if test "$have_kerberos" = yes ; then
13703       have_kerberos5=yes
13704       cat >>confdefs.h <<\_ACEOF
13705 #define HAVE_KERBEROS 1
13706 _ACEOF
13707
13708       cat >>confdefs.h <<\_ACEOF
13709 #define HAVE_KERBEROS5 1
13710 _ACEOF
13711
13712     else
13713       have_kerberos5=no
13714       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13715 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13716     fi
13717
13718   fi
13719
13720   if test "$have_kerberos5" = yes ; then
13721     # from Matt Knopp <mhat@infocalypse.netlag.com>
13722     # (who got it from amu@mit.edu)
13723
13724     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13725
13726     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13727
13728   ac_save_CPPFLAGS="$CPPFLAGS"
13729   ac_save_LDFLAGS="$LDFLAGS"
13730 #  ac_save_LIBS="$LIBS"
13731
13732   if test \! -z "$includedir" ; then
13733     CPPFLAGS="$CPPFLAGS -I$includedir"
13734   fi
13735   # note: $X_CFLAGS includes $x_includes
13736   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13737
13738   if test \! -z "$libdir" ; then
13739     LDFLAGS="$LDFLAGS -L$libdir"
13740   fi
13741   # note: $X_LIBS includes $x_libraries
13742   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13743
13744   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13745   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13746   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13747 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13748 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13749   echo $ECHO_N "(cached) $ECHO_C" >&6
13750 else
13751   ac_check_lib_save_LIBS=$LIBS
13752 LIBS="-lcrypt  $LIBS"
13753 cat >conftest.$ac_ext <<_ACEOF
13754 /* confdefs.h.  */
13755 _ACEOF
13756 cat confdefs.h >>conftest.$ac_ext
13757 cat >>conftest.$ac_ext <<_ACEOF
13758 /* end confdefs.h.  */
13759
13760 /* Override any GCC internal prototype to avoid an error.
13761    Use char because int might match the return type of a GCC
13762    builtin and then its argument prototype would still apply.  */
13763 #ifdef __cplusplus
13764 extern "C"
13765 #endif
13766 char crypt ();
13767 int
13768 main ()
13769 {
13770 return crypt ();
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 rm -f conftest.$ac_objext conftest$ac_exeext
13776 if { (ac_try="$ac_link"
13777 case "(($ac_try" in
13778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13779   *) ac_try_echo=$ac_try;;
13780 esac
13781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13782   (eval "$ac_link") 2>conftest.er1
13783   ac_status=$?
13784   grep -v '^ *+' conftest.er1 >conftest.err
13785   rm -f conftest.er1
13786   cat conftest.err >&5
13787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788   (exit $ac_status); } && {
13789          test -z "$ac_c_werror_flag" ||
13790          test ! -s conftest.err
13791        } && test -s conftest$ac_exeext &&
13792        $as_test_x conftest$ac_exeext; then
13793   ac_cv_lib_crypt_crypt=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 sed 's/^/| /' conftest.$ac_ext >&5
13797
13798         ac_cv_lib_crypt_crypt=no
13799 fi
13800
13801 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13802       conftest$ac_exeext conftest.$ac_ext
13803 LIBS=$ac_check_lib_save_LIBS
13804 fi
13805 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13806 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13807 if test $ac_cv_lib_crypt_crypt = yes; then
13808   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13809 fi
13810
13811   CPPFLAGS="$ac_save_CPPFLAGS"
13812   LDFLAGS="$ac_save_LDFLAGS"
13813 #  LIBS="$ac_save_LIBS"
13814
13815
13816   elif test "$have_kerberos" = yes ; then
13817     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13818     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13819   fi
13820
13821   if test "$have_kerberos" = yes ; then
13822     { echo "$as_me:$LINENO: checking for res_search" >&5
13823 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13824 if test "${ac_cv_func_res_search+set}" = set; then
13825   echo $ECHO_N "(cached) $ECHO_C" >&6
13826 else
13827   cat >conftest.$ac_ext <<_ACEOF
13828 /* confdefs.h.  */
13829 _ACEOF
13830 cat confdefs.h >>conftest.$ac_ext
13831 cat >>conftest.$ac_ext <<_ACEOF
13832 /* end confdefs.h.  */
13833 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13834    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13835 #define res_search innocuous_res_search
13836
13837 /* System header to define __stub macros and hopefully few prototypes,
13838     which can conflict with char res_search (); below.
13839     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13840     <limits.h> exists even on freestanding compilers.  */
13841
13842 #ifdef __STDC__
13843 # include <limits.h>
13844 #else
13845 # include <assert.h>
13846 #endif
13847
13848 #undef res_search
13849
13850 /* Override any GCC internal prototype to avoid an error.
13851    Use char because int might match the return type of a GCC
13852    builtin and then its argument prototype would still apply.  */
13853 #ifdef __cplusplus
13854 extern "C"
13855 #endif
13856 char res_search ();
13857 /* The GNU C library defines this for functions which it implements
13858     to always fail with ENOSYS.  Some functions are actually named
13859     something starting with __ and the normal name is an alias.  */
13860 #if defined __stub_res_search || defined __stub___res_search
13861 choke me
13862 #endif
13863
13864 int
13865 main ()
13866 {
13867 return res_search ();
13868   ;
13869   return 0;
13870 }
13871 _ACEOF
13872 rm -f conftest.$ac_objext conftest$ac_exeext
13873 if { (ac_try="$ac_link"
13874 case "(($ac_try" in
13875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13876   *) ac_try_echo=$ac_try;;
13877 esac
13878 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13879   (eval "$ac_link") 2>conftest.er1
13880   ac_status=$?
13881   grep -v '^ *+' conftest.er1 >conftest.err
13882   rm -f conftest.er1
13883   cat conftest.err >&5
13884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885   (exit $ac_status); } && {
13886          test -z "$ac_c_werror_flag" ||
13887          test ! -s conftest.err
13888        } && test -s conftest$ac_exeext &&
13889        $as_test_x conftest$ac_exeext; then
13890   ac_cv_func_res_search=yes
13891 else
13892   echo "$as_me: failed program was:" >&5
13893 sed 's/^/| /' conftest.$ac_ext >&5
13894
13895         ac_cv_func_res_search=no
13896 fi
13897
13898 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13899       conftest$ac_exeext conftest.$ac_ext
13900 fi
13901 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13902 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13903 if test $ac_cv_func_res_search = yes; then
13904   :
13905 else
13906   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13907 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13908 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13909   echo $ECHO_N "(cached) $ECHO_C" >&6
13910 else
13911   ac_check_lib_save_LIBS=$LIBS
13912 LIBS="-lresolv  $LIBS"
13913 cat >conftest.$ac_ext <<_ACEOF
13914 /* confdefs.h.  */
13915 _ACEOF
13916 cat confdefs.h >>conftest.$ac_ext
13917 cat >>conftest.$ac_ext <<_ACEOF
13918 /* end confdefs.h.  */
13919
13920 /* Override any GCC internal prototype to avoid an error.
13921    Use char because int might match the return type of a GCC
13922    builtin and then its argument prototype would still apply.  */
13923 #ifdef __cplusplus
13924 extern "C"
13925 #endif
13926 char res_search ();
13927 int
13928 main ()
13929 {
13930 return res_search ();
13931   ;
13932   return 0;
13933 }
13934 _ACEOF
13935 rm -f conftest.$ac_objext conftest$ac_exeext
13936 if { (ac_try="$ac_link"
13937 case "(($ac_try" in
13938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13939   *) ac_try_echo=$ac_try;;
13940 esac
13941 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13942   (eval "$ac_link") 2>conftest.er1
13943   ac_status=$?
13944   grep -v '^ *+' conftest.er1 >conftest.err
13945   rm -f conftest.er1
13946   cat conftest.err >&5
13947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948   (exit $ac_status); } && {
13949          test -z "$ac_c_werror_flag" ||
13950          test ! -s conftest.err
13951        } && test -s conftest$ac_exeext &&
13952        $as_test_x conftest$ac_exeext; then
13953   ac_cv_lib_resolv_res_search=yes
13954 else
13955   echo "$as_me: failed program was:" >&5
13956 sed 's/^/| /' conftest.$ac_ext >&5
13957
13958         ac_cv_lib_resolv_res_search=no
13959 fi
13960
13961 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13962       conftest$ac_exeext conftest.$ac_ext
13963 LIBS=$ac_check_lib_save_LIBS
13964 fi
13965 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13966 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13967 if test $ac_cv_lib_resolv_res_search = yes; then
13968   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13969 else
13970   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13971 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13972
13973 fi
13974
13975 fi
13976
13977   fi
13978 fi
13979
13980
13981 ###############################################################################
13982 #
13983 #       Check for the nine billion variants of shadow passwords...
13984 #
13985 ###############################################################################
13986
13987 need_setuid=no
13988
13989 have_shadow=no
13990 with_shadow_req=unspecified
13991
13992
13993 # Check whether --with-shadow was given.
13994 if test "${with_shadow+set}" = set; then
13995   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13996 else
13997   with_shadow=yes
13998 fi
13999
14000
14001
14002    case "$with_shadow" in
14003     yes) ;;
14004     no)  ;;
14005
14006     /*)
14007      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14008 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14009      d=$with_shadow/include
14010      if test -d $d; then
14011        X_CFLAGS="-I$d $X_CFLAGS"
14012        { echo "$as_me:$LINENO: result: $d" >&5
14013 echo "${ECHO_T}$d" >&6; }
14014      else
14015        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14016 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14017      fi
14018
14019      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14020 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14021      d=$with_shadow/lib
14022      if test -d $d; then
14023        X_LIBS="-L$d $X_LIBS"
14024        { echo "$as_me:$LINENO: result: $d" >&5
14025 echo "${ECHO_T}$d" >&6; }
14026      else
14027        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14028 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14029      fi
14030
14031      # replace the directory string with "yes".
14032      with_shadow_req="yes"
14033      with_shadow=$with_shadow_req
14034      ;;
14035
14036     *)
14037      echo ""
14038      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14039      echo "       If it is a directory, then \`DIR/include' will be added to"
14040      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14041      exit 1
14042      ;;
14043    esac
14044
14045
14046 if test "$enable_locking" = no ; then
14047   with_shadow_req=no
14048   with_shadow=no
14049 fi
14050
14051
14052 ###############################################################################
14053 #
14054 #       Check for Sun "adjunct" passwords.
14055 #
14056 ###############################################################################
14057
14058 if test "$with_shadow" = yes ; then
14059   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14060 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14061 if test "${ac_cv_sun_adjunct+set}" = set; then
14062   echo $ECHO_N "(cached) $ECHO_C" >&6
14063 else
14064
14065   ac_save_CPPFLAGS="$CPPFLAGS"
14066   if test \! -z "$includedir" ; then
14067     CPPFLAGS="$CPPFLAGS -I$includedir"
14068   fi
14069   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14070   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14071   cat >conftest.$ac_ext <<_ACEOF
14072 /* confdefs.h.  */
14073 _ACEOF
14074 cat confdefs.h >>conftest.$ac_ext
14075 cat >>conftest.$ac_ext <<_ACEOF
14076 /* end confdefs.h.  */
14077 #include <stdlib.h>
14078                                     #include <unistd.h>
14079                                     #include <sys/types.h>
14080                                     #include <sys/label.h>
14081                                     #include <sys/audit.h>
14082                                     #include <pwdadj.h>
14083 int
14084 main ()
14085 {
14086 struct passwd_adjunct *p = getpwanam("nobody");
14087                        const char *pw = p->pwa_passwd;
14088   ;
14089   return 0;
14090 }
14091 _ACEOF
14092 rm -f conftest.$ac_objext
14093 if { (ac_try="$ac_compile"
14094 case "(($ac_try" in
14095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096   *) ac_try_echo=$ac_try;;
14097 esac
14098 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14099   (eval "$ac_compile") 2>conftest.er1
14100   ac_status=$?
14101   grep -v '^ *+' conftest.er1 >conftest.err
14102   rm -f conftest.er1
14103   cat conftest.err >&5
14104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105   (exit $ac_status); } && {
14106          test -z "$ac_c_werror_flag" ||
14107          test ! -s conftest.err
14108        } && test -s conftest.$ac_objext; then
14109   ac_cv_sun_adjunct=yes
14110 else
14111   echo "$as_me: failed program was:" >&5
14112 sed 's/^/| /' conftest.$ac_ext >&5
14113
14114         ac_cv_sun_adjunct=no
14115 fi
14116
14117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14118   CPPFLAGS="$ac_save_CPPFLAGS"
14119 fi
14120 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14121 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14122   if test "$ac_cv_sun_adjunct" = yes; then
14123     have_shadow_adjunct=yes
14124     have_shadow=yes
14125     need_setuid=yes
14126   fi
14127 fi
14128
14129
14130 ###############################################################################
14131 #
14132 #       Check for DEC and SCO so-called "enhanced" security.
14133 #
14134 ###############################################################################
14135
14136 if test "$with_shadow" = yes ; then
14137   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14138 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14139 if test "${ac_cv_enhanced_passwd+set}" = set; then
14140   echo $ECHO_N "(cached) $ECHO_C" >&6
14141 else
14142
14143   ac_save_CPPFLAGS="$CPPFLAGS"
14144   if test \! -z "$includedir" ; then
14145     CPPFLAGS="$CPPFLAGS -I$includedir"
14146   fi
14147   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14148   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14149   cat >conftest.$ac_ext <<_ACEOF
14150 /* confdefs.h.  */
14151 _ACEOF
14152 cat confdefs.h >>conftest.$ac_ext
14153 cat >>conftest.$ac_ext <<_ACEOF
14154 /* end confdefs.h.  */
14155 #include <stdlib.h>
14156                                     #include <unistd.h>
14157                                     #include <sys/types.h>
14158                                     #include <pwd.h>
14159                                     #include <sys/security.h>
14160                                     #include <prot.h>
14161 int
14162 main ()
14163 {
14164 struct pr_passwd *p;
14165                        const char *pw;
14166                        set_auth_parameters(0, 0);
14167                        check_auth_parameters();
14168                        p = getprpwnam("nobody");
14169                        pw = p->ufld.fd_encrypt;
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 rm -f conftest.$ac_objext
14175 if { (ac_try="$ac_compile"
14176 case "(($ac_try" in
14177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14178   *) ac_try_echo=$ac_try;;
14179 esac
14180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14181   (eval "$ac_compile") 2>conftest.er1
14182   ac_status=$?
14183   grep -v '^ *+' conftest.er1 >conftest.err
14184   rm -f conftest.er1
14185   cat conftest.err >&5
14186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187   (exit $ac_status); } && {
14188          test -z "$ac_c_werror_flag" ||
14189          test ! -s conftest.err
14190        } && test -s conftest.$ac_objext; then
14191   ac_cv_enhanced_passwd=yes
14192 else
14193   echo "$as_me: failed program was:" >&5
14194 sed 's/^/| /' conftest.$ac_ext >&5
14195
14196         ac_cv_enhanced_passwd=no
14197 fi
14198
14199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14200   CPPFLAGS="$ac_save_CPPFLAGS"
14201 fi
14202 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14203 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14204   if test $ac_cv_enhanced_passwd = yes; then
14205     have_shadow_enhanced=yes
14206     have_shadow=yes
14207     need_setuid=yes
14208
14209     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14210     # (I'm told it needs -lcurses too, but I don't understand why.)
14211     # But on DEC, it's in -lsecurity.
14212     #
14213     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14214 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14215 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14216   echo $ECHO_N "(cached) $ECHO_C" >&6
14217 else
14218   ac_check_lib_save_LIBS=$LIBS
14219 LIBS="-lprot -lx $LIBS"
14220 cat >conftest.$ac_ext <<_ACEOF
14221 /* confdefs.h.  */
14222 _ACEOF
14223 cat confdefs.h >>conftest.$ac_ext
14224 cat >>conftest.$ac_ext <<_ACEOF
14225 /* end confdefs.h.  */
14226
14227 /* Override any GCC internal prototype to avoid an error.
14228    Use char because int might match the return type of a GCC
14229    builtin and then its argument prototype would still apply.  */
14230 #ifdef __cplusplus
14231 extern "C"
14232 #endif
14233 char getprpwnam ();
14234 int
14235 main ()
14236 {
14237 return getprpwnam ();
14238   ;
14239   return 0;
14240 }
14241 _ACEOF
14242 rm -f conftest.$ac_objext conftest$ac_exeext
14243 if { (ac_try="$ac_link"
14244 case "(($ac_try" in
14245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14246   *) ac_try_echo=$ac_try;;
14247 esac
14248 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14249   (eval "$ac_link") 2>conftest.er1
14250   ac_status=$?
14251   grep -v '^ *+' conftest.er1 >conftest.err
14252   rm -f conftest.er1
14253   cat conftest.err >&5
14254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255   (exit $ac_status); } && {
14256          test -z "$ac_c_werror_flag" ||
14257          test ! -s conftest.err
14258        } && test -s conftest$ac_exeext &&
14259        $as_test_x conftest$ac_exeext; then
14260   ac_cv_lib_prot_getprpwnam=yes
14261 else
14262   echo "$as_me: failed program was:" >&5
14263 sed 's/^/| /' conftest.$ac_ext >&5
14264
14265         ac_cv_lib_prot_getprpwnam=no
14266 fi
14267
14268 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14269       conftest$ac_exeext conftest.$ac_ext
14270 LIBS=$ac_check_lib_save_LIBS
14271 fi
14272 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14273 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14274 if test $ac_cv_lib_prot_getprpwnam = yes; then
14275   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14276 else
14277   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14278 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14279 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14280   echo $ECHO_N "(cached) $ECHO_C" >&6
14281 else
14282   ac_check_lib_save_LIBS=$LIBS
14283 LIBS="-lsecurity  $LIBS"
14284 cat >conftest.$ac_ext <<_ACEOF
14285 /* confdefs.h.  */
14286 _ACEOF
14287 cat confdefs.h >>conftest.$ac_ext
14288 cat >>conftest.$ac_ext <<_ACEOF
14289 /* end confdefs.h.  */
14290
14291 /* Override any GCC internal prototype to avoid an error.
14292    Use char because int might match the return type of a GCC
14293    builtin and then its argument prototype would still apply.  */
14294 #ifdef __cplusplus
14295 extern "C"
14296 #endif
14297 char getprpwnam ();
14298 int
14299 main ()
14300 {
14301 return getprpwnam ();
14302   ;
14303   return 0;
14304 }
14305 _ACEOF
14306 rm -f conftest.$ac_objext conftest$ac_exeext
14307 if { (ac_try="$ac_link"
14308 case "(($ac_try" in
14309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14310   *) ac_try_echo=$ac_try;;
14311 esac
14312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14313   (eval "$ac_link") 2>conftest.er1
14314   ac_status=$?
14315   grep -v '^ *+' conftest.er1 >conftest.err
14316   rm -f conftest.er1
14317   cat conftest.err >&5
14318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319   (exit $ac_status); } && {
14320          test -z "$ac_c_werror_flag" ||
14321          test ! -s conftest.err
14322        } && test -s conftest$ac_exeext &&
14323        $as_test_x conftest$ac_exeext; then
14324   ac_cv_lib_security_getprpwnam=yes
14325 else
14326   echo "$as_me: failed program was:" >&5
14327 sed 's/^/| /' conftest.$ac_ext >&5
14328
14329         ac_cv_lib_security_getprpwnam=no
14330 fi
14331
14332 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14333       conftest$ac_exeext conftest.$ac_ext
14334 LIBS=$ac_check_lib_save_LIBS
14335 fi
14336 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14337 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14338 if test $ac_cv_lib_security_getprpwnam = yes; then
14339   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14340 fi
14341
14342 fi
14343
14344   fi
14345 fi
14346
14347 ###############################################################################
14348 #
14349 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14350 #
14351 ###############################################################################
14352
14353 if test "$with_shadow" = yes ; then
14354   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14355 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14356 if test "${ac_cv_hpux_passwd+set}" = set; then
14357   echo $ECHO_N "(cached) $ECHO_C" >&6
14358 else
14359
14360   ac_save_CPPFLAGS="$CPPFLAGS"
14361   if test \! -z "$includedir" ; then
14362     CPPFLAGS="$CPPFLAGS -I$includedir"
14363   fi
14364   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14365   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14366   cat >conftest.$ac_ext <<_ACEOF
14367 /* confdefs.h.  */
14368 _ACEOF
14369 cat confdefs.h >>conftest.$ac_ext
14370 cat >>conftest.$ac_ext <<_ACEOF
14371 /* end confdefs.h.  */
14372 #include <stdlib.h>
14373                                     #include <unistd.h>
14374                                     #include <sys/types.h>
14375                                     #include <pwd.h>
14376                                     #include <hpsecurity.h>
14377                                     #include <prot.h>
14378 int
14379 main ()
14380 {
14381 struct s_passwd *p = getspwnam("nobody");
14382                        const char *pw = p->pw_passwd;
14383   ;
14384   return 0;
14385 }
14386 _ACEOF
14387 rm -f conftest.$ac_objext
14388 if { (ac_try="$ac_compile"
14389 case "(($ac_try" in
14390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14391   *) ac_try_echo=$ac_try;;
14392 esac
14393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14394   (eval "$ac_compile") 2>conftest.er1
14395   ac_status=$?
14396   grep -v '^ *+' conftest.er1 >conftest.err
14397   rm -f conftest.er1
14398   cat conftest.err >&5
14399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14400   (exit $ac_status); } && {
14401          test -z "$ac_c_werror_flag" ||
14402          test ! -s conftest.err
14403        } && test -s conftest.$ac_objext; then
14404   ac_cv_hpux_passwd=yes
14405 else
14406   echo "$as_me: failed program was:" >&5
14407 sed 's/^/| /' conftest.$ac_ext >&5
14408
14409         ac_cv_hpux_passwd=no
14410 fi
14411
14412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14413   CPPFLAGS="$ac_save_CPPFLAGS"
14414 fi
14415 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14416 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14417   if test "$ac_cv_hpux_passwd" = yes; then
14418     have_shadow_hpux=yes
14419     have_shadow=yes
14420     need_setuid=yes
14421
14422     # on HPUX, bigcrypt is in -lsec
14423     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14424 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14425 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14426   echo $ECHO_N "(cached) $ECHO_C" >&6
14427 else
14428   ac_check_lib_save_LIBS=$LIBS
14429 LIBS="-lsec  $LIBS"
14430 cat >conftest.$ac_ext <<_ACEOF
14431 /* confdefs.h.  */
14432 _ACEOF
14433 cat confdefs.h >>conftest.$ac_ext
14434 cat >>conftest.$ac_ext <<_ACEOF
14435 /* end confdefs.h.  */
14436
14437 /* Override any GCC internal prototype to avoid an error.
14438    Use char because int might match the return type of a GCC
14439    builtin and then its argument prototype would still apply.  */
14440 #ifdef __cplusplus
14441 extern "C"
14442 #endif
14443 char bigcrypt ();
14444 int
14445 main ()
14446 {
14447 return bigcrypt ();
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 rm -f conftest.$ac_objext conftest$ac_exeext
14453 if { (ac_try="$ac_link"
14454 case "(($ac_try" in
14455   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14456   *) ac_try_echo=$ac_try;;
14457 esac
14458 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14459   (eval "$ac_link") 2>conftest.er1
14460   ac_status=$?
14461   grep -v '^ *+' conftest.er1 >conftest.err
14462   rm -f conftest.er1
14463   cat conftest.err >&5
14464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465   (exit $ac_status); } && {
14466          test -z "$ac_c_werror_flag" ||
14467          test ! -s conftest.err
14468        } && test -s conftest$ac_exeext &&
14469        $as_test_x conftest$ac_exeext; then
14470   ac_cv_lib_sec_bigcrypt=yes
14471 else
14472   echo "$as_me: failed program was:" >&5
14473 sed 's/^/| /' conftest.$ac_ext >&5
14474
14475         ac_cv_lib_sec_bigcrypt=no
14476 fi
14477
14478 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14479       conftest$ac_exeext conftest.$ac_ext
14480 LIBS=$ac_check_lib_save_LIBS
14481 fi
14482 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14483 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14484 if test $ac_cv_lib_sec_bigcrypt = yes; then
14485   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14486 fi
14487
14488   fi
14489 fi
14490
14491
14492 ###############################################################################
14493 #
14494 #       Check for FreeBSD-style shadow passwords.
14495 #
14496 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14497 #       password systems -- except you only get stuff in the pw_passwd field
14498 #       if the running program is setuid.  So, guess that we've got this
14499 #       lossage to contend with if /etc/master.passwd exists, and default to
14500 #       a setuid installation.
14501 #
14502 ###############################################################################
14503
14504 if test "$with_shadow" = yes ; then
14505   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14506 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14507 if test "${ac_cv_master_passwd+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510   if test -f /etc/master.passwd ; then
14511                     ac_cv_master_passwd=yes
14512                   else
14513                     ac_cv_master_passwd=no
14514                   fi
14515 fi
14516 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14517 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14518   if test "$ac_cv_master_passwd" = yes; then
14519     need_setuid=yes
14520   fi
14521 fi
14522
14523
14524 ###############################################################################
14525 #
14526 #       Check for traditional (ha!) shadow passwords.
14527 #
14528 ###############################################################################
14529
14530 if test "$with_shadow" = yes ; then
14531   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14532 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14533 if test "${ac_cv_shadow+set}" = set; then
14534   echo $ECHO_N "(cached) $ECHO_C" >&6
14535 else
14536
14537   ac_save_CPPFLAGS="$CPPFLAGS"
14538   if test \! -z "$includedir" ; then
14539     CPPFLAGS="$CPPFLAGS -I$includedir"
14540   fi
14541   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14542   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14543   cat >conftest.$ac_ext <<_ACEOF
14544 /* confdefs.h.  */
14545 _ACEOF
14546 cat confdefs.h >>conftest.$ac_ext
14547 cat >>conftest.$ac_ext <<_ACEOF
14548 /* end confdefs.h.  */
14549 #include <stdlib.h>
14550                                     #include <unistd.h>
14551                                     #include <sys/types.h>
14552                                     #include <pwd.h>
14553                                     #include <shadow.h>
14554 int
14555 main ()
14556 {
14557 struct spwd *p = getspnam("nobody");
14558                        const char *pw = p->sp_pwdp;
14559   ;
14560   return 0;
14561 }
14562 _ACEOF
14563 rm -f conftest.$ac_objext
14564 if { (ac_try="$ac_compile"
14565 case "(($ac_try" in
14566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14567   *) ac_try_echo=$ac_try;;
14568 esac
14569 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14570   (eval "$ac_compile") 2>conftest.er1
14571   ac_status=$?
14572   grep -v '^ *+' conftest.er1 >conftest.err
14573   rm -f conftest.er1
14574   cat conftest.err >&5
14575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576   (exit $ac_status); } && {
14577          test -z "$ac_c_werror_flag" ||
14578          test ! -s conftest.err
14579        } && test -s conftest.$ac_objext; then
14580   ac_cv_shadow=yes
14581 else
14582   echo "$as_me: failed program was:" >&5
14583 sed 's/^/| /' conftest.$ac_ext >&5
14584
14585         ac_cv_shadow=no
14586 fi
14587
14588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589   CPPFLAGS="$ac_save_CPPFLAGS"
14590 fi
14591 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14592 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14593   if test "$ac_cv_shadow" = yes; then
14594     have_shadow=yes
14595     need_setuid=yes
14596
14597     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14598     have_getspnam=no
14599     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14600 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14601 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14602   echo $ECHO_N "(cached) $ECHO_C" >&6
14603 else
14604   ac_check_lib_save_LIBS=$LIBS
14605 LIBS="-lc  $LIBS"
14606 cat >conftest.$ac_ext <<_ACEOF
14607 /* confdefs.h.  */
14608 _ACEOF
14609 cat confdefs.h >>conftest.$ac_ext
14610 cat >>conftest.$ac_ext <<_ACEOF
14611 /* end confdefs.h.  */
14612
14613 /* Override any GCC internal prototype to avoid an error.
14614    Use char because int might match the return type of a GCC
14615    builtin and then its argument prototype would still apply.  */
14616 #ifdef __cplusplus
14617 extern "C"
14618 #endif
14619 char getspnam ();
14620 int
14621 main ()
14622 {
14623 return getspnam ();
14624   ;
14625   return 0;
14626 }
14627 _ACEOF
14628 rm -f conftest.$ac_objext conftest$ac_exeext
14629 if { (ac_try="$ac_link"
14630 case "(($ac_try" in
14631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14632   *) ac_try_echo=$ac_try;;
14633 esac
14634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14635   (eval "$ac_link") 2>conftest.er1
14636   ac_status=$?
14637   grep -v '^ *+' conftest.er1 >conftest.err
14638   rm -f conftest.er1
14639   cat conftest.err >&5
14640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14641   (exit $ac_status); } && {
14642          test -z "$ac_c_werror_flag" ||
14643          test ! -s conftest.err
14644        } && test -s conftest$ac_exeext &&
14645        $as_test_x conftest$ac_exeext; then
14646   ac_cv_lib_c_getspnam=yes
14647 else
14648   echo "$as_me: failed program was:" >&5
14649 sed 's/^/| /' conftest.$ac_ext >&5
14650
14651         ac_cv_lib_c_getspnam=no
14652 fi
14653
14654 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14655       conftest$ac_exeext conftest.$ac_ext
14656 LIBS=$ac_check_lib_save_LIBS
14657 fi
14658 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14659 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14660 if test $ac_cv_lib_c_getspnam = yes; then
14661   have_getspnam=yes
14662 fi
14663
14664     if test "$have_getspnam" = no ; then
14665       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14666 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14667 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14668   echo $ECHO_N "(cached) $ECHO_C" >&6
14669 else
14670   ac_check_lib_save_LIBS=$LIBS
14671 LIBS="-lgen  $LIBS"
14672 cat >conftest.$ac_ext <<_ACEOF
14673 /* confdefs.h.  */
14674 _ACEOF
14675 cat confdefs.h >>conftest.$ac_ext
14676 cat >>conftest.$ac_ext <<_ACEOF
14677 /* end confdefs.h.  */
14678
14679 /* Override any GCC internal prototype to avoid an error.
14680    Use char because int might match the return type of a GCC
14681    builtin and then its argument prototype would still apply.  */
14682 #ifdef __cplusplus
14683 extern "C"
14684 #endif
14685 char getspnam ();
14686 int
14687 main ()
14688 {
14689 return getspnam ();
14690   ;
14691   return 0;
14692 }
14693 _ACEOF
14694 rm -f conftest.$ac_objext conftest$ac_exeext
14695 if { (ac_try="$ac_link"
14696 case "(($ac_try" in
14697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14698   *) ac_try_echo=$ac_try;;
14699 esac
14700 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14701   (eval "$ac_link") 2>conftest.er1
14702   ac_status=$?
14703   grep -v '^ *+' conftest.er1 >conftest.err
14704   rm -f conftest.er1
14705   cat conftest.err >&5
14706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14707   (exit $ac_status); } && {
14708          test -z "$ac_c_werror_flag" ||
14709          test ! -s conftest.err
14710        } && test -s conftest$ac_exeext &&
14711        $as_test_x conftest$ac_exeext; then
14712   ac_cv_lib_gen_getspnam=yes
14713 else
14714   echo "$as_me: failed program was:" >&5
14715 sed 's/^/| /' conftest.$ac_ext >&5
14716
14717         ac_cv_lib_gen_getspnam=no
14718 fi
14719
14720 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14721       conftest$ac_exeext conftest.$ac_ext
14722 LIBS=$ac_check_lib_save_LIBS
14723 fi
14724 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14725 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14726 if test $ac_cv_lib_gen_getspnam = yes; then
14727   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14728 fi
14729
14730     fi
14731   fi
14732 fi
14733
14734
14735 ###############################################################################
14736 #
14737 #       Check for other libraries needed for non-shadow passwords.
14738 #
14739 ###############################################################################
14740
14741 if test "$enable_locking" = yes ; then
14742
14743   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14744   have_crypt=no
14745   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14746 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14747 if test "${ac_cv_lib_c_crypt+set}" = set; then
14748   echo $ECHO_N "(cached) $ECHO_C" >&6
14749 else
14750   ac_check_lib_save_LIBS=$LIBS
14751 LIBS="-lc  $LIBS"
14752 cat >conftest.$ac_ext <<_ACEOF
14753 /* confdefs.h.  */
14754 _ACEOF
14755 cat confdefs.h >>conftest.$ac_ext
14756 cat >>conftest.$ac_ext <<_ACEOF
14757 /* end confdefs.h.  */
14758
14759 /* Override any GCC internal prototype to avoid an error.
14760    Use char because int might match the return type of a GCC
14761    builtin and then its argument prototype would still apply.  */
14762 #ifdef __cplusplus
14763 extern "C"
14764 #endif
14765 char crypt ();
14766 int
14767 main ()
14768 {
14769 return crypt ();
14770   ;
14771   return 0;
14772 }
14773 _ACEOF
14774 rm -f conftest.$ac_objext conftest$ac_exeext
14775 if { (ac_try="$ac_link"
14776 case "(($ac_try" in
14777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14778   *) ac_try_echo=$ac_try;;
14779 esac
14780 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14781   (eval "$ac_link") 2>conftest.er1
14782   ac_status=$?
14783   grep -v '^ *+' conftest.er1 >conftest.err
14784   rm -f conftest.er1
14785   cat conftest.err >&5
14786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787   (exit $ac_status); } && {
14788          test -z "$ac_c_werror_flag" ||
14789          test ! -s conftest.err
14790        } && test -s conftest$ac_exeext &&
14791        $as_test_x conftest$ac_exeext; then
14792   ac_cv_lib_c_crypt=yes
14793 else
14794   echo "$as_me: failed program was:" >&5
14795 sed 's/^/| /' conftest.$ac_ext >&5
14796
14797         ac_cv_lib_c_crypt=no
14798 fi
14799
14800 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14801       conftest$ac_exeext conftest.$ac_ext
14802 LIBS=$ac_check_lib_save_LIBS
14803 fi
14804 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14805 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14806 if test $ac_cv_lib_c_crypt = yes; then
14807   have_crypt=yes
14808 fi
14809
14810   if test "$have_crypt" = no ; then
14811     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14812 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14813 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14814   echo $ECHO_N "(cached) $ECHO_C" >&6
14815 else
14816   ac_check_lib_save_LIBS=$LIBS
14817 LIBS="-lcrypt  $LIBS"
14818 cat >conftest.$ac_ext <<_ACEOF
14819 /* confdefs.h.  */
14820 _ACEOF
14821 cat confdefs.h >>conftest.$ac_ext
14822 cat >>conftest.$ac_ext <<_ACEOF
14823 /* end confdefs.h.  */
14824
14825 /* Override any GCC internal prototype to avoid an error.
14826    Use char because int might match the return type of a GCC
14827    builtin and then its argument prototype would still apply.  */
14828 #ifdef __cplusplus
14829 extern "C"
14830 #endif
14831 char crypt ();
14832 int
14833 main ()
14834 {
14835 return crypt ();
14836   ;
14837   return 0;
14838 }
14839 _ACEOF
14840 rm -f conftest.$ac_objext conftest$ac_exeext
14841 if { (ac_try="$ac_link"
14842 case "(($ac_try" in
14843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14844   *) ac_try_echo=$ac_try;;
14845 esac
14846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14847   (eval "$ac_link") 2>conftest.er1
14848   ac_status=$?
14849   grep -v '^ *+' conftest.er1 >conftest.err
14850   rm -f conftest.er1
14851   cat conftest.err >&5
14852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853   (exit $ac_status); } && {
14854          test -z "$ac_c_werror_flag" ||
14855          test ! -s conftest.err
14856        } && test -s conftest$ac_exeext &&
14857        $as_test_x conftest$ac_exeext; then
14858   ac_cv_lib_crypt_crypt=yes
14859 else
14860   echo "$as_me: failed program was:" >&5
14861 sed 's/^/| /' conftest.$ac_ext >&5
14862
14863         ac_cv_lib_crypt_crypt=no
14864 fi
14865
14866 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14867       conftest$ac_exeext conftest.$ac_ext
14868 LIBS=$ac_check_lib_save_LIBS
14869 fi
14870 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14871 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14872 if test $ac_cv_lib_crypt_crypt = yes; then
14873   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14874 fi
14875
14876   fi
14877 fi
14878
14879
14880 # Most of the above shadow mechanisms will have set need_setuid to yes,
14881 # if they were found.  But, on some systems, we need setuid even when
14882 # using plain old vanilla passwords.
14883 #
14884 if test "$enable_locking" = yes ; then
14885   case "$host" in
14886     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14887       need_setuid=yes
14888     ;;
14889   esac
14890 fi
14891
14892
14893 if test "$have_shadow_adjunct" = yes ; then
14894   cat >>confdefs.h <<\_ACEOF
14895 #define HAVE_ADJUNCT_PASSWD 1
14896 _ACEOF
14897
14898 elif test "$have_shadow_enhanced" = yes ; then
14899   cat >>confdefs.h <<\_ACEOF
14900 #define HAVE_ENHANCED_PASSWD 1
14901 _ACEOF
14902
14903 elif test "$have_shadow_hpux" = yes ; then
14904   cat >>confdefs.h <<\_ACEOF
14905 #define HAVE_HPUX_PASSWD 1
14906 _ACEOF
14907
14908 elif test "$have_shadow" = yes ; then
14909   cat >>confdefs.h <<\_ACEOF
14910 #define HAVE_SHADOW_PASSWD 1
14911 _ACEOF
14912
14913 fi
14914
14915
14916 ###############################################################################
14917 #
14918 #       Check for external password helper
14919 #       On SuSE, instead of having xscreensaver be a setuid program, they
14920 #       fork an external program that takes the password on stdin, and
14921 #       returns true if that password is a valid one.  Then only that
14922 #       smaller program needs to be setuid.
14923 #
14924 #       (Note that this external program is not a GUI: the GUI is still
14925 #       all in xscreensaver itself; the external program just does auth.)
14926 #
14927 ###############################################################################
14928
14929 have_passwd_helper=no
14930 with_passwd_helper_req=unspecified
14931
14932
14933 # Check whether --with-passwd-helper was given.
14934 if test "${with_passwd_helper+set}" = set; then
14935   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14936 else
14937   with_passwd_helper=no
14938 fi
14939
14940 # no HANDLE_X_PATH_ARG for this one
14941
14942 if test "$enable_locking" = no ; then
14943   with_passwd_helper_req=no
14944   with_passwd_helper=no
14945 fi
14946
14947 case "$with_passwd_helper" in
14948   ""|no) : ;;
14949   /*)
14950     cat >>confdefs.h <<_ACEOF
14951 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14952 _ACEOF
14953
14954     have_passwd_helper=yes;;
14955   *)
14956     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14957     exit 1
14958 esac
14959
14960
14961 ###############################################################################
14962 #
14963 #       Check for a login manager for a "New Login" button on the lock dialog.
14964 #       Usually this will be "/usr/bin/gdmflexiserver".
14965 #
14966 ###############################################################################
14967
14968 have_login_manager=no
14969 with_login_manager_req=unspecified
14970 default_login_manager='gdmflexiserver -ls'
14971
14972
14973 # Check whether --with-login-manager was given.
14974 if test "${with_login_manager+set}" = set; then
14975   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14976 else
14977   with_login_manager=no
14978 fi
14979
14980 # no HANDLE_X_PATH_ARG for this one
14981
14982 if test "$enable_locking" = no ; then
14983   with_login_manager_req=no
14984   with_login_manager=no
14985 fi
14986
14987 if test -n "$with_login_manager_req" ; then
14988   ac_cv_login_manager_program=""
14989
14990  if test "$with_login_manager_req" = "yes" ; then
14991    with_login_manager_req=$default_login_manager
14992  fi
14993
14994   case "$with_login_manager_req" in
14995     no)
14996       with_login_manager=""
14997     ;;
14998     /*)
14999       # absolute path
15000       set dummy $with_login_manager_req ; login_manager_tmp=$2
15001       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15002 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15003       if test -x "$login_manager_tmp" ; then
15004         { echo "$as_me:$LINENO: result: yes" >&5
15005 echo "${ECHO_T}yes" >&6; }
15006       else
15007         { echo "$as_me:$LINENO: result: no" >&5
15008 echo "${ECHO_T}no" >&6; }
15009         with_login_manager=""
15010       fi
15011     ;;
15012     *)
15013       # relative path
15014       set dummy $with_login_manager_req ; login_manager_tmp=$2
15015       # don't cache
15016       unset ac_cv_path_login_manager_tmp
15017       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15018 set dummy $login_manager_tmp; ac_word=$2
15019 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15020 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15021 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15022   echo $ECHO_N "(cached) $ECHO_C" >&6
15023 else
15024   case $login_manager_tmp in
15025   [\\/]* | ?:[\\/]*)
15026   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15027   ;;
15028   *)
15029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15030 for as_dir in $PATH
15031 do
15032   IFS=$as_save_IFS
15033   test -z "$as_dir" && as_dir=.
15034   for ac_exec_ext in '' $ac_executable_extensions; do
15035   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15036     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15037     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15038     break 2
15039   fi
15040 done
15041 done
15042 IFS=$as_save_IFS
15043
15044   ;;
15045 esac
15046 fi
15047 login_manager_tmp=$ac_cv_path_login_manager_tmp
15048 if test -n "$login_manager_tmp"; then
15049   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15050 echo "${ECHO_T}$login_manager_tmp" >&6; }
15051 else
15052   { echo "$as_me:$LINENO: result: no" >&5
15053 echo "${ECHO_T}no" >&6; }
15054 fi
15055
15056
15057       if test -z "$login_manager_tmp" ; then
15058         with_login_manager=""
15059       else
15060         with_login_manager="$login_manager_tmp"
15061       fi
15062     ;;
15063   esac
15064   ac_cv_login_manager_program="$with_login_manager"
15065
15066 elif test -n "$ac_cv_login_manager_program"; then
15067   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15068 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15069 fi
15070
15071 NEW_LOGIN_COMMAND_P=''
15072 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15073
15074 if test -z "$NEW_LOGIN_COMMAND" ; then
15075   NEW_LOGIN_COMMAND="$default_login_manager"
15076   NEW_LOGIN_COMMAND_P='! '
15077 fi
15078
15079
15080
15081 ###############################################################################
15082 #
15083 #       Check for -lgtk (and Gnome stuff)
15084 #
15085 ###############################################################################
15086
15087 have_gtk=no
15088 with_gtk_req=unspecified
15089
15090 # Check whether --with-gtk was given.
15091 if test "${with_gtk+set}" = set; then
15092   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15093 else
15094   with_gtk=yes
15095 fi
15096
15097
15098 # if --with-gtk=/directory/ was specified, remember that directory so that
15099 # we can also look for the `gtk-config' program in that directory.
15100 case "$with_gtk" in
15101   /*)
15102     gtk_dir="$with_gtk"
15103     ;;
15104   *)
15105     gtk_dir=""
15106     ;;
15107 esac
15108
15109
15110    case "$with_gtk" in
15111     yes) ;;
15112     no)  ;;
15113
15114     /*)
15115      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15116 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15117      d=$with_gtk/include
15118      if test -d $d; then
15119        X_CFLAGS="-I$d $X_CFLAGS"
15120        { echo "$as_me:$LINENO: result: $d" >&5
15121 echo "${ECHO_T}$d" >&6; }
15122      else
15123        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15124 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15125      fi
15126
15127      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15128 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15129      d=$with_gtk/lib
15130      if test -d $d; then
15131        X_LIBS="-L$d $X_LIBS"
15132        { echo "$as_me:$LINENO: result: $d" >&5
15133 echo "${ECHO_T}$d" >&6; }
15134      else
15135        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15136 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15137      fi
15138
15139      # replace the directory string with "yes".
15140      with_gtk_req="yes"
15141      with_gtk=$with_gtk_req
15142      ;;
15143
15144     *)
15145      echo ""
15146      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15147      echo "       If it is a directory, then \`DIR/include' will be added to"
15148      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15149      exit 1
15150      ;;
15151    esac
15152
15153
15154 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15155   echo "error: must be yes or no: --with-gtk=$with_gtk"
15156   exit 1
15157 fi
15158
15159
15160 parse_gtk_version_string() {
15161   # M4 sucks!!
15162
15163   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15164   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15165
15166   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15167   if test -z "$ac_gtk_version"; then
15168     ac_gtk_version=unknown
15169     ac_gtk_version_string=unknown
15170   fi
15171 }
15172
15173 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15174 # if the user specified --with-gtk=/foo/ then look there.
15175 #
15176 gtk_path="$PATH"
15177 if test ! -z "$gtk_dir"; then
15178   # canonicalize slashes.
15179   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15180   gtk_path="$foo:$gtk_path"
15181 fi
15182
15183 for ac_prog in pkg-config
15184 do
15185   # Extract the first word of "$ac_prog", so it can be a program name with args.
15186 set dummy $ac_prog; ac_word=$2
15187 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15189 if test "${ac_cv_path_pkg_config+set}" = set; then
15190   echo $ECHO_N "(cached) $ECHO_C" >&6
15191 else
15192   case $pkg_config in
15193   [\\/]* | ?:[\\/]*)
15194   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15195   ;;
15196   *)
15197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15198 for as_dir in $gtk_path
15199 do
15200   IFS=$as_save_IFS
15201   test -z "$as_dir" && as_dir=.
15202   for ac_exec_ext in '' $ac_executable_extensions; do
15203   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15204     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15205     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15206     break 2
15207   fi
15208 done
15209 done
15210 IFS=$as_save_IFS
15211
15212   ;;
15213 esac
15214 fi
15215 pkg_config=$ac_cv_path_pkg_config
15216 if test -n "$pkg_config"; then
15217   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15218 echo "${ECHO_T}$pkg_config" >&6; }
15219 else
15220   { echo "$as_me:$LINENO: result: no" >&5
15221 echo "${ECHO_T}no" >&6; }
15222 fi
15223
15224
15225   test -n "$pkg_config" && break
15226 done
15227
15228
15229 if test -z "$pkg_config" ; then
15230   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15231 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15232   pkg_config="false"
15233 fi
15234
15235
15236 # Utility function for running pkg-config-based tests...
15237 #
15238 pkgs=''
15239 pkg_check_version() {
15240   if test "$ok" = yes ; then
15241     req="$1"
15242     min="$2"
15243     { echo "$as_me:$LINENO: checking for $req" >&5
15244 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15245     if $pkg_config --exists "$req" ; then
15246       vers=`$pkg_config --modversion "$req"`
15247       if $pkg_config --exists "$req >= $min" ; then
15248         { echo "$as_me:$LINENO: result: $vers" >&5
15249 echo "${ECHO_T}$vers" >&6; }
15250         pkgs="$pkgs $req"
15251         return 1
15252       else
15253         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15254 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15255         ok=no
15256         return 0
15257       fi
15258     else
15259       { echo "$as_me:$LINENO: result: no" >&5
15260 echo "${ECHO_T}no" >&6; }
15261       ok=no
15262       return 0
15263     fi
15264   fi
15265 }
15266
15267
15268 jurassic_gtk=no
15269 gtk_halfassed=no
15270
15271 #if test "$with_gtk" = yes; then
15272   have_gtk=no
15273
15274   ok="yes"
15275   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15276   pkg_check_version         gmodule-2.0  2.0.0
15277   pkg_check_version          libxml-2.0  2.4.6
15278   pkg_check_version        libglade-2.0  1.99.0
15279   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15280   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15281   have_gtk="$ok"
15282
15283   if test "$have_gtk" = no; then
15284     if test -n "$ac_gtk_version_string" ; then
15285       gtk_halfassed="$ac_gtk_version_string"
15286       gtk_halfassed_lib="$req"
15287     fi
15288   fi
15289
15290   if test "$have_gtk" = yes; then
15291     parse_gtk_version_string
15292     jurassic_gtk=no
15293   fi
15294
15295   if test "$have_gtk" = yes; then
15296     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15297 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15298 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15299   echo $ECHO_N "(cached) $ECHO_C" >&6
15300 else
15301   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15302 fi
15303 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15304 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15305     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15306 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15307 if test "${ac_cv_gtk_config_libs+set}" = set; then
15308   echo $ECHO_N "(cached) $ECHO_C" >&6
15309 else
15310   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15311 fi
15312 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15313 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15314   fi
15315
15316   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15317   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15318
15319   GTK_EXTRA_OBJS=""
15320   GTK_DATADIR=""
15321   if test "$have_gtk" = yes; then
15322     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15323     GTK_DATADIR="$GTK_DATADIR/share"
15324   fi
15325
15326   if test "$have_gtk" = yes; then
15327     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15328     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15329     cat >>confdefs.h <<\_ACEOF
15330 #define HAVE_GTK 1
15331 _ACEOF
15332
15333     cat >>confdefs.h <<\_ACEOF
15334 #define HAVE_GTK2 1
15335 _ACEOF
15336
15337     cat >>confdefs.h <<\_ACEOF
15338 #define HAVE_XML 1
15339 _ACEOF
15340
15341   fi
15342
15343 #fi
15344
15345 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15346 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15347 if test "${ac_cv_dbus_config_cflags+set}" = set; then
15348   echo $ECHO_N "(cached) $ECHO_C" >&6
15349 else
15350   ac_cv_dbus_config_cflags=`$pkg_config --cflags dbus-1`
15351 fi
15352 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_cflags" >&5
15353 echo "${ECHO_T}$ac_cv_dbus_config_cflags" >&6; }
15354 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15355 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15356 if test "${ac_cv_dbus_config_libs+set}" = set; then
15357   echo $ECHO_N "(cached) $ECHO_C" >&6
15358 else
15359   ac_cv_dbus_config_libs=`$pkg_config --libs dbus-1`
15360 fi
15361 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_libs" >&5
15362 echo "${ECHO_T}$ac_cv_dbus_config_libs" >&6; }
15363
15364 ac_dbus_config_cflags=$ac_cv_dbus_config_cflags
15365 ac_dbus_config_libs=$ac_cv_dbus_config_libs
15366
15367 INCLUDES="$INCLUDES $ac_dbus_config_cflags"
15368 DBUS_LIBS="$GTK_LIBS $ac_dbus_config_libs"
15369
15370
15371
15372 # Check for the various Gnome help and URL loading programs.
15373 #
15374 WITH_BROWSER=gnome-open
15375 if test "$have_gtk" = yes; then
15376   for ac_prog in gnome-open
15377 do
15378   # Extract the first word of "$ac_prog", so it can be a program name with args.
15379 set dummy $ac_prog; ac_word=$2
15380 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15382 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385   if test -n "$gnome_open_program"; then
15386   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15387 else
15388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15389 for as_dir in $PATH
15390 do
15391   IFS=$as_save_IFS
15392   test -z "$as_dir" && as_dir=.
15393   for ac_exec_ext in '' $ac_executable_extensions; do
15394   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15395     ac_cv_prog_gnome_open_program="$ac_prog"
15396     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15397     break 2
15398   fi
15399 done
15400 done
15401 IFS=$as_save_IFS
15402
15403 fi
15404 fi
15405 gnome_open_program=$ac_cv_prog_gnome_open_program
15406 if test -n "$gnome_open_program"; then
15407   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15408 echo "${ECHO_T}$gnome_open_program" >&6; }
15409 else
15410   { echo "$as_me:$LINENO: result: no" >&5
15411 echo "${ECHO_T}no" >&6; }
15412 fi
15413
15414
15415   test -n "$gnome_open_program" && break
15416 done
15417
15418   for ac_prog in gnome-url-show
15419 do
15420   # Extract the first word of "$ac_prog", so it can be a program name with args.
15421 set dummy $ac_prog; ac_word=$2
15422 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15424 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15425   echo $ECHO_N "(cached) $ECHO_C" >&6
15426 else
15427   if test -n "$gnome_url_show_program"; then
15428   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15429 else
15430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15431 for as_dir in $PATH
15432 do
15433   IFS=$as_save_IFS
15434   test -z "$as_dir" && as_dir=.
15435   for ac_exec_ext in '' $ac_executable_extensions; do
15436   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15437     ac_cv_prog_gnome_url_show_program="$ac_prog"
15438     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15439     break 2
15440   fi
15441 done
15442 done
15443 IFS=$as_save_IFS
15444
15445 fi
15446 fi
15447 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15448 if test -n "$gnome_url_show_program"; then
15449   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15450 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15451 else
15452   { echo "$as_me:$LINENO: result: no" >&5
15453 echo "${ECHO_T}no" >&6; }
15454 fi
15455
15456
15457   test -n "$gnome_url_show_program" && break
15458 done
15459
15460 fi
15461
15462
15463 ###############################################################################
15464 #
15465 #       Check for -lXm.
15466 #
15467 ###############################################################################
15468
15469 have_motif=no
15470 with_motif_req=unspecified
15471
15472 # Check whether --with-motif was given.
15473 if test "${with_motif+set}" = set; then
15474   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15475 else
15476   with_motif=no
15477 fi
15478
15479
15480
15481    case "$with_motif" in
15482     yes) ;;
15483     no)  ;;
15484
15485     /*)
15486      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15487 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15488      d=$with_motif/include
15489      if test -d $d; then
15490        X_CFLAGS="-I$d $X_CFLAGS"
15491        { echo "$as_me:$LINENO: result: $d" >&5
15492 echo "${ECHO_T}$d" >&6; }
15493      else
15494        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15495 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15496      fi
15497
15498      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15499 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15500      d=$with_motif/lib
15501      if test -d $d; then
15502        X_LIBS="-L$d $X_LIBS"
15503        { echo "$as_me:$LINENO: result: $d" >&5
15504 echo "${ECHO_T}$d" >&6; }
15505      else
15506        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15507 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15508      fi
15509
15510      # replace the directory string with "yes".
15511      with_motif_req="yes"
15512      with_motif=$with_motif_req
15513      ;;
15514
15515     *)
15516      echo ""
15517      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15518      echo "       If it is a directory, then \`DIR/include' will be added to"
15519      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15520      exit 1
15521      ;;
15522    esac
15523
15524
15525 if test "$with_motif" != yes -a "$with_motif" != no ; then
15526   echo "error: must be yes or no: --with-motif=$with_motif"
15527   exit 1
15528 fi
15529
15530 if test "$with_motif" = yes; then
15531   have_motif=no
15532
15533   ac_save_CPPFLAGS="$CPPFLAGS"
15534   if test \! -z "$includedir" ; then
15535     CPPFLAGS="$CPPFLAGS -I$includedir"
15536   fi
15537   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15538   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15539   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15540 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15541 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15542   echo $ECHO_N "(cached) $ECHO_C" >&6
15543 else
15544   cat >conftest.$ac_ext <<_ACEOF
15545 /* confdefs.h.  */
15546 _ACEOF
15547 cat confdefs.h >>conftest.$ac_ext
15548 cat >>conftest.$ac_ext <<_ACEOF
15549 /* end confdefs.h.  */
15550 #include <stdlib.h>
15551                      #include <stdio.h>
15552                      #include <X11/Intrinsic.h>
15553
15554 #include <Xm/Xm.h>
15555 _ACEOF
15556 rm -f conftest.$ac_objext
15557 if { (ac_try="$ac_compile"
15558 case "(($ac_try" in
15559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15560   *) ac_try_echo=$ac_try;;
15561 esac
15562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15563   (eval "$ac_compile") 2>conftest.er1
15564   ac_status=$?
15565   grep -v '^ *+' conftest.er1 >conftest.err
15566   rm -f conftest.er1
15567   cat conftest.err >&5
15568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569   (exit $ac_status); } && {
15570          test -z "$ac_c_werror_flag" ||
15571          test ! -s conftest.err
15572        } && test -s conftest.$ac_objext; then
15573   ac_cv_header_Xm_Xm_h=yes
15574 else
15575   echo "$as_me: failed program was:" >&5
15576 sed 's/^/| /' conftest.$ac_ext >&5
15577
15578         ac_cv_header_Xm_Xm_h=no
15579 fi
15580
15581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15582 fi
15583 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15584 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15585 if test $ac_cv_header_Xm_Xm_h = yes; then
15586   have_motif=yes
15587                      cat >>confdefs.h <<\_ACEOF
15588 #define HAVE_MOTIF 1
15589 _ACEOF
15590
15591                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15592 fi
15593
15594
15595   CPPFLAGS="$ac_save_CPPFLAGS"
15596 fi
15597
15598
15599 if test "$have_motif" = yes; then
15600
15601   ac_save_CPPFLAGS="$CPPFLAGS"
15602   if test \! -z "$includedir" ; then
15603     CPPFLAGS="$CPPFLAGS -I$includedir"
15604   fi
15605   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15606   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15607   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15608 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15609 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15610   echo $ECHO_N "(cached) $ECHO_C" >&6
15611 else
15612   cat >conftest.$ac_ext <<_ACEOF
15613 /* confdefs.h.  */
15614 _ACEOF
15615 cat confdefs.h >>conftest.$ac_ext
15616 cat >>conftest.$ac_ext <<_ACEOF
15617 /* end confdefs.h.  */
15618 #include <stdlib.h>
15619                      #include <stdio.h>
15620                      #include <X11/Intrinsic.h>
15621
15622 #include <Xm/ComboBox.h>
15623 _ACEOF
15624 rm -f conftest.$ac_objext
15625 if { (ac_try="$ac_compile"
15626 case "(($ac_try" in
15627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15628   *) ac_try_echo=$ac_try;;
15629 esac
15630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15631   (eval "$ac_compile") 2>conftest.er1
15632   ac_status=$?
15633   grep -v '^ *+' conftest.er1 >conftest.err
15634   rm -f conftest.er1
15635   cat conftest.err >&5
15636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637   (exit $ac_status); } && {
15638          test -z "$ac_c_werror_flag" ||
15639          test ! -s conftest.err
15640        } && test -s conftest.$ac_objext; then
15641   ac_cv_header_Xm_ComboBox_h=yes
15642 else
15643   echo "$as_me: failed program was:" >&5
15644 sed 's/^/| /' conftest.$ac_ext >&5
15645
15646         ac_cv_header_Xm_ComboBox_h=no
15647 fi
15648
15649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15650 fi
15651 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15652 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15653 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15654   cat >>confdefs.h <<\_ACEOF
15655 #define HAVE_XMCOMBOBOX 1
15656 _ACEOF
15657
15658 fi
15659
15660
15661   CPPFLAGS="$ac_save_CPPFLAGS"
15662 fi
15663
15664
15665 ###############################################################################
15666 #
15667 #       Checking whether Motif is really Lesstif.
15668 #
15669 ###############################################################################
15670
15671 have_lesstif=no
15672 if test "$have_motif" = yes ; then
15673   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15674 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15675 if test "${ac_cv_have_lesstif+set}" = set; then
15676   echo $ECHO_N "(cached) $ECHO_C" >&6
15677 else
15678
15679   ac_save_CPPFLAGS="$CPPFLAGS"
15680   if test \! -z "$includedir" ; then
15681     CPPFLAGS="$CPPFLAGS -I$includedir"
15682   fi
15683   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15684   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15685   cat >conftest.$ac_ext <<_ACEOF
15686 /* confdefs.h.  */
15687 _ACEOF
15688 cat confdefs.h >>conftest.$ac_ext
15689 cat >>conftest.$ac_ext <<_ACEOF
15690 /* end confdefs.h.  */
15691 #include <Xm/Xm.h>
15692 int
15693 main ()
15694 {
15695 long vers = LesstifVersion;
15696   ;
15697   return 0;
15698 }
15699 _ACEOF
15700 rm -f conftest.$ac_objext
15701 if { (ac_try="$ac_compile"
15702 case "(($ac_try" in
15703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15704   *) ac_try_echo=$ac_try;;
15705 esac
15706 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15707   (eval "$ac_compile") 2>conftest.er1
15708   ac_status=$?
15709   grep -v '^ *+' conftest.er1 >conftest.err
15710   rm -f conftest.er1
15711   cat conftest.err >&5
15712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15713   (exit $ac_status); } && {
15714          test -z "$ac_c_werror_flag" ||
15715          test ! -s conftest.err
15716        } && test -s conftest.$ac_objext; then
15717   ac_cv_have_lesstif=yes
15718 else
15719   echo "$as_me: failed program was:" >&5
15720 sed 's/^/| /' conftest.$ac_ext >&5
15721
15722         ac_cv_have_lesstif=no
15723 fi
15724
15725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15726   CPPFLAGS="$ac_save_CPPFLAGS"
15727 fi
15728 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15729 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15730   have_lesstif=$ac_cv_have_lesstif
15731 fi
15732
15733
15734 lesstif_version=unknown
15735 lesstif_version_string=unknown
15736
15737 if test "$have_lesstif" = yes ; then
15738   ltv=unknown
15739   echo unknown > conftest-lt
15740   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15741 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15742 if test "${ac_cv_lesstif_version_string+set}" = set; then
15743   echo $ECHO_N "(cached) $ECHO_C" >&6
15744 else
15745
15746   ac_save_CPPFLAGS="$CPPFLAGS"
15747   if test \! -z "$includedir" ; then
15748     CPPFLAGS="$CPPFLAGS -I$includedir"
15749   fi
15750   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15751   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15752   if test "$cross_compiling" = yes; then
15753   ac_cv_lesstif_version=unknown
15754                      ac_cv_lesstif_version_string=unknown
15755 else
15756   cat >conftest.$ac_ext <<_ACEOF
15757 /* confdefs.h.  */
15758 _ACEOF
15759 cat confdefs.h >>conftest.$ac_ext
15760 cat >>conftest.$ac_ext <<_ACEOF
15761 /* end confdefs.h.  */
15762 #include <stdio.h>
15763                      #include <Xm/Xm.h>
15764                      int main() {
15765                        FILE *f = fopen("conftest-lt", "w");
15766                        if (!f) exit(1);
15767                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15768                           LESSTIF_VERSION, LESSTIF_REVISION);
15769                        fclose(f);
15770                        exit(0);
15771                      }
15772 _ACEOF
15773 rm -f conftest$ac_exeext
15774 if { (ac_try="$ac_link"
15775 case "(($ac_try" in
15776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15777   *) ac_try_echo=$ac_try;;
15778 esac
15779 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15780   (eval "$ac_link") 2>&5
15781   ac_status=$?
15782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15783   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15784   { (case "(($ac_try" in
15785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15786   *) ac_try_echo=$ac_try;;
15787 esac
15788 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15789   (eval "$ac_try") 2>&5
15790   ac_status=$?
15791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792   (exit $ac_status); }; }; then
15793   ltv=`cat conftest-lt`
15794                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15795                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15796 else
15797   echo "$as_me: program exited with status $ac_status" >&5
15798 echo "$as_me: failed program was:" >&5
15799 sed 's/^/| /' conftest.$ac_ext >&5
15800
15801 ( exit $ac_status )
15802 ac_cv_lesstif_version=unknown
15803                      ac_cv_lesstif_version_string=unknown
15804 fi
15805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15806 fi
15807
15808
15809   CPPFLAGS="$ac_save_CPPFLAGS"
15810 fi
15811 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15812 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15813   rm -f conftest-lt
15814   lesstif_version=$ac_cv_lesstif_version
15815   lesstif_version_string=$ac_cv_lesstif_version_string
15816
15817 fi
15818
15819
15820 if test "$have_motif" = yes ; then
15821   mtv=unknown
15822   echo unknown > conftest-mt
15823   { echo "$as_me:$LINENO: checking Motif version number" >&5
15824 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15825 if test "${ac_cv_motif_version_string+set}" = set; then
15826   echo $ECHO_N "(cached) $ECHO_C" >&6
15827 else
15828
15829   ac_save_CPPFLAGS="$CPPFLAGS"
15830   if test \! -z "$includedir" ; then
15831     CPPFLAGS="$CPPFLAGS -I$includedir"
15832   fi
15833   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15834   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15835   if test "$cross_compiling" = yes; then
15836   ac_cv_motif_version=unknown
15837                      ac_cv_motif_version_string=unknown
15838 else
15839   cat >conftest.$ac_ext <<_ACEOF
15840 /* confdefs.h.  */
15841 _ACEOF
15842 cat confdefs.h >>conftest.$ac_ext
15843 cat >>conftest.$ac_ext <<_ACEOF
15844 /* end confdefs.h.  */
15845 #include <stdio.h>
15846                      #include <Xm/Xm.h>
15847                      int main() {
15848                        FILE *f = fopen("conftest-mt", "w");
15849                        if (!f) exit(1);
15850                        fprintf(f, "%d %d.%d\n", XmVersion,
15851                           XmVERSION, XmREVISION);
15852                        fclose(f);
15853                        exit(0);
15854                      }
15855 _ACEOF
15856 rm -f conftest$ac_exeext
15857 if { (ac_try="$ac_link"
15858 case "(($ac_try" in
15859   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15860   *) ac_try_echo=$ac_try;;
15861 esac
15862 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15863   (eval "$ac_link") 2>&5
15864   ac_status=$?
15865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15867   { (case "(($ac_try" in
15868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15869   *) ac_try_echo=$ac_try;;
15870 esac
15871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15872   (eval "$ac_try") 2>&5
15873   ac_status=$?
15874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875   (exit $ac_status); }; }; then
15876   mtv=`cat conftest-mt`
15877                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15878                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15879 else
15880   echo "$as_me: program exited with status $ac_status" >&5
15881 echo "$as_me: failed program was:" >&5
15882 sed 's/^/| /' conftest.$ac_ext >&5
15883
15884 ( exit $ac_status )
15885 ac_cv_motif_version=unknown
15886                      ac_cv_motif_version_string=unknown
15887 fi
15888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15889 fi
15890
15891
15892   CPPFLAGS="$ac_save_CPPFLAGS"
15893 fi
15894 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15895 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15896   rm -f conftest-mt
15897   motif_version=$ac_cv_motif_version
15898   motif_version_string=$ac_cv_motif_version_string
15899
15900 fi
15901
15902
15903 ###############################################################################
15904 #
15905 #       Checking whether Motif requires -lXpm.
15906 #
15907 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15908 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15909 #       of the library whether to build the XPM code into libXm, or whether
15910 #       to rely on an external libXm.  So the only way to tell whether XPM is
15911 #       a link-time requirement is to examine libXm.a, which is very
15912 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15913 #       always link against XPM if the XPM lib exists (and this will be a
15914 #       no-op if libXm happens to already have the XPM code in it.)
15915 #
15916 ###############################################################################
15917
15918 motif_requires_xpm=no
15919 if test "$have_motif" = yes ; then
15920    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15921 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15922    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15923    then
15924      motif_requires_xpm=yes
15925      { echo "$as_me:$LINENO: result: maybe" >&5
15926 echo "${ECHO_T}maybe" >&6; }
15927    else
15928      { echo "$as_me:$LINENO: result: no" >&5
15929 echo "${ECHO_T}no" >&6; }
15930    fi
15931 fi
15932
15933
15934 ###############################################################################
15935 #
15936 #       Checking whether Motif requires -lXp.
15937 #
15938 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15939 #       Extension".   Why this extension isn't in -lXext with all the others,
15940 #       I have no idea.
15941 #
15942 ###############################################################################
15943
15944 have_xp_ext=no
15945 if test "$have_motif" = yes ; then
15946    have_xp_ext=no
15947
15948   ac_save_CPPFLAGS="$CPPFLAGS"
15949   ac_save_LDFLAGS="$LDFLAGS"
15950 #  ac_save_LIBS="$LIBS"
15951
15952   if test \! -z "$includedir" ; then
15953     CPPFLAGS="$CPPFLAGS -I$includedir"
15954   fi
15955   # note: $X_CFLAGS includes $x_includes
15956   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15957
15958   if test \! -z "$libdir" ; then
15959     LDFLAGS="$LDFLAGS -L$libdir"
15960   fi
15961   # note: $X_LIBS includes $x_libraries
15962   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15963
15964   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15965   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15966   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15967 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15968 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15969   echo $ECHO_N "(cached) $ECHO_C" >&6
15970 else
15971   ac_check_lib_save_LIBS=$LIBS
15972 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15973 cat >conftest.$ac_ext <<_ACEOF
15974 /* confdefs.h.  */
15975 _ACEOF
15976 cat confdefs.h >>conftest.$ac_ext
15977 cat >>conftest.$ac_ext <<_ACEOF
15978 /* end confdefs.h.  */
15979
15980 /* Override any GCC internal prototype to avoid an error.
15981    Use char because int might match the return type of a GCC
15982    builtin and then its argument prototype would still apply.  */
15983 #ifdef __cplusplus
15984 extern "C"
15985 #endif
15986 char XpQueryExtension ();
15987 int
15988 main ()
15989 {
15990 return XpQueryExtension ();
15991   ;
15992   return 0;
15993 }
15994 _ACEOF
15995 rm -f conftest.$ac_objext conftest$ac_exeext
15996 if { (ac_try="$ac_link"
15997 case "(($ac_try" in
15998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15999   *) ac_try_echo=$ac_try;;
16000 esac
16001 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16002   (eval "$ac_link") 2>conftest.er1
16003   ac_status=$?
16004   grep -v '^ *+' conftest.er1 >conftest.err
16005   rm -f conftest.er1
16006   cat conftest.err >&5
16007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008   (exit $ac_status); } && {
16009          test -z "$ac_c_werror_flag" ||
16010          test ! -s conftest.err
16011        } && test -s conftest$ac_exeext &&
16012        $as_test_x conftest$ac_exeext; then
16013   ac_cv_lib_Xp_XpQueryExtension=yes
16014 else
16015   echo "$as_me: failed program was:" >&5
16016 sed 's/^/| /' conftest.$ac_ext >&5
16017
16018         ac_cv_lib_Xp_XpQueryExtension=no
16019 fi
16020
16021 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16022       conftest$ac_exeext conftest.$ac_ext
16023 LIBS=$ac_check_lib_save_LIBS
16024 fi
16025 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16026 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16027 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16028   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16029 else
16030   true
16031 fi
16032
16033   CPPFLAGS="$ac_save_CPPFLAGS"
16034   LDFLAGS="$ac_save_LDFLAGS"
16035 #  LIBS="$ac_save_LIBS"
16036
16037 fi
16038
16039
16040 ###############################################################################
16041 #
16042 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16043 #
16044 ###############################################################################
16045
16046 have_xintl=no
16047 if test "$have_motif" = yes ; then
16048
16049   ac_save_CPPFLAGS="$CPPFLAGS"
16050   ac_save_LDFLAGS="$LDFLAGS"
16051 #  ac_save_LIBS="$LIBS"
16052
16053   if test \! -z "$includedir" ; then
16054     CPPFLAGS="$CPPFLAGS -I$includedir"
16055   fi
16056   # note: $X_CFLAGS includes $x_includes
16057   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16058
16059   if test \! -z "$libdir" ; then
16060     LDFLAGS="$LDFLAGS -L$libdir"
16061   fi
16062   # note: $X_LIBS includes $x_libraries
16063   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16064
16065   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16066   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16067   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16068 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16069 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16070   echo $ECHO_N "(cached) $ECHO_C" >&6
16071 else
16072   ac_check_lib_save_LIBS=$LIBS
16073 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16074 cat >conftest.$ac_ext <<_ACEOF
16075 /* confdefs.h.  */
16076 _ACEOF
16077 cat confdefs.h >>conftest.$ac_ext
16078 cat >>conftest.$ac_ext <<_ACEOF
16079 /* end confdefs.h.  */
16080
16081 /* Override any GCC internal prototype to avoid an error.
16082    Use char because int might match the return type of a GCC
16083    builtin and then its argument prototype would still apply.  */
16084 #ifdef __cplusplus
16085 extern "C"
16086 #endif
16087 char _Xsetlocale ();
16088 int
16089 main ()
16090 {
16091 return _Xsetlocale ();
16092   ;
16093   return 0;
16094 }
16095 _ACEOF
16096 rm -f conftest.$ac_objext conftest$ac_exeext
16097 if { (ac_try="$ac_link"
16098 case "(($ac_try" in
16099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16100   *) ac_try_echo=$ac_try;;
16101 esac
16102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16103   (eval "$ac_link") 2>conftest.er1
16104   ac_status=$?
16105   grep -v '^ *+' conftest.er1 >conftest.err
16106   rm -f conftest.er1
16107   cat conftest.err >&5
16108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109   (exit $ac_status); } && {
16110          test -z "$ac_c_werror_flag" ||
16111          test ! -s conftest.err
16112        } && test -s conftest$ac_exeext &&
16113        $as_test_x conftest$ac_exeext; then
16114   ac_cv_lib_Xintl__Xsetlocale=yes
16115 else
16116   echo "$as_me: failed program was:" >&5
16117 sed 's/^/| /' conftest.$ac_ext >&5
16118
16119         ac_cv_lib_Xintl__Xsetlocale=no
16120 fi
16121
16122 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16123       conftest$ac_exeext conftest.$ac_ext
16124 LIBS=$ac_check_lib_save_LIBS
16125 fi
16126 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16127 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16128 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16129   have_xintl=yes
16130 else
16131   have_xintl=no
16132 fi
16133
16134   CPPFLAGS="$ac_save_CPPFLAGS"
16135   LDFLAGS="$ac_save_LDFLAGS"
16136 #  LIBS="$ac_save_LIBS"
16137
16138   if test "$have_xintl" = yes; then
16139     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16140   fi
16141 fi
16142
16143
16144 ###############################################################################
16145 #
16146 #       Check for -lGL or -lMesaGL.
16147 #
16148 ###############################################################################
16149
16150 have_gl=no
16151 ac_have_mesa_gl=no
16152 with_gl_req=unspecified
16153 gl_halfassed=no
16154
16155 # Check whether --with-gl was given.
16156 if test "${with_gl+set}" = set; then
16157   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16158 else
16159   with_gl=yes
16160 fi
16161
16162
16163
16164    case "$with_gl" in
16165     yes) ;;
16166     no)  ;;
16167
16168     /*)
16169      { echo "$as_me:$LINENO: checking for GL headers" >&5
16170 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16171      d=$with_gl/include
16172      if test -d $d; then
16173        X_CFLAGS="-I$d $X_CFLAGS"
16174        { echo "$as_me:$LINENO: result: $d" >&5
16175 echo "${ECHO_T}$d" >&6; }
16176      else
16177        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16178 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16179      fi
16180
16181      { echo "$as_me:$LINENO: checking for GL libs" >&5
16182 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16183      d=$with_gl/lib
16184      if test -d $d; then
16185        X_LIBS="-L$d $X_LIBS"
16186        { echo "$as_me:$LINENO: result: $d" >&5
16187 echo "${ECHO_T}$d" >&6; }
16188      else
16189        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16190 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16191      fi
16192
16193      # replace the directory string with "yes".
16194      with_gl_req="yes"
16195      with_gl=$with_gl_req
16196      ;;
16197
16198     *)
16199      echo ""
16200      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16201      echo "       If it is a directory, then \`DIR/include' will be added to"
16202      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16203      exit 1
16204      ;;
16205    esac
16206
16207
16208 ac_mesagl_version=unknown
16209 ac_mesagl_version_string=unknown
16210
16211 if test "$with_gl" = yes; then
16212
16213   ac_save_CPPFLAGS="$CPPFLAGS"
16214   if test \! -z "$includedir" ; then
16215     CPPFLAGS="$CPPFLAGS -I$includedir"
16216   fi
16217   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16218   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16219   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16220   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16221 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16222 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16223   echo $ECHO_N "(cached) $ECHO_C" >&6
16224 fi
16225 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16226 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16227 else
16228   # Is the header compilable?
16229 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16230 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16231 cat >conftest.$ac_ext <<_ACEOF
16232 /* confdefs.h.  */
16233 _ACEOF
16234 cat confdefs.h >>conftest.$ac_ext
16235 cat >>conftest.$ac_ext <<_ACEOF
16236 /* end confdefs.h.  */
16237 $ac_includes_default
16238 #include <GL/gl.h>
16239 _ACEOF
16240 rm -f conftest.$ac_objext
16241 if { (ac_try="$ac_compile"
16242 case "(($ac_try" in
16243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16244   *) ac_try_echo=$ac_try;;
16245 esac
16246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16247   (eval "$ac_compile") 2>conftest.er1
16248   ac_status=$?
16249   grep -v '^ *+' conftest.er1 >conftest.err
16250   rm -f conftest.er1
16251   cat conftest.err >&5
16252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253   (exit $ac_status); } && {
16254          test -z "$ac_c_werror_flag" ||
16255          test ! -s conftest.err
16256        } && test -s conftest.$ac_objext; then
16257   ac_header_compiler=yes
16258 else
16259   echo "$as_me: failed program was:" >&5
16260 sed 's/^/| /' conftest.$ac_ext >&5
16261
16262         ac_header_compiler=no
16263 fi
16264
16265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16266 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16267 echo "${ECHO_T}$ac_header_compiler" >&6; }
16268
16269 # Is the header present?
16270 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16271 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16272 cat >conftest.$ac_ext <<_ACEOF
16273 /* confdefs.h.  */
16274 _ACEOF
16275 cat confdefs.h >>conftest.$ac_ext
16276 cat >>conftest.$ac_ext <<_ACEOF
16277 /* end confdefs.h.  */
16278 #include <GL/gl.h>
16279 _ACEOF
16280 if { (ac_try="$ac_cpp conftest.$ac_ext"
16281 case "(($ac_try" in
16282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16283   *) ac_try_echo=$ac_try;;
16284 esac
16285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16286   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16287   ac_status=$?
16288   grep -v '^ *+' conftest.er1 >conftest.err
16289   rm -f conftest.er1
16290   cat conftest.err >&5
16291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292   (exit $ac_status); } >/dev/null && {
16293          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16294          test ! -s conftest.err
16295        }; then
16296   ac_header_preproc=yes
16297 else
16298   echo "$as_me: failed program was:" >&5
16299 sed 's/^/| /' conftest.$ac_ext >&5
16300
16301   ac_header_preproc=no
16302 fi
16303
16304 rm -f conftest.err conftest.$ac_ext
16305 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16306 echo "${ECHO_T}$ac_header_preproc" >&6; }
16307
16308 # So?  What about this header?
16309 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16310   yes:no: )
16311     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16312 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16313     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16314 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16315     ac_header_preproc=yes
16316     ;;
16317   no:yes:* )
16318     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16319 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16320     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16321 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16322     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16323 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16324     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16325 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16326     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16327 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16328     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16329 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16330
16331     ;;
16332 esac
16333 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16334 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16335 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16336   echo $ECHO_N "(cached) $ECHO_C" >&6
16337 else
16338   ac_cv_header_GL_gl_h=$ac_header_preproc
16339 fi
16340 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16341 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16342
16343 fi
16344 if test $ac_cv_header_GL_gl_h = yes; then
16345   have_gl=yes
16346 else
16347   have_gl=no
16348 fi
16349
16350
16351   CPPFLAGS="$ac_save_CPPFLAGS"
16352   if test "$have_gl" = yes ; then
16353
16354   ac_save_CPPFLAGS="$CPPFLAGS"
16355   if test \! -z "$includedir" ; then
16356     CPPFLAGS="$CPPFLAGS -I$includedir"
16357   fi
16358   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16359   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16360   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16361 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16362 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16363   echo $ECHO_N "(cached) $ECHO_C" >&6
16364 else
16365   cat >conftest.$ac_ext <<_ACEOF
16366 /* confdefs.h.  */
16367 _ACEOF
16368 cat confdefs.h >>conftest.$ac_ext
16369 cat >>conftest.$ac_ext <<_ACEOF
16370 /* end confdefs.h.  */
16371 #include <GL/gl.h>
16372
16373 #include <GL/glx.h>
16374 _ACEOF
16375 rm -f conftest.$ac_objext
16376 if { (ac_try="$ac_compile"
16377 case "(($ac_try" in
16378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16379   *) ac_try_echo=$ac_try;;
16380 esac
16381 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16382   (eval "$ac_compile") 2>conftest.er1
16383   ac_status=$?
16384   grep -v '^ *+' conftest.er1 >conftest.err
16385   rm -f conftest.er1
16386   cat conftest.err >&5
16387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388   (exit $ac_status); } && {
16389          test -z "$ac_c_werror_flag" ||
16390          test ! -s conftest.err
16391        } && test -s conftest.$ac_objext; then
16392   ac_cv_header_GL_glx_h=yes
16393 else
16394   echo "$as_me: failed program was:" >&5
16395 sed 's/^/| /' conftest.$ac_ext >&5
16396
16397         ac_cv_header_GL_glx_h=no
16398 fi
16399
16400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16401 fi
16402 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16403 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16404 if test $ac_cv_header_GL_glx_h = yes; then
16405   have_gl=yes
16406 else
16407   have_gl=no
16408 fi
16409
16410
16411   CPPFLAGS="$ac_save_CPPFLAGS"
16412   fi
16413
16414   # If we have the headers, try and figure out which vendor it's from.
16415   #
16416   if test "$have_gl" = yes ; then
16417
16418     # We need to know whether it's MesaGL so that we know which libraries
16419     # to link against.
16420     #
16421     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16422 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16423 if test "${ac_cv_have_mesa_gl+set}" = set; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426   ac_cv_have_mesa_gl=no
16427        if test "$ac_macosx" = no; then
16428          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16429          # It's not really Mesa, is it?
16430
16431   ac_save_CPPFLAGS="$CPPFLAGS"
16432   if test \! -z "$includedir" ; then
16433     CPPFLAGS="$CPPFLAGS -I$includedir"
16434   fi
16435   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16436   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16437   cat >conftest.$ac_ext <<_ACEOF
16438 /* confdefs.h.  */
16439 _ACEOF
16440 cat confdefs.h >>conftest.$ac_ext
16441 cat >>conftest.$ac_ext <<_ACEOF
16442 /* end confdefs.h.  */
16443 #include <GL/glx.h>
16444
16445 _ACEOF
16446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16447   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16448   ac_cv_have_mesa_gl=yes
16449 fi
16450 rm -f conftest*
16451
16452   CPPFLAGS="$ac_save_CPPFLAGS"
16453        fi
16454 fi
16455 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16456 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16457     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16458
16459     gl_lib_1=""
16460     GL_LIBS=""
16461
16462     if test "$ac_macosx" = yes; then
16463
16464       # Without these, every link against libGL gets a bunch of useless
16465       # warnings.
16466       #
16467       osx_crud="-bind_at_load -multiply_defined suppress"
16468       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16469 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16470       GL_LIBS="$GL_LIBS $osx_crud"
16471       unset osx_crud
16472
16473       # New lossage in 10.5.0: without this, we get:
16474       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16475       #
16476       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16477       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16478
16479       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16480 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16481       GL_LIBS="$GL_LIBS $osx_crud"
16482       unset osx_crud
16483     fi
16484
16485
16486     # Some versions of MesaGL are compiled to require -lpthread.
16487     # So if the Mesa headers exist, and -lpthread exists, then always
16488     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16489     #
16490     if test "$ac_have_mesa_gl" = yes; then
16491       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16492 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16493 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16494   echo $ECHO_N "(cached) $ECHO_C" >&6
16495 else
16496   ac_check_lib_save_LIBS=$LIBS
16497 LIBS="-lpthread  $LIBS"
16498 cat >conftest.$ac_ext <<_ACEOF
16499 /* confdefs.h.  */
16500 _ACEOF
16501 cat confdefs.h >>conftest.$ac_ext
16502 cat >>conftest.$ac_ext <<_ACEOF
16503 /* end confdefs.h.  */
16504
16505 /* Override any GCC internal prototype to avoid an error.
16506    Use char because int might match the return type of a GCC
16507    builtin and then its argument prototype would still apply.  */
16508 #ifdef __cplusplus
16509 extern "C"
16510 #endif
16511 char pthread_create ();
16512 int
16513 main ()
16514 {
16515 return pthread_create ();
16516   ;
16517   return 0;
16518 }
16519 _ACEOF
16520 rm -f conftest.$ac_objext conftest$ac_exeext
16521 if { (ac_try="$ac_link"
16522 case "(($ac_try" in
16523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16524   *) ac_try_echo=$ac_try;;
16525 esac
16526 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16527   (eval "$ac_link") 2>conftest.er1
16528   ac_status=$?
16529   grep -v '^ *+' conftest.er1 >conftest.err
16530   rm -f conftest.er1
16531   cat conftest.err >&5
16532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533   (exit $ac_status); } && {
16534          test -z "$ac_c_werror_flag" ||
16535          test ! -s conftest.err
16536        } && test -s conftest$ac_exeext &&
16537        $as_test_x conftest$ac_exeext; then
16538   ac_cv_lib_pthread_pthread_create=yes
16539 else
16540   echo "$as_me: failed program was:" >&5
16541 sed 's/^/| /' conftest.$ac_ext >&5
16542
16543         ac_cv_lib_pthread_pthread_create=no
16544 fi
16545
16546 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16547       conftest$ac_exeext conftest.$ac_ext
16548 LIBS=$ac_check_lib_save_LIBS
16549 fi
16550 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16551 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16552 if test $ac_cv_lib_pthread_pthread_create = yes; then
16553   GL_LIBS="-lpthread"
16554 fi
16555
16556     fi
16557
16558
16559     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16560     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16561     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16562     #
16563
16564     if test "$ac_have_mesa_gl" = yes ; then
16565
16566   ac_save_CPPFLAGS="$CPPFLAGS"
16567   ac_save_LDFLAGS="$LDFLAGS"
16568 #  ac_save_LIBS="$LIBS"
16569
16570   if test \! -z "$includedir" ; then
16571     CPPFLAGS="$CPPFLAGS -I$includedir"
16572   fi
16573   # note: $X_CFLAGS includes $x_includes
16574   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16575
16576   if test \! -z "$libdir" ; then
16577     LDFLAGS="$LDFLAGS -L$libdir"
16578   fi
16579   # note: $X_LIBS includes $x_libraries
16580   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16581
16582   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16583   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16584   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16585 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16586 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16587   echo $ECHO_N "(cached) $ECHO_C" >&6
16588 else
16589   ac_check_lib_save_LIBS=$LIBS
16590 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16591 cat >conftest.$ac_ext <<_ACEOF
16592 /* confdefs.h.  */
16593 _ACEOF
16594 cat confdefs.h >>conftest.$ac_ext
16595 cat >>conftest.$ac_ext <<_ACEOF
16596 /* end confdefs.h.  */
16597
16598 /* Override any GCC internal prototype to avoid an error.
16599    Use char because int might match the return type of a GCC
16600    builtin and then its argument prototype would still apply.  */
16601 #ifdef __cplusplus
16602 extern "C"
16603 #endif
16604 char glXCreateContext ();
16605 int
16606 main ()
16607 {
16608 return glXCreateContext ();
16609   ;
16610   return 0;
16611 }
16612 _ACEOF
16613 rm -f conftest.$ac_objext conftest$ac_exeext
16614 if { (ac_try="$ac_link"
16615 case "(($ac_try" in
16616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16617   *) ac_try_echo=$ac_try;;
16618 esac
16619 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16620   (eval "$ac_link") 2>conftest.er1
16621   ac_status=$?
16622   grep -v '^ *+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } && {
16627          test -z "$ac_c_werror_flag" ||
16628          test ! -s conftest.err
16629        } && test -s conftest$ac_exeext &&
16630        $as_test_x conftest$ac_exeext; then
16631   ac_cv_lib_MesaGL_glXCreateContext=yes
16632 else
16633   echo "$as_me: failed program was:" >&5
16634 sed 's/^/| /' conftest.$ac_ext >&5
16635
16636         ac_cv_lib_MesaGL_glXCreateContext=no
16637 fi
16638
16639 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16640       conftest$ac_exeext conftest.$ac_ext
16641 LIBS=$ac_check_lib_save_LIBS
16642 fi
16643 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16644 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16645 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16646   gl_lib_1="MesaGL"
16647                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16648 fi
16649
16650   CPPFLAGS="$ac_save_CPPFLAGS"
16651   LDFLAGS="$ac_save_LDFLAGS"
16652 #  LIBS="$ac_save_LIBS"
16653
16654     fi
16655
16656     if test "$gl_lib_1" = "" ; then
16657
16658   ac_save_CPPFLAGS="$CPPFLAGS"
16659   ac_save_LDFLAGS="$LDFLAGS"
16660 #  ac_save_LIBS="$LIBS"
16661
16662   if test \! -z "$includedir" ; then
16663     CPPFLAGS="$CPPFLAGS -I$includedir"
16664   fi
16665   # note: $X_CFLAGS includes $x_includes
16666   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16667
16668   if test \! -z "$libdir" ; then
16669     LDFLAGS="$LDFLAGS -L$libdir"
16670   fi
16671   # note: $X_LIBS includes $x_libraries
16672   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16673
16674   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16675   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16676   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16677 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16678 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681   ac_check_lib_save_LIBS=$LIBS
16682 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16683 cat >conftest.$ac_ext <<_ACEOF
16684 /* confdefs.h.  */
16685 _ACEOF
16686 cat confdefs.h >>conftest.$ac_ext
16687 cat >>conftest.$ac_ext <<_ACEOF
16688 /* end confdefs.h.  */
16689
16690 /* Override any GCC internal prototype to avoid an error.
16691    Use char because int might match the return type of a GCC
16692    builtin and then its argument prototype would still apply.  */
16693 #ifdef __cplusplus
16694 extern "C"
16695 #endif
16696 char glXCreateContext ();
16697 int
16698 main ()
16699 {
16700 return glXCreateContext ();
16701   ;
16702   return 0;
16703 }
16704 _ACEOF
16705 rm -f conftest.$ac_objext conftest$ac_exeext
16706 if { (ac_try="$ac_link"
16707 case "(($ac_try" in
16708   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16709   *) ac_try_echo=$ac_try;;
16710 esac
16711 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16712   (eval "$ac_link") 2>conftest.er1
16713   ac_status=$?
16714   grep -v '^ *+' conftest.er1 >conftest.err
16715   rm -f conftest.er1
16716   cat conftest.err >&5
16717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16718   (exit $ac_status); } && {
16719          test -z "$ac_c_werror_flag" ||
16720          test ! -s conftest.err
16721        } && test -s conftest$ac_exeext &&
16722        $as_test_x conftest$ac_exeext; then
16723   ac_cv_lib_GL_glXCreateContext=yes
16724 else
16725   echo "$as_me: failed program was:" >&5
16726 sed 's/^/| /' conftest.$ac_ext >&5
16727
16728         ac_cv_lib_GL_glXCreateContext=no
16729 fi
16730
16731 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16732       conftest$ac_exeext conftest.$ac_ext
16733 LIBS=$ac_check_lib_save_LIBS
16734 fi
16735 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16736 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16737 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16738   gl_lib_1="GL"
16739                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16740 fi
16741
16742   CPPFLAGS="$ac_save_CPPFLAGS"
16743   LDFLAGS="$ac_save_LDFLAGS"
16744 #  LIBS="$ac_save_LIBS"
16745
16746     fi
16747
16748     if test "$gl_lib_1" = "" ; then
16749       # we have headers, but no libs -- bail.
16750       have_gl=no
16751       ac_have_mesa_gl=no
16752       gl_halfassed=yes
16753     else
16754       # linking works -- we can build the GL hacks.
16755       cat >>confdefs.h <<\_ACEOF
16756 #define HAVE_GL 1
16757 _ACEOF
16758
16759       if test "$ac_have_mesa_gl" = yes ; then
16760         cat >>confdefs.h <<\_ACEOF
16761 #define HAVE_MESA_GL 1
16762 _ACEOF
16763
16764       fi
16765     fi
16766   fi
16767
16768
16769   # Now that we know we have GL headers and libs, do some more GL testing.
16770   #
16771
16772   if test "$have_gl" = yes ; then
16773     # If it's MesaGL, we'd like to issue a warning if the version number
16774     # is less than or equal to 2.6, because that version had a security bug.
16775     #
16776     if test "$ac_have_mesa_gl" = yes; then
16777
16778       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16779 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16780 if test "${ac_cv_mesagl_version_string+set}" = set; then
16781   echo $ECHO_N "(cached) $ECHO_C" >&6
16782 else
16783   cat > conftest.$ac_ext <<EOF
16784 #line 16784 "configure"
16785 #include "confdefs.h"
16786 #include <GL/gl.h>
16787 #ifndef MESA_MAJOR_VERSION
16788 # include <GL/xmesa.h>
16789 # ifdef XMESA_MAJOR_VERSION
16790    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16791       we have to check the XMesa version number (the number of the X protocol
16792       support, which seems to be the same as the Mesa version number.)
16793     */
16794 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16795 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16796 # else
16797    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16798       so we have no way of telling what version of Mesa this is at all.
16799       So, we'll guess that the osmesa version (the "offscreen protocol")
16800       is less than or equal to the real mesa version number.  Except that
16801       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16802       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16803     */
16804 # include <GL/osmesa.h>
16805 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16806 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16807 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16808 #   undef MESA_MINOR_VERSION
16809 #   define MESA_MINOR_VERSION 4 or newer, probably?
16810 #  endif
16811 # endif
16812 #endif
16813 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16814 EOF
16815
16816          ac_save_CPPFLAGS="$CPPFLAGS"
16817          if test \! -z "$includedir" ; then
16818            CPPFLAGS="$CPPFLAGS -I$includedir"
16819          fi
16820          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16821
16822          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16823
16824          # M4 sucks!!
16825
16826           mglv=`echo "$mglv" | sed -n \
16827              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16828
16829
16830          rm -f conftest.$ac_ext
16831
16832          CPPFLAGS="$ac_save_CPPFLAGS"
16833
16834          if test "$mglv" = ""; then
16835            ac_mesagl_version=unknown
16836            ac_mesagl_version_string=unknown
16837          else
16838            ac_mesagl_version_string="$mglv"
16839            # M4 sucks!!
16840
16841            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16842            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16843
16844            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16845            if test -z "$ac_mesagl_version"; then
16846              ac_mesagl_version=unknown
16847              ac_mesagl_version_string=unknown
16848            fi
16849          fi
16850          ac_cv_mesagl_version=$ac_mesagl_version
16851          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16852
16853 fi
16854 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16855 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16856       ac_mesagl_version=$ac_cv_mesagl_version
16857       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16858     fi
16859
16860
16861     # Check for OpenGL 1.1 features.
16862     #
16863
16864   ac_save_CPPFLAGS="$CPPFLAGS"
16865   ac_save_LDFLAGS="$LDFLAGS"
16866 #  ac_save_LIBS="$LIBS"
16867
16868   if test \! -z "$includedir" ; then
16869     CPPFLAGS="$CPPFLAGS -I$includedir"
16870   fi
16871   # note: $X_CFLAGS includes $x_includes
16872   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16873
16874   if test \! -z "$libdir" ; then
16875     LDFLAGS="$LDFLAGS -L$libdir"
16876   fi
16877   # note: $X_LIBS includes $x_libraries
16878   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16879
16880   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16881   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16882   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16883 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16884 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16885 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16886   echo $ECHO_N "(cached) $ECHO_C" >&6
16887 else
16888   ac_check_lib_save_LIBS=$LIBS
16889 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16890 cat >conftest.$ac_ext <<_ACEOF
16891 /* confdefs.h.  */
16892 _ACEOF
16893 cat confdefs.h >>conftest.$ac_ext
16894 cat >>conftest.$ac_ext <<_ACEOF
16895 /* end confdefs.h.  */
16896
16897 /* Override any GCC internal prototype to avoid an error.
16898    Use char because int might match the return type of a GCC
16899    builtin and then its argument prototype would still apply.  */
16900 #ifdef __cplusplus
16901 extern "C"
16902 #endif
16903 char glBindTexture ();
16904 int
16905 main ()
16906 {
16907 return glBindTexture ();
16908   ;
16909   return 0;
16910 }
16911 _ACEOF
16912 rm -f conftest.$ac_objext conftest$ac_exeext
16913 if { (ac_try="$ac_link"
16914 case "(($ac_try" in
16915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16916   *) ac_try_echo=$ac_try;;
16917 esac
16918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16919   (eval "$ac_link") 2>conftest.er1
16920   ac_status=$?
16921   grep -v '^ *+' conftest.er1 >conftest.err
16922   rm -f conftest.er1
16923   cat conftest.err >&5
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); } && {
16926          test -z "$ac_c_werror_flag" ||
16927          test ! -s conftest.err
16928        } && test -s conftest$ac_exeext &&
16929        $as_test_x conftest$ac_exeext; then
16930   eval "$as_ac_Lib=yes"
16931 else
16932   echo "$as_me: failed program was:" >&5
16933 sed 's/^/| /' conftest.$ac_ext >&5
16934
16935         eval "$as_ac_Lib=no"
16936 fi
16937
16938 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16939       conftest$ac_exeext conftest.$ac_ext
16940 LIBS=$ac_check_lib_save_LIBS
16941 fi
16942 ac_res=`eval echo '${'$as_ac_Lib'}'`
16943                { echo "$as_me:$LINENO: result: $ac_res" >&5
16944 echo "${ECHO_T}$ac_res" >&6; }
16945 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16946   cat >>confdefs.h <<\_ACEOF
16947 #define HAVE_GLBINDTEXTURE 1
16948 _ACEOF
16949
16950 else
16951   true
16952 fi
16953
16954   CPPFLAGS="$ac_save_CPPFLAGS"
16955   LDFLAGS="$ac_save_LDFLAGS"
16956 #  LIBS="$ac_save_LIBS"
16957
16958   fi
16959
16960 elif test "$with_gl" != no; then
16961   echo "error: must be yes or no: --with-gl=$with_gl"
16962   exit 1
16963 fi
16964
16965
16966 ###############################################################################
16967 #
16968 #       Check for -lgle.
16969 #
16970 ###############################################################################
16971
16972 have_gle=no
16973 with_gle_req=unspecified
16974 gle_halfassed=no
16975
16976 # Check whether --with-gle was given.
16977 if test "${with_gle+set}" = set; then
16978   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16979 else
16980   with_gle=yes
16981 fi
16982
16983
16984
16985    case "$with_gle" in
16986     yes) ;;
16987     no)  ;;
16988
16989     /*)
16990      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16991 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16992      d=$with_gle/include
16993      if test -d $d; then
16994        X_CFLAGS="-I$d $X_CFLAGS"
16995        { echo "$as_me:$LINENO: result: $d" >&5
16996 echo "${ECHO_T}$d" >&6; }
16997      else
16998        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16999 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17000      fi
17001
17002      { echo "$as_me:$LINENO: checking for GLE libs" >&5
17003 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
17004      d=$with_gle/lib
17005      if test -d $d; then
17006        X_LIBS="-L$d $X_LIBS"
17007        { echo "$as_me:$LINENO: result: $d" >&5
17008 echo "${ECHO_T}$d" >&6; }
17009      else
17010        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17011 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17012      fi
17013
17014      # replace the directory string with "yes".
17015      with_gle_req="yes"
17016      with_gle=$with_gle_req
17017      ;;
17018
17019     *)
17020      echo ""
17021      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17022      echo "       If it is a directory, then \`DIR/include' will be added to"
17023      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17024      exit 1
17025      ;;
17026    esac
17027
17028
17029 GLE_LIBS=""
17030
17031 if test "$have_gl" = no ; then
17032  true
17033 elif test "$with_gle" = yes; then
17034
17035
17036   ac_save_CPPFLAGS="$CPPFLAGS"
17037   if test \! -z "$includedir" ; then
17038     CPPFLAGS="$CPPFLAGS -I$includedir"
17039   fi
17040   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17041   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17042   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17043 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17044 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17045   echo $ECHO_N "(cached) $ECHO_C" >&6
17046 else
17047   cat >conftest.$ac_ext <<_ACEOF
17048 /* confdefs.h.  */
17049 _ACEOF
17050 cat confdefs.h >>conftest.$ac_ext
17051 cat >>conftest.$ac_ext <<_ACEOF
17052 /* end confdefs.h.  */
17053 #include <GL/gl.h>
17054
17055 #include <GL/gle.h>
17056 _ACEOF
17057 rm -f conftest.$ac_objext
17058 if { (ac_try="$ac_compile"
17059 case "(($ac_try" in
17060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17061   *) ac_try_echo=$ac_try;;
17062 esac
17063 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17064   (eval "$ac_compile") 2>conftest.er1
17065   ac_status=$?
17066   grep -v '^ *+' conftest.er1 >conftest.err
17067   rm -f conftest.er1
17068   cat conftest.err >&5
17069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070   (exit $ac_status); } && {
17071          test -z "$ac_c_werror_flag" ||
17072          test ! -s conftest.err
17073        } && test -s conftest.$ac_objext; then
17074   ac_cv_header_GL_gle_h=yes
17075 else
17076   echo "$as_me: failed program was:" >&5
17077 sed 's/^/| /' conftest.$ac_ext >&5
17078
17079         ac_cv_header_GL_gle_h=no
17080 fi
17081
17082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17083 fi
17084 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17085 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17086 if test $ac_cv_header_GL_gle_h = yes; then
17087   have_gle3=yes
17088 else
17089   have_gle3=no
17090 fi
17091
17092
17093   CPPFLAGS="$ac_save_CPPFLAGS"
17094   if test "$have_gle3" = yes ; then
17095     have_gle=yes;
17096   else
17097
17098   ac_save_CPPFLAGS="$CPPFLAGS"
17099   if test \! -z "$includedir" ; then
17100     CPPFLAGS="$CPPFLAGS -I$includedir"
17101   fi
17102   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17103   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17104   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17105 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17106 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17107   echo $ECHO_N "(cached) $ECHO_C" >&6
17108 else
17109   cat >conftest.$ac_ext <<_ACEOF
17110 /* confdefs.h.  */
17111 _ACEOF
17112 cat confdefs.h >>conftest.$ac_ext
17113 cat >>conftest.$ac_ext <<_ACEOF
17114 /* end confdefs.h.  */
17115 #include <GL/gl.h>
17116
17117 #include <GL/gutil.h>
17118 _ACEOF
17119 rm -f conftest.$ac_objext
17120 if { (ac_try="$ac_compile"
17121 case "(($ac_try" in
17122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17123   *) ac_try_echo=$ac_try;;
17124 esac
17125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17126   (eval "$ac_compile") 2>conftest.er1
17127   ac_status=$?
17128   grep -v '^ *+' conftest.er1 >conftest.err
17129   rm -f conftest.er1
17130   cat conftest.err >&5
17131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17132   (exit $ac_status); } && {
17133          test -z "$ac_c_werror_flag" ||
17134          test ! -s conftest.err
17135        } && test -s conftest.$ac_objext; then
17136   ac_cv_header_GL_gutil_h=yes
17137 else
17138   echo "$as_me: failed program was:" >&5
17139 sed 's/^/| /' conftest.$ac_ext >&5
17140
17141         ac_cv_header_GL_gutil_h=no
17142 fi
17143
17144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17145 fi
17146 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17147 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17148 if test $ac_cv_header_GL_gutil_h = yes; then
17149   have_gle=yes
17150 else
17151   have_gle=no
17152 fi
17153
17154
17155   CPPFLAGS="$ac_save_CPPFLAGS"
17156     if test "$have_gle" = yes ; then
17157
17158   ac_save_CPPFLAGS="$CPPFLAGS"
17159   if test \! -z "$includedir" ; then
17160     CPPFLAGS="$CPPFLAGS -I$includedir"
17161   fi
17162   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17163   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17164   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17165 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17166 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17167   echo $ECHO_N "(cached) $ECHO_C" >&6
17168 else
17169   cat >conftest.$ac_ext <<_ACEOF
17170 /* confdefs.h.  */
17171 _ACEOF
17172 cat confdefs.h >>conftest.$ac_ext
17173 cat >>conftest.$ac_ext <<_ACEOF
17174 /* end confdefs.h.  */
17175 #include <GL/gl.h>
17176
17177 #include <GL/tube.h>
17178 _ACEOF
17179 rm -f conftest.$ac_objext
17180 if { (ac_try="$ac_compile"
17181 case "(($ac_try" in
17182   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17183   *) ac_try_echo=$ac_try;;
17184 esac
17185 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17186   (eval "$ac_compile") 2>conftest.er1
17187   ac_status=$?
17188   grep -v '^ *+' conftest.er1 >conftest.err
17189   rm -f conftest.er1
17190   cat conftest.err >&5
17191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192   (exit $ac_status); } && {
17193          test -z "$ac_c_werror_flag" ||
17194          test ! -s conftest.err
17195        } && test -s conftest.$ac_objext; then
17196   ac_cv_header_GL_tube_h=yes
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 sed 's/^/| /' conftest.$ac_ext >&5
17200
17201         ac_cv_header_GL_tube_h=no
17202 fi
17203
17204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17205 fi
17206 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17207 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17208 if test $ac_cv_header_GL_tube_h = yes; then
17209   have_gle=yes
17210 else
17211   have_gle=no
17212 fi
17213
17214
17215   CPPFLAGS="$ac_save_CPPFLAGS"
17216     fi
17217   fi
17218
17219   if test "$have_gle" = yes ; then
17220     have_gle=no
17221     gle_halfassed=yes
17222
17223   ac_save_CPPFLAGS="$CPPFLAGS"
17224   ac_save_LDFLAGS="$LDFLAGS"
17225 #  ac_save_LIBS="$LIBS"
17226
17227   if test \! -z "$includedir" ; then
17228     CPPFLAGS="$CPPFLAGS -I$includedir"
17229   fi
17230   # note: $X_CFLAGS includes $x_includes
17231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17232
17233   if test \! -z "$libdir" ; then
17234     LDFLAGS="$LDFLAGS -L$libdir"
17235   fi
17236   # note: $X_LIBS includes $x_libraries
17237   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17238
17239   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17240   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17241   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17242 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17243 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17244   echo $ECHO_N "(cached) $ECHO_C" >&6
17245 else
17246   ac_check_lib_save_LIBS=$LIBS
17247 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17248 cat >conftest.$ac_ext <<_ACEOF
17249 /* confdefs.h.  */
17250 _ACEOF
17251 cat confdefs.h >>conftest.$ac_ext
17252 cat >>conftest.$ac_ext <<_ACEOF
17253 /* end confdefs.h.  */
17254
17255 /* Override any GCC internal prototype to avoid an error.
17256    Use char because int might match the return type of a GCC
17257    builtin and then its argument prototype would still apply.  */
17258 #ifdef __cplusplus
17259 extern "C"
17260 #endif
17261 char gleCreateGC ();
17262 int
17263 main ()
17264 {
17265 return gleCreateGC ();
17266   ;
17267   return 0;
17268 }
17269 _ACEOF
17270 rm -f conftest.$ac_objext conftest$ac_exeext
17271 if { (ac_try="$ac_link"
17272 case "(($ac_try" in
17273   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274   *) ac_try_echo=$ac_try;;
17275 esac
17276 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17277   (eval "$ac_link") 2>conftest.er1
17278   ac_status=$?
17279   grep -v '^ *+' conftest.er1 >conftest.err
17280   rm -f conftest.er1
17281   cat conftest.err >&5
17282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17283   (exit $ac_status); } && {
17284          test -z "$ac_c_werror_flag" ||
17285          test ! -s conftest.err
17286        } && test -s conftest$ac_exeext &&
17287        $as_test_x conftest$ac_exeext; then
17288   ac_cv_lib_gle_gleCreateGC=yes
17289 else
17290   echo "$as_me: failed program was:" >&5
17291 sed 's/^/| /' conftest.$ac_ext >&5
17292
17293         ac_cv_lib_gle_gleCreateGC=no
17294 fi
17295
17296 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17297       conftest$ac_exeext conftest.$ac_ext
17298 LIBS=$ac_check_lib_save_LIBS
17299 fi
17300 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17301 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17302 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17303   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17304 fi
17305
17306   CPPFLAGS="$ac_save_CPPFLAGS"
17307   LDFLAGS="$ac_save_LDFLAGS"
17308 #  LIBS="$ac_save_LIBS"
17309
17310   fi
17311   if test "$have_gle" = yes ; then
17312     have_gle=no
17313     gle_halfassed=yes
17314
17315     # sometimes the libmatrix stuff is included in libgle.  look there first.
17316 #
17317 # I don't get it.  For some reason, this test passes on SGI, as if
17318 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17319 # Yet the link is succeeding.  Why???
17320 #
17321 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17322 #                   [have_gle=yes; gle_halfassed=no],
17323 #                   [], $GL_LIBS -lX11 -lXext -lm)
17324
17325     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17326     # *sigh*
17327     if test "$have_gle3" = yes ; then
17328
17329   ac_save_CPPFLAGS="$CPPFLAGS"
17330   ac_save_LDFLAGS="$LDFLAGS"
17331 #  ac_save_LIBS="$LIBS"
17332
17333   if test \! -z "$includedir" ; then
17334     CPPFLAGS="$CPPFLAGS -I$includedir"
17335   fi
17336   # note: $X_CFLAGS includes $x_includes
17337   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17338
17339   if test \! -z "$libdir" ; then
17340     LDFLAGS="$LDFLAGS -L$libdir"
17341   fi
17342   # note: $X_LIBS includes $x_libraries
17343   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17344
17345   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17346   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17347   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17348 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17349 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17350   echo $ECHO_N "(cached) $ECHO_C" >&6
17351 else
17352   ac_check_lib_save_LIBS=$LIBS
17353 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17354 cat >conftest.$ac_ext <<_ACEOF
17355 /* confdefs.h.  */
17356 _ACEOF
17357 cat confdefs.h >>conftest.$ac_ext
17358 cat >>conftest.$ac_ext <<_ACEOF
17359 /* end confdefs.h.  */
17360
17361 /* Override any GCC internal prototype to avoid an error.
17362    Use char because int might match the return type of a GCC
17363    builtin and then its argument prototype would still apply.  */
17364 #ifdef __cplusplus
17365 extern "C"
17366 #endif
17367 char uview_direction ();
17368 int
17369 main ()
17370 {
17371 return uview_direction ();
17372   ;
17373   return 0;
17374 }
17375 _ACEOF
17376 rm -f conftest.$ac_objext conftest$ac_exeext
17377 if { (ac_try="$ac_link"
17378 case "(($ac_try" in
17379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17380   *) ac_try_echo=$ac_try;;
17381 esac
17382 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17383   (eval "$ac_link") 2>conftest.er1
17384   ac_status=$?
17385   grep -v '^ *+' conftest.er1 >conftest.err
17386   rm -f conftest.er1
17387   cat conftest.err >&5
17388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17389   (exit $ac_status); } && {
17390          test -z "$ac_c_werror_flag" ||
17391          test ! -s conftest.err
17392        } && test -s conftest$ac_exeext &&
17393        $as_test_x conftest$ac_exeext; then
17394   ac_cv_lib_gle_uview_direction=yes
17395 else
17396   echo "$as_me: failed program was:" >&5
17397 sed 's/^/| /' conftest.$ac_ext >&5
17398
17399         ac_cv_lib_gle_uview_direction=no
17400 fi
17401
17402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17403       conftest$ac_exeext conftest.$ac_ext
17404 LIBS=$ac_check_lib_save_LIBS
17405 fi
17406 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17407 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17408 if test $ac_cv_lib_gle_uview_direction = yes; then
17409   have_gle=yes; gle_halfassed=no
17410 fi
17411
17412   CPPFLAGS="$ac_save_CPPFLAGS"
17413   LDFLAGS="$ac_save_LDFLAGS"
17414 #  LIBS="$ac_save_LIBS"
17415
17416     fi
17417     # if it wasn't in libgle, then look in libmatrix.
17418     if test "$have_gle" = no ; then
17419
17420   ac_save_CPPFLAGS="$CPPFLAGS"
17421   ac_save_LDFLAGS="$LDFLAGS"
17422 #  ac_save_LIBS="$LIBS"
17423
17424   if test \! -z "$includedir" ; then
17425     CPPFLAGS="$CPPFLAGS -I$includedir"
17426   fi
17427   # note: $X_CFLAGS includes $x_includes
17428   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17429
17430   if test \! -z "$libdir" ; then
17431     LDFLAGS="$LDFLAGS -L$libdir"
17432   fi
17433   # note: $X_LIBS includes $x_libraries
17434   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17435
17436   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17437   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17438   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17439 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17440 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17441   echo $ECHO_N "(cached) $ECHO_C" >&6
17442 else
17443   ac_check_lib_save_LIBS=$LIBS
17444 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17445 cat >conftest.$ac_ext <<_ACEOF
17446 /* confdefs.h.  */
17447 _ACEOF
17448 cat confdefs.h >>conftest.$ac_ext
17449 cat >>conftest.$ac_ext <<_ACEOF
17450 /* end confdefs.h.  */
17451
17452 /* Override any GCC internal prototype to avoid an error.
17453    Use char because int might match the return type of a GCC
17454    builtin and then its argument prototype would still apply.  */
17455 #ifdef __cplusplus
17456 extern "C"
17457 #endif
17458 char uview_direction_d ();
17459 int
17460 main ()
17461 {
17462 return uview_direction_d ();
17463   ;
17464   return 0;
17465 }
17466 _ACEOF
17467 rm -f conftest.$ac_objext conftest$ac_exeext
17468 if { (ac_try="$ac_link"
17469 case "(($ac_try" in
17470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17471   *) ac_try_echo=$ac_try;;
17472 esac
17473 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17474   (eval "$ac_link") 2>conftest.er1
17475   ac_status=$?
17476   grep -v '^ *+' conftest.er1 >conftest.err
17477   rm -f conftest.er1
17478   cat conftest.err >&5
17479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17480   (exit $ac_status); } && {
17481          test -z "$ac_c_werror_flag" ||
17482          test ! -s conftest.err
17483        } && test -s conftest$ac_exeext &&
17484        $as_test_x conftest$ac_exeext; then
17485   ac_cv_lib_matrix_uview_direction_d=yes
17486 else
17487   echo "$as_me: failed program was:" >&5
17488 sed 's/^/| /' conftest.$ac_ext >&5
17489
17490         ac_cv_lib_matrix_uview_direction_d=no
17491 fi
17492
17493 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17494       conftest$ac_exeext conftest.$ac_ext
17495 LIBS=$ac_check_lib_save_LIBS
17496 fi
17497 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17498 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17499 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17500   have_gle=yes; gle_halfassed=no;
17501                       GLE_LIBS="$GLE_LIBS -lmatrix"
17502 fi
17503
17504   CPPFLAGS="$ac_save_CPPFLAGS"
17505   LDFLAGS="$ac_save_LDFLAGS"
17506 #  LIBS="$ac_save_LIBS"
17507
17508     fi
17509   fi
17510
17511   if test "$have_gle" = yes ; then
17512     cat >>confdefs.h <<\_ACEOF
17513 #define HAVE_GLE 1
17514 _ACEOF
17515
17516     if test "$have_gle3" = yes ; then
17517       cat >>confdefs.h <<\_ACEOF
17518 #define HAVE_GLE3 1
17519 _ACEOF
17520
17521     fi
17522   fi
17523
17524 elif test "$with_gle" != no; then
17525   echo "error: must be yes or no: --with-gle=$with_gle"
17526   exit 1
17527
17528 fi
17529
17530
17531 ###############################################################################
17532 #
17533 #       Check for -lgdk_pixbuf.
17534 #       These tests are for gdk_pixbuf usage of the hacks,
17535 #       not xscreensaver-demo (thus we have to test again to get
17536 #       the libraries right: don't want to pull in all of GTK
17537 #       for the hacks.)
17538 #
17539 ###############################################################################
17540
17541 have_gdk_pixbuf=no
17542 with_gdk_pixbuf_req=unspecified
17543
17544 # Check whether --with-pixbuf was given.
17545 if test "${with_pixbuf+set}" = set; then
17546   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17547 else
17548   with_gdk_pixbuf=yes
17549 fi
17550
17551
17552 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17553 # we can also look for the `gdk-pixbuf-config' program in that directory.
17554 case "$with_gdk_pixbuf" in
17555   /*)
17556     gdk_pixbuf_dir="$with_gdk_pixbuf"
17557     ;;
17558   *)
17559     gdk_pixbuf_dir=""
17560     ;;
17561 esac
17562
17563
17564    case "$with_gdk_pixbuf" in
17565     yes) ;;
17566     no)  ;;
17567
17568     /*)
17569      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17570 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17571      d=$with_gdk_pixbuf/include
17572      if test -d $d; then
17573        X_CFLAGS="-I$d $X_CFLAGS"
17574        { echo "$as_me:$LINENO: result: $d" >&5
17575 echo "${ECHO_T}$d" >&6; }
17576      else
17577        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17578 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17579      fi
17580
17581      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17582 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17583      d=$with_gdk_pixbuf/lib
17584      if test -d $d; then
17585        X_LIBS="-L$d $X_LIBS"
17586        { echo "$as_me:$LINENO: result: $d" >&5
17587 echo "${ECHO_T}$d" >&6; }
17588      else
17589        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17590 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17591      fi
17592
17593      # replace the directory string with "yes".
17594      with_gdk_pixbuf_req="yes"
17595      with_gdk_pixbuf=$with_gdk_pixbuf_req
17596      ;;
17597
17598     *)
17599      echo ""
17600      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17601      echo "       If it is a directory, then \`DIR/include' will be added to"
17602      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17603      exit 1
17604      ;;
17605    esac
17606
17607
17608 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17609   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17610   exit 1
17611 fi
17612
17613 if test "$with_gdk_pixbuf" = yes; then
17614   have_gdk_pixbuf=no
17615
17616   pkgs=''
17617   ok="yes"
17618
17619   pkg_check_version gdk-pixbuf-2.0      2.0.0
17620   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17621   have_gdk_pixbuf="$ok"
17622
17623   if test "$have_gdk_pixbuf" = yes; then
17624     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17625 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17626 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17627   echo $ECHO_N "(cached) $ECHO_C" >&6
17628 else
17629   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17630 fi
17631 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17632 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17633     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17634 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17635 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17636   echo $ECHO_N "(cached) $ECHO_C" >&6
17637 else
17638   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17639 fi
17640 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17641 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17642   fi
17643
17644   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17645   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17646
17647
17648   if test "$have_gdk_pixbuf" = yes; then
17649     #
17650     # we appear to have pixbuf; check for headers/libs to be sure.
17651     #
17652     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17653     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17654
17655     have_gdk_pixbuf=no
17656
17657     # check for header A...
17658
17659   ac_save_CPPFLAGS="$CPPFLAGS"
17660   if test \! -z "$includedir" ; then
17661     CPPFLAGS="$CPPFLAGS -I$includedir"
17662   fi
17663   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17664   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17665   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17666   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17667 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17668 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17669   echo $ECHO_N "(cached) $ECHO_C" >&6
17670 fi
17671 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17672 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17673 else
17674   # Is the header compilable?
17675 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17676 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17677 cat >conftest.$ac_ext <<_ACEOF
17678 /* confdefs.h.  */
17679 _ACEOF
17680 cat confdefs.h >>conftest.$ac_ext
17681 cat >>conftest.$ac_ext <<_ACEOF
17682 /* end confdefs.h.  */
17683 $ac_includes_default
17684 #include <gdk-pixbuf/gdk-pixbuf.h>
17685 _ACEOF
17686 rm -f conftest.$ac_objext
17687 if { (ac_try="$ac_compile"
17688 case "(($ac_try" in
17689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17690   *) ac_try_echo=$ac_try;;
17691 esac
17692 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17693   (eval "$ac_compile") 2>conftest.er1
17694   ac_status=$?
17695   grep -v '^ *+' conftest.er1 >conftest.err
17696   rm -f conftest.er1
17697   cat conftest.err >&5
17698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17699   (exit $ac_status); } && {
17700          test -z "$ac_c_werror_flag" ||
17701          test ! -s conftest.err
17702        } && test -s conftest.$ac_objext; then
17703   ac_header_compiler=yes
17704 else
17705   echo "$as_me: failed program was:" >&5
17706 sed 's/^/| /' conftest.$ac_ext >&5
17707
17708         ac_header_compiler=no
17709 fi
17710
17711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17712 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17713 echo "${ECHO_T}$ac_header_compiler" >&6; }
17714
17715 # Is the header present?
17716 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17717 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17718 cat >conftest.$ac_ext <<_ACEOF
17719 /* confdefs.h.  */
17720 _ACEOF
17721 cat confdefs.h >>conftest.$ac_ext
17722 cat >>conftest.$ac_ext <<_ACEOF
17723 /* end confdefs.h.  */
17724 #include <gdk-pixbuf/gdk-pixbuf.h>
17725 _ACEOF
17726 if { (ac_try="$ac_cpp conftest.$ac_ext"
17727 case "(($ac_try" in
17728   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17729   *) ac_try_echo=$ac_try;;
17730 esac
17731 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17732   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17733   ac_status=$?
17734   grep -v '^ *+' conftest.er1 >conftest.err
17735   rm -f conftest.er1
17736   cat conftest.err >&5
17737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17738   (exit $ac_status); } >/dev/null && {
17739          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17740          test ! -s conftest.err
17741        }; then
17742   ac_header_preproc=yes
17743 else
17744   echo "$as_me: failed program was:" >&5
17745 sed 's/^/| /' conftest.$ac_ext >&5
17746
17747   ac_header_preproc=no
17748 fi
17749
17750 rm -f conftest.err conftest.$ac_ext
17751 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17752 echo "${ECHO_T}$ac_header_preproc" >&6; }
17753
17754 # So?  What about this header?
17755 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17756   yes:no: )
17757     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17758 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17759     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17760 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17761     ac_header_preproc=yes
17762     ;;
17763   no:yes:* )
17764     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17765 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17766     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17767 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17768     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17769 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17770     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17771 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17772     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17773 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17774     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17775 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17776
17777     ;;
17778 esac
17779 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17780 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17781 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17782   echo $ECHO_N "(cached) $ECHO_C" >&6
17783 else
17784   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17785 fi
17786 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17787 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17788
17789 fi
17790 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17791   have_gdk_pixbuf=yes
17792 fi
17793
17794
17795   CPPFLAGS="$ac_save_CPPFLAGS"
17796
17797     # if that worked, check for header B...
17798     if test "$have_gdk_pixbuf" = yes; then
17799       have_gdk_pixbuf=no
17800       gdk_pixbuf_halfassed=yes
17801
17802   ac_save_CPPFLAGS="$CPPFLAGS"
17803   if test \! -z "$includedir" ; then
17804     CPPFLAGS="$CPPFLAGS -I$includedir"
17805   fi
17806   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17807   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17808   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17809   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17810 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17811 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17812   echo $ECHO_N "(cached) $ECHO_C" >&6
17813 fi
17814 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17815 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17816 else
17817   # Is the header compilable?
17818 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17819 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17820 cat >conftest.$ac_ext <<_ACEOF
17821 /* confdefs.h.  */
17822 _ACEOF
17823 cat confdefs.h >>conftest.$ac_ext
17824 cat >>conftest.$ac_ext <<_ACEOF
17825 /* end confdefs.h.  */
17826 $ac_includes_default
17827 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17828 _ACEOF
17829 rm -f conftest.$ac_objext
17830 if { (ac_try="$ac_compile"
17831 case "(($ac_try" in
17832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17833   *) ac_try_echo=$ac_try;;
17834 esac
17835 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17836   (eval "$ac_compile") 2>conftest.er1
17837   ac_status=$?
17838   grep -v '^ *+' conftest.er1 >conftest.err
17839   rm -f conftest.er1
17840   cat conftest.err >&5
17841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17842   (exit $ac_status); } && {
17843          test -z "$ac_c_werror_flag" ||
17844          test ! -s conftest.err
17845        } && test -s conftest.$ac_objext; then
17846   ac_header_compiler=yes
17847 else
17848   echo "$as_me: failed program was:" >&5
17849 sed 's/^/| /' conftest.$ac_ext >&5
17850
17851         ac_header_compiler=no
17852 fi
17853
17854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17855 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17856 echo "${ECHO_T}$ac_header_compiler" >&6; }
17857
17858 # Is the header present?
17859 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17860 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17861 cat >conftest.$ac_ext <<_ACEOF
17862 /* confdefs.h.  */
17863 _ACEOF
17864 cat confdefs.h >>conftest.$ac_ext
17865 cat >>conftest.$ac_ext <<_ACEOF
17866 /* end confdefs.h.  */
17867 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17868 _ACEOF
17869 if { (ac_try="$ac_cpp conftest.$ac_ext"
17870 case "(($ac_try" in
17871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872   *) ac_try_echo=$ac_try;;
17873 esac
17874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17875   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17876   ac_status=$?
17877   grep -v '^ *+' conftest.er1 >conftest.err
17878   rm -f conftest.er1
17879   cat conftest.err >&5
17880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17881   (exit $ac_status); } >/dev/null && {
17882          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17883          test ! -s conftest.err
17884        }; then
17885   ac_header_preproc=yes
17886 else
17887   echo "$as_me: failed program was:" >&5
17888 sed 's/^/| /' conftest.$ac_ext >&5
17889
17890   ac_header_preproc=no
17891 fi
17892
17893 rm -f conftest.err conftest.$ac_ext
17894 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17895 echo "${ECHO_T}$ac_header_preproc" >&6; }
17896
17897 # So?  What about this header?
17898 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17899   yes:no: )
17900     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17901 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17902     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17903 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17904     ac_header_preproc=yes
17905     ;;
17906   no:yes:* )
17907     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17908 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17909     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17910 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17911     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17912 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17913     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17914 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17915     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17916 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17917     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17918 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17919
17920     ;;
17921 esac
17922 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17923 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17924 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17925   echo $ECHO_N "(cached) $ECHO_C" >&6
17926 else
17927   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17928 fi
17929 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17930 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17931
17932 fi
17933 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17934   have_gdk_pixbuf=yes
17935                          gdk_pixbuf_halfassed=no
17936 fi
17937
17938
17939   CPPFLAGS="$ac_save_CPPFLAGS"
17940
17941       # yay, it has a new name in Gtk 2.x...
17942       if test "$have_gdk_pixbuf" = no; then
17943         have_gdk_pixbuf=no
17944         gdk_pixbuf_halfassed=yes
17945
17946   ac_save_CPPFLAGS="$CPPFLAGS"
17947   if test \! -z "$includedir" ; then
17948     CPPFLAGS="$CPPFLAGS -I$includedir"
17949   fi
17950   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17951   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17952   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17953   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17954 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17955 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17956   echo $ECHO_N "(cached) $ECHO_C" >&6
17957 fi
17958 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17959 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17960 else
17961   # Is the header compilable?
17962 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17963 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17964 cat >conftest.$ac_ext <<_ACEOF
17965 /* confdefs.h.  */
17966 _ACEOF
17967 cat confdefs.h >>conftest.$ac_ext
17968 cat >>conftest.$ac_ext <<_ACEOF
17969 /* end confdefs.h.  */
17970 $ac_includes_default
17971 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17972 _ACEOF
17973 rm -f conftest.$ac_objext
17974 if { (ac_try="$ac_compile"
17975 case "(($ac_try" in
17976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17977   *) ac_try_echo=$ac_try;;
17978 esac
17979 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17980   (eval "$ac_compile") 2>conftest.er1
17981   ac_status=$?
17982   grep -v '^ *+' conftest.er1 >conftest.err
17983   rm -f conftest.er1
17984   cat conftest.err >&5
17985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986   (exit $ac_status); } && {
17987          test -z "$ac_c_werror_flag" ||
17988          test ! -s conftest.err
17989        } && test -s conftest.$ac_objext; then
17990   ac_header_compiler=yes
17991 else
17992   echo "$as_me: failed program was:" >&5
17993 sed 's/^/| /' conftest.$ac_ext >&5
17994
17995         ac_header_compiler=no
17996 fi
17997
17998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17999 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18000 echo "${ECHO_T}$ac_header_compiler" >&6; }
18001
18002 # Is the header present?
18003 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18004 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
18005 cat >conftest.$ac_ext <<_ACEOF
18006 /* confdefs.h.  */
18007 _ACEOF
18008 cat confdefs.h >>conftest.$ac_ext
18009 cat >>conftest.$ac_ext <<_ACEOF
18010 /* end confdefs.h.  */
18011 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18012 _ACEOF
18013 if { (ac_try="$ac_cpp conftest.$ac_ext"
18014 case "(($ac_try" in
18015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18016   *) ac_try_echo=$ac_try;;
18017 esac
18018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18019   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18020   ac_status=$?
18021   grep -v '^ *+' conftest.er1 >conftest.err
18022   rm -f conftest.er1
18023   cat conftest.err >&5
18024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025   (exit $ac_status); } >/dev/null && {
18026          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18027          test ! -s conftest.err
18028        }; then
18029   ac_header_preproc=yes
18030 else
18031   echo "$as_me: failed program was:" >&5
18032 sed 's/^/| /' conftest.$ac_ext >&5
18033
18034   ac_header_preproc=no
18035 fi
18036
18037 rm -f conftest.err conftest.$ac_ext
18038 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18039 echo "${ECHO_T}$ac_header_preproc" >&6; }
18040
18041 # So?  What about this header?
18042 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18043   yes:no: )
18044     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18045 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18046     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18047 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18048     ac_header_preproc=yes
18049     ;;
18050   no:yes:* )
18051     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18052 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18053     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18054 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18055     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18056 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18057     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18058 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18059     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18060 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18061     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18062 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18063
18064     ;;
18065 esac
18066 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18067 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18068 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18069   echo $ECHO_N "(cached) $ECHO_C" >&6
18070 else
18071   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18072 fi
18073 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18074 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18075
18076 fi
18077 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18078   have_gdk_pixbuf=yes
18079                            gdk_pixbuf_halfassed=no
18080 fi
18081
18082
18083   CPPFLAGS="$ac_save_CPPFLAGS"
18084       fi
18085     fi
18086     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18087   fi
18088
18089   if test "$have_gdk_pixbuf" = yes; then
18090     # we have the headers, now check for the libraries
18091     have_gdk_pixbuf=no
18092     gdk_pixbuf_halfassed=yes
18093
18094     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18095 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18096
18097     # library A...
18098
18099   ac_save_CPPFLAGS="$CPPFLAGS"
18100   ac_save_LDFLAGS="$LDFLAGS"
18101 #  ac_save_LIBS="$LIBS"
18102
18103   if test \! -z "$includedir" ; then
18104     CPPFLAGS="$CPPFLAGS -I$includedir"
18105   fi
18106   # note: $X_CFLAGS includes $x_includes
18107   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18108
18109   if test \! -z "$libdir" ; then
18110     LDFLAGS="$LDFLAGS -L$libdir"
18111   fi
18112   # note: $X_LIBS includes $x_libraries
18113   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18114
18115   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18116   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18117   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18118 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18119 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18120   echo $ECHO_N "(cached) $ECHO_C" >&6
18121 else
18122   ac_check_lib_save_LIBS=$LIBS
18123 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18124 cat >conftest.$ac_ext <<_ACEOF
18125 /* confdefs.h.  */
18126 _ACEOF
18127 cat confdefs.h >>conftest.$ac_ext
18128 cat >>conftest.$ac_ext <<_ACEOF
18129 /* end confdefs.h.  */
18130
18131 /* Override any GCC internal prototype to avoid an error.
18132    Use char because int might match the return type of a GCC
18133    builtin and then its argument prototype would still apply.  */
18134 #ifdef __cplusplus
18135 extern "C"
18136 #endif
18137 char gdk_pixbuf_new_from_file ();
18138 int
18139 main ()
18140 {
18141 return gdk_pixbuf_new_from_file ();
18142   ;
18143   return 0;
18144 }
18145 _ACEOF
18146 rm -f conftest.$ac_objext conftest$ac_exeext
18147 if { (ac_try="$ac_link"
18148 case "(($ac_try" in
18149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18150   *) ac_try_echo=$ac_try;;
18151 esac
18152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18153   (eval "$ac_link") 2>conftest.er1
18154   ac_status=$?
18155   grep -v '^ *+' conftest.er1 >conftest.err
18156   rm -f conftest.er1
18157   cat conftest.err >&5
18158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18159   (exit $ac_status); } && {
18160          test -z "$ac_c_werror_flag" ||
18161          test ! -s conftest.err
18162        } && test -s conftest$ac_exeext &&
18163        $as_test_x conftest$ac_exeext; then
18164   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18165 else
18166   echo "$as_me: failed program was:" >&5
18167 sed 's/^/| /' conftest.$ac_ext >&5
18168
18169         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18170 fi
18171
18172 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18173       conftest$ac_exeext conftest.$ac_ext
18174 LIBS=$ac_check_lib_save_LIBS
18175 fi
18176 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18177 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18178 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18179   have_gdk_pixbuf=yes
18180 fi
18181
18182   CPPFLAGS="$ac_save_CPPFLAGS"
18183   LDFLAGS="$ac_save_LDFLAGS"
18184 #  LIBS="$ac_save_LIBS"
18185
18186     # library B...
18187     if test "$have_gdk_pixbuf" = yes; then
18188       have_gdk_pixbuf=no
18189
18190   ac_save_CPPFLAGS="$CPPFLAGS"
18191   ac_save_LDFLAGS="$LDFLAGS"
18192 #  ac_save_LIBS="$LIBS"
18193
18194   if test \! -z "$includedir" ; then
18195     CPPFLAGS="$CPPFLAGS -I$includedir"
18196   fi
18197   # note: $X_CFLAGS includes $x_includes
18198   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18199
18200   if test \! -z "$libdir" ; then
18201     LDFLAGS="$LDFLAGS -L$libdir"
18202   fi
18203   # note: $X_LIBS includes $x_libraries
18204   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18205
18206   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18207   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18208   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18209 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18210 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18211   echo $ECHO_N "(cached) $ECHO_C" >&6
18212 else
18213   ac_check_lib_save_LIBS=$LIBS
18214 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18215 cat >conftest.$ac_ext <<_ACEOF
18216 /* confdefs.h.  */
18217 _ACEOF
18218 cat confdefs.h >>conftest.$ac_ext
18219 cat >>conftest.$ac_ext <<_ACEOF
18220 /* end confdefs.h.  */
18221
18222 /* Override any GCC internal prototype to avoid an error.
18223    Use char because int might match the return type of a GCC
18224    builtin and then its argument prototype would still apply.  */
18225 #ifdef __cplusplus
18226 extern "C"
18227 #endif
18228 char gdk_pixbuf_xlib_init ();
18229 int
18230 main ()
18231 {
18232 return gdk_pixbuf_xlib_init ();
18233   ;
18234   return 0;
18235 }
18236 _ACEOF
18237 rm -f conftest.$ac_objext conftest$ac_exeext
18238 if { (ac_try="$ac_link"
18239 case "(($ac_try" in
18240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18241   *) ac_try_echo=$ac_try;;
18242 esac
18243 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18244   (eval "$ac_link") 2>conftest.er1
18245   ac_status=$?
18246   grep -v '^ *+' conftest.er1 >conftest.err
18247   rm -f conftest.er1
18248   cat conftest.err >&5
18249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18250   (exit $ac_status); } && {
18251          test -z "$ac_c_werror_flag" ||
18252          test ! -s conftest.err
18253        } && test -s conftest$ac_exeext &&
18254        $as_test_x conftest$ac_exeext; then
18255   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18256 else
18257   echo "$as_me: failed program was:" >&5
18258 sed 's/^/| /' conftest.$ac_ext >&5
18259
18260         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18261 fi
18262
18263 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18264       conftest$ac_exeext conftest.$ac_ext
18265 LIBS=$ac_check_lib_save_LIBS
18266 fi
18267 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18268 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18269 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18270   have_gdk_pixbuf=yes
18271                       gdk_pixbuf_halfassed=no
18272 fi
18273
18274   CPPFLAGS="$ac_save_CPPFLAGS"
18275   LDFLAGS="$ac_save_LDFLAGS"
18276 #  LIBS="$ac_save_LIBS"
18277
18278     fi
18279   fi
18280
18281   if test "$have_gdk_pixbuf" = yes; then
18282     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18283     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18284     cat >>confdefs.h <<\_ACEOF
18285 #define HAVE_GDK_PIXBUF 1
18286 _ACEOF
18287
18288   else
18289     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18290 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18291   fi
18292
18293   if test "$have_gdk_pixbuf" = yes; then
18294
18295   ac_save_CPPFLAGS="$CPPFLAGS"
18296   ac_save_LDFLAGS="$LDFLAGS"
18297 #  ac_save_LIBS="$LIBS"
18298
18299   if test \! -z "$includedir" ; then
18300     CPPFLAGS="$CPPFLAGS -I$includedir"
18301   fi
18302   # note: $X_CFLAGS includes $x_includes
18303   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18304
18305   if test \! -z "$libdir" ; then
18306     LDFLAGS="$LDFLAGS -L$libdir"
18307   fi
18308   # note: $X_LIBS includes $x_libraries
18309   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18310
18311   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18312   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18313   { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18314 echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
18315 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18316   echo $ECHO_N "(cached) $ECHO_C" >&6
18317 else
18318   ac_check_lib_save_LIBS=$LIBS
18319 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18320 cat >conftest.$ac_ext <<_ACEOF
18321 /* confdefs.h.  */
18322 _ACEOF
18323 cat confdefs.h >>conftest.$ac_ext
18324 cat >>conftest.$ac_ext <<_ACEOF
18325 /* end confdefs.h.  */
18326
18327 /* Override any GCC internal prototype to avoid an error.
18328    Use char because int might match the return type of a GCC
18329    builtin and then its argument prototype would still apply.  */
18330 #ifdef __cplusplus
18331 extern "C"
18332 #endif
18333 char gdk_pixbuf_apply_embedded_orientation ();
18334 int
18335 main ()
18336 {
18337 return gdk_pixbuf_apply_embedded_orientation ();
18338   ;
18339   return 0;
18340 }
18341 _ACEOF
18342 rm -f conftest.$ac_objext conftest$ac_exeext
18343 if { (ac_try="$ac_link"
18344 case "(($ac_try" in
18345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18346   *) ac_try_echo=$ac_try;;
18347 esac
18348 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18349   (eval "$ac_link") 2>conftest.er1
18350   ac_status=$?
18351   grep -v '^ *+' conftest.er1 >conftest.err
18352   rm -f conftest.er1
18353   cat conftest.err >&5
18354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18355   (exit $ac_status); } && {
18356          test -z "$ac_c_werror_flag" ||
18357          test ! -s conftest.err
18358        } && test -s conftest$ac_exeext &&
18359        $as_test_x conftest$ac_exeext; then
18360   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18361 else
18362   echo "$as_me: failed program was:" >&5
18363 sed 's/^/| /' conftest.$ac_ext >&5
18364
18365         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18366 fi
18367
18368 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18369       conftest$ac_exeext conftest.$ac_ext
18370 LIBS=$ac_check_lib_save_LIBS
18371 fi
18372 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18373 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18374 if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
18375   cat >>confdefs.h <<\_ACEOF
18376 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18377 _ACEOF
18378
18379 fi
18380
18381   CPPFLAGS="$ac_save_CPPFLAGS"
18382   LDFLAGS="$ac_save_LDFLAGS"
18383 #  LIBS="$ac_save_LIBS"
18384
18385   fi
18386 fi
18387
18388
18389 ###############################################################################
18390 #
18391 #       Check for -lXpm.
18392 #
18393 ###############################################################################
18394
18395 have_xpm=no
18396 with_xpm_req=unspecified
18397
18398 # Check whether --with-xpm was given.
18399 if test "${with_xpm+set}" = set; then
18400   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18401 else
18402   with_xpm=yes
18403 fi
18404
18405
18406
18407    case "$with_xpm" in
18408     yes) ;;
18409     no)  ;;
18410
18411     /*)
18412      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18413 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18414      d=$with_xpm/include
18415      if test -d $d; then
18416        X_CFLAGS="-I$d $X_CFLAGS"
18417        { echo "$as_me:$LINENO: result: $d" >&5
18418 echo "${ECHO_T}$d" >&6; }
18419      else
18420        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18421 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18422      fi
18423
18424      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18425 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18426      d=$with_xpm/lib
18427      if test -d $d; then
18428        X_LIBS="-L$d $X_LIBS"
18429        { echo "$as_me:$LINENO: result: $d" >&5
18430 echo "${ECHO_T}$d" >&6; }
18431      else
18432        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18433 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18434      fi
18435
18436      # replace the directory string with "yes".
18437      with_xpm_req="yes"
18438      with_xpm=$with_xpm_req
18439      ;;
18440
18441     *)
18442      echo ""
18443      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18444      echo "       If it is a directory, then \`DIR/include' will be added to"
18445      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18446      exit 1
18447      ;;
18448    esac
18449
18450
18451 if test "$with_xpm" = yes; then
18452
18453   ac_save_CPPFLAGS="$CPPFLAGS"
18454   if test \! -z "$includedir" ; then
18455     CPPFLAGS="$CPPFLAGS -I$includedir"
18456   fi
18457   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18458   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18459   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18460 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18461 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18462   echo $ECHO_N "(cached) $ECHO_C" >&6
18463 else
18464   cat >conftest.$ac_ext <<_ACEOF
18465 /* confdefs.h.  */
18466 _ACEOF
18467 cat confdefs.h >>conftest.$ac_ext
18468 cat >>conftest.$ac_ext <<_ACEOF
18469 /* end confdefs.h.  */
18470 #include <X11/Xlib.h>
18471
18472 #include <X11/xpm.h>
18473 _ACEOF
18474 rm -f conftest.$ac_objext
18475 if { (ac_try="$ac_compile"
18476 case "(($ac_try" in
18477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478   *) ac_try_echo=$ac_try;;
18479 esac
18480 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18481   (eval "$ac_compile") 2>conftest.er1
18482   ac_status=$?
18483   grep -v '^ *+' conftest.er1 >conftest.err
18484   rm -f conftest.er1
18485   cat conftest.err >&5
18486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18487   (exit $ac_status); } && {
18488          test -z "$ac_c_werror_flag" ||
18489          test ! -s conftest.err
18490        } && test -s conftest.$ac_objext; then
18491   ac_cv_header_X11_xpm_h=yes
18492 else
18493   echo "$as_me: failed program was:" >&5
18494 sed 's/^/| /' conftest.$ac_ext >&5
18495
18496         ac_cv_header_X11_xpm_h=no
18497 fi
18498
18499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18500 fi
18501 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18502 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18503 if test $ac_cv_header_X11_xpm_h = yes; then
18504   have_xpm=yes
18505                     cat >>confdefs.h <<\_ACEOF
18506 #define HAVE_XPM 1
18507 _ACEOF
18508
18509                     XPM_LIBS="-lXpm $XPM_LIBS"
18510 fi
18511
18512
18513   CPPFLAGS="$ac_save_CPPFLAGS"
18514 elif test "$with_xpm" != no; then
18515   echo "error: must be yes or no: --with-xpm=$with_xpm"
18516   exit 1
18517 fi
18518
18519 # See comment near $motif_requires_xpm, above.
18520 # Need to do this here, after both Motif and XPM have been checked for.
18521 #
18522 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18523   if test "$motif_requires_xpm" = yes ; then
18524     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18525   fi
18526 fi
18527
18528 if test "$XPM_LIBS" = "" ; then
18529   XPM_LIBS=$(MINIXPM)
18530 fi
18531
18532
18533 ###############################################################################
18534 #
18535 #       Check for -ljpeg
18536 #
18537 ###############################################################################
18538
18539 have_jpeg=no
18540 with_jpeg_req=unspecified
18541 jpeg_halfassed=no
18542
18543 # Check whether --with-jpeg was given.
18544 if test "${with_jpeg+set}" = set; then
18545   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18546 else
18547   with_jpeg=yes
18548 fi
18549
18550
18551
18552    case "$with_jpeg" in
18553     yes) ;;
18554     no)  ;;
18555
18556     /*)
18557      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18558 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18559      d=$with_jpeg/include
18560      if test -d $d; then
18561        X_CFLAGS="-I$d $X_CFLAGS"
18562        { echo "$as_me:$LINENO: result: $d" >&5
18563 echo "${ECHO_T}$d" >&6; }
18564      else
18565        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18566 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18567      fi
18568
18569      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18570 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18571      d=$with_jpeg/lib
18572      if test -d $d; then
18573        X_LIBS="-L$d $X_LIBS"
18574        { echo "$as_me:$LINENO: result: $d" >&5
18575 echo "${ECHO_T}$d" >&6; }
18576      else
18577        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18578 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18579      fi
18580
18581      # replace the directory string with "yes".
18582      with_jpeg_req="yes"
18583      with_jpeg=$with_jpeg_req
18584      ;;
18585
18586     *)
18587      echo ""
18588      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18589      echo "       If it is a directory, then \`DIR/include' will be added to"
18590      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18591      exit 1
18592      ;;
18593    esac
18594
18595
18596 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18597   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18598   exit 1
18599 fi
18600
18601 if test "$with_jpeg" = yes; then
18602
18603   have_jpeg=no
18604
18605   ac_save_CPPFLAGS="$CPPFLAGS"
18606   if test \! -z "$includedir" ; then
18607     CPPFLAGS="$CPPFLAGS -I$includedir"
18608   fi
18609   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18610   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18611   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18612   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18613 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18614 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18615   echo $ECHO_N "(cached) $ECHO_C" >&6
18616 fi
18617 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18618 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18619 else
18620   # Is the header compilable?
18621 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18622 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18623 cat >conftest.$ac_ext <<_ACEOF
18624 /* confdefs.h.  */
18625 _ACEOF
18626 cat confdefs.h >>conftest.$ac_ext
18627 cat >>conftest.$ac_ext <<_ACEOF
18628 /* end confdefs.h.  */
18629 $ac_includes_default
18630 #include <jpeglib.h>
18631 _ACEOF
18632 rm -f conftest.$ac_objext
18633 if { (ac_try="$ac_compile"
18634 case "(($ac_try" in
18635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18636   *) ac_try_echo=$ac_try;;
18637 esac
18638 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18639   (eval "$ac_compile") 2>conftest.er1
18640   ac_status=$?
18641   grep -v '^ *+' conftest.er1 >conftest.err
18642   rm -f conftest.er1
18643   cat conftest.err >&5
18644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645   (exit $ac_status); } && {
18646          test -z "$ac_c_werror_flag" ||
18647          test ! -s conftest.err
18648        } && test -s conftest.$ac_objext; then
18649   ac_header_compiler=yes
18650 else
18651   echo "$as_me: failed program was:" >&5
18652 sed 's/^/| /' conftest.$ac_ext >&5
18653
18654         ac_header_compiler=no
18655 fi
18656
18657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18658 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18659 echo "${ECHO_T}$ac_header_compiler" >&6; }
18660
18661 # Is the header present?
18662 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18663 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18664 cat >conftest.$ac_ext <<_ACEOF
18665 /* confdefs.h.  */
18666 _ACEOF
18667 cat confdefs.h >>conftest.$ac_ext
18668 cat >>conftest.$ac_ext <<_ACEOF
18669 /* end confdefs.h.  */
18670 #include <jpeglib.h>
18671 _ACEOF
18672 if { (ac_try="$ac_cpp conftest.$ac_ext"
18673 case "(($ac_try" in
18674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18675   *) ac_try_echo=$ac_try;;
18676 esac
18677 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18678   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18679   ac_status=$?
18680   grep -v '^ *+' conftest.er1 >conftest.err
18681   rm -f conftest.er1
18682   cat conftest.err >&5
18683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684   (exit $ac_status); } >/dev/null && {
18685          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18686          test ! -s conftest.err
18687        }; then
18688   ac_header_preproc=yes
18689 else
18690   echo "$as_me: failed program was:" >&5
18691 sed 's/^/| /' conftest.$ac_ext >&5
18692
18693   ac_header_preproc=no
18694 fi
18695
18696 rm -f conftest.err conftest.$ac_ext
18697 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18698 echo "${ECHO_T}$ac_header_preproc" >&6; }
18699
18700 # So?  What about this header?
18701 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18702   yes:no: )
18703     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18704 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18705     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18706 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18707     ac_header_preproc=yes
18708     ;;
18709   no:yes:* )
18710     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18711 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18712     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18713 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18714     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18715 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18716     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18717 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18718     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18719 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18720     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18721 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18722
18723     ;;
18724 esac
18725 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18726 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18727 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18728   echo $ECHO_N "(cached) $ECHO_C" >&6
18729 else
18730   ac_cv_header_jpeglib_h=$ac_header_preproc
18731 fi
18732 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18733 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18734
18735 fi
18736 if test $ac_cv_header_jpeglib_h = yes; then
18737   have_jpeg=yes
18738 fi
18739
18740
18741   CPPFLAGS="$ac_save_CPPFLAGS"
18742
18743   if test "$have_jpeg" = yes; then
18744     # we have the header, now check for the library
18745     have_jpeg=no
18746     jpeg_halfassed=yes
18747
18748   ac_save_CPPFLAGS="$CPPFLAGS"
18749   ac_save_LDFLAGS="$LDFLAGS"
18750 #  ac_save_LIBS="$LIBS"
18751
18752   if test \! -z "$includedir" ; then
18753     CPPFLAGS="$CPPFLAGS -I$includedir"
18754   fi
18755   # note: $X_CFLAGS includes $x_includes
18756   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18757
18758   if test \! -z "$libdir" ; then
18759     LDFLAGS="$LDFLAGS -L$libdir"
18760   fi
18761   # note: $X_LIBS includes $x_libraries
18762   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18763
18764   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18765   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18766   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18767 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18768 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18769   echo $ECHO_N "(cached) $ECHO_C" >&6
18770 else
18771   ac_check_lib_save_LIBS=$LIBS
18772 LIBS="-ljpeg  $LIBS"
18773 cat >conftest.$ac_ext <<_ACEOF
18774 /* confdefs.h.  */
18775 _ACEOF
18776 cat confdefs.h >>conftest.$ac_ext
18777 cat >>conftest.$ac_ext <<_ACEOF
18778 /* end confdefs.h.  */
18779
18780 /* Override any GCC internal prototype to avoid an error.
18781    Use char because int might match the return type of a GCC
18782    builtin and then its argument prototype would still apply.  */
18783 #ifdef __cplusplus
18784 extern "C"
18785 #endif
18786 char jpeg_start_compress ();
18787 int
18788 main ()
18789 {
18790 return jpeg_start_compress ();
18791   ;
18792   return 0;
18793 }
18794 _ACEOF
18795 rm -f conftest.$ac_objext conftest$ac_exeext
18796 if { (ac_try="$ac_link"
18797 case "(($ac_try" in
18798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799   *) ac_try_echo=$ac_try;;
18800 esac
18801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18802   (eval "$ac_link") 2>conftest.er1
18803   ac_status=$?
18804   grep -v '^ *+' conftest.er1 >conftest.err
18805   rm -f conftest.er1
18806   cat conftest.err >&5
18807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18808   (exit $ac_status); } && {
18809          test -z "$ac_c_werror_flag" ||
18810          test ! -s conftest.err
18811        } && test -s conftest$ac_exeext &&
18812        $as_test_x conftest$ac_exeext; then
18813   ac_cv_lib_jpeg_jpeg_start_compress=yes
18814 else
18815   echo "$as_me: failed program was:" >&5
18816 sed 's/^/| /' conftest.$ac_ext >&5
18817
18818         ac_cv_lib_jpeg_jpeg_start_compress=no
18819 fi
18820
18821 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18822       conftest$ac_exeext conftest.$ac_ext
18823 LIBS=$ac_check_lib_save_LIBS
18824 fi
18825 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18826 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18827 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18828   have_jpeg=yes
18829                     jpeg_halfassed=no
18830                     JPEG_LIBS="-ljpeg"
18831                     cat >>confdefs.h <<\_ACEOF
18832 #define HAVE_JPEGLIB 1
18833 _ACEOF
18834
18835 fi
18836
18837   CPPFLAGS="$ac_save_CPPFLAGS"
18838   LDFLAGS="$ac_save_LDFLAGS"
18839 #  LIBS="$ac_save_LIBS"
18840
18841   fi
18842 fi
18843
18844
18845 ###############################################################################
18846 #
18847 #       Check for pty support: this allows 'phosphor' and 'apple2'
18848 #       to run curses-based programs, or be used as terminal windows.
18849 #
18850 ###############################################################################
18851
18852 PTY_LIBS=
18853
18854
18855 for ac_header in pty.h util.h
18856 do
18857 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18858 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18859   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18861 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18862   echo $ECHO_N "(cached) $ECHO_C" >&6
18863 fi
18864 ac_res=`eval echo '${'$as_ac_Header'}'`
18865                { echo "$as_me:$LINENO: result: $ac_res" >&5
18866 echo "${ECHO_T}$ac_res" >&6; }
18867 else
18868   # Is the header compilable?
18869 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18870 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18871 cat >conftest.$ac_ext <<_ACEOF
18872 /* confdefs.h.  */
18873 _ACEOF
18874 cat confdefs.h >>conftest.$ac_ext
18875 cat >>conftest.$ac_ext <<_ACEOF
18876 /* end confdefs.h.  */
18877 $ac_includes_default
18878 #include <$ac_header>
18879 _ACEOF
18880 rm -f conftest.$ac_objext
18881 if { (ac_try="$ac_compile"
18882 case "(($ac_try" in
18883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18884   *) ac_try_echo=$ac_try;;
18885 esac
18886 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18887   (eval "$ac_compile") 2>conftest.er1
18888   ac_status=$?
18889   grep -v '^ *+' conftest.er1 >conftest.err
18890   rm -f conftest.er1
18891   cat conftest.err >&5
18892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18893   (exit $ac_status); } && {
18894          test -z "$ac_c_werror_flag" ||
18895          test ! -s conftest.err
18896        } && test -s conftest.$ac_objext; then
18897   ac_header_compiler=yes
18898 else
18899   echo "$as_me: failed program was:" >&5
18900 sed 's/^/| /' conftest.$ac_ext >&5
18901
18902         ac_header_compiler=no
18903 fi
18904
18905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18906 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18907 echo "${ECHO_T}$ac_header_compiler" >&6; }
18908
18909 # Is the header present?
18910 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18911 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18912 cat >conftest.$ac_ext <<_ACEOF
18913 /* confdefs.h.  */
18914 _ACEOF
18915 cat confdefs.h >>conftest.$ac_ext
18916 cat >>conftest.$ac_ext <<_ACEOF
18917 /* end confdefs.h.  */
18918 #include <$ac_header>
18919 _ACEOF
18920 if { (ac_try="$ac_cpp conftest.$ac_ext"
18921 case "(($ac_try" in
18922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18923   *) ac_try_echo=$ac_try;;
18924 esac
18925 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18926   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18927   ac_status=$?
18928   grep -v '^ *+' conftest.er1 >conftest.err
18929   rm -f conftest.er1
18930   cat conftest.err >&5
18931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18932   (exit $ac_status); } >/dev/null && {
18933          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18934          test ! -s conftest.err
18935        }; then
18936   ac_header_preproc=yes
18937 else
18938   echo "$as_me: failed program was:" >&5
18939 sed 's/^/| /' conftest.$ac_ext >&5
18940
18941   ac_header_preproc=no
18942 fi
18943
18944 rm -f conftest.err conftest.$ac_ext
18945 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18946 echo "${ECHO_T}$ac_header_preproc" >&6; }
18947
18948 # So?  What about this header?
18949 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18950   yes:no: )
18951     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18952 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18953     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18954 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18955     ac_header_preproc=yes
18956     ;;
18957   no:yes:* )
18958     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18959 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18960     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18961 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18962     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18963 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18964     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18965 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18966     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18967 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18968     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18969 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18970
18971     ;;
18972 esac
18973 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18974 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18975 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18976   echo $ECHO_N "(cached) $ECHO_C" >&6
18977 else
18978   eval "$as_ac_Header=\$ac_header_preproc"
18979 fi
18980 ac_res=`eval echo '${'$as_ac_Header'}'`
18981                { echo "$as_me:$LINENO: result: $ac_res" >&5
18982 echo "${ECHO_T}$ac_res" >&6; }
18983
18984 fi
18985 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18986   cat >>confdefs.h <<_ACEOF
18987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18988 _ACEOF
18989
18990 fi
18991
18992 done
18993
18994
18995   ac_save_CPPFLAGS="$CPPFLAGS"
18996   ac_save_LDFLAGS="$LDFLAGS"
18997 #  ac_save_LIBS="$LIBS"
18998
18999   if test \! -z "$includedir" ; then
19000     CPPFLAGS="$CPPFLAGS -I$includedir"
19001   fi
19002   # note: $X_CFLAGS includes $x_includes
19003   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19004
19005   if test \! -z "$libdir" ; then
19006     LDFLAGS="$LDFLAGS -L$libdir"
19007   fi
19008   # note: $X_LIBS includes $x_libraries
19009   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19010
19011   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19012   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19013   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19014 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
19015 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018   ac_check_lib_save_LIBS=$LIBS
19019 LIBS="-lutil  $LIBS"
19020 cat >conftest.$ac_ext <<_ACEOF
19021 /* confdefs.h.  */
19022 _ACEOF
19023 cat confdefs.h >>conftest.$ac_ext
19024 cat >>conftest.$ac_ext <<_ACEOF
19025 /* end confdefs.h.  */
19026
19027 /* Override any GCC internal prototype to avoid an error.
19028    Use char because int might match the return type of a GCC
19029    builtin and then its argument prototype would still apply.  */
19030 #ifdef __cplusplus
19031 extern "C"
19032 #endif
19033 char forkpty ();
19034 int
19035 main ()
19036 {
19037 return forkpty ();
19038   ;
19039   return 0;
19040 }
19041 _ACEOF
19042 rm -f conftest.$ac_objext conftest$ac_exeext
19043 if { (ac_try="$ac_link"
19044 case "(($ac_try" in
19045   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19046   *) ac_try_echo=$ac_try;;
19047 esac
19048 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19049   (eval "$ac_link") 2>conftest.er1
19050   ac_status=$?
19051   grep -v '^ *+' conftest.er1 >conftest.err
19052   rm -f conftest.er1
19053   cat conftest.err >&5
19054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19055   (exit $ac_status); } && {
19056          test -z "$ac_c_werror_flag" ||
19057          test ! -s conftest.err
19058        } && test -s conftest$ac_exeext &&
19059        $as_test_x conftest$ac_exeext; then
19060   ac_cv_lib_util_forkpty=yes
19061 else
19062   echo "$as_me: failed program was:" >&5
19063 sed 's/^/| /' conftest.$ac_ext >&5
19064
19065         ac_cv_lib_util_forkpty=no
19066 fi
19067
19068 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19069       conftest$ac_exeext conftest.$ac_ext
19070 LIBS=$ac_check_lib_save_LIBS
19071 fi
19072 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19073 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19074 if test $ac_cv_lib_util_forkpty = yes; then
19075   PTY_LIBS="-lutil"
19076                 ac_have_forkpty=yes
19077                 cat >>confdefs.h <<\_ACEOF
19078 #define HAVE_FORKPTY 1
19079 _ACEOF
19080
19081 fi
19082
19083   CPPFLAGS="$ac_save_CPPFLAGS"
19084   LDFLAGS="$ac_save_LDFLAGS"
19085 #  LIBS="$ac_save_LIBS"
19086
19087
19088 if test "$ac_have_forkpty" != yes ; then
19089   # we don't need (or have) -lutil on MacOS 10.4.2...
19090
19091   ac_save_CPPFLAGS="$CPPFLAGS"
19092   ac_save_LDFLAGS="$LDFLAGS"
19093 #  ac_save_LIBS="$LIBS"
19094
19095   if test \! -z "$includedir" ; then
19096     CPPFLAGS="$CPPFLAGS -I$includedir"
19097   fi
19098   # note: $X_CFLAGS includes $x_includes
19099   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19100
19101   if test \! -z "$libdir" ; then
19102     LDFLAGS="$LDFLAGS -L$libdir"
19103   fi
19104   # note: $X_LIBS includes $x_libraries
19105   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19106
19107   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19108   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19109   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19110 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
19111 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19112   echo $ECHO_N "(cached) $ECHO_C" >&6
19113 else
19114   ac_check_lib_save_LIBS=$LIBS
19115 LIBS="-lc  $LIBS"
19116 cat >conftest.$ac_ext <<_ACEOF
19117 /* confdefs.h.  */
19118 _ACEOF
19119 cat confdefs.h >>conftest.$ac_ext
19120 cat >>conftest.$ac_ext <<_ACEOF
19121 /* end confdefs.h.  */
19122
19123 /* Override any GCC internal prototype to avoid an error.
19124    Use char because int might match the return type of a GCC
19125    builtin and then its argument prototype would still apply.  */
19126 #ifdef __cplusplus
19127 extern "C"
19128 #endif
19129 char forkpty ();
19130 int
19131 main ()
19132 {
19133 return forkpty ();
19134   ;
19135   return 0;
19136 }
19137 _ACEOF
19138 rm -f conftest.$ac_objext conftest$ac_exeext
19139 if { (ac_try="$ac_link"
19140 case "(($ac_try" in
19141   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19142   *) ac_try_echo=$ac_try;;
19143 esac
19144 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19145   (eval "$ac_link") 2>conftest.er1
19146   ac_status=$?
19147   grep -v '^ *+' conftest.er1 >conftest.err
19148   rm -f conftest.er1
19149   cat conftest.err >&5
19150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19151   (exit $ac_status); } && {
19152          test -z "$ac_c_werror_flag" ||
19153          test ! -s conftest.err
19154        } && test -s conftest$ac_exeext &&
19155        $as_test_x conftest$ac_exeext; then
19156   ac_cv_lib_c_forkpty=yes
19157 else
19158   echo "$as_me: failed program was:" >&5
19159 sed 's/^/| /' conftest.$ac_ext >&5
19160
19161         ac_cv_lib_c_forkpty=no
19162 fi
19163
19164 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19165       conftest$ac_exeext conftest.$ac_ext
19166 LIBS=$ac_check_lib_save_LIBS
19167 fi
19168 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19169 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19170 if test $ac_cv_lib_c_forkpty = yes; then
19171   PTY_LIBS=""
19172                   cat >>confdefs.h <<\_ACEOF
19173 #define HAVE_FORKPTY 1
19174 _ACEOF
19175
19176 fi
19177
19178   CPPFLAGS="$ac_save_CPPFLAGS"
19179   LDFLAGS="$ac_save_LDFLAGS"
19180 #  LIBS="$ac_save_LIBS"
19181
19182 fi
19183
19184 ###############################################################################
19185 #
19186 #       Check for the XSHM server extension.
19187 #
19188 ###############################################################################
19189
19190 have_xshm=no
19191 with_xshm_req=unspecified
19192
19193 # Check whether --with-xshm-ext was given.
19194 if test "${with_xshm_ext+set}" = set; then
19195   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19196 else
19197   with_xshm=yes
19198 fi
19199
19200
19201
19202    case "$with_xshm" in
19203     yes) ;;
19204     no)  ;;
19205
19206     /*)
19207      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19208 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19209      d=$with_xshm/include
19210      if test -d $d; then
19211        X_CFLAGS="-I$d $X_CFLAGS"
19212        { echo "$as_me:$LINENO: result: $d" >&5
19213 echo "${ECHO_T}$d" >&6; }
19214      else
19215        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19216 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19217      fi
19218
19219      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19220 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19221      d=$with_xshm/lib
19222      if test -d $d; then
19223        X_LIBS="-L$d $X_LIBS"
19224        { echo "$as_me:$LINENO: result: $d" >&5
19225 echo "${ECHO_T}$d" >&6; }
19226      else
19227        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19228 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19229      fi
19230
19231      # replace the directory string with "yes".
19232      with_xshm_req="yes"
19233      with_xshm=$with_xshm_req
19234      ;;
19235
19236     *)
19237      echo ""
19238      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19239      echo "       If it is a directory, then \`DIR/include' will be added to"
19240      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19241      exit 1
19242      ;;
19243    esac
19244
19245
19246 if test "$with_xshm" = yes; then
19247
19248   # first check for Xshm.h.
19249
19250   ac_save_CPPFLAGS="$CPPFLAGS"
19251   if test \! -z "$includedir" ; then
19252     CPPFLAGS="$CPPFLAGS -I$includedir"
19253   fi
19254   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19255   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19256   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19257 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19258 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19259   echo $ECHO_N "(cached) $ECHO_C" >&6
19260 else
19261   cat >conftest.$ac_ext <<_ACEOF
19262 /* confdefs.h.  */
19263 _ACEOF
19264 cat confdefs.h >>conftest.$ac_ext
19265 cat >>conftest.$ac_ext <<_ACEOF
19266 /* end confdefs.h.  */
19267 #include <X11/Xlib.h>
19268
19269 #include <X11/extensions/XShm.h>
19270 _ACEOF
19271 rm -f conftest.$ac_objext
19272 if { (ac_try="$ac_compile"
19273 case "(($ac_try" in
19274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19275   *) ac_try_echo=$ac_try;;
19276 esac
19277 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19278   (eval "$ac_compile") 2>conftest.er1
19279   ac_status=$?
19280   grep -v '^ *+' conftest.er1 >conftest.err
19281   rm -f conftest.er1
19282   cat conftest.err >&5
19283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19284   (exit $ac_status); } && {
19285          test -z "$ac_c_werror_flag" ||
19286          test ! -s conftest.err
19287        } && test -s conftest.$ac_objext; then
19288   ac_cv_header_X11_extensions_XShm_h=yes
19289 else
19290   echo "$as_me: failed program was:" >&5
19291 sed 's/^/| /' conftest.$ac_ext >&5
19292
19293         ac_cv_header_X11_extensions_XShm_h=no
19294 fi
19295
19296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19297 fi
19298 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19299 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19300 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19301   have_xshm=yes
19302 fi
19303
19304
19305   CPPFLAGS="$ac_save_CPPFLAGS"
19306
19307   # if that succeeded, then check for sys/ipc.h.
19308   if test "$have_xshm" = yes; then
19309     have_xshm=no
19310
19311   ac_save_CPPFLAGS="$CPPFLAGS"
19312   if test \! -z "$includedir" ; then
19313     CPPFLAGS="$CPPFLAGS -I$includedir"
19314   fi
19315   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19316   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19317   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19318   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19319 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19320 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19321   echo $ECHO_N "(cached) $ECHO_C" >&6
19322 fi
19323 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19324 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19325 else
19326   # Is the header compilable?
19327 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19328 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19329 cat >conftest.$ac_ext <<_ACEOF
19330 /* confdefs.h.  */
19331 _ACEOF
19332 cat confdefs.h >>conftest.$ac_ext
19333 cat >>conftest.$ac_ext <<_ACEOF
19334 /* end confdefs.h.  */
19335 $ac_includes_default
19336 #include <sys/ipc.h>
19337 _ACEOF
19338 rm -f conftest.$ac_objext
19339 if { (ac_try="$ac_compile"
19340 case "(($ac_try" in
19341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342   *) ac_try_echo=$ac_try;;
19343 esac
19344 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19345   (eval "$ac_compile") 2>conftest.er1
19346   ac_status=$?
19347   grep -v '^ *+' conftest.er1 >conftest.err
19348   rm -f conftest.er1
19349   cat conftest.err >&5
19350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19351   (exit $ac_status); } && {
19352          test -z "$ac_c_werror_flag" ||
19353          test ! -s conftest.err
19354        } && test -s conftest.$ac_objext; then
19355   ac_header_compiler=yes
19356 else
19357   echo "$as_me: failed program was:" >&5
19358 sed 's/^/| /' conftest.$ac_ext >&5
19359
19360         ac_header_compiler=no
19361 fi
19362
19363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19364 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19365 echo "${ECHO_T}$ac_header_compiler" >&6; }
19366
19367 # Is the header present?
19368 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19369 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19370 cat >conftest.$ac_ext <<_ACEOF
19371 /* confdefs.h.  */
19372 _ACEOF
19373 cat confdefs.h >>conftest.$ac_ext
19374 cat >>conftest.$ac_ext <<_ACEOF
19375 /* end confdefs.h.  */
19376 #include <sys/ipc.h>
19377 _ACEOF
19378 if { (ac_try="$ac_cpp conftest.$ac_ext"
19379 case "(($ac_try" in
19380   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381   *) ac_try_echo=$ac_try;;
19382 esac
19383 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19384   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19385   ac_status=$?
19386   grep -v '^ *+' conftest.er1 >conftest.err
19387   rm -f conftest.er1
19388   cat conftest.err >&5
19389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19390   (exit $ac_status); } >/dev/null && {
19391          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19392          test ! -s conftest.err
19393        }; then
19394   ac_header_preproc=yes
19395 else
19396   echo "$as_me: failed program was:" >&5
19397 sed 's/^/| /' conftest.$ac_ext >&5
19398
19399   ac_header_preproc=no
19400 fi
19401
19402 rm -f conftest.err conftest.$ac_ext
19403 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19404 echo "${ECHO_T}$ac_header_preproc" >&6; }
19405
19406 # So?  What about this header?
19407 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19408   yes:no: )
19409     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19410 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19411     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19412 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19413     ac_header_preproc=yes
19414     ;;
19415   no:yes:* )
19416     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19417 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19418     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19419 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19420     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19421 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19422     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19423 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19424     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19425 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19426     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19427 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19428
19429     ;;
19430 esac
19431 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19432 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19433 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19434   echo $ECHO_N "(cached) $ECHO_C" >&6
19435 else
19436   ac_cv_header_sys_ipc_h=$ac_header_preproc
19437 fi
19438 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19439 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19440
19441 fi
19442 if test $ac_cv_header_sys_ipc_h = yes; then
19443   have_xshm=yes
19444 fi
19445
19446
19447   CPPFLAGS="$ac_save_CPPFLAGS"
19448   fi
19449
19450   # if that succeeded, then check for sys/shm.h.
19451   if test "$have_xshm" = yes; then
19452     have_xshm=no
19453
19454   ac_save_CPPFLAGS="$CPPFLAGS"
19455   if test \! -z "$includedir" ; then
19456     CPPFLAGS="$CPPFLAGS -I$includedir"
19457   fi
19458   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19459   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19460   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19461   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19462 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19463 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19464   echo $ECHO_N "(cached) $ECHO_C" >&6
19465 fi
19466 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19467 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19468 else
19469   # Is the header compilable?
19470 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19471 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19472 cat >conftest.$ac_ext <<_ACEOF
19473 /* confdefs.h.  */
19474 _ACEOF
19475 cat confdefs.h >>conftest.$ac_ext
19476 cat >>conftest.$ac_ext <<_ACEOF
19477 /* end confdefs.h.  */
19478 $ac_includes_default
19479 #include <sys/shm.h>
19480 _ACEOF
19481 rm -f conftest.$ac_objext
19482 if { (ac_try="$ac_compile"
19483 case "(($ac_try" in
19484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19485   *) ac_try_echo=$ac_try;;
19486 esac
19487 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19488   (eval "$ac_compile") 2>conftest.er1
19489   ac_status=$?
19490   grep -v '^ *+' conftest.er1 >conftest.err
19491   rm -f conftest.er1
19492   cat conftest.err >&5
19493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19494   (exit $ac_status); } && {
19495          test -z "$ac_c_werror_flag" ||
19496          test ! -s conftest.err
19497        } && test -s conftest.$ac_objext; then
19498   ac_header_compiler=yes
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 sed 's/^/| /' conftest.$ac_ext >&5
19502
19503         ac_header_compiler=no
19504 fi
19505
19506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19507 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19508 echo "${ECHO_T}$ac_header_compiler" >&6; }
19509
19510 # Is the header present?
19511 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19512 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19513 cat >conftest.$ac_ext <<_ACEOF
19514 /* confdefs.h.  */
19515 _ACEOF
19516 cat confdefs.h >>conftest.$ac_ext
19517 cat >>conftest.$ac_ext <<_ACEOF
19518 /* end confdefs.h.  */
19519 #include <sys/shm.h>
19520 _ACEOF
19521 if { (ac_try="$ac_cpp conftest.$ac_ext"
19522 case "(($ac_try" in
19523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19524   *) ac_try_echo=$ac_try;;
19525 esac
19526 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19527   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19528   ac_status=$?
19529   grep -v '^ *+' conftest.er1 >conftest.err
19530   rm -f conftest.er1
19531   cat conftest.err >&5
19532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19533   (exit $ac_status); } >/dev/null && {
19534          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19535          test ! -s conftest.err
19536        }; then
19537   ac_header_preproc=yes
19538 else
19539   echo "$as_me: failed program was:" >&5
19540 sed 's/^/| /' conftest.$ac_ext >&5
19541
19542   ac_header_preproc=no
19543 fi
19544
19545 rm -f conftest.err conftest.$ac_ext
19546 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19547 echo "${ECHO_T}$ac_header_preproc" >&6; }
19548
19549 # So?  What about this header?
19550 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19551   yes:no: )
19552     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19553 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19554     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19555 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19556     ac_header_preproc=yes
19557     ;;
19558   no:yes:* )
19559     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19560 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19561     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19562 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19563     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19564 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19565     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19566 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19567     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19568 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19569     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19570 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19571
19572     ;;
19573 esac
19574 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19575 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19576 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19577   echo $ECHO_N "(cached) $ECHO_C" >&6
19578 else
19579   ac_cv_header_sys_shm_h=$ac_header_preproc
19580 fi
19581 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19582 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19583
19584 fi
19585 if test $ac_cv_header_sys_shm_h = yes; then
19586   have_xshm=yes
19587 fi
19588
19589
19590   CPPFLAGS="$ac_save_CPPFLAGS"
19591   fi
19592
19593   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19594   # to exist, but the library code to not exist.  And even better, the library
19595   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19596   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19597   # that's not quite right, but close enough.)
19598   #
19599   case "$host" in
19600     *-aix*)
19601       if  `uname -v` -eq 3 ; then
19602         have_xshm=no
19603
19604   ac_save_CPPFLAGS="$CPPFLAGS"
19605   ac_save_LDFLAGS="$LDFLAGS"
19606 #  ac_save_LIBS="$LIBS"
19607
19608   if test \! -z "$includedir" ; then
19609     CPPFLAGS="$CPPFLAGS -I$includedir"
19610   fi
19611   # note: $X_CFLAGS includes $x_includes
19612   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19613
19614   if test \! -z "$libdir" ; then
19615     LDFLAGS="$LDFLAGS -L$libdir"
19616   fi
19617   # note: $X_LIBS includes $x_libraries
19618   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19619
19620   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19621   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19622   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19623 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19624 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19625   echo $ECHO_N "(cached) $ECHO_C" >&6
19626 else
19627   ac_check_lib_save_LIBS=$LIBS
19628 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19629 cat >conftest.$ac_ext <<_ACEOF
19630 /* confdefs.h.  */
19631 _ACEOF
19632 cat confdefs.h >>conftest.$ac_ext
19633 cat >>conftest.$ac_ext <<_ACEOF
19634 /* end confdefs.h.  */
19635
19636 /* Override any GCC internal prototype to avoid an error.
19637    Use char because int might match the return type of a GCC
19638    builtin and then its argument prototype would still apply.  */
19639 #ifdef __cplusplus
19640 extern "C"
19641 #endif
19642 char XShmQueryExtension ();
19643 int
19644 main ()
19645 {
19646 return XShmQueryExtension ();
19647   ;
19648   return 0;
19649 }
19650 _ACEOF
19651 rm -f conftest.$ac_objext conftest$ac_exeext
19652 if { (ac_try="$ac_link"
19653 case "(($ac_try" in
19654   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19655   *) ac_try_echo=$ac_try;;
19656 esac
19657 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19658   (eval "$ac_link") 2>conftest.er1
19659   ac_status=$?
19660   grep -v '^ *+' conftest.er1 >conftest.err
19661   rm -f conftest.er1
19662   cat conftest.err >&5
19663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19664   (exit $ac_status); } && {
19665          test -z "$ac_c_werror_flag" ||
19666          test ! -s conftest.err
19667        } && test -s conftest$ac_exeext &&
19668        $as_test_x conftest$ac_exeext; then
19669   ac_cv_lib_XextSam_XShmQueryExtension=yes
19670 else
19671   echo "$as_me: failed program was:" >&5
19672 sed 's/^/| /' conftest.$ac_ext >&5
19673
19674         ac_cv_lib_XextSam_XShmQueryExtension=no
19675 fi
19676
19677 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19678       conftest$ac_exeext conftest.$ac_ext
19679 LIBS=$ac_check_lib_save_LIBS
19680 fi
19681 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19682 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19683 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19684   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19685 else
19686   true
19687 fi
19688
19689   CPPFLAGS="$ac_save_CPPFLAGS"
19690   LDFLAGS="$ac_save_LDFLAGS"
19691 #  LIBS="$ac_save_LIBS"
19692
19693       fi
19694     ;;
19695   esac
19696
19697   # if that succeeded, then we've really got it.
19698   if test "$have_xshm" = yes; then
19699     cat >>confdefs.h <<\_ACEOF
19700 #define HAVE_XSHM_EXTENSION 1
19701 _ACEOF
19702
19703   fi
19704
19705 elif test "$with_xshm" != no; then
19706   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19707   exit 1
19708 fi
19709
19710
19711 ###############################################################################
19712 #
19713 #       Check for the DOUBLE-BUFFER server extension.
19714 #
19715 ###############################################################################
19716
19717 have_xdbe=no
19718 with_xdbe_req=unspecified
19719
19720 # Check whether --with-xdbe-ext was given.
19721 if test "${with_xdbe_ext+set}" = set; then
19722   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19723 else
19724   with_xdbe=yes
19725 fi
19726
19727
19728
19729    case "$with_xdbe" in
19730     yes) ;;
19731     no)  ;;
19732
19733     /*)
19734      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19735 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19736      d=$with_xdbe/include
19737      if test -d $d; then
19738        X_CFLAGS="-I$d $X_CFLAGS"
19739        { echo "$as_me:$LINENO: result: $d" >&5
19740 echo "${ECHO_T}$d" >&6; }
19741      else
19742        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19743 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19744      fi
19745
19746      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19747 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19748      d=$with_xdbe/lib
19749      if test -d $d; then
19750        X_LIBS="-L$d $X_LIBS"
19751        { echo "$as_me:$LINENO: result: $d" >&5
19752 echo "${ECHO_T}$d" >&6; }
19753      else
19754        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19755 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19756      fi
19757
19758      # replace the directory string with "yes".
19759      with_xdbe_req="yes"
19760      with_xdbe=$with_xdbe_req
19761      ;;
19762
19763     *)
19764      echo ""
19765      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19766      echo "       If it is a directory, then \`DIR/include' will be added to"
19767      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19768      exit 1
19769      ;;
19770    esac
19771
19772
19773 if test "$with_xdbe" = yes; then
19774
19775
19776   ac_save_CPPFLAGS="$CPPFLAGS"
19777   if test \! -z "$includedir" ; then
19778     CPPFLAGS="$CPPFLAGS -I$includedir"
19779   fi
19780   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19781   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19782   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19783 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19784 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19785   echo $ECHO_N "(cached) $ECHO_C" >&6
19786 else
19787   cat >conftest.$ac_ext <<_ACEOF
19788 /* confdefs.h.  */
19789 _ACEOF
19790 cat confdefs.h >>conftest.$ac_ext
19791 cat >>conftest.$ac_ext <<_ACEOF
19792 /* end confdefs.h.  */
19793 #include <X11/Xlib.h>
19794
19795 #include <X11/extensions/Xdbe.h>
19796 _ACEOF
19797 rm -f conftest.$ac_objext
19798 if { (ac_try="$ac_compile"
19799 case "(($ac_try" in
19800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19801   *) ac_try_echo=$ac_try;;
19802 esac
19803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19804   (eval "$ac_compile") 2>conftest.er1
19805   ac_status=$?
19806   grep -v '^ *+' conftest.er1 >conftest.err
19807   rm -f conftest.er1
19808   cat conftest.err >&5
19809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19810   (exit $ac_status); } && {
19811          test -z "$ac_c_werror_flag" ||
19812          test ! -s conftest.err
19813        } && test -s conftest.$ac_objext; then
19814   ac_cv_header_X11_extensions_Xdbe_h=yes
19815 else
19816   echo "$as_me: failed program was:" >&5
19817 sed 's/^/| /' conftest.$ac_ext >&5
19818
19819         ac_cv_header_X11_extensions_Xdbe_h=no
19820 fi
19821
19822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19823 fi
19824 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19825 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19826 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19827   have_xdbe=yes
19828 fi
19829
19830
19831   CPPFLAGS="$ac_save_CPPFLAGS"
19832   if test "$have_xdbe" = yes; then
19833     cat >>confdefs.h <<\_ACEOF
19834 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19835 _ACEOF
19836
19837   fi
19838
19839 elif test "$with_xdbe" != no; then
19840   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19841   exit 1
19842 fi
19843
19844
19845 ###############################################################################
19846 #
19847 #       Check for the SGI XReadDisplay server extension.
19848 #
19849 #       Note: this has to be down here, rather than up with the other server
19850 #       extension tests, so that the output of `configure --help' is in the
19851 #       right order.  Arrgh!
19852 #
19853 ###############################################################################
19854
19855 have_readdisplay=no
19856 with_readdisplay_req=unspecified
19857
19858 # Check whether --with-readdisplay was given.
19859 if test "${with_readdisplay+set}" = set; then
19860   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19861 else
19862   with_readdisplay=yes
19863 fi
19864
19865
19866
19867    case "$with_readdisplay" in
19868     yes) ;;
19869     no)  ;;
19870
19871     /*)
19872      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19873 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19874      d=$with_readdisplay/include
19875      if test -d $d; then
19876        X_CFLAGS="-I$d $X_CFLAGS"
19877        { echo "$as_me:$LINENO: result: $d" >&5
19878 echo "${ECHO_T}$d" >&6; }
19879      else
19880        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19881 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19882      fi
19883
19884      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19885 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19886      d=$with_readdisplay/lib
19887      if test -d $d; then
19888        X_LIBS="-L$d $X_LIBS"
19889        { echo "$as_me:$LINENO: result: $d" >&5
19890 echo "${ECHO_T}$d" >&6; }
19891      else
19892        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19893 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19894      fi
19895
19896      # replace the directory string with "yes".
19897      with_readdisplay_req="yes"
19898      with_readdisplay=$with_readdisplay_req
19899      ;;
19900
19901     *)
19902      echo ""
19903      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19904      echo "       If it is a directory, then \`DIR/include' will be added to"
19905      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19906      exit 1
19907      ;;
19908    esac
19909
19910
19911 if test "$with_readdisplay" = yes; then
19912
19913   ac_save_CPPFLAGS="$CPPFLAGS"
19914   if test \! -z "$includedir" ; then
19915     CPPFLAGS="$CPPFLAGS -I$includedir"
19916   fi
19917   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19918   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19919   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19920 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19921 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19922   echo $ECHO_N "(cached) $ECHO_C" >&6
19923 else
19924   cat >conftest.$ac_ext <<_ACEOF
19925 /* confdefs.h.  */
19926 _ACEOF
19927 cat confdefs.h >>conftest.$ac_ext
19928 cat >>conftest.$ac_ext <<_ACEOF
19929 /* end confdefs.h.  */
19930 #include <X11/Xlib.h>
19931
19932 #include <X11/extensions/readdisplay.h>
19933 _ACEOF
19934 rm -f conftest.$ac_objext
19935 if { (ac_try="$ac_compile"
19936 case "(($ac_try" in
19937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938   *) ac_try_echo=$ac_try;;
19939 esac
19940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19941   (eval "$ac_compile") 2>conftest.er1
19942   ac_status=$?
19943   grep -v '^ *+' conftest.er1 >conftest.err
19944   rm -f conftest.er1
19945   cat conftest.err >&5
19946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19947   (exit $ac_status); } && {
19948          test -z "$ac_c_werror_flag" ||
19949          test ! -s conftest.err
19950        } && test -s conftest.$ac_objext; then
19951   ac_cv_header_X11_extensions_readdisplay_h=yes
19952 else
19953   echo "$as_me: failed program was:" >&5
19954 sed 's/^/| /' conftest.$ac_ext >&5
19955
19956         ac_cv_header_X11_extensions_readdisplay_h=no
19957 fi
19958
19959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19960 fi
19961 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19962 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19963 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19964   cat >>confdefs.h <<\_ACEOF
19965 #define HAVE_READ_DISPLAY_EXTENSION 1
19966 _ACEOF
19967
19968 fi
19969
19970
19971   CPPFLAGS="$ac_save_CPPFLAGS"
19972 elif test "$with_readdisplay" != no; then
19973   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19974   exit 1
19975 fi
19976
19977
19978 ###############################################################################
19979 #
19980 #       Check for a directory full of images to use as the default value
19981 #       of the "imageDirectory" preference.
19982 #
19983 ###############################################################################
19984
19985 have_imagedir=no
19986 with_imagedir_req=unspecified
19987
19988
19989 # Check whether --with-image-directory was given.
19990 if test "${with_image_directory+set}" = set; then
19991   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19992 else
19993   with_imagedir=yes
19994 fi
19995
19996 # no HANDLE_X_PATH_ARG for this one
19997
19998 case "$with_imagedir" in
19999   /*)
20000     # absolute path
20001     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20002 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
20003     if test -d "$with_imagedir" ; then
20004       { echo "$as_me:$LINENO: result: yes" >&5
20005 echo "${ECHO_T}yes" >&6; }
20006     else
20007       { echo "$as_me:$LINENO: result: no" >&5
20008 echo "${ECHO_T}no" >&6; }
20009       with_imagedir=""
20010     fi
20011   ;;
20012   yes)
20013     with_imagedir=""
20014
20015     #### Could use some more defaults here...
20016     for dd in \
20017       "/usr/share/backgrounds/images/"          \
20018       "/usr/share/wallpapers/"                  \
20019       "/Library/Desktop Pictures/"              \
20020     ; do
20021       if test -z "$with_imagedir"; then
20022         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
20023 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
20024         if test -d "$dd" ; then
20025           { echo "$as_me:$LINENO: result: yes" >&5
20026 echo "${ECHO_T}yes" >&6; }
20027           with_imagedir="$dd"
20028         else
20029           { echo "$as_me:$LINENO: result: no" >&5
20030 echo "${ECHO_T}no" >&6; }
20031         fi
20032       fi
20033     done
20034
20035   ;;
20036   no)
20037     with_imagedir=""
20038   ;;
20039
20040   *)
20041     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20042     exit 1
20043   ;;
20044 esac
20045 ac_cv_imagedir="$with_imagedir"
20046
20047 DEFAULT_IMAGES_P='True'
20048 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20049
20050 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20051   DEFAULT_IMAGES_P='False'
20052 fi
20053
20054
20055 ###############################################################################
20056 #
20057 #       Pick a text file to use as the default of the "textFile" preference.
20058 #       Any old file will do, but preferably one that will make interesting
20059 #       shapes when displayed by "starwars" and "fontglide".
20060 #
20061 ###############################################################################
20062
20063 have_textfile=no
20064 with_textfile_req=unspecified
20065
20066
20067 # Check whether --with-text-file was given.
20068 if test "${with_text_file+set}" = set; then
20069   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20070 else
20071   with_textfile=yes
20072 fi
20073
20074 # no HANDLE_X_PATH_ARG for this one
20075
20076 case "$with_textfile" in
20077   /*)
20078     # absolute path
20079     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20080 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
20081     if test -f "$with_textfile" ; then
20082       { echo "$as_me:$LINENO: result: yes" >&5
20083 echo "${ECHO_T}yes" >&6; }
20084     else
20085       { echo "$as_me:$LINENO: result: no" >&5
20086 echo "${ECHO_T}no" >&6; }
20087       with_textfile=""
20088     fi
20089   ;;
20090   yes)
20091     with_textfile=""
20092
20093     #### Could use some more defaults here...
20094     for f in \
20095       "/usr/X11R6/lib/X11/doc/README"              \
20096       "/usr/share/doc/xserver-common/copyright"    \
20097       "/usr/share/doc/xserver-xorg-core/copyright" \
20098       "/usr/X11R6/README"                          \
20099       "/usr/share/doc/debian/debian-manifesto"     \
20100     ; do
20101       if test -z "$with_textfile"; then
20102         { echo "$as_me:$LINENO: checking for text file $f" >&5
20103 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
20104         if test -f "$f" ; then
20105           { echo "$as_me:$LINENO: result: yes" >&5
20106 echo "${ECHO_T}yes" >&6; }
20107           with_textfile="$f"
20108         else
20109           { echo "$as_me:$LINENO: result: no" >&5
20110 echo "${ECHO_T}no" >&6; }
20111         fi
20112       fi
20113     done
20114
20115   ;;
20116   no)
20117     with_textfile=""
20118   ;;
20119
20120   *)
20121     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20122     exit 1
20123   ;;
20124 esac
20125 ac_cv_textfile="$with_textfile"
20126
20127 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20128
20129
20130 ###############################################################################
20131 #
20132 #       Check the browser to see help URL
20133 #
20134 ###############################################################################
20135
20136 have_browser=no
20137 with_browser_req=unspecified
20138
20139
20140 # Check whether --with-browser was given.
20141 if test "${with_browser+set}" = set; then
20142   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20143 else
20144   with_browser=no
20145 fi
20146
20147 # no HANDLE_X_PATH_ARG for this one
20148
20149 case "$with_browser" in
20150   no )
20151   ;;
20152   * )
20153     WITH_BROWSER=$with_browser
20154     gnome_open_program=$with_browser
20155     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20156 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20157     with_browser_fullpath=`which $with_browser 2>/dev/null`
20158     case $with_browser_fullpath in
20159          /* )
20160                 { echo "$as_me:$LINENO: result: yes" >&5
20161 echo "${ECHO_T}yes" >&6; }
20162                  have_browser=yes
20163                  ;;
20164         * )
20165                { echo "$as_me:$LINENO: result: no" >&5
20166 echo "${ECHO_T}no" >&6; }
20167 # Only warning: we don't want to install all packages for the
20168 # dependency of the browser in building stage...
20169                echo "WARNING: browser not found: --with-browser=$with_browser"
20170                ;;
20171     esac
20172   ;;
20173 esac
20174 ac_cv_browser="$with_browser"
20175
20176 ###############################################################################
20177 #
20178 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20179 #       This should be safe, but let's give people the option.
20180 #
20181 ###############################################################################
20182
20183 setuid_hacks_default=no
20184 setuid_hacks="$setuid_hacks_default"
20185
20186 # Check whether --with-setuid-hacks was given.
20187 if test "${with_setuid_hacks+set}" = set; then
20188   withval=$with_setuid_hacks; setuid_hacks="$withval"
20189 else
20190   setuid_hacks="$setuid_hacks_default"
20191 fi
20192
20193
20194
20195    case "$setuid_hacks" in
20196     yes) ;;
20197     no)  ;;
20198
20199     /*)
20200      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20201 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20202      d=$setuid_hacks/include
20203      if test -d $d; then
20204        X_CFLAGS="-I$d $X_CFLAGS"
20205        { echo "$as_me:$LINENO: result: $d" >&5
20206 echo "${ECHO_T}$d" >&6; }
20207      else
20208        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20209 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20210      fi
20211
20212      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20213 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20214      d=$setuid_hacks/lib
20215      if test -d $d; then
20216        X_LIBS="-L$d $X_LIBS"
20217        { echo "$as_me:$LINENO: result: $d" >&5
20218 echo "${ECHO_T}$d" >&6; }
20219      else
20220        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20221 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20222      fi
20223
20224      # replace the directory string with "yes".
20225      setuid_hacks_req="yes"
20226      setuid_hacks=$setuid_hacks_req
20227      ;;
20228
20229     *)
20230      echo ""
20231      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20232      echo "       If it is a directory, then \`DIR/include' will be added to"
20233      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20234      exit 1
20235      ;;
20236    esac
20237
20238
20239 if test "$setuid_hacks" = yes; then
20240   true
20241 elif test "$setuid_hacks" != no; then
20242   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20243   exit 1
20244 fi
20245
20246
20247 ###############################################################################
20248 #
20249 #       Done testing.  Now, set up the various -I and -L variables,
20250 #       and decide which GUI program to build by default.
20251 #
20252 ###############################################################################
20253
20254 DEPEND=makedepend
20255 DEPEND_FLAGS=
20256 DEPEND_DEFINES=
20257
20258
20259 if test \! -z "$includedir" ; then
20260   INCLUDES="$INCLUDES -I$includedir"
20261 fi
20262
20263 if test \! -z "$libdir" ; then
20264   LDFLAGS="$LDFLAGS -L$libdir"
20265 fi
20266
20267
20268 PREFERRED_DEMO_PROGRAM=''
20269 ALL_DEMO_PROGRAMS=
20270 if test "$have_motif" = yes; then
20271   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20272   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20273 fi
20274 if test "$have_gtk" = yes; then
20275   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20276   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20277 fi
20278
20279
20280 if test "$have_kerberos" = yes; then
20281   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20282   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20283 fi
20284 if test "$have_pam" = yes; then
20285   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20286   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20287   INSTALL_PAM="install-pam"
20288 fi
20289 if test "$have_passwd_helper" = yes; then
20290   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20291   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20292 fi
20293   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20294   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20295
20296
20297 if test "$enable_locking" = yes; then
20298   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20299   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20300 else
20301   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20302   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20303 fi
20304
20305 if test "$ac_macosx" = yes; then
20306   EXES_OSX='$(EXES_OSX)'
20307   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20308   MEN_OSX='$(MEN_OSX)'
20309 else
20310   EXES_OSX=
20311   SCRIPTS_OSX=
20312   MEN_OSX=
20313 fi
20314
20315
20316 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20317
20318 if test "$need_setuid" = yes; then
20319   NEED_SETUID=yes
20320 else
20321   NEED_SETUID=no
20322 fi
20323
20324 if test "$setuid_hacks" = yes; then
20325   SETUID_HACKS=yes
20326 else
20327   SETUID_HACKS=no
20328 fi
20329
20330 tab='   '
20331 if test "$have_gl" = yes; then
20332   GL_EXES='$(GL_EXES)'
20333   SUID_EXES='$(SUID_EXES)'
20334   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
20335   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20336   GL_MEN='$(GL_MEN)'
20337   GL_KLUDGE=" "
20338 else
20339   GL_KLUDGE="-"
20340 fi
20341
20342 if test "$have_gle" = yes; then
20343   GLE_EXES='$(GLE_EXES)'
20344   GLE_KLUDGE=" "
20345 else
20346   GLE_KLUDGE="-"
20347 fi
20348
20349 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20350  JPEG_EXES='$(JPEG_EXES)'
20351 fi
20352
20353
20354 # Another substitution in the XScreenSaver.ad.in file:
20355 #
20356 if test "$gnome_open_program" != ''; then
20357   GNOME24=''
20358   GNOME22='!    '
20359   NOGNOME='!    '
20360 elif test "$gnome_url_show_program" != ''; then
20361   GNOME24='!    '
20362   GNOME22=''
20363   NOGNOME='!    '
20364 else
20365   GNOME24='!    '
20366   GNOME22='!    '
20367   NOGNOME=''
20368 fi
20369
20370
20371 # Set PO_DATADIR to something sensible.
20372 #
20373 { echo "$as_me:$LINENO: checking for locale directory" >&5
20374 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20375 if test -n "$GTK_DATADIR" ; then
20376   PO_DATADIR="$GTK_DATADIR"
20377 elif test "$have_gtk" = yes; then
20378   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20379   PO_DATADIR="$PO_DATADIR/share"
20380 fi
20381
20382 if test -z "$PO_DATADIR" ; then
20383   #
20384   # #### Total fucking kludge --
20385   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20386   # but of course we need to expand all the nested variables to do that...
20387   #
20388   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20389   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20390 fi
20391
20392 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20393 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20394
20395
20396 # canonicalize slashes.
20397 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20398
20399 # gcc 3.0 likes to issue this warning for every file:
20400 #
20401 # cc1: warning: changing search order for system directory "/usr/local/include"
20402 # cc1: warning:   as it has already been specified as a non-system directory
20403 #
20404 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20405 # Which *should* be totally redundant, and thus an ok thing to delete?
20406 #
20407 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20408
20409
20410 ###############################################################################
20411 #
20412 #       Perform substitutions and write Makefiles.
20413 #
20414 ###############################################################################
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
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 APPDEFAULTS=$ac_x_app_defaults
20482
20483
20484
20485
20486
20487
20488
20489 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20490
20491 cat >confcache <<\_ACEOF
20492 # This file is a shell script that caches the results of configure
20493 # tests run on this system so they can be shared between configure
20494 # scripts and configure runs, see configure's option --config-cache.
20495 # It is not useful on other systems.  If it contains results you don't
20496 # want to keep, you may remove or edit it.
20497 #
20498 # config.status only pays attention to the cache file if you give it
20499 # the --recheck option to rerun configure.
20500 #
20501 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20502 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20503 # following values.
20504
20505 _ACEOF
20506
20507 # The following way of writing the cache mishandles newlines in values,
20508 # but we know of no workaround that is simple, portable, and efficient.
20509 # So, we kill variables containing newlines.
20510 # Ultrix sh set writes to stderr and can't be redirected directly,
20511 # and sets the high bit in the cache file unless we assign to the vars.
20512 (
20513   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20514     eval ac_val=\$$ac_var
20515     case $ac_val in #(
20516     *${as_nl}*)
20517       case $ac_var in #(
20518       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20519 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20520       esac
20521       case $ac_var in #(
20522       _ | IFS | as_nl) ;; #(
20523       *) $as_unset $ac_var ;;
20524       esac ;;
20525     esac
20526   done
20527
20528   (set) 2>&1 |
20529     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20530     *${as_nl}ac_space=\ *)
20531       # `set' does not quote correctly, so add quotes (double-quote
20532       # substitution turns \\\\ into \\, and sed turns \\ into \).
20533       sed -n \
20534         "s/'/'\\\\''/g;
20535           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20536       ;; #(
20537     *)
20538       # `set' quotes correctly as required by POSIX, so do not add quotes.
20539       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20540       ;;
20541     esac |
20542     sort
20543 ) |
20544   sed '
20545      /^ac_cv_env_/b end
20546      t clear
20547      :clear
20548      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20549      t end
20550      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20551      :end' >>confcache
20552 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20553   if test -w "$cache_file"; then
20554     test "x$cache_file" != "x/dev/null" &&
20555       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20556 echo "$as_me: updating cache $cache_file" >&6;}
20557     cat confcache >$cache_file
20558   else
20559     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20560 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20561   fi
20562 fi
20563 rm -f confcache
20564
20565 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20566 # Let make expand exec_prefix.
20567 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20568
20569 DEFS=-DHAVE_CONFIG_H
20570
20571 ac_libobjs=
20572 ac_ltlibobjs=
20573 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20574   # 1. Remove the extension, and $U if already installed.
20575   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20576   ac_i=`echo "$ac_i" | sed "$ac_script"`
20577   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20578   #    will be set to the directory where LIBOBJS objects are built.
20579   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20580   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20581 done
20582 LIBOBJS=$ac_libobjs
20583
20584 LTLIBOBJS=$ac_ltlibobjs
20585
20586
20587
20588
20589         mv -f po/POTFILES po/POTFILES.tmp
20590         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20591         rm -f po/POTFILES.tmp
20592
20593
20594
20595 : ${CONFIG_STATUS=./config.status}
20596 ac_clean_files_save=$ac_clean_files
20597 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20598 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20599 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20600 cat >$CONFIG_STATUS <<_ACEOF
20601 #! $SHELL
20602 # Generated by $as_me.
20603 # Run this file to recreate the current configuration.
20604 # Compiler output produced by configure, useful for debugging
20605 # configure, is in config.log if it exists.
20606
20607 debug=false
20608 ac_cs_recheck=false
20609 ac_cs_silent=false
20610 SHELL=\${CONFIG_SHELL-$SHELL}
20611 _ACEOF
20612
20613 cat >>$CONFIG_STATUS <<\_ACEOF
20614 ## --------------------- ##
20615 ## M4sh Initialization.  ##
20616 ## --------------------- ##
20617
20618 # Be more Bourne compatible
20619 DUALCASE=1; export DUALCASE # for MKS sh
20620 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20621   emulate sh
20622   NULLCMD=:
20623   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20624   # is contrary to our usage.  Disable this feature.
20625   alias -g '${1+"$@"}'='"$@"'
20626   setopt NO_GLOB_SUBST
20627 else
20628   case `(set -o) 2>/dev/null` in
20629   *posix*) set -o posix ;;
20630 esac
20631
20632 fi
20633
20634
20635
20636
20637 # PATH needs CR
20638 # Avoid depending upon Character Ranges.
20639 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20640 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20641 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20642 as_cr_digits='0123456789'
20643 as_cr_alnum=$as_cr_Letters$as_cr_digits
20644
20645 # The user is always right.
20646 if test "${PATH_SEPARATOR+set}" != set; then
20647   echo "#! /bin/sh" >conf$$.sh
20648   echo  "exit 0"   >>conf$$.sh
20649   chmod +x conf$$.sh
20650   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20651     PATH_SEPARATOR=';'
20652   else
20653     PATH_SEPARATOR=:
20654   fi
20655   rm -f conf$$.sh
20656 fi
20657
20658 # Support unset when possible.
20659 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20660   as_unset=unset
20661 else
20662   as_unset=false
20663 fi
20664
20665
20666 # IFS
20667 # We need space, tab and new line, in precisely that order.  Quoting is
20668 # there to prevent editors from complaining about space-tab.
20669 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20670 # splitting by setting IFS to empty value.)
20671 as_nl='
20672 '
20673 IFS=" ""        $as_nl"
20674
20675 # Find who we are.  Look in the path if we contain no directory separator.
20676 case $0 in
20677   *[\\/]* ) as_myself=$0 ;;
20678   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20679 for as_dir in $PATH
20680 do
20681   IFS=$as_save_IFS
20682   test -z "$as_dir" && as_dir=.
20683   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20684 done
20685 IFS=$as_save_IFS
20686
20687      ;;
20688 esac
20689 # We did not find ourselves, most probably we were run as `sh COMMAND'
20690 # in which case we are not to be found in the path.
20691 if test "x$as_myself" = x; then
20692   as_myself=$0
20693 fi
20694 if test ! -f "$as_myself"; then
20695   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20696   { (exit 1); exit 1; }
20697 fi
20698
20699 # Work around bugs in pre-3.0 UWIN ksh.
20700 for as_var in ENV MAIL MAILPATH
20701 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20702 done
20703 PS1='$ '
20704 PS2='> '
20705 PS4='+ '
20706
20707 # NLS nuisances.
20708 for as_var in \
20709   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20710   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20711   LC_TELEPHONE LC_TIME
20712 do
20713   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20714     eval $as_var=C; export $as_var
20715   else
20716     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20717   fi
20718 done
20719
20720 # Required to use basename.
20721 if expr a : '\(a\)' >/dev/null 2>&1 &&
20722    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20723   as_expr=expr
20724 else
20725   as_expr=false
20726 fi
20727
20728 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20729   as_basename=basename
20730 else
20731   as_basename=false
20732 fi
20733
20734
20735 # Name of the executable.
20736 as_me=`$as_basename -- "$0" ||
20737 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20738          X"$0" : 'X\(//\)$' \| \
20739          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20740 echo X/"$0" |
20741     sed '/^.*\/\([^/][^/]*\)\/*$/{
20742             s//\1/
20743             q
20744           }
20745           /^X\/\(\/\/\)$/{
20746             s//\1/
20747             q
20748           }
20749           /^X\/\(\/\).*/{
20750             s//\1/
20751             q
20752           }
20753           s/.*/./; q'`
20754
20755 # CDPATH.
20756 $as_unset CDPATH
20757
20758
20759
20760   as_lineno_1=$LINENO
20761   as_lineno_2=$LINENO
20762   test "x$as_lineno_1" != "x$as_lineno_2" &&
20763   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20764
20765   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20766   # uniformly replaced by the line number.  The first 'sed' inserts a
20767   # line-number line after each line using $LINENO; the second 'sed'
20768   # does the real work.  The second script uses 'N' to pair each
20769   # line-number line with the line containing $LINENO, and appends
20770   # trailing '-' during substitution so that $LINENO is not a special
20771   # case at line end.
20772   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20773   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20774   # E. McMahon (1931-1989) for sed's syntax.  :-)
20775   sed -n '
20776     p
20777     /[$]LINENO/=
20778   ' <$as_myself |
20779     sed '
20780       s/[$]LINENO.*/&-/
20781       t lineno
20782       b
20783       :lineno
20784       N
20785       :loop
20786       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20787       t loop
20788       s/-\n.*//
20789     ' >$as_me.lineno &&
20790   chmod +x "$as_me.lineno" ||
20791     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20792    { (exit 1); exit 1; }; }
20793
20794   # Don't try to exec as it changes $[0], causing all sort of problems
20795   # (the dirname of $[0] is not the place where we might find the
20796   # original and so on.  Autoconf is especially sensitive to this).
20797   . "./$as_me.lineno"
20798   # Exit status is that of the last command.
20799   exit
20800 }
20801
20802
20803 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20804   as_dirname=dirname
20805 else
20806   as_dirname=false
20807 fi
20808
20809 ECHO_C= ECHO_N= ECHO_T=
20810 case `echo -n x` in
20811 -n*)
20812   case `echo 'x\c'` in
20813   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20814   *)   ECHO_C='\c';;
20815   esac;;
20816 *)
20817   ECHO_N='-n';;
20818 esac
20819
20820 if expr a : '\(a\)' >/dev/null 2>&1 &&
20821    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20822   as_expr=expr
20823 else
20824   as_expr=false
20825 fi
20826
20827 rm -f conf$$ conf$$.exe conf$$.file
20828 if test -d conf$$.dir; then
20829   rm -f conf$$.dir/conf$$.file
20830 else
20831   rm -f conf$$.dir
20832   mkdir conf$$.dir
20833 fi
20834 echo >conf$$.file
20835 if ln -s conf$$.file conf$$ 2>/dev/null; then
20836   as_ln_s='ln -s'
20837   # ... but there are two gotchas:
20838   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20839   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20840   # In both cases, we have to default to `cp -p'.
20841   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20842     as_ln_s='cp -p'
20843 elif ln conf$$.file conf$$ 2>/dev/null; then
20844   as_ln_s=ln
20845 else
20846   as_ln_s='cp -p'
20847 fi
20848 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20849 rmdir conf$$.dir 2>/dev/null
20850
20851 if mkdir -p . 2>/dev/null; then
20852   as_mkdir_p=:
20853 else
20854   test -d ./-p && rmdir ./-p
20855   as_mkdir_p=false
20856 fi
20857
20858 if test -x / >/dev/null 2>&1; then
20859   as_test_x='test -x'
20860 else
20861   if ls -dL / >/dev/null 2>&1; then
20862     as_ls_L_option=L
20863   else
20864     as_ls_L_option=
20865   fi
20866   as_test_x='
20867     eval sh -c '\''
20868       if test -d "$1"; then
20869         test -d "$1/.";
20870       else
20871         case $1 in
20872         -*)set "./$1";;
20873         esac;
20874         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20875         ???[sx]*):;;*)false;;esac;fi
20876     '\'' sh
20877   '
20878 fi
20879 as_executable_p=$as_test_x
20880
20881 # Sed expression to map a string onto a valid CPP name.
20882 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20883
20884 # Sed expression to map a string onto a valid variable name.
20885 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20886
20887
20888 exec 6>&1
20889
20890 # Save the log message, to keep $[0] and so on meaningful, and to
20891 # report actual input values of CONFIG_FILES etc. instead of their
20892 # values after options handling.
20893 ac_log="
20894 This file was extended by $as_me, which was
20895 generated by GNU Autoconf 2.61.  Invocation command line was
20896
20897   CONFIG_FILES    = $CONFIG_FILES
20898   CONFIG_HEADERS  = $CONFIG_HEADERS
20899   CONFIG_LINKS    = $CONFIG_LINKS
20900   CONFIG_COMMANDS = $CONFIG_COMMANDS
20901   $ $0 $@
20902
20903 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20904 "
20905
20906 _ACEOF
20907
20908 cat >>$CONFIG_STATUS <<_ACEOF
20909 # Files that config.status was made for.
20910 config_files="$ac_config_files"
20911 config_headers="$ac_config_headers"
20912 config_commands="$ac_config_commands"
20913
20914 _ACEOF
20915
20916 cat >>$CONFIG_STATUS <<\_ACEOF
20917 ac_cs_usage="\
20918 \`$as_me' instantiates files from templates according to the
20919 current configuration.
20920
20921 Usage: $0 [OPTIONS] [FILE]...
20922
20923   -h, --help       print this help, then exit
20924   -V, --version    print version number and configuration settings, then exit
20925   -q, --quiet      do not print progress messages
20926   -d, --debug      don't remove temporary files
20927       --recheck    update $as_me by reconfiguring in the same conditions
20928   --file=FILE[:TEMPLATE]
20929                    instantiate the configuration file FILE
20930   --header=FILE[:TEMPLATE]
20931                    instantiate the configuration header FILE
20932
20933 Configuration files:
20934 $config_files
20935
20936 Configuration headers:
20937 $config_headers
20938
20939 Configuration commands:
20940 $config_commands
20941
20942 Report bugs to <bug-autoconf@gnu.org>."
20943
20944 _ACEOF
20945 cat >>$CONFIG_STATUS <<_ACEOF
20946 ac_cs_version="\\
20947 config.status
20948 configured by $0, generated by GNU Autoconf 2.61,
20949   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20950
20951 Copyright (C) 2006 Free Software Foundation, Inc.
20952 This config.status script is free software; the Free Software Foundation
20953 gives unlimited permission to copy, distribute and modify it."
20954
20955 ac_pwd='$ac_pwd'
20956 srcdir='$srcdir'
20957 INSTALL='$INSTALL'
20958 _ACEOF
20959
20960 cat >>$CONFIG_STATUS <<\_ACEOF
20961 # If no file are specified by the user, then we need to provide default
20962 # value.  By we need to know if files were specified by the user.
20963 ac_need_defaults=:
20964 while test $# != 0
20965 do
20966   case $1 in
20967   --*=*)
20968     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20969     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20970     ac_shift=:
20971     ;;
20972   *)
20973     ac_option=$1
20974     ac_optarg=$2
20975     ac_shift=shift
20976     ;;
20977   esac
20978
20979   case $ac_option in
20980   # Handling of the options.
20981   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20982     ac_cs_recheck=: ;;
20983   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20984     echo "$ac_cs_version"; exit ;;
20985   --debug | --debu | --deb | --de | --d | -d )
20986     debug=: ;;
20987   --file | --fil | --fi | --f )
20988     $ac_shift
20989     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20990     ac_need_defaults=false;;
20991   --header | --heade | --head | --hea )
20992     $ac_shift
20993     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20994     ac_need_defaults=false;;
20995   --he | --h)
20996     # Conflict between --help and --header
20997     { echo "$as_me: error: ambiguous option: $1
20998 Try \`$0 --help' for more information." >&2
20999    { (exit 1); exit 1; }; };;
21000   --help | --hel | -h )
21001     echo "$ac_cs_usage"; exit ;;
21002   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21003   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21004     ac_cs_silent=: ;;
21005
21006   # This is an error.
21007   -*) { echo "$as_me: error: unrecognized option: $1
21008 Try \`$0 --help' for more information." >&2
21009    { (exit 1); exit 1; }; } ;;
21010
21011   *) ac_config_targets="$ac_config_targets $1"
21012      ac_need_defaults=false ;;
21013
21014   esac
21015   shift
21016 done
21017
21018 ac_configure_extra_args=
21019
21020 if $ac_cs_silent; then
21021   exec 6>/dev/null
21022   ac_configure_extra_args="$ac_configure_extra_args --silent"
21023 fi
21024
21025 _ACEOF
21026 cat >>$CONFIG_STATUS <<_ACEOF
21027 if \$ac_cs_recheck; then
21028   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21029   CONFIG_SHELL=$SHELL
21030   export CONFIG_SHELL
21031   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21032 fi
21033
21034 _ACEOF
21035 cat >>$CONFIG_STATUS <<\_ACEOF
21036 exec 5>>config.log
21037 {
21038   echo
21039   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21040 ## Running $as_me. ##
21041 _ASBOX
21042   echo "$ac_log"
21043 } >&5
21044
21045 _ACEOF
21046 cat >>$CONFIG_STATUS <<_ACEOF
21047 #
21048 # INIT-COMMANDS
21049 #
21050 INTLTOOL_PERL=${INTLTOOL_PERL}
21051
21052
21053 _ACEOF
21054
21055 cat >>$CONFIG_STATUS <<\_ACEOF
21056
21057 # Handling of arguments.
21058 for ac_config_target in $ac_config_targets
21059 do
21060   case $ac_config_target in
21061     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21062     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21063     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21064     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21065     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21066     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21067     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21068     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21069     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21070     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21071
21072   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21073 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21074    { (exit 1); exit 1; }; };;
21075   esac
21076 done
21077
21078
21079 # If the user did not use the arguments to specify the items to instantiate,
21080 # then the envvar interface is used.  Set only those that are not.
21081 # We use the long form for the default assignment because of an extremely
21082 # bizarre bug on SunOS 4.1.3.
21083 if $ac_need_defaults; then
21084   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21085   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21086   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21087 fi
21088
21089 # Have a temporary directory for convenience.  Make it in the build tree
21090 # simply because there is no reason against having it here, and in addition,
21091 # creating and moving files from /tmp can sometimes cause problems.
21092 # Hook for its removal unless debugging.
21093 # Note that there is a small window in which the directory will not be cleaned:
21094 # after its creation but before its name has been assigned to `$tmp'.
21095 $debug ||
21096 {
21097   tmp=
21098   trap 'exit_status=$?
21099   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21100 ' 0
21101   trap '{ (exit 1); exit 1; }' 1 2 13 15
21102 }
21103 # Create a (secure) tmp directory for tmp files.
21104
21105 {
21106   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21107   test -n "$tmp" && test -d "$tmp"
21108 }  ||
21109 {
21110   tmp=./conf$$-$RANDOM
21111   (umask 077 && mkdir "$tmp")
21112 } ||
21113 {
21114    echo "$me: cannot create a temporary directory in ." >&2
21115    { (exit 1); exit 1; }
21116 }
21117
21118 #
21119 # Set up the sed scripts for CONFIG_FILES section.
21120 #
21121
21122 # No need to generate the scripts if there are no CONFIG_FILES.
21123 # This happens for instance when ./config.status config.h
21124 if test -n "$CONFIG_FILES"; then
21125
21126 _ACEOF
21127
21128
21129
21130 ac_delim='%!_!# '
21131 for ac_last_try in false false false false false :; do
21132   cat >conf$$subs.sed <<_ACEOF
21133 SHELL!$SHELL$ac_delim
21134 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21135 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21136 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21137 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21138 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21139 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21140 exec_prefix!$exec_prefix$ac_delim
21141 prefix!$prefix$ac_delim
21142 program_transform_name!$program_transform_name$ac_delim
21143 bindir!$bindir$ac_delim
21144 sbindir!$sbindir$ac_delim
21145 libexecdir!$libexecdir$ac_delim
21146 datarootdir!$datarootdir$ac_delim
21147 datadir!$datadir$ac_delim
21148 sysconfdir!$sysconfdir$ac_delim
21149 sharedstatedir!$sharedstatedir$ac_delim
21150 localstatedir!$localstatedir$ac_delim
21151 includedir!$includedir$ac_delim
21152 oldincludedir!$oldincludedir$ac_delim
21153 docdir!$docdir$ac_delim
21154 infodir!$infodir$ac_delim
21155 htmldir!$htmldir$ac_delim
21156 dvidir!$dvidir$ac_delim
21157 pdfdir!$pdfdir$ac_delim
21158 psdir!$psdir$ac_delim
21159 libdir!$libdir$ac_delim
21160 localedir!$localedir$ac_delim
21161 mandir!$mandir$ac_delim
21162 DEFS!$DEFS$ac_delim
21163 ECHO_C!$ECHO_C$ac_delim
21164 ECHO_N!$ECHO_N$ac_delim
21165 ECHO_T!$ECHO_T$ac_delim
21166 LIBS!$LIBS$ac_delim
21167 build_alias!$build_alias$ac_delim
21168 host_alias!$host_alias$ac_delim
21169 target_alias!$target_alias$ac_delim
21170 build!$build$ac_delim
21171 build_cpu!$build_cpu$ac_delim
21172 build_vendor!$build_vendor$ac_delim
21173 build_os!$build_os$ac_delim
21174 host!$host$ac_delim
21175 host_cpu!$host_cpu$ac_delim
21176 host_vendor!$host_vendor$ac_delim
21177 host_os!$host_os$ac_delim
21178 CC!$CC$ac_delim
21179 CFLAGS!$CFLAGS$ac_delim
21180 LDFLAGS!$LDFLAGS$ac_delim
21181 CPPFLAGS!$CPPFLAGS$ac_delim
21182 ac_ct_CC!$ac_ct_CC$ac_delim
21183 EXEEXT!$EXEEXT$ac_delim
21184 OBJEXT!$OBJEXT$ac_delim
21185 CPP!$CPP$ac_delim
21186 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21187 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21188 INSTALL_DATA!$INSTALL_DATA$ac_delim
21189 SET_MAKE!$SET_MAKE$ac_delim
21190 GREP!$GREP$ac_delim
21191 EGREP!$EGREP$ac_delim
21192 PERL!$PERL$ac_delim
21193 XMKMF!$XMKMF$ac_delim
21194 X_CFLAGS!$X_CFLAGS$ac_delim
21195 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21196 X_LIBS!$X_LIBS$ac_delim
21197 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21198 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21199 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21200 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21201 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21202 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21203 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21204 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21205 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21206 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21207 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21208 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21209 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21210 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21211 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21212 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21213 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21214 RANLIB!$RANLIB$ac_delim
21215 ALLOCA!$ALLOCA$ac_delim
21216 USE_NLS!$USE_NLS$ac_delim
21217 MSGFMT!$MSGFMT$ac_delim
21218 GMSGFMT!$GMSGFMT$ac_delim
21219 XGETTEXT!$XGETTEXT$ac_delim
21220 CATALOGS!$CATALOGS$ac_delim
21221 CATOBJEXT!$CATOBJEXT$ac_delim
21222 DATADIRNAME!$DATADIRNAME$ac_delim
21223 GMOFILES!$GMOFILES$ac_delim
21224 INSTOBJEXT!$INSTOBJEXT$ac_delim
21225 INTLDEPS!$INTLDEPS$ac_delim
21226 INTLLIBS!$INTLLIBS$ac_delim
21227 INTLOBJS!$INTLOBJS$ac_delim
21228 POFILES!$POFILES$ac_delim
21229 POSUB!$POSUB$ac_delim
21230 _ACEOF
21231
21232   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21233     break
21234   elif $ac_last_try; then
21235     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21236 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21237    { (exit 1); exit 1; }; }
21238   else
21239     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21240   fi
21241 done
21242
21243 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21244 if test -n "$ac_eof"; then
21245   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21246   ac_eof=`expr $ac_eof + 1`
21247 fi
21248
21249 cat >>$CONFIG_STATUS <<_ACEOF
21250 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21251 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21252 _ACEOF
21253 sed '
21254 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21255 s/^/s,@/; s/!/@,|#_!!_#|/
21256 :n
21257 t n
21258 s/'"$ac_delim"'$/,g/; t
21259 s/$/\\/; p
21260 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21261 ' >>$CONFIG_STATUS <conf$$subs.sed
21262 rm -f conf$$subs.sed
21263 cat >>$CONFIG_STATUS <<_ACEOF
21264 CEOF$ac_eof
21265 _ACEOF
21266
21267
21268 ac_delim='%!_!# '
21269 for ac_last_try in false false false false false :; do
21270   cat >conf$$subs.sed <<_ACEOF
21271 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21272 login_manager_tmp!$login_manager_tmp$ac_delim
21273 pkg_config!$pkg_config$ac_delim
21274 gnome_open_program!$gnome_open_program$ac_delim
21275 gnome_url_show_program!$gnome_url_show_program$ac_delim
21276 INCLUDES!$INCLUDES$ac_delim
21277 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21278 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21279 SAVER_LIBS!$SAVER_LIBS$ac_delim
21280 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21281 GTK_LIBS!$GTK_LIBS$ac_delim
21282 XML_LIBS!$XML_LIBS$ac_delim
21283 JPEG_LIBS!$JPEG_LIBS$ac_delim
21284 HACK_LIBS!$HACK_LIBS$ac_delim
21285 XPM_LIBS!$XPM_LIBS$ac_delim
21286 PTY_LIBS!$PTY_LIBS$ac_delim
21287 GL_LIBS!$GL_LIBS$ac_delim
21288 DBUS_LIBS!$DBUS_LIBS$ac_delim
21289 GLE_LIBS!$GLE_LIBS$ac_delim
21290 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21291 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21292 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21293 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21294 SETUID_HACKS!$SETUID_HACKS$ac_delim
21295 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21296 NEED_SETUID!$NEED_SETUID$ac_delim
21297 INSTALL_PAM!$INSTALL_PAM$ac_delim
21298 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21299 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21300 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21301 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21302 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21303 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21304 WITH_BROWSER!$WITH_BROWSER$ac_delim
21305 OBJCC!$OBJCC$ac_delim
21306 EXES_OSX!$EXES_OSX$ac_delim
21307 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21308 MEN_OSX!$MEN_OSX$ac_delim
21309 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21310 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21311 XMU_SRCS!$XMU_SRCS$ac_delim
21312 XMU_OBJS!$XMU_OBJS$ac_delim
21313 XMU_LIBS!$XMU_LIBS$ac_delim
21314 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21315 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21316 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21317 LOCK_SRCS!$LOCK_SRCS$ac_delim
21318 LOCK_OBJS!$LOCK_OBJS$ac_delim
21319 JPEG_EXES!$JPEG_EXES$ac_delim
21320 GL_EXES!$GL_EXES$ac_delim
21321 RETIRED_GL_EXES!$RETIRED_GL_EXES$ac_delim
21322 SUID_EXES!$SUID_EXES$ac_delim
21323 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21324 GL_MEN!$GL_MEN$ac_delim
21325 GL_KLUDGE!$GL_KLUDGE$ac_delim
21326 GLE_EXES!$GLE_EXES$ac_delim
21327 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21328 GNOME24!$GNOME24$ac_delim
21329 GNOME22!$GNOME22$ac_delim
21330 NOGNOME!$NOGNOME$ac_delim
21331 HACKDIR!$HACKDIR$ac_delim
21332 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21333 GTK_DATADIR!$GTK_DATADIR$ac_delim
21334 PO_DATADIR!$PO_DATADIR$ac_delim
21335 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21336 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21337 APPDEFAULTS!$APPDEFAULTS$ac_delim
21338 DEPEND!$DEPEND$ac_delim
21339 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21340 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21341 LIBOBJS!$LIBOBJS$ac_delim
21342 LTLIBOBJS!$LTLIBOBJS$ac_delim
21343 _ACEOF
21344
21345   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then
21346     break
21347   elif $ac_last_try; then
21348     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21349 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21350    { (exit 1); exit 1; }; }
21351   else
21352     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21353   fi
21354 done
21355
21356 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21357 if test -n "$ac_eof"; then
21358   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21359   ac_eof=`expr $ac_eof + 1`
21360 fi
21361
21362 cat >>$CONFIG_STATUS <<_ACEOF
21363 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21364 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21365 _ACEOF
21366 sed '
21367 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21368 s/^/s,@/; s/!/@,|#_!!_#|/
21369 :n
21370 t n
21371 s/'"$ac_delim"'$/,g/; t
21372 s/$/\\/; p
21373 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21374 ' >>$CONFIG_STATUS <conf$$subs.sed
21375 rm -f conf$$subs.sed
21376 cat >>$CONFIG_STATUS <<_ACEOF
21377 :end
21378 s/|#_!!_#|//g
21379 CEOF$ac_eof
21380 _ACEOF
21381
21382
21383 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21384 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21385 # trailing colons and then remove the whole line if VPATH becomes empty
21386 # (actually we leave an empty line to preserve line numbers).
21387 if test "x$srcdir" = x.; then
21388   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21389 s/:*\$(srcdir):*/:/
21390 s/:*\${srcdir}:*/:/
21391 s/:*@srcdir@:*/:/
21392 s/^\([^=]*=[     ]*\):*/\1/
21393 s/:*$//
21394 s/^[^=]*=[       ]*$//
21395 }'
21396 fi
21397
21398 cat >>$CONFIG_STATUS <<\_ACEOF
21399 fi # test -n "$CONFIG_FILES"
21400
21401
21402 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21403 do
21404   case $ac_tag in
21405   :[FHLC]) ac_mode=$ac_tag; continue;;
21406   esac
21407   case $ac_mode$ac_tag in
21408   :[FHL]*:*);;
21409   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21410 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21411    { (exit 1); exit 1; }; };;
21412   :[FH]-) ac_tag=-:-;;
21413   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21414   esac
21415   ac_save_IFS=$IFS
21416   IFS=:
21417   set x $ac_tag
21418   IFS=$ac_save_IFS
21419   shift
21420   ac_file=$1
21421   shift
21422
21423   case $ac_mode in
21424   :L) ac_source=$1;;
21425   :[FH])
21426     ac_file_inputs=
21427     for ac_f
21428     do
21429       case $ac_f in
21430       -) ac_f="$tmp/stdin";;
21431       *) # Look for the file first in the build tree, then in the source tree
21432          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21433          # because $ac_f cannot contain `:'.
21434          test -f "$ac_f" ||
21435            case $ac_f in
21436            [\\/$]*) false;;
21437            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21438            esac ||
21439            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21440 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21441    { (exit 1); exit 1; }; };;
21442       esac
21443       ac_file_inputs="$ac_file_inputs $ac_f"
21444     done
21445
21446     # Let's still pretend it is `configure' which instantiates (i.e., don't
21447     # use $as_me), people would be surprised to read:
21448     #    /* config.h.  Generated by config.status.  */
21449     configure_input="Generated from "`IFS=:
21450           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21451     if test x"$ac_file" != x-; then
21452       configure_input="$ac_file.  $configure_input"
21453       { echo "$as_me:$LINENO: creating $ac_file" >&5
21454 echo "$as_me: creating $ac_file" >&6;}
21455     fi
21456
21457     case $ac_tag in
21458     *:-:* | *:-) cat >"$tmp/stdin";;
21459     esac
21460     ;;
21461   esac
21462
21463   ac_dir=`$as_dirname -- "$ac_file" ||
21464 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21465          X"$ac_file" : 'X\(//\)[^/]' \| \
21466          X"$ac_file" : 'X\(//\)$' \| \
21467          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21468 echo X"$ac_file" |
21469     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21470             s//\1/
21471             q
21472           }
21473           /^X\(\/\/\)[^/].*/{
21474             s//\1/
21475             q
21476           }
21477           /^X\(\/\/\)$/{
21478             s//\1/
21479             q
21480           }
21481           /^X\(\/\).*/{
21482             s//\1/
21483             q
21484           }
21485           s/.*/./; q'`
21486   { as_dir="$ac_dir"
21487   case $as_dir in #(
21488   -*) as_dir=./$as_dir;;
21489   esac
21490   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21491     as_dirs=
21492     while :; do
21493       case $as_dir in #(
21494       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21495       *) as_qdir=$as_dir;;
21496       esac
21497       as_dirs="'$as_qdir' $as_dirs"
21498       as_dir=`$as_dirname -- "$as_dir" ||
21499 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21500          X"$as_dir" : 'X\(//\)[^/]' \| \
21501          X"$as_dir" : 'X\(//\)$' \| \
21502          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21503 echo X"$as_dir" |
21504     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21505             s//\1/
21506             q
21507           }
21508           /^X\(\/\/\)[^/].*/{
21509             s//\1/
21510             q
21511           }
21512           /^X\(\/\/\)$/{
21513             s//\1/
21514             q
21515           }
21516           /^X\(\/\).*/{
21517             s//\1/
21518             q
21519           }
21520           s/.*/./; q'`
21521       test -d "$as_dir" && break
21522     done
21523     test -z "$as_dirs" || eval "mkdir $as_dirs"
21524   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21525 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21526    { (exit 1); exit 1; }; }; }
21527   ac_builddir=.
21528
21529 case "$ac_dir" in
21530 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21531 *)
21532   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21533   # A ".." for each directory in $ac_dir_suffix.
21534   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21535   case $ac_top_builddir_sub in
21536   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21537   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21538   esac ;;
21539 esac
21540 ac_abs_top_builddir=$ac_pwd
21541 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21542 # for backward compatibility:
21543 ac_top_builddir=$ac_top_build_prefix
21544
21545 case $srcdir in
21546   .)  # We are building in place.
21547     ac_srcdir=.
21548     ac_top_srcdir=$ac_top_builddir_sub
21549     ac_abs_top_srcdir=$ac_pwd ;;
21550   [\\/]* | ?:[\\/]* )  # Absolute name.
21551     ac_srcdir=$srcdir$ac_dir_suffix;
21552     ac_top_srcdir=$srcdir
21553     ac_abs_top_srcdir=$srcdir ;;
21554   *) # Relative name.
21555     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21556     ac_top_srcdir=$ac_top_build_prefix$srcdir
21557     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21558 esac
21559 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21560
21561
21562   case $ac_mode in
21563   :F)
21564   #
21565   # CONFIG_FILE
21566   #
21567
21568   case $INSTALL in
21569   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21570   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21571   esac
21572 _ACEOF
21573
21574 cat >>$CONFIG_STATUS <<\_ACEOF
21575 # If the template does not know about datarootdir, expand it.
21576 # FIXME: This hack should be removed a few years after 2.60.
21577 ac_datarootdir_hack=; ac_datarootdir_seen=
21578
21579 case `sed -n '/datarootdir/ {
21580   p
21581   q
21582 }
21583 /@datadir@/p
21584 /@docdir@/p
21585 /@infodir@/p
21586 /@localedir@/p
21587 /@mandir@/p
21588 ' $ac_file_inputs` in
21589 *datarootdir*) ac_datarootdir_seen=yes;;
21590 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21591   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21592 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21593 _ACEOF
21594 cat >>$CONFIG_STATUS <<_ACEOF
21595   ac_datarootdir_hack='
21596   s&@datadir@&$datadir&g
21597   s&@docdir@&$docdir&g
21598   s&@infodir@&$infodir&g
21599   s&@localedir@&$localedir&g
21600   s&@mandir@&$mandir&g
21601     s&\\\${datarootdir}&$datarootdir&g' ;;
21602 esac
21603 _ACEOF
21604
21605 # Neutralize VPATH when `$srcdir' = `.'.
21606 # Shell code in configure.ac might set extrasub.
21607 # FIXME: do we really want to maintain this feature?
21608 cat >>$CONFIG_STATUS <<_ACEOF
21609   sed "$ac_vpsub
21610 $extrasub
21611 _ACEOF
21612 cat >>$CONFIG_STATUS <<\_ACEOF
21613 :t
21614 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21615 s&@configure_input@&$configure_input&;t t
21616 s&@top_builddir@&$ac_top_builddir_sub&;t t
21617 s&@srcdir@&$ac_srcdir&;t t
21618 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21619 s&@top_srcdir@&$ac_top_srcdir&;t t
21620 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21621 s&@builddir@&$ac_builddir&;t t
21622 s&@abs_builddir@&$ac_abs_builddir&;t t
21623 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21624 s&@INSTALL@&$ac_INSTALL&;t t
21625 $ac_datarootdir_hack
21626 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21627
21628 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21629   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21630   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21631   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21632 which seems to be undefined.  Please make sure it is defined." >&5
21633 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21634 which seems to be undefined.  Please make sure it is defined." >&2;}
21635
21636   rm -f "$tmp/stdin"
21637   case $ac_file in
21638   -) cat "$tmp/out"; rm -f "$tmp/out";;
21639   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21640   esac
21641  ;;
21642   :H)
21643   #
21644   # CONFIG_HEADER
21645   #
21646 _ACEOF
21647
21648 # Transform confdefs.h into a sed script `conftest.defines', that
21649 # substitutes the proper values into config.h.in to produce config.h.
21650 rm -f conftest.defines conftest.tail
21651 # First, append a space to every undef/define line, to ease matching.
21652 echo 's/$/ /' >conftest.defines
21653 # Then, protect against being on the right side of a sed subst, or in
21654 # an unquoted here document, in config.status.  If some macros were
21655 # called several times there might be several #defines for the same
21656 # symbol, which is useless.  But do not sort them, since the last
21657 # AC_DEFINE must be honored.
21658 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21659 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21660 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21661 # PARAMS is the parameter list in the macro definition--in most cases, it's
21662 # just an empty string.
21663 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21664 ac_dB='\\)[      (].*,\\1define\\2'
21665 ac_dC=' '
21666 ac_dD=' ,'
21667
21668 uniq confdefs.h |
21669   sed -n '
21670         t rset
21671         :rset
21672         s/^[     ]*#[    ]*define[       ][      ]*//
21673         t ok
21674         d
21675         :ok
21676         s/[\\&,]/\\&/g
21677         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21678         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21679   ' >>conftest.defines
21680
21681 # Remove the space that was appended to ease matching.
21682 # Then replace #undef with comments.  This is necessary, for
21683 # example, in the case of _POSIX_SOURCE, which is predefined and required
21684 # on some systems where configure will not decide to define it.
21685 # (The regexp can be short, since the line contains either #define or #undef.)
21686 echo 's/ $//
21687 s,^[     #]*u.*,/* & */,' >>conftest.defines
21688
21689 # Break up conftest.defines:
21690 ac_max_sed_lines=50
21691
21692 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21693 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21694 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21695 # et cetera.
21696 ac_in='$ac_file_inputs'
21697 ac_out='"$tmp/out1"'
21698 ac_nxt='"$tmp/out2"'
21699
21700 while :
21701 do
21702   # Write a here document:
21703     cat >>$CONFIG_STATUS <<_ACEOF
21704     # First, check the format of the line:
21705     cat >"\$tmp/defines.sed" <<\\CEOF
21706 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21707 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21708 b
21709 :def
21710 _ACEOF
21711   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21712   echo 'CEOF
21713     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21714   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21715   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21716   grep . conftest.tail >/dev/null || break
21717   rm -f conftest.defines
21718   mv conftest.tail conftest.defines
21719 done
21720 rm -f conftest.defines conftest.tail
21721
21722 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21723 cat >>$CONFIG_STATUS <<\_ACEOF
21724   if test x"$ac_file" != x-; then
21725     echo "/* $configure_input  */" >"$tmp/config.h"
21726     cat "$ac_result" >>"$tmp/config.h"
21727     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21728       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21729 echo "$as_me: $ac_file is unchanged" >&6;}
21730     else
21731       rm -f $ac_file
21732       mv "$tmp/config.h" $ac_file
21733     fi
21734   else
21735     echo "/* $configure_input  */"
21736     cat "$ac_result"
21737   fi
21738   rm -f "$tmp/out12"
21739  ;;
21740
21741   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21742 echo "$as_me: executing $ac_file commands" >&6;}
21743  ;;
21744   esac
21745
21746
21747   case $ac_file$ac_mode in
21748     "default-1":C)
21749
21750 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21751 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21752   rm -f intltool-extract.out
21753 else
21754   mv -f intltool-extract.out intltool-extract
21755 fi
21756 chmod ugo+x intltool-extract
21757 chmod u+w intltool-extract
21758
21759 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21760 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21761   rm -f intltool-merge.out
21762 else
21763   mv -f intltool-merge.out intltool-merge
21764 fi
21765 chmod ugo+x intltool-merge
21766 chmod u+w intltool-merge
21767
21768 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21769 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21770   rm -f intltool-update.out
21771 else
21772   mv -f intltool-update.out intltool-update
21773 fi
21774 chmod ugo+x intltool-update
21775 chmod u+w intltool-update
21776
21777  ;;
21778     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21779         rm -f po/stamp-it po/stamp-it.tmp
21780         > po/stamp-it.tmp
21781         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21782         mv po/stamp-it.tmp po/stamp-it
21783       esac ;;
21784
21785   esac
21786 done # for ac_tag
21787
21788
21789 { (exit 0); exit 0; }
21790 _ACEOF
21791 chmod +x $CONFIG_STATUS
21792 ac_clean_files=$ac_clean_files_save
21793
21794
21795 # configure is writing to config.log, and then calls config.status.
21796 # config.status does its own redirection, appending to config.log.
21797 # Unfortunately, on DOS this fails, as config.log is still kept open
21798 # by configure, so config.status won't be able to write to it; its
21799 # output is simply discarded.  So we exec the FD to /dev/null,
21800 # effectively closing config.log, so it can be properly (re)opened and
21801 # appended to by config.status.  When coming back to configure, we
21802 # need to make the FD available again.
21803 if test "$no_create" != yes; then
21804   ac_cs_success=:
21805   ac_config_status_args=
21806   test "$silent" = yes &&
21807     ac_config_status_args="$ac_config_status_args --quiet"
21808   exec 5>/dev/null
21809   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21810   exec 5>>config.log
21811   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21812   # would make configure fail if this is the last instruction.
21813   $ac_cs_success || { (exit 1); exit 1; }
21814 fi
21815
21816
21817 ###############################################################################
21818 #
21819 #       Print some warnings at the end.
21820 #
21821 ###############################################################################
21822
21823 warn_prefix_1="    Warning:"
21824 warn_prefix_2="       Note:"
21825 warn_prefix="$warn_prefix_1"
21826
21827 warning=no
21828 warnsep='    #################################################################'
21829
21830 warnpre() {
21831   if test "$warning" = no ; then
21832     echo '' ; echo "$warnsep" ; echo ''
21833     warning=yes
21834   fi
21835 }
21836
21837 warn() {
21838   warnpre
21839   if test "$warning" = long ; then echo '' ; fi
21840   warning=yes
21841   rest="$@"
21842   echo "$warn_prefix $rest"
21843 }
21844
21845 warnL() {
21846   was=$warning
21847   warnpre
21848   warning=yes
21849   if test "$was" != no ; then echo '' ; fi
21850   rest="$@"
21851   echo "$warn_prefix $rest"
21852 }
21853
21854 warn2() {
21855   rest="$@"
21856   echo "             $rest"
21857   warning=long
21858 }
21859
21860 note() {
21861   warn_prefix="$warn_prefix_2"
21862   warn $@
21863   warn_prefix="$warn_prefix_1"
21864 }
21865
21866 noteL() {
21867   warn_prefix="$warn_prefix_2"
21868   warnL $@
21869   warn_prefix="$warn_prefix_1"
21870 }
21871
21872
21873 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21874   warn 'The SGI saver extension was requested, but was not found.'
21875 fi
21876
21877 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21878   warn 'The XIdle extension was requested, but was not found.'
21879 fi
21880
21881 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21882   warn 'The XSHM extension was requested, but was not found.'
21883 fi
21884
21885 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21886   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21887 fi
21888
21889 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21890   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21891 fi
21892
21893 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21894   warn 'The DPMS extension was requested, but was not found.'
21895 fi
21896
21897 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21898   warn 'The Xinerama extension was requested, but was not found.'
21899 fi
21900
21901 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21902   warn 'The XF86VMODE extension was requested, but was not found.'
21903 fi
21904
21905 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21906   warn 'The RANDR extension was requested, but was not found.'
21907 fi
21908
21909 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21910   warn "Checking of /proc/interrupts was requested, but it's bogus."
21911 fi
21912
21913 if test "$pkg_config" = false ; then
21914   warnL 'The "pkg-config" program was not found.  Without that,'
21915   warn2 "detection of the various GTK libraries won't work."
21916 else
21917   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21918   if test "x$pkgerr" != "x" ; then
21919     warnL 'The "pkg-config" program produces errors.  This often causes'
21920     warn2 "detection of the various GTK libraries to malfunction."
21921     warn2 "The errors are:"
21922     echo ''
21923     echo "$pkgerr" | sed 's/^/             > /g'
21924   fi
21925 fi
21926
21927 if test "$gtk_halfassed" != no ; then
21928   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21929   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21930   warn2 "Perhaps some of the development packages are not installed?"
21931   if test "$have_gtk" = yes ; then
21932     v="$ac_gtk_version_string"
21933     warn2 "GTK $v is also installed, so it will be used instead."
21934     warn2 "Please read the above output and the \`config.log' file"
21935     warn2 "for more details."
21936   fi
21937 fi
21938
21939 motif_warn2() {
21940   warn2 'Though the Motif front-end to xscreensaver is still'
21941   warn2 'maintained, it is no longer being updated with new'
21942   warn2 'features: all new development on the xscreensaver-demo'
21943   warn2 'program is happening in the GTK version, and not in the'
21944   warn2 'Motif version.  It is recommended that you build against'
21945   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21946 }
21947
21948 if test "$have_motif" = no -a "$have_gtk" = no; then
21949
21950   if test "$with_motif" = yes; then
21951     warnL "Neither the GTK nor Motif libraries were found; the"
21952     warn2 "\`xscreensaver-demo' program requires one of these."
21953     echo ''
21954     motif_warn2
21955   else
21956     warnL "The GTK libraries do not seem to be available; the"
21957     warn2 "\`xscreensaver-demo' program requires them."
21958 #   echo ''
21959 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21960 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21961 #   motif_warn2
21962   fi
21963
21964 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21965   warnL "Use of Motif was requested, but it wasn't found;"
21966   warn2 "Gtk will be used instead."
21967
21968 elif test "$jurassic_gtk" = yes ; then
21969
21970   pref_gtk=2.0
21971
21972   v="$ac_gtk_version_string"
21973   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21974     warnL "Use of Gtk was requested, but its version number is unknown;"
21975   elif test "$with_gtk_req" = yes ; then
21976     warnL "Use of Gtk was requested, but it is version $v;"
21977   else
21978     warnL "Gtk was found on this system, but it is version $v;"
21979   fi
21980
21981   warn2 "Gtk $pref_gtk or newer is required."
21982
21983 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21984   warnL "Use of Gtk was requested, but it wasn't found."
21985 fi
21986
21987
21988 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21989   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21990   warn2 "headers were not found.  That can't be good.  Please"
21991   warn2 "install the GDK-Pixbuf development kit and re-configure."
21992 fi
21993
21994 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21995
21996   preferred_lesstif=0.92
21997
21998   if test "$lesstif_version" = unknown; then
21999     warnL "Unable to determine the LessTif version number!"
22000     warn2 "Make sure you are using version $preferred_lesstif or newer."
22001     warn2 "See <http://www.lesstif.org/>."
22002
22003   elif test \! $lesstif_version -gt 82; then
22004     warnL "LessTif version $lesstif_version_string is being used."
22005     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22006     warn2 "use with XScreenSaver; it is strongly recommended"
22007     warn2 "that you upgrade to at least version $preferred_lesstif!"
22008     warn2 "See <http://www.lesstif.org/>."
22009   fi
22010 fi
22011
22012
22013 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22014   warn  'Motif is being used, and GTK is not.'
22015   echo  ''
22016   motif_warn2
22017 fi
22018
22019
22020 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22021   warnL 'Use of XPM was requested, but it was not found.'
22022 fi
22023
22024 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22025   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22026 fi
22027
22028 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22029    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22030
22031   if test "$with_gdk_pixbuf_req" = yes ; then
22032     true
22033   elif test "$with_gdk_pixbuf_req" = no ; then
22034     warnL 'The GDK-Pixbuf library is not being used.'
22035   else
22036     warnL 'The GDK-Pixbuf library was not found.'
22037   fi
22038
22039   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22040     true
22041   elif test "$with_xpm_req" = no ; then
22042     warnL 'The XPM library is not being used.'
22043   else
22044     warnL 'The XPM library was not found.'
22045   fi
22046
22047   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22048     warn2 'The XPM library is being used instead.'
22049   fi
22050
22051   if test "$gdk_pixbuf_halfassed" = yes ; then
22052     echo ''
22053     warn2 'More specifically, we found the headers, but not the'
22054     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22055     warn2 "system, or something else went wrong.  The \`config.log'"
22056     warn2 'file might contain some clues.'
22057   fi
22058
22059   echo ''
22060   warn2 'Some of the demos will not use images as much as they could.'
22061   warn2 'You should consider installing GDK-Pixbuf and re-running'
22062   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22063   warn2 'provides support for more image formats.)'
22064 fi
22065
22066
22067 if test "$have_jpeg" = no ; then
22068   if test "$with_jpeg_req" = yes ; then
22069     warnL 'Use of libjpeg was requested, but it was not found.'
22070   elif test "$with_jpeg_req" = no ; then
22071     noteL 'The JPEG library is not being used.'
22072   else
22073     noteL 'The JPEG library was not found.'
22074   fi
22075
22076   if test "$jpeg_halfassed" = yes ; then
22077     echo ''
22078     warn2 'More specifically, we found the headers, but not the'
22079     warn2 'library; so either JPEG is half-installed on this'
22080     warn2 "system, or something else went wrong.  The \`config.log'"
22081     warn2 'file might contain some clues.'
22082     echo ''
22083   fi
22084
22085   if test "$have_gdk_pixbuf" = no ; then
22086     warn2 "This means that it won't be possible for the image-manipulating"
22087     warn2 "display modes to load files from disk; and it also means that"
22088     warn2 "the \`webcollage' program will be much slower."
22089   else
22090     warn2 "This means the \`webcollage' program will be much slower."
22091   fi
22092 fi
22093
22094
22095 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22096   preferred_mesagl=3.4
22097   mgv="$ac_mesagl_version_string"
22098   pgl="$preferred_mesagl"
22099
22100   if test "$ac_mesagl_version" = unknown; then
22101     true
22102     # warnL "Unable to determine the MesaGL version number!"
22103     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22104
22105   elif test \! "$ac_mesagl_version" -gt 2006; then
22106     warnL "MesaGL version number is $mgv --"
22107     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22108     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22109
22110   elif test \! "$ac_mesagl_version" -gt 3003; then
22111     warnL "MesaGL version number is $mgv --"
22112     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22113     warn2 "that you upgrade to $pgl or newer."
22114   fi
22115 fi
22116
22117 if test "$have_gl" = no ; then
22118   if test "$with_gl_req" = yes ; then
22119     warnL 'Use of GL was requested, but it was not found.'
22120   elif test "$with_gl_req" = no ; then
22121     noteL 'The OpenGL 3D library is not being used.'
22122   else
22123     noteL 'The OpenGL 3D library was not found.'
22124   fi
22125
22126   if test "$gl_halfassed" = yes ; then
22127     echo ''
22128     warn2 'More specifically, we found the headers, but not the'
22129     warn2 'libraries; so either GL is half-installed on this'
22130     warn2 "system, or something else went wrong.  The \`config.log'"
22131     warn2 'file might contain some clues.'
22132   fi
22133
22134   echo ''
22135   warn2 'Those demos which use 3D will not be built or installed.'
22136   warn2 'You might want to consider installing OpenGL and'
22137   warn2 "re-running configure.  If your vendor doesn't ship"
22138   warn2 'their own implementation of OpenGL, you can get a free'
22139   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22140   warn2 'info, see <http://www.opengl.org/>.'
22141
22142 fi
22143
22144
22145 if test "$have_gl" = yes -a "$have_gle" = no ; then
22146
22147  # nobody cares about this; don't print the warning unless it was
22148  # requested and not found, or halfway-found.
22149  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22150
22151   if test "$with_gle_req" = yes ; then
22152     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22153     warn2 'it was not found (though the OpenGL library was found, and'
22154     warn2 'is being used.)'
22155   elif test "$with_gle_req" = no ; then
22156     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22157     warn2 'library is not.'
22158   else
22159     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22160     warn2 'was not.'
22161   fi
22162
22163   if test "$gle_halfassed" = yes ; then
22164     echo ''
22165     warn2 'More specifically, we found the headers, but not the'
22166     warn2 'libraries; so either GLE is half-installed on this'
22167     warn2 "system, or something else went wrong.  The \`config.log'"
22168     warn2 'file might contain some clues.'
22169   fi
22170
22171   echo ''
22172   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22173   warn2 'will not be built or installed.  You might want to consider'
22174   warn2 'installing GLE and re-running configure.  You can find the'
22175   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22176   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22177
22178  fi
22179 fi
22180
22181
22182 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22183   warn 'Use of XReadDisplay was requested, but it was not found.'
22184 fi
22185
22186 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22187   warn 'Use of Kerberos was requested, but it was not found.'
22188 fi
22189
22190 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22191   warn 'Use of PAM was requested, but it was not found.'
22192 fi
22193
22194 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22195   warn 'Use of shadow passwords was requested, but they were not found.'
22196 fi
22197
22198 if test "$ac_macosx" = yes ; then
22199   if test "$enable_locking" = yes ; then
22200     warn  "You have specified --enable-locking on MacOS X."
22201     warn2 "THIS DOES NOT WORK!  Don't do this!"
22202   fi
22203 fi
22204
22205
22206 # You are in a twisty maze of namespaces and syntaxes, all alike.
22207 # Fuck the skull of Unix.
22208 #
22209 bindir=`eval eval eval eval eval eval eval echo $bindir`
22210 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22211 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22212
22213 # canonicalize slashes.
22214 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22215 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22216 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22217
22218
22219 # Sanity check the hackdir
22220 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22221   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22222     echo ""
22223     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22224                    There will be an executable installed with that name, so
22225                    that can't be the name of a directory as well.  Please
22226                    re-configure with a different directory name." >&5
22227 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22228                    There will be an executable installed with that name, so
22229                    that can't be the name of a directory as well.  Please
22230                    re-configure with a different directory name." >&2;}
22231    { (exit 1); exit 1; }; }
22232   fi
22233 done
22234
22235
22236 do_dir_warning=no
22237
22238 # Now let's warn if there's a previous RPM version already installed.
22239 # But don't bother with this test if we are currently *building* an RPM.
22240
22241 if test -z "$RPM_PACKAGE_VERSION" ; then
22242
22243   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22244
22245   # M4 sucks!!
22246
22247   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22248         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22249         head -1`
22250
22251
22252   if test \! -z "$rpmv" ; then
22253     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22254     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22255
22256     warning=no
22257     warnL "There is already an installed RPM of xscreensaver $rpmv"
22258     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22259     warn2 'before running "make install" in this directory.'
22260     echo ""
22261     warn2 "Alternately, you could build this version of xscreensaver"
22262     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22263     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22264     warn2 "See the RPM documentation for more info."
22265     echo ""
22266
22267     if test "$rpmbdir" = "$rpmhdir" ; then
22268       warn2 "The RPM version was installed in $rpmbdir/."
22269       do_dir_warning=yes
22270     else
22271       warn2 "The RPM version was installed in $rpmbdir/,"
22272       warn2 "with demos in $rpmhdir/."
22273     fi
22274   fi
22275 fi
22276
22277 # Also warn if there's a Debian package installed.
22278 #
22279 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22280 debv=''
22281 for dpkg in $debnames ; do
22282   if test -z "$debv"; then
22283     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22284   fi
22285 done
22286
22287 if test \! -z "$debv" ; then
22288   debbdir=`dpkg -L $debnames 2>/dev/null | \
22289             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22290   debhdir=`dpkg -L $debnames 2>/dev/null | \
22291             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22292   if test -z "$debbdir" ; then debbdir='???'; fi
22293   if test -z "$debhdir" ; then debhdir='???'; fi
22294
22295   warning=no
22296   warnL "There is already an installed dpkg of xscreensaver"
22297   warn2 "version \"$debv\" on this system."
22298   echo ""
22299   warn2 "The dpkg was installed in $debbdir,"
22300   warn2 "with demos in $debhdir."
22301 fi
22302
22303
22304 if test "${bindir}" = "${HACKDIR}" ; then
22305   do_dir_warning=yes
22306 fi
22307
22308 if test "$do_dir_warning" = yes; then
22309   echo ""
22310   echo "$warnsep"
22311   echo ""
22312   echo '      When you run "make install", the "xscreensaver",'
22313   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22314   echo "      will be installed in ${bindir}/."
22315   echo ""
22316   echo "      The various graphics demos (190+ different executables) will"
22317   echo "      be installed in ${HACKDIR}/."
22318   echo ""
22319   echo "      If you would prefer the demos to be installed elsewhere,"
22320   echo "      you should re-run configure with the --with-hackdir=DIR"
22321   echo "      option.  For more information, run \`./configure --help'."
22322   warning=yes
22323 fi
22324
22325 if test "$warning" != no; then
22326   echo '' ; echo "$warnsep" ; echo ''
22327 fi
22328
22329 if test "$do_dir_warning" = no; then
22330   if test "$warning" = no; then
22331     echo ''
22332   fi
22333   echo "User programs will be installed in ${bindir}/"
22334   echo "Screen savers will be installed in ${HACKDIR}/"
22335   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22336   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22337   echo ''
22338 fi