http://www.jwz.org/xscreensaver/xscreensaver-5.09.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME=
574 PACKAGE_TARNAME=
575 PACKAGE_VERSION=
576 PACKAGE_STRING=
577 PACKAGE_BUGREPORT=
578
579 ac_unique_file="driver/subprocs.c"
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 #  include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 #  include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 build
654 build_cpu
655 build_vendor
656 build_os
657 host
658 host_cpu
659 host_vendor
660 host_os
661 CC
662 CFLAGS
663 LDFLAGS
664 CPPFLAGS
665 ac_ct_CC
666 EXEEXT
667 OBJEXT
668 CPP
669 INSTALL_PROGRAM
670 INSTALL_SCRIPT
671 INSTALL_DATA
672 SET_MAKE
673 GREP
674 EGREP
675 PERL
676 XMKMF
677 X_CFLAGS
678 X_PRE_LIBS
679 X_LIBS
680 X_EXTRA_LIBS
681 INTLTOOL_DESKTOP_RULE
682 INTLTOOL_DIRECTORY_RULE
683 INTLTOOL_KEYS_RULE
684 INTLTOOL_OAF_RULE
685 INTLTOOL_PONG_RULE
686 INTLTOOL_SERVER_RULE
687 INTLTOOL_SHEET_RULE
688 INTLTOOL_SOUNDLIST_RULE
689 INTLTOOL_UI_RULE
690 INTLTOOL_XML_RULE
691 INTLTOOL_CAVES_RULE
692 INTLTOOL_EXTRACT
693 INTLTOOL_MERGE
694 INTLTOOL_UPDATE
695 INTLTOOL_PERL
696 GETTEXT_PACKAGE
697 RANLIB
698 ALLOCA
699 USE_NLS
700 MSGFMT
701 GMSGFMT
702 XGETTEXT
703 CATALOGS
704 CATOBJEXT
705 DATADIRNAME
706 GMOFILES
707 INSTOBJEXT
708 INTLDEPS
709 INTLLIBS
710 INTLOBJS
711 POFILES
712 POSUB
713 MKINSTALLDIRS
714 login_manager_tmp
715 pkg_config
716 gnome_open_program
717 gnome_url_show_program
718 INCLUDES
719 PREFERRED_DEMO_PROGRAM
720 ALL_DEMO_PROGRAMS
721 SAVER_LIBS
722 MOTIF_LIBS
723 GTK_LIBS
724 XML_LIBS
725 JPEG_LIBS
726 HACK_LIBS
727 XPM_LIBS
728 PTY_LIBS
729 GL_LIBS
730 GLE_LIBS
731 XDPMS_LIBS
732 XINERAMA_LIBS
733 PASSWD_LIBS
734 INSTALL_SETUID
735 SETUID_HACKS
736 INSTALL_DIRS
737 NEED_SETUID
738 INSTALL_PAM
739 HAVE_PAM_FAIL_DELAY
740 NEW_LOGIN_COMMAND
741 NEW_LOGIN_COMMAND_P
742 DEFAULT_IMAGES_P
743 DEFAULT_IMAGE_DIRECTORY
744 DEFAULT_TEXT_FILE
745 WITH_BROWSER
746 OBJCC
747 EXES_OSX
748 SCRIPTS_OSX
749 MEN_OSX
750 PASSWD_SRCS
751 PASSWD_OBJS
752 XMU_SRCS
753 XMU_OBJS
754 XMU_LIBS
755 SAVER_GL_SRCS
756 SAVER_GL_OBJS
757 SAVER_GL_LIBS
758 LOCK_SRCS
759 LOCK_OBJS
760 JPEG_EXES
761 GL_EXES
762 RETIRED_GL_EXES
763 SUID_EXES
764 GL_UTIL_EXES
765 GL_MEN
766 GL_KLUDGE
767 GLE_EXES
768 GLE_KLUDGE
769 GNOME24
770 GNOME22
771 NOGNOME
772 HACKDIR
773 HACKDIR_FULL
774 GTK_DATADIR
775 PO_DATADIR
776 HACK_CONF_DIR
777 GTK_EXTRA_OBJS
778 APPDEFAULTS
779 DEPEND
780 DEPEND_FLAGS
781 DEPEND_DEFINES
782 LIBOBJS
783 LTLIBOBJS'
784 ac_subst_files=''
785       ac_precious_vars='build_alias
786 host_alias
787 target_alias
788 CC
789 CFLAGS
790 LDFLAGS
791 LIBS
792 CPPFLAGS
793 CPP
794 XMKMF'
795
796
797 # Initialize some variables set by options.
798 ac_init_help=
799 ac_init_version=false
800 # The variables have the same names as the options, with
801 # dashes changed to underlines.
802 cache_file=/dev/null
803 exec_prefix=NONE
804 no_create=
805 no_recursion=
806 prefix=NONE
807 program_prefix=NONE
808 program_suffix=NONE
809 program_transform_name=s,x,x,
810 silent=
811 site=
812 srcdir=
813 verbose=
814 x_includes=NONE
815 x_libraries=NONE
816
817 # Installation directory options.
818 # These are left unexpanded so users can "make install exec_prefix=/foo"
819 # and all the variables that are supposed to be based on exec_prefix
820 # by default will actually change.
821 # Use braces instead of parens because sh, perl, etc. also accept them.
822 # (The list follows the same order as the GNU Coding Standards.)
823 bindir='${exec_prefix}/bin'
824 sbindir='${exec_prefix}/sbin'
825 libexecdir='${exec_prefix}/libexec'
826 datarootdir='${prefix}/share'
827 datadir='${datarootdir}'
828 sysconfdir='${prefix}/etc'
829 sharedstatedir='${prefix}/com'
830 localstatedir='${prefix}/var'
831 includedir='${prefix}/include'
832 oldincludedir='/usr/include'
833 docdir='${datarootdir}/doc/${PACKAGE}'
834 infodir='${datarootdir}/info'
835 htmldir='${docdir}'
836 dvidir='${docdir}'
837 pdfdir='${docdir}'
838 psdir='${docdir}'
839 libdir='${exec_prefix}/lib'
840 localedir='${datarootdir}/locale'
841 mandir='${datarootdir}/man'
842
843 ac_prev=
844 ac_dashdash=
845 for ac_option
846 do
847   # If the previous option needs an argument, assign it.
848   if test -n "$ac_prev"; then
849     eval $ac_prev=\$ac_option
850     ac_prev=
851     continue
852   fi
853
854   case $ac_option in
855   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
856   *)    ac_optarg=yes ;;
857   esac
858
859   # Accept the important Cygnus configure options, so we can diagnose typos.
860
861   case $ac_dashdash$ac_option in
862   --)
863     ac_dashdash=yes ;;
864
865   -bindir | --bindir | --bindi | --bind | --bin | --bi)
866     ac_prev=bindir ;;
867   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
868     bindir=$ac_optarg ;;
869
870   -build | --build | --buil | --bui | --bu)
871     ac_prev=build_alias ;;
872   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
873     build_alias=$ac_optarg ;;
874
875   -cache-file | --cache-file | --cache-fil | --cache-fi \
876   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
877     ac_prev=cache_file ;;
878   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
879   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
880     cache_file=$ac_optarg ;;
881
882   --config-cache | -C)
883     cache_file=config.cache ;;
884
885   -datadir | --datadir | --datadi | --datad)
886     ac_prev=datadir ;;
887   -datadir=* | --datadir=* | --datadi=* | --datad=*)
888     datadir=$ac_optarg ;;
889
890   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
891   | --dataroo | --dataro | --datar)
892     ac_prev=datarootdir ;;
893   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
894   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
895     datarootdir=$ac_optarg ;;
896
897   -disable-* | --disable-*)
898     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
899     # Reject names that are not valid shell variable names.
900     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
901       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
902    { (exit 1); exit 1; }; }
903     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
904     eval enable_$ac_feature=no ;;
905
906   -docdir | --docdir | --docdi | --doc | --do)
907     ac_prev=docdir ;;
908   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909     docdir=$ac_optarg ;;
910
911   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912     ac_prev=dvidir ;;
913   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914     dvidir=$ac_optarg ;;
915
916   -enable-* | --enable-*)
917     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
918     # Reject names that are not valid shell variable names.
919     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
920       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
921    { (exit 1); exit 1; }; }
922     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
923     eval enable_$ac_feature=\$ac_optarg ;;
924
925   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
926   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
927   | --exec | --exe | --ex)
928     ac_prev=exec_prefix ;;
929   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
930   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
931   | --exec=* | --exe=* | --ex=*)
932     exec_prefix=$ac_optarg ;;
933
934   -gas | --gas | --ga | --g)
935     # Obsolete; use --with-gas.
936     with_gas=yes ;;
937
938   -help | --help | --hel | --he | -h)
939     ac_init_help=long ;;
940   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
941     ac_init_help=recursive ;;
942   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
943     ac_init_help=short ;;
944
945   -host | --host | --hos | --ho)
946     ac_prev=host_alias ;;
947   -host=* | --host=* | --hos=* | --ho=*)
948     host_alias=$ac_optarg ;;
949
950   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
951     ac_prev=htmldir ;;
952   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
953   | --ht=*)
954     htmldir=$ac_optarg ;;
955
956   -includedir | --includedir | --includedi | --included | --include \
957   | --includ | --inclu | --incl | --inc)
958     ac_prev=includedir ;;
959   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
960   | --includ=* | --inclu=* | --incl=* | --inc=*)
961     includedir=$ac_optarg ;;
962
963   -infodir | --infodir | --infodi | --infod | --info | --inf)
964     ac_prev=infodir ;;
965   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
966     infodir=$ac_optarg ;;
967
968   -libdir | --libdir | --libdi | --libd)
969     ac_prev=libdir ;;
970   -libdir=* | --libdir=* | --libdi=* | --libd=*)
971     libdir=$ac_optarg ;;
972
973   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
974   | --libexe | --libex | --libe)
975     ac_prev=libexecdir ;;
976   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
977   | --libexe=* | --libex=* | --libe=*)
978     libexecdir=$ac_optarg ;;
979
980   -localedir | --localedir | --localedi | --localed | --locale)
981     ac_prev=localedir ;;
982   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
983     localedir=$ac_optarg ;;
984
985   -localstatedir | --localstatedir | --localstatedi | --localstated \
986   | --localstate | --localstat | --localsta | --localst | --locals)
987     ac_prev=localstatedir ;;
988   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
989   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
990     localstatedir=$ac_optarg ;;
991
992   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
993     ac_prev=mandir ;;
994   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
995     mandir=$ac_optarg ;;
996
997   -nfp | --nfp | --nf)
998     # Obsolete; use --without-fp.
999     with_fp=no ;;
1000
1001   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1002   | --no-cr | --no-c | -n)
1003     no_create=yes ;;
1004
1005   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007     no_recursion=yes ;;
1008
1009   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1010   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1011   | --oldin | --oldi | --old | --ol | --o)
1012     ac_prev=oldincludedir ;;
1013   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1014   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1015   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1016     oldincludedir=$ac_optarg ;;
1017
1018   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1019     ac_prev=prefix ;;
1020   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1021     prefix=$ac_optarg ;;
1022
1023   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1024   | --program-pre | --program-pr | --program-p)
1025     ac_prev=program_prefix ;;
1026   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1027   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1028     program_prefix=$ac_optarg ;;
1029
1030   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1031   | --program-suf | --program-su | --program-s)
1032     ac_prev=program_suffix ;;
1033   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1034   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1035     program_suffix=$ac_optarg ;;
1036
1037   -program-transform-name | --program-transform-name \
1038   | --program-transform-nam | --program-transform-na \
1039   | --program-transform-n | --program-transform- \
1040   | --program-transform | --program-transfor \
1041   | --program-transfo | --program-transf \
1042   | --program-trans | --program-tran \
1043   | --progr-tra | --program-tr | --program-t)
1044     ac_prev=program_transform_name ;;
1045   -program-transform-name=* | --program-transform-name=* \
1046   | --program-transform-nam=* | --program-transform-na=* \
1047   | --program-transform-n=* | --program-transform-=* \
1048   | --program-transform=* | --program-transfor=* \
1049   | --program-transfo=* | --program-transf=* \
1050   | --program-trans=* | --program-tran=* \
1051   | --progr-tra=* | --program-tr=* | --program-t=*)
1052     program_transform_name=$ac_optarg ;;
1053
1054   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1055     ac_prev=pdfdir ;;
1056   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1057     pdfdir=$ac_optarg ;;
1058
1059   -psdir | --psdir | --psdi | --psd | --ps)
1060     ac_prev=psdir ;;
1061   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1062     psdir=$ac_optarg ;;
1063
1064   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1065   | -silent | --silent | --silen | --sile | --sil)
1066     silent=yes ;;
1067
1068   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1069     ac_prev=sbindir ;;
1070   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1071   | --sbi=* | --sb=*)
1072     sbindir=$ac_optarg ;;
1073
1074   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1075   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1076   | --sharedst | --shareds | --shared | --share | --shar \
1077   | --sha | --sh)
1078     ac_prev=sharedstatedir ;;
1079   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1080   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1081   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1082   | --sha=* | --sh=*)
1083     sharedstatedir=$ac_optarg ;;
1084
1085   -site | --site | --sit)
1086     ac_prev=site ;;
1087   -site=* | --site=* | --sit=*)
1088     site=$ac_optarg ;;
1089
1090   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091     ac_prev=srcdir ;;
1092   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1093     srcdir=$ac_optarg ;;
1094
1095   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1096   | --syscon | --sysco | --sysc | --sys | --sy)
1097     ac_prev=sysconfdir ;;
1098   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1099   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1100     sysconfdir=$ac_optarg ;;
1101
1102   -target | --target | --targe | --targ | --tar | --ta | --t)
1103     ac_prev=target_alias ;;
1104   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1105     target_alias=$ac_optarg ;;
1106
1107   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1108     verbose=yes ;;
1109
1110   -version | --version | --versio | --versi | --vers | -V)
1111     ac_init_version=: ;;
1112
1113   -with-* | --with-*)
1114     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1115     # Reject names that are not valid shell variable names.
1116     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117       { echo "$as_me: error: invalid package name: $ac_package" >&2
1118    { (exit 1); exit 1; }; }
1119     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1120     eval with_$ac_package=\$ac_optarg ;;
1121
1122   -without-* | --without-*)
1123     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1124     # Reject names that are not valid shell variable names.
1125     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1126       { echo "$as_me: error: invalid package name: $ac_package" >&2
1127    { (exit 1); exit 1; }; }
1128     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1129     eval with_$ac_package=no ;;
1130
1131   --x)
1132     # Obsolete; use --with-x.
1133     with_x=yes ;;
1134
1135   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136   | --x-incl | --x-inc | --x-in | --x-i)
1137     ac_prev=x_includes ;;
1138   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1140     x_includes=$ac_optarg ;;
1141
1142   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144     ac_prev=x_libraries ;;
1145   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1147     x_libraries=$ac_optarg ;;
1148
1149   -*) { echo "$as_me: error: unrecognized option: $ac_option
1150 Try \`$0 --help' for more information." >&2
1151    { (exit 1); exit 1; }; }
1152     ;;
1153
1154   *=*)
1155     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156     # Reject names that are not valid shell variable names.
1157     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1158       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1159    { (exit 1); exit 1; }; }
1160     eval $ac_envvar=\$ac_optarg
1161     export $ac_envvar ;;
1162
1163   *)
1164     # FIXME: should be removed in autoconf 3.0.
1165     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1166     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1167       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1168     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1169     ;;
1170
1171   esac
1172 done
1173
1174 if test -n "$ac_prev"; then
1175   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1176   { echo "$as_me: error: missing argument to $ac_option" >&2
1177    { (exit 1); exit 1; }; }
1178 fi
1179
1180 # Be sure to have absolute directory names.
1181 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1182                 datadir sysconfdir sharedstatedir localstatedir includedir \
1183                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1184                 libdir localedir mandir
1185 do
1186   eval ac_val=\$$ac_var
1187   case $ac_val in
1188     [\\/$]* | ?:[\\/]* )  continue;;
1189     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1190   esac
1191   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1192    { (exit 1); exit 1; }; }
1193 done
1194
1195 # There might be people who depend on the old broken behavior: `$host'
1196 # used to hold the argument of --host etc.
1197 # FIXME: To remove some day.
1198 build=$build_alias
1199 host=$host_alias
1200 target=$target_alias
1201
1202 # FIXME: To remove some day.
1203 if test "x$host_alias" != x; then
1204   if test "x$build_alias" = x; then
1205     cross_compiling=maybe
1206     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1207     If a cross compiler is detected then cross compile mode will be used." >&2
1208   elif test "x$build_alias" != "x$host_alias"; then
1209     cross_compiling=yes
1210   fi
1211 fi
1212
1213 ac_tool_prefix=
1214 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1215
1216 test "$silent" = yes && exec 6>/dev/null
1217
1218
1219 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1220 ac_ls_di=`ls -di .` &&
1221 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1222   { echo "$as_me: error: Working directory cannot be determined" >&2
1223    { (exit 1); exit 1; }; }
1224 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1225   { echo "$as_me: error: pwd does not report name of working directory" >&2
1226    { (exit 1); exit 1; }; }
1227
1228
1229 # Find the source files, if location was not specified.
1230 if test -z "$srcdir"; then
1231   ac_srcdir_defaulted=yes
1232   # Try the directory containing this script, then the parent directory.
1233   ac_confdir=`$as_dirname -- "$0" ||
1234 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1235          X"$0" : 'X\(//\)[^/]' \| \
1236          X"$0" : 'X\(//\)$' \| \
1237          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1238 echo X"$0" |
1239     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1240             s//\1/
1241             q
1242           }
1243           /^X\(\/\/\)[^/].*/{
1244             s//\1/
1245             q
1246           }
1247           /^X\(\/\/\)$/{
1248             s//\1/
1249             q
1250           }
1251           /^X\(\/\).*/{
1252             s//\1/
1253             q
1254           }
1255           s/.*/./; q'`
1256   srcdir=$ac_confdir
1257   if test ! -r "$srcdir/$ac_unique_file"; then
1258     srcdir=..
1259   fi
1260 else
1261   ac_srcdir_defaulted=no
1262 fi
1263 if test ! -r "$srcdir/$ac_unique_file"; then
1264   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1265   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1266    { (exit 1); exit 1; }; }
1267 fi
1268 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1269 ac_abs_confdir=`(
1270         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1271    { (exit 1); exit 1; }; }
1272         pwd)`
1273 # When building in place, set srcdir=.
1274 if test "$ac_abs_confdir" = "$ac_pwd"; then
1275   srcdir=.
1276 fi
1277 # Remove unnecessary trailing slashes from srcdir.
1278 # Double slashes in file names in object file debugging info
1279 # mess up M-x gdb in Emacs.
1280 case $srcdir in
1281 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1282 esac
1283 for ac_var in $ac_precious_vars; do
1284   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1285   eval ac_env_${ac_var}_value=\$${ac_var}
1286   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1287   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1288 done
1289
1290 #
1291 # Report the --help message.
1292 #
1293 if test "$ac_init_help" = "long"; then
1294   # Omit some internal or obsolete options to make the list less imposing.
1295   # This message is too long to be a string in the A/UX 3.1 sh.
1296   cat <<_ACEOF
1297 \`configure' configures this package to adapt to many kinds of systems.
1298
1299 Usage: $0 [OPTION]... [VAR=VALUE]...
1300
1301 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1302 VAR=VALUE.  See below for descriptions of some of the useful variables.
1303
1304 Defaults for the options are specified in brackets.
1305
1306
1307 Configuration:
1308
1309   -h, --help              display this help and exit
1310       --help=short        display options specific to this package
1311       --help=recursive    display the short help of all the included packages
1312   -V, --version           display version information and exit
1313   -q, --quiet, --silent   do not print \`checking...' messages
1314       --cache-file=FILE   cache test results in FILE [disabled]
1315   -C, --config-cache      alias for \`--cache-file=config.cache'
1316   -n, --no-create         do not create output files
1317       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1318
1319 Installation directories:
1320   --prefix=PREFIX         install architecture-independent files in PREFIX
1321                           [$ac_default_prefix]
1322   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1323                           [PREFIX]
1324
1325 By default, \`make install' will install all the files in
1326 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1327 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1328 for instance \`--prefix=\$HOME'.
1329
1330 For better control, use the options below.
1331
1332 Fine tuning of the installation directories:
1333   --bindir=DIR           user executables [EPREFIX/bin]
1334   --libexecdir=DIR       program executables [EPREFIX/libexec]
1335   --libdir=DIR           object code libraries [EPREFIX/lib]
1336   --includedir=DIR       C header files [PREFIX/include]
1337   --x-includes=DIR        X include files are in DIR
1338   --x-libraries=DIR       X library files are in DIR
1339   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1340   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1341   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1342   --mandir=DIR           man documentation [DATAROOTDIR/man]
1343   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1344   --htmldir=DIR          html documentation [DOCDIR]
1345   --dvidir=DIR           dvi documentation [DOCDIR]
1346   --pdfdir=DIR           pdf documentation [DOCDIR]
1347   --psdir=DIR            ps documentation [DOCDIR]
1348 _ACEOF
1349
1350   cat <<\_ACEOF
1351
1352 X features:
1353   --x-includes=DIR    X include files are in DIR
1354   --x-libraries=DIR   X library files are in DIR
1355
1356 System types:
1357   --build=BUILD     configure for building on BUILD [guessed]
1358   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1359 _ACEOF
1360 fi
1361
1362 if test -n "$ac_init_help"; then
1363
1364   cat <<\_ACEOF
1365
1366 Optional Features:
1367   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1368   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1369
1370 Screen locking options:
1371   --enable-locking        Compile in support for locking the display.
1372   --disable-locking       Do not allow locking at all.
1373
1374   --enable-root-passwd        Allow root passwd to unlock screen.
1375   --disable-root-passwd       Do not allow that.
1376
1377 Optional Packages:
1378   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1379   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1380
1381
1382 Installation options:
1383   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1384                           Default: `PREFIX/libexec/xscreensaver/'
1385   --with-configdir=DIR    Where to install the data files that describe each
1386                           of the display modes to the GUI.
1387                           Default: `PREFIX/share/xscreensaver/config/'
1388   --with-x-app-defaults=DIR
1389                            Where to install xscreensaver configuration file.
1390
1391 Except where noted, all of the --with options below can also take a
1392 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1393 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1394 to be added to the -L list, assuming those directories exist.
1395
1396 By default, support for each of these options will be built in, if the
1397 relevant library routines exist.  At run time, they will then be used
1398 only if the X server being used supports them.  Each --with option has
1399 a corresponding --without option, to override building support for them
1400 at all.
1401
1402 Screen blanking and idle-detection options:
1403
1404   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1405   --with-xidle-ext        Include support for the XIDLE extension.
1406   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1407   --with-dpms-ext         Include support for the DPMS extension.
1408   --with-xinerama-ext     Include support for the XINERAMA extension.
1409   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1410   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1411   --with-randr-ext        Include support for the X Resize+Rotate extension.
1412   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1413                           file to notice keyboard activity.
1414   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1415   --with-pam-service-name=NAME
1416                           NAME is the name of the PAM service that
1417                           xscreensaver will authenticate as.
1418   --with-kerberos         Include support for Kerberos authentication.
1419   --with-shadow           Include support for shadow password authentication.
1420   --with-passwd-helper    Include support for an external password
1421                           verification helper program.
1422   --with-login-manager    Put a "New Login" button on the unlock dialog that
1423                           runs a login manager such as gdmflexiserver.
1424
1425 User interface options:
1426
1427   --with-gtk              Use the Gtk toolkit for the user interface.
1428   --with-motif            Use the Motif toolkit for the user interface
1429                           (not recommended.)
1430
1431 Graphics options:
1432
1433   --with-gl               Build those demos which depend on OpenGL.
1434   --with-gle              Build those demos which depend on GLE
1435                           (the OpenGL "extrusion" library.)
1436   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1437                           demos, which will make it possible for them to read
1438                           GIF, JPEG, and PNG files as well.
1439   --with-xpm              Include support for XPM files in some demos.
1440                           (Not needed if Pixbuf is used.)
1441   --with-jpeg             Include support for the JPEG library.
1442   --with-xshm-ext         Include support for the Shared Memory extension.
1443   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1444   --with-readdisplay      Include support for the XReadDisplay extension.
1445   --with-image-directory=DIR  By default, some demos may display random images
1446                           from this directory.
1447   --with-text-file=FILE   By default, some demos may display this file.
1448   --with-browser=BROWSER   Specify the browser to show help URL.
1449   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1450                           (which is needed in order to ping other hosts.)
1451
1452
1453 Some influential environment variables:
1454   CC          C compiler command
1455   CFLAGS      C compiler flags
1456   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1457               nonstandard directory <lib dir>
1458   LIBS        libraries to pass to the linker, e.g. -l<library>
1459   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1460               you have headers in a nonstandard directory <include dir>
1461   CPP         C preprocessor
1462   XMKMF       Path to xmkmf, Makefile generator for X Window System
1463
1464 Use these variables to override the choices made by `configure' or to help
1465 it to find libraries and programs with nonstandard names/locations.
1466
1467 _ACEOF
1468 ac_status=$?
1469 fi
1470
1471 if test "$ac_init_help" = "recursive"; then
1472   # If there are subdirs, report their specific --help.
1473   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1474     test -d "$ac_dir" || continue
1475     ac_builddir=.
1476
1477 case "$ac_dir" in
1478 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *)
1480   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1481   # A ".." for each directory in $ac_dir_suffix.
1482   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1483   case $ac_top_builddir_sub in
1484   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1485   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1486   esac ;;
1487 esac
1488 ac_abs_top_builddir=$ac_pwd
1489 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1490 # for backward compatibility:
1491 ac_top_builddir=$ac_top_build_prefix
1492
1493 case $srcdir in
1494   .)  # We are building in place.
1495     ac_srcdir=.
1496     ac_top_srcdir=$ac_top_builddir_sub
1497     ac_abs_top_srcdir=$ac_pwd ;;
1498   [\\/]* | ?:[\\/]* )  # Absolute name.
1499     ac_srcdir=$srcdir$ac_dir_suffix;
1500     ac_top_srcdir=$srcdir
1501     ac_abs_top_srcdir=$srcdir ;;
1502   *) # Relative name.
1503     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1504     ac_top_srcdir=$ac_top_build_prefix$srcdir
1505     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1506 esac
1507 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1508
1509     cd "$ac_dir" || { ac_status=$?; continue; }
1510     # Check for guested configure.
1511     if test -f "$ac_srcdir/configure.gnu"; then
1512       echo &&
1513       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1514     elif test -f "$ac_srcdir/configure"; then
1515       echo &&
1516       $SHELL "$ac_srcdir/configure" --help=recursive
1517     else
1518       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1519     fi || ac_status=$?
1520     cd "$ac_pwd" || { ac_status=$?; break; }
1521   done
1522 fi
1523
1524 test -n "$ac_init_help" && exit $ac_status
1525 if $ac_init_version; then
1526   cat <<\_ACEOF
1527 configure
1528 generated by GNU Autoconf 2.61
1529
1530 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1531 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1532 This configure script is free software; the Free Software Foundation
1533 gives unlimited permission to copy, distribute and modify it.
1534 _ACEOF
1535   exit
1536 fi
1537 cat >config.log <<_ACEOF
1538 This file contains any messages produced by compilers while
1539 running configure, to aid debugging if configure makes a mistake.
1540
1541 It was created by $as_me, which was
1542 generated by GNU Autoconf 2.61.  Invocation command line was
1543
1544   $ $0 $@
1545
1546 _ACEOF
1547 exec 5>>config.log
1548 {
1549 cat <<_ASUNAME
1550 ## --------- ##
1551 ## Platform. ##
1552 ## --------- ##
1553
1554 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1555 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1556 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1557 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1558 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1559
1560 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1561 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1562
1563 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1564 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1565 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1566 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1567 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1568 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1569 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1570
1571 _ASUNAME
1572
1573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1574 for as_dir in $PATH
1575 do
1576   IFS=$as_save_IFS
1577   test -z "$as_dir" && as_dir=.
1578   echo "PATH: $as_dir"
1579 done
1580 IFS=$as_save_IFS
1581
1582 } >&5
1583
1584 cat >&5 <<_ACEOF
1585
1586
1587 ## ----------- ##
1588 ## Core tests. ##
1589 ## ----------- ##
1590
1591 _ACEOF
1592
1593
1594 # Keep a trace of the command line.
1595 # Strip out --no-create and --no-recursion so they do not pile up.
1596 # Strip out --silent because we don't want to record it for future runs.
1597 # Also quote any args containing shell meta-characters.
1598 # Make two passes to allow for proper duplicate-argument suppression.
1599 ac_configure_args=
1600 ac_configure_args0=
1601 ac_configure_args1=
1602 ac_must_keep_next=false
1603 for ac_pass in 1 2
1604 do
1605   for ac_arg
1606   do
1607     case $ac_arg in
1608     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1609     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1610     | -silent | --silent | --silen | --sile | --sil)
1611       continue ;;
1612     *\'*)
1613       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1614     esac
1615     case $ac_pass in
1616     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1617     2)
1618       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1619       if test $ac_must_keep_next = true; then
1620         ac_must_keep_next=false # Got value, back to normal.
1621       else
1622         case $ac_arg in
1623           *=* | --config-cache | -C | -disable-* | --disable-* \
1624           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1625           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1626           | -with-* | --with-* | -without-* | --without-* | --x)
1627             case "$ac_configure_args0 " in
1628               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1629             esac
1630             ;;
1631           -* ) ac_must_keep_next=true ;;
1632         esac
1633       fi
1634       ac_configure_args="$ac_configure_args '$ac_arg'"
1635       ;;
1636     esac
1637   done
1638 done
1639 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1640 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1641
1642 # When interrupted or exit'd, cleanup temporary files, and complete
1643 # config.log.  We remove comments because anyway the quotes in there
1644 # would cause problems or look ugly.
1645 # WARNING: Use '\'' to represent an apostrophe within the trap.
1646 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1647 trap 'exit_status=$?
1648   # Save into config.log some information that might help in debugging.
1649   {
1650     echo
1651
1652     cat <<\_ASBOX
1653 ## ---------------- ##
1654 ## Cache variables. ##
1655 ## ---------------- ##
1656 _ASBOX
1657     echo
1658     # The following way of writing the cache mishandles newlines in values,
1659 (
1660   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1661     eval ac_val=\$$ac_var
1662     case $ac_val in #(
1663     *${as_nl}*)
1664       case $ac_var in #(
1665       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1666 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1667       esac
1668       case $ac_var in #(
1669       _ | IFS | as_nl) ;; #(
1670       *) $as_unset $ac_var ;;
1671       esac ;;
1672     esac
1673   done
1674   (set) 2>&1 |
1675     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1676     *${as_nl}ac_space=\ *)
1677       sed -n \
1678         "s/'\''/'\''\\\\'\'''\''/g;
1679           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1680       ;; #(
1681     *)
1682       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1683       ;;
1684     esac |
1685     sort
1686 )
1687     echo
1688
1689     cat <<\_ASBOX
1690 ## ----------------- ##
1691 ## Output variables. ##
1692 ## ----------------- ##
1693 _ASBOX
1694     echo
1695     for ac_var in $ac_subst_vars
1696     do
1697       eval ac_val=\$$ac_var
1698       case $ac_val in
1699       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1700       esac
1701       echo "$ac_var='\''$ac_val'\''"
1702     done | sort
1703     echo
1704
1705     if test -n "$ac_subst_files"; then
1706       cat <<\_ASBOX
1707 ## ------------------- ##
1708 ## File substitutions. ##
1709 ## ------------------- ##
1710 _ASBOX
1711       echo
1712       for ac_var in $ac_subst_files
1713       do
1714         eval ac_val=\$$ac_var
1715         case $ac_val in
1716         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1717         esac
1718         echo "$ac_var='\''$ac_val'\''"
1719       done | sort
1720       echo
1721     fi
1722
1723     if test -s confdefs.h; then
1724       cat <<\_ASBOX
1725 ## ----------- ##
1726 ## confdefs.h. ##
1727 ## ----------- ##
1728 _ASBOX
1729       echo
1730       cat confdefs.h
1731       echo
1732     fi
1733     test "$ac_signal" != 0 &&
1734       echo "$as_me: caught signal $ac_signal"
1735     echo "$as_me: exit $exit_status"
1736   } >&5
1737   rm -f core *.core core.conftest.* &&
1738     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1739     exit $exit_status
1740 ' 0
1741 for ac_signal in 1 2 13 15; do
1742   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1743 done
1744 ac_signal=0
1745
1746 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1747 rm -f -r conftest* confdefs.h
1748
1749 # Predefined preprocessor variables.
1750
1751 cat >>confdefs.h <<_ACEOF
1752 #define PACKAGE_NAME "$PACKAGE_NAME"
1753 _ACEOF
1754
1755
1756 cat >>confdefs.h <<_ACEOF
1757 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1758 _ACEOF
1759
1760
1761 cat >>confdefs.h <<_ACEOF
1762 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1763 _ACEOF
1764
1765
1766 cat >>confdefs.h <<_ACEOF
1767 #define PACKAGE_STRING "$PACKAGE_STRING"
1768 _ACEOF
1769
1770
1771 cat >>confdefs.h <<_ACEOF
1772 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1773 _ACEOF
1774
1775
1776 # Let the site file select an alternate cache file if it wants to.
1777 # Prefer explicitly selected file to automatically selected ones.
1778 if test -n "$CONFIG_SITE"; then
1779   set x "$CONFIG_SITE"
1780 elif test "x$prefix" != xNONE; then
1781   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1782 else
1783   set x "$ac_default_prefix/share/config.site" \
1784         "$ac_default_prefix/etc/config.site"
1785 fi
1786 shift
1787 for ac_site_file
1788 do
1789   if test -r "$ac_site_file"; then
1790     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1791 echo "$as_me: loading site script $ac_site_file" >&6;}
1792     sed 's/^/| /' "$ac_site_file" >&5
1793     . "$ac_site_file"
1794   fi
1795 done
1796
1797 if test -r "$cache_file"; then
1798   # Some versions of bash will fail to source /dev/null (special
1799   # files actually), so we avoid doing that.
1800   if test -f "$cache_file"; then
1801     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1802 echo "$as_me: loading cache $cache_file" >&6;}
1803     case $cache_file in
1804       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1805       *)                      . "./$cache_file";;
1806     esac
1807   fi
1808 else
1809   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1810 echo "$as_me: creating cache $cache_file" >&6;}
1811   >$cache_file
1812 fi
1813
1814 # Check that the precious variables saved in the cache have kept the same
1815 # value.
1816 ac_cache_corrupted=false
1817 for ac_var in $ac_precious_vars; do
1818   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1819   eval ac_new_set=\$ac_env_${ac_var}_set
1820   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1821   eval ac_new_val=\$ac_env_${ac_var}_value
1822   case $ac_old_set,$ac_new_set in
1823     set,)
1824       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1825 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1826       ac_cache_corrupted=: ;;
1827     ,set)
1828       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1829 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1830       ac_cache_corrupted=: ;;
1831     ,);;
1832     *)
1833       if test "x$ac_old_val" != "x$ac_new_val"; then
1834         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1835 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1836         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1837 echo "$as_me:   former value:  $ac_old_val" >&2;}
1838         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1839 echo "$as_me:   current value: $ac_new_val" >&2;}
1840         ac_cache_corrupted=:
1841       fi;;
1842   esac
1843   # Pass precious variables to config.status.
1844   if test "$ac_new_set" = set; then
1845     case $ac_new_val in
1846     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1847     *) ac_arg=$ac_var=$ac_new_val ;;
1848     esac
1849     case " $ac_configure_args " in
1850       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1851       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1852     esac
1853   fi
1854 done
1855 if $ac_cache_corrupted; then
1856   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1857 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1858   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1859 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1860    { (exit 1); exit 1; }; }
1861 fi
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879 ac_ext=c
1880 ac_cpp='$CPP $CPPFLAGS'
1881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1884
1885
1886 ac_config_headers="$ac_config_headers config.h"
1887
1888
1889 echo "current directory: `pwd`"
1890 echo "command line was: $0 $@"
1891
1892 ###############################################################################
1893 #
1894 #       Autoheader stuff
1895 #
1896 ###############################################################################
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071 # After checking to see that --srcdir is correct (which AC_INIT does)
2072 # check for some random other files that come later in the tar file,
2073 # to make sure everything is here.
2074 #
2075 for d in driver utils hacks hacks/glx ; do
2076   f=$srcdir/$d/Makefile.in
2077   if test \! -r $f ; then
2078     echo ""
2079     echo "ERROR: The package is incomplete: $f does not exist."
2080     echo "       This probably means that your download was truncated."
2081     echo ""
2082     exit 1
2083   fi
2084 done
2085
2086 ###############################################################################
2087 #
2088 #       Function to figure out how to run the compiler.
2089 #
2090 ###############################################################################
2091
2092
2093
2094
2095 ###############################################################################
2096 #
2097 #       Check for availability of various gcc command-line options.
2098 #
2099 ###############################################################################
2100
2101
2102
2103
2104
2105
2106
2107 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2108 # around an Apple-specific gcc bug.
2109 #
2110
2111
2112 ###############################################################################
2113 #
2114 #       Function to figure out how to disable // comments in ANSI C code.
2115 #
2116 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2117 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2118 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2119 #       so much for compatibility!)
2120 #
2121 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2122 #       declarations preceed statements, without resorting to "-pedantic".
2123 #       This means that there is no way to get gcc3 to issue warnings that
2124 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2125 #       also drowning in totally useless warnings.  Thank you master may I
2126 #       have another.
2127 #
2128 #       So, I give up, let's just use -pedantic.
2129 #
2130 ###############################################################################
2131
2132
2133
2134
2135
2136
2137 ###############################################################################
2138 #
2139 #       Function to figure out how to create directory trees.
2140 #
2141 ###############################################################################
2142
2143
2144
2145
2146 ###############################################################################
2147 #
2148 #       Function to check whether gettimeofday() exists, and how to call it.
2149 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2150 #
2151 ###############################################################################
2152
2153
2154
2155
2156 ###############################################################################
2157 #
2158 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2159 #
2160 ###############################################################################
2161
2162 # M4 sucks!!  perl sucks too!!
2163
2164 perl_version_cmd='print $]'
2165
2166
2167
2168
2169
2170 ###############################################################################
2171 #
2172 #       Function to demand "bc".  Losers.
2173 #
2174 ###############################################################################
2175
2176
2177
2178 ###############################################################################
2179 #
2180 #       Functions to check how to do ICMP PING requests.
2181 #
2182 ###############################################################################
2183
2184
2185
2186
2187
2188
2189 ###############################################################################
2190 #
2191 #       Functions to check for various X11 crap.
2192 #
2193 ###############################################################################
2194
2195 # Try and find the app-defaults directory.
2196 # It sucks that autoconf doesn't do this already...
2197 #
2198
2199
2200 ###############################################################################
2201 #
2202 #       Handle the --with-x-app-defaults option HERE
2203 #
2204 ###############################################################################
2205
2206
2207 # Check whether --with-x-app-defaults was given.
2208 if test "${with_x_app_defaults+set}" = set; then
2209   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2210 else
2211   eval ac_x_app_defaults="$withval"
2212 fi
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224 # Random special-cases for X on certain pathological OSes.
2225 # You know who you are.
2226 #
2227
2228
2229
2230
2231 ###############################################################################
2232 #
2233 #       Some utility functions to make checking for X things easier.
2234 #
2235 ###############################################################################
2236
2237 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2238 #
2239
2240
2241 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2242 #
2243
2244
2245 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2246 #
2247
2248
2249
2250 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2251 # Use this sparingly; it probably doesn't work very well on X programs.
2252 #
2253
2254
2255 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2256 # (But not the -L directories!)
2257 #
2258
2259
2260
2261
2262 # Usage: HANDLE_X_PATH_ARG([variable_name],
2263 #                          [--command-line-option],
2264 #                          [descriptive string])
2265 #
2266 # All of the --with options take three forms:
2267 #
2268 #   --with-foo (or --with-foo=yes)
2269 #   --without-foo (or --with-foo=no)
2270 #   --with-foo=/DIR
2271 #
2272 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2273 # a directory (string beginning with a slash) it checks to see whether
2274 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2275 # as appropriate.
2276 #
2277
2278
2279
2280
2281 ###############################################################################
2282 ###############################################################################
2283 #
2284 #       End of function definitions.  Now start actually executing stuff.
2285 #
2286 ###############################################################################
2287 ###############################################################################
2288
2289 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2290 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2291 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2292
2293
2294 # random compiler setup
2295 ac_aux_dir=
2296 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2297   if test -f "$ac_dir/install-sh"; then
2298     ac_aux_dir=$ac_dir
2299     ac_install_sh="$ac_aux_dir/install-sh -c"
2300     break
2301   elif test -f "$ac_dir/install.sh"; then
2302     ac_aux_dir=$ac_dir
2303     ac_install_sh="$ac_aux_dir/install.sh -c"
2304     break
2305   elif test -f "$ac_dir/shtool"; then
2306     ac_aux_dir=$ac_dir
2307     ac_install_sh="$ac_aux_dir/shtool install -c"
2308     break
2309   fi
2310 done
2311 if test -z "$ac_aux_dir"; then
2312   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2313 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2314    { (exit 1); exit 1; }; }
2315 fi
2316
2317 # These three variables are undocumented and unsupported,
2318 # and are intended to be withdrawn in a future Autoconf release.
2319 # They can cause serious problems if a builder's source tree is in a directory
2320 # whose full name contains unusual characters.
2321 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2322 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2323 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2324
2325
2326 # Make sure we can run config.sub.
2327 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2328   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2329 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2330    { (exit 1); exit 1; }; }
2331
2332 { echo "$as_me:$LINENO: checking build system type" >&5
2333 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2334 if test "${ac_cv_build+set}" = set; then
2335   echo $ECHO_N "(cached) $ECHO_C" >&6
2336 else
2337   ac_build_alias=$build_alias
2338 test "x$ac_build_alias" = x &&
2339   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2340 test "x$ac_build_alias" = x &&
2341   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2342 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2343    { (exit 1); exit 1; }; }
2344 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2345   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2346 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2347    { (exit 1); exit 1; }; }
2348
2349 fi
2350 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2351 echo "${ECHO_T}$ac_cv_build" >&6; }
2352 case $ac_cv_build in
2353 *-*-*) ;;
2354 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2355 echo "$as_me: error: invalid value of canonical build" >&2;}
2356    { (exit 1); exit 1; }; };;
2357 esac
2358 build=$ac_cv_build
2359 ac_save_IFS=$IFS; IFS='-'
2360 set x $ac_cv_build
2361 shift
2362 build_cpu=$1
2363 build_vendor=$2
2364 shift; shift
2365 # Remember, the first character of IFS is used to create $*,
2366 # except with old shells:
2367 build_os=$*
2368 IFS=$ac_save_IFS
2369 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2370
2371
2372 { echo "$as_me:$LINENO: checking host system type" >&5
2373 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2374 if test "${ac_cv_host+set}" = set; then
2375   echo $ECHO_N "(cached) $ECHO_C" >&6
2376 else
2377   if test "x$host_alias" = x; then
2378   ac_cv_host=$ac_cv_build
2379 else
2380   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2381     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2382 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2383    { (exit 1); exit 1; }; }
2384 fi
2385
2386 fi
2387 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2388 echo "${ECHO_T}$ac_cv_host" >&6; }
2389 case $ac_cv_host in
2390 *-*-*) ;;
2391 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2392 echo "$as_me: error: invalid value of canonical host" >&2;}
2393    { (exit 1); exit 1; }; };;
2394 esac
2395 host=$ac_cv_host
2396 ac_save_IFS=$IFS; IFS='-'
2397 set x $ac_cv_host
2398 shift
2399 host_cpu=$1
2400 host_vendor=$2
2401 shift; shift
2402 # Remember, the first character of IFS is used to create $*,
2403 # except with old shells:
2404 host_os=$*
2405 IFS=$ac_save_IFS
2406 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2407
2408
2409
2410 ac_ext=c
2411 ac_cpp='$CPP $CPPFLAGS'
2412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2415 if test -n "$ac_tool_prefix"; then
2416   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2417 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2418 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2420 if test "${ac_cv_prog_CC+set}" = set; then
2421   echo $ECHO_N "(cached) $ECHO_C" >&6
2422 else
2423   if test -n "$CC"; then
2424   ac_cv_prog_CC="$CC" # Let the user override the test.
2425 else
2426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2427 for as_dir in $PATH
2428 do
2429   IFS=$as_save_IFS
2430   test -z "$as_dir" && as_dir=.
2431   for ac_exec_ext in '' $ac_executable_extensions; do
2432   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2433     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2434     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2435     break 2
2436   fi
2437 done
2438 done
2439 IFS=$as_save_IFS
2440
2441 fi
2442 fi
2443 CC=$ac_cv_prog_CC
2444 if test -n "$CC"; then
2445   { echo "$as_me:$LINENO: result: $CC" >&5
2446 echo "${ECHO_T}$CC" >&6; }
2447 else
2448   { echo "$as_me:$LINENO: result: no" >&5
2449 echo "${ECHO_T}no" >&6; }
2450 fi
2451
2452
2453 fi
2454 if test -z "$ac_cv_prog_CC"; then
2455   ac_ct_CC=$CC
2456   # Extract the first word of "gcc", so it can be a program name with args.
2457 set dummy gcc; ac_word=$2
2458 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2460 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2461   echo $ECHO_N "(cached) $ECHO_C" >&6
2462 else
2463   if test -n "$ac_ct_CC"; then
2464   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2465 else
2466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467 for as_dir in $PATH
2468 do
2469   IFS=$as_save_IFS
2470   test -z "$as_dir" && as_dir=.
2471   for ac_exec_ext in '' $ac_executable_extensions; do
2472   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2473     ac_cv_prog_ac_ct_CC="gcc"
2474     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2475     break 2
2476   fi
2477 done
2478 done
2479 IFS=$as_save_IFS
2480
2481 fi
2482 fi
2483 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2484 if test -n "$ac_ct_CC"; then
2485   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2486 echo "${ECHO_T}$ac_ct_CC" >&6; }
2487 else
2488   { echo "$as_me:$LINENO: result: no" >&5
2489 echo "${ECHO_T}no" >&6; }
2490 fi
2491
2492   if test "x$ac_ct_CC" = x; then
2493     CC=""
2494   else
2495     case $cross_compiling:$ac_tool_warned in
2496 yes:)
2497 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2498 whose name does not start with the host triplet.  If you think this
2499 configuration is useful to you, please write to autoconf@gnu.org." >&5
2500 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2501 whose name does not start with the host triplet.  If you think this
2502 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2503 ac_tool_warned=yes ;;
2504 esac
2505     CC=$ac_ct_CC
2506   fi
2507 else
2508   CC="$ac_cv_prog_CC"
2509 fi
2510
2511 if test -z "$CC"; then
2512           if test -n "$ac_tool_prefix"; then
2513     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2514 set dummy ${ac_tool_prefix}cc; ac_word=$2
2515 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2517 if test "${ac_cv_prog_CC+set}" = set; then
2518   echo $ECHO_N "(cached) $ECHO_C" >&6
2519 else
2520   if test -n "$CC"; then
2521   ac_cv_prog_CC="$CC" # Let the user override the test.
2522 else
2523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2524 for as_dir in $PATH
2525 do
2526   IFS=$as_save_IFS
2527   test -z "$as_dir" && as_dir=.
2528   for ac_exec_ext in '' $ac_executable_extensions; do
2529   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2530     ac_cv_prog_CC="${ac_tool_prefix}cc"
2531     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2532     break 2
2533   fi
2534 done
2535 done
2536 IFS=$as_save_IFS
2537
2538 fi
2539 fi
2540 CC=$ac_cv_prog_CC
2541 if test -n "$CC"; then
2542   { echo "$as_me:$LINENO: result: $CC" >&5
2543 echo "${ECHO_T}$CC" >&6; }
2544 else
2545   { echo "$as_me:$LINENO: result: no" >&5
2546 echo "${ECHO_T}no" >&6; }
2547 fi
2548
2549
2550   fi
2551 fi
2552 if test -z "$CC"; then
2553   # Extract the first word of "cc", so it can be a program name with args.
2554 set dummy cc; ac_word=$2
2555 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2557 if test "${ac_cv_prog_CC+set}" = set; then
2558   echo $ECHO_N "(cached) $ECHO_C" >&6
2559 else
2560   if test -n "$CC"; then
2561   ac_cv_prog_CC="$CC" # Let the user override the test.
2562 else
2563   ac_prog_rejected=no
2564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2565 for as_dir in $PATH
2566 do
2567   IFS=$as_save_IFS
2568   test -z "$as_dir" && as_dir=.
2569   for ac_exec_ext in '' $ac_executable_extensions; do
2570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2571     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2572        ac_prog_rejected=yes
2573        continue
2574      fi
2575     ac_cv_prog_CC="cc"
2576     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2577     break 2
2578   fi
2579 done
2580 done
2581 IFS=$as_save_IFS
2582
2583 if test $ac_prog_rejected = yes; then
2584   # We found a bogon in the path, so make sure we never use it.
2585   set dummy $ac_cv_prog_CC
2586   shift
2587   if test $# != 0; then
2588     # We chose a different compiler from the bogus one.
2589     # However, it has the same basename, so the bogon will be chosen
2590     # first if we set CC to just the basename; use the full file name.
2591     shift
2592     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2593   fi
2594 fi
2595 fi
2596 fi
2597 CC=$ac_cv_prog_CC
2598 if test -n "$CC"; then
2599   { echo "$as_me:$LINENO: result: $CC" >&5
2600 echo "${ECHO_T}$CC" >&6; }
2601 else
2602   { echo "$as_me:$LINENO: result: no" >&5
2603 echo "${ECHO_T}no" >&6; }
2604 fi
2605
2606
2607 fi
2608 if test -z "$CC"; then
2609   if test -n "$ac_tool_prefix"; then
2610   for ac_prog in cl.exe
2611   do
2612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2614 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2616 if test "${ac_cv_prog_CC+set}" = set; then
2617   echo $ECHO_N "(cached) $ECHO_C" >&6
2618 else
2619   if test -n "$CC"; then
2620   ac_cv_prog_CC="$CC" # Let the user override the test.
2621 else
2622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623 for as_dir in $PATH
2624 do
2625   IFS=$as_save_IFS
2626   test -z "$as_dir" && as_dir=.
2627   for ac_exec_ext in '' $ac_executable_extensions; do
2628   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2629     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2630     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2631     break 2
2632   fi
2633 done
2634 done
2635 IFS=$as_save_IFS
2636
2637 fi
2638 fi
2639 CC=$ac_cv_prog_CC
2640 if test -n "$CC"; then
2641   { echo "$as_me:$LINENO: result: $CC" >&5
2642 echo "${ECHO_T}$CC" >&6; }
2643 else
2644   { echo "$as_me:$LINENO: result: no" >&5
2645 echo "${ECHO_T}no" >&6; }
2646 fi
2647
2648
2649     test -n "$CC" && break
2650   done
2651 fi
2652 if test -z "$CC"; then
2653   ac_ct_CC=$CC
2654   for ac_prog in cl.exe
2655 do
2656   # Extract the first word of "$ac_prog", so it can be a program name with args.
2657 set dummy $ac_prog; ac_word=$2
2658 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2661   echo $ECHO_N "(cached) $ECHO_C" >&6
2662 else
2663   if test -n "$ac_ct_CC"; then
2664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2665 else
2666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667 for as_dir in $PATH
2668 do
2669   IFS=$as_save_IFS
2670   test -z "$as_dir" && as_dir=.
2671   for ac_exec_ext in '' $ac_executable_extensions; do
2672   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2673     ac_cv_prog_ac_ct_CC="$ac_prog"
2674     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2675     break 2
2676   fi
2677 done
2678 done
2679 IFS=$as_save_IFS
2680
2681 fi
2682 fi
2683 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2684 if test -n "$ac_ct_CC"; then
2685   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2686 echo "${ECHO_T}$ac_ct_CC" >&6; }
2687 else
2688   { echo "$as_me:$LINENO: result: no" >&5
2689 echo "${ECHO_T}no" >&6; }
2690 fi
2691
2692
2693   test -n "$ac_ct_CC" && break
2694 done
2695
2696   if test "x$ac_ct_CC" = x; then
2697     CC=""
2698   else
2699     case $cross_compiling:$ac_tool_warned in
2700 yes:)
2701 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2702 whose name does not start with the host triplet.  If you think this
2703 configuration is useful to you, please write to autoconf@gnu.org." >&5
2704 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2705 whose name does not start with the host triplet.  If you think this
2706 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2707 ac_tool_warned=yes ;;
2708 esac
2709     CC=$ac_ct_CC
2710   fi
2711 fi
2712
2713 fi
2714
2715
2716 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2717 See \`config.log' for more details." >&5
2718 echo "$as_me: error: no acceptable C compiler found in \$PATH
2719 See \`config.log' for more details." >&2;}
2720    { (exit 1); exit 1; }; }
2721
2722 # Provide some information about the compiler.
2723 echo "$as_me:$LINENO: checking for C compiler version" >&5
2724 ac_compiler=`set X $ac_compile; echo $2`
2725 { (ac_try="$ac_compiler --version >&5"
2726 case "(($ac_try" in
2727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728   *) ac_try_echo=$ac_try;;
2729 esac
2730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731   (eval "$ac_compiler --version >&5") 2>&5
2732   ac_status=$?
2733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734   (exit $ac_status); }
2735 { (ac_try="$ac_compiler -v >&5"
2736 case "(($ac_try" in
2737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2738   *) ac_try_echo=$ac_try;;
2739 esac
2740 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2741   (eval "$ac_compiler -v >&5") 2>&5
2742   ac_status=$?
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); }
2745 { (ac_try="$ac_compiler -V >&5"
2746 case "(($ac_try" in
2747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2748   *) ac_try_echo=$ac_try;;
2749 esac
2750 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2751   (eval "$ac_compiler -V >&5") 2>&5
2752   ac_status=$?
2753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754   (exit $ac_status); }
2755
2756 cat >conftest.$ac_ext <<_ACEOF
2757 /* confdefs.h.  */
2758 _ACEOF
2759 cat confdefs.h >>conftest.$ac_ext
2760 cat >>conftest.$ac_ext <<_ACEOF
2761 /* end confdefs.h.  */
2762
2763 int
2764 main ()
2765 {
2766
2767   ;
2768   return 0;
2769 }
2770 _ACEOF
2771 ac_clean_files_save=$ac_clean_files
2772 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2773 # Try to create an executable without -o first, disregard a.out.
2774 # It will help us diagnose broken compilers, and finding out an intuition
2775 # of exeext.
2776 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2777 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2778 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2779 #
2780 # List of possible output files, starting from the most likely.
2781 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2782 # only as a last resort.  b.out is created by i960 compilers.
2783 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2784 #
2785 # The IRIX 6 linker writes into existing files which may not be
2786 # executable, retaining their permissions.  Remove them first so a
2787 # subsequent execution test works.
2788 ac_rmfiles=
2789 for ac_file in $ac_files
2790 do
2791   case $ac_file in
2792     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2793     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2794   esac
2795 done
2796 rm -f $ac_rmfiles
2797
2798 if { (ac_try="$ac_link_default"
2799 case "(($ac_try" in
2800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2801   *) ac_try_echo=$ac_try;;
2802 esac
2803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2804   (eval "$ac_link_default") 2>&5
2805   ac_status=$?
2806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807   (exit $ac_status); }; then
2808   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2809 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2810 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2811 # so that the user can short-circuit this test for compilers unknown to
2812 # Autoconf.
2813 for ac_file in $ac_files ''
2814 do
2815   test -f "$ac_file" || continue
2816   case $ac_file in
2817     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2818         ;;
2819     [ab].out )
2820         # We found the default executable, but exeext='' is most
2821         # certainly right.
2822         break;;
2823     *.* )
2824         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2825         then :; else
2826            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2827         fi
2828         # We set ac_cv_exeext here because the later test for it is not
2829         # safe: cross compilers may not add the suffix if given an `-o'
2830         # argument, so we may need to know it at that point already.
2831         # Even if this section looks crufty: it has the advantage of
2832         # actually working.
2833         break;;
2834     * )
2835         break;;
2836   esac
2837 done
2838 test "$ac_cv_exeext" = no && ac_cv_exeext=
2839
2840 else
2841   ac_file=''
2842 fi
2843
2844 { echo "$as_me:$LINENO: result: $ac_file" >&5
2845 echo "${ECHO_T}$ac_file" >&6; }
2846 if test -z "$ac_file"; then
2847   echo "$as_me: failed program was:" >&5
2848 sed 's/^/| /' conftest.$ac_ext >&5
2849
2850 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2851 See \`config.log' for more details." >&5
2852 echo "$as_me: error: C compiler cannot create executables
2853 See \`config.log' for more details." >&2;}
2854    { (exit 77); exit 77; }; }
2855 fi
2856
2857 ac_exeext=$ac_cv_exeext
2858
2859 # Check that the compiler produces executables we can run.  If not, either
2860 # the compiler is broken, or we cross compile.
2861 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2862 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2863 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2864 # If not cross compiling, check that we can run a simple program.
2865 if test "$cross_compiling" != yes; then
2866   if { ac_try='./$ac_file'
2867   { (case "(($ac_try" in
2868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2869   *) ac_try_echo=$ac_try;;
2870 esac
2871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2872   (eval "$ac_try") 2>&5
2873   ac_status=$?
2874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875   (exit $ac_status); }; }; then
2876     cross_compiling=no
2877   else
2878     if test "$cross_compiling" = maybe; then
2879         cross_compiling=yes
2880     else
2881         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2882 If you meant to cross compile, use \`--host'.
2883 See \`config.log' for more details." >&5
2884 echo "$as_me: error: cannot run C compiled programs.
2885 If you meant to cross compile, use \`--host'.
2886 See \`config.log' for more details." >&2;}
2887    { (exit 1); exit 1; }; }
2888     fi
2889   fi
2890 fi
2891 { echo "$as_me:$LINENO: result: yes" >&5
2892 echo "${ECHO_T}yes" >&6; }
2893
2894 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2895 ac_clean_files=$ac_clean_files_save
2896 # Check that the compiler produces executables we can run.  If not, either
2897 # the compiler is broken, or we cross compile.
2898 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2899 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2900 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2901 echo "${ECHO_T}$cross_compiling" >&6; }
2902
2903 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2904 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2905 if { (ac_try="$ac_link"
2906 case "(($ac_try" in
2907   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2908   *) ac_try_echo=$ac_try;;
2909 esac
2910 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2911   (eval "$ac_link") 2>&5
2912   ac_status=$?
2913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2914   (exit $ac_status); }; then
2915   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2916 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2917 # work properly (i.e., refer to `conftest.exe'), while it won't with
2918 # `rm'.
2919 for ac_file in conftest.exe conftest conftest.*; do
2920   test -f "$ac_file" || continue
2921   case $ac_file in
2922     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2923     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2924           break;;
2925     * ) break;;
2926   esac
2927 done
2928 else
2929   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2930 See \`config.log' for more details." >&5
2931 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2932 See \`config.log' for more details." >&2;}
2933    { (exit 1); exit 1; }; }
2934 fi
2935
2936 rm -rf conftest$ac_cv_exeext
2937 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2938 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2939
2940 rm -rf conftest.$ac_ext
2941 EXEEXT=$ac_cv_exeext
2942 ac_exeext=$EXEEXT
2943 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2944 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2945 if test "${ac_cv_objext+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   cat >conftest.$ac_ext <<_ACEOF
2949 /* confdefs.h.  */
2950 _ACEOF
2951 cat confdefs.h >>conftest.$ac_ext
2952 cat >>conftest.$ac_ext <<_ACEOF
2953 /* end confdefs.h.  */
2954
2955 int
2956 main ()
2957 {
2958
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 rm -rf conftest.o conftest.obj
2964 if { (ac_try="$ac_compile"
2965 case "(($ac_try" in
2966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2967   *) ac_try_echo=$ac_try;;
2968 esac
2969 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2970   (eval "$ac_compile") 2>&5
2971   ac_status=$?
2972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2973   (exit $ac_status); }; then
2974   for ac_file in conftest.o conftest.obj conftest.*; do
2975   test -f "$ac_file" || continue;
2976   case $ac_file in
2977     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2978     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2979        break;;
2980   esac
2981 done
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985
2986 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2987 See \`config.log' for more details." >&5
2988 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2989 See \`config.log' for more details." >&2;}
2990    { (exit 1); exit 1; }; }
2991 fi
2992
2993 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
2994 fi
2995 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2996 echo "${ECHO_T}$ac_cv_objext" >&6; }
2997 OBJEXT=$ac_cv_objext
2998 ac_objext=$OBJEXT
2999 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3000 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3001 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3002   echo $ECHO_N "(cached) $ECHO_C" >&6
3003 else
3004   cat >conftest.$ac_ext <<_ACEOF
3005 /* confdefs.h.  */
3006 _ACEOF
3007 cat confdefs.h >>conftest.$ac_ext
3008 cat >>conftest.$ac_ext <<_ACEOF
3009 /* end confdefs.h.  */
3010
3011 int
3012 main ()
3013 {
3014 #ifndef __GNUC__
3015        choke me
3016 #endif
3017
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -rf conftest.$ac_objext
3023 if { (ac_try="$ac_compile"
3024 case "(($ac_try" in
3025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026   *) ac_try_echo=$ac_try;;
3027 esac
3028 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3029   (eval "$ac_compile") 2>conftest.er1
3030   ac_status=$?
3031   grep -v '^ *+' conftest.er1 >conftest.err
3032   rm -rf conftest.er1
3033   cat conftest.err >&5
3034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035   (exit $ac_status); } && {
3036          test -z "$ac_c_werror_flag" ||
3037          test ! -s conftest.err
3038        } && test -s conftest.$ac_objext; then
3039   ac_compiler_gnu=yes
3040 else
3041   echo "$as_me: failed program was:" >&5
3042 sed 's/^/| /' conftest.$ac_ext >&5
3043
3044         ac_compiler_gnu=no
3045 fi
3046
3047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3048 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3049
3050 fi
3051 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3052 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3053 GCC=`test $ac_compiler_gnu = yes && echo yes`
3054 ac_test_CFLAGS=${CFLAGS+set}
3055 ac_save_CFLAGS=$CFLAGS
3056 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3057 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3058 if test "${ac_cv_prog_cc_g+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   ac_save_c_werror_flag=$ac_c_werror_flag
3062    ac_c_werror_flag=yes
3063    ac_cv_prog_cc_g=no
3064    CFLAGS="-g"
3065    cat >conftest.$ac_ext <<_ACEOF
3066 /* confdefs.h.  */
3067 _ACEOF
3068 cat confdefs.h >>conftest.$ac_ext
3069 cat >>conftest.$ac_ext <<_ACEOF
3070 /* end confdefs.h.  */
3071
3072 int
3073 main ()
3074 {
3075
3076   ;
3077   return 0;
3078 }
3079 _ACEOF
3080 rm -rf conftest.$ac_objext
3081 if { (ac_try="$ac_compile"
3082 case "(($ac_try" in
3083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084   *) ac_try_echo=$ac_try;;
3085 esac
3086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3087   (eval "$ac_compile") 2>conftest.er1
3088   ac_status=$?
3089   grep -v '^ *+' conftest.er1 >conftest.err
3090   rm -rf conftest.er1
3091   cat conftest.err >&5
3092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3093   (exit $ac_status); } && {
3094          test -z "$ac_c_werror_flag" ||
3095          test ! -s conftest.err
3096        } && test -s conftest.$ac_objext; then
3097   ac_cv_prog_cc_g=yes
3098 else
3099   echo "$as_me: failed program was:" >&5
3100 sed 's/^/| /' conftest.$ac_ext >&5
3101
3102         CFLAGS=""
3103       cat >conftest.$ac_ext <<_ACEOF
3104 /* confdefs.h.  */
3105 _ACEOF
3106 cat confdefs.h >>conftest.$ac_ext
3107 cat >>conftest.$ac_ext <<_ACEOF
3108 /* end confdefs.h.  */
3109
3110 int
3111 main ()
3112 {
3113
3114   ;
3115   return 0;
3116 }
3117 _ACEOF
3118 rm -rf conftest.$ac_objext
3119 if { (ac_try="$ac_compile"
3120 case "(($ac_try" in
3121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3122   *) ac_try_echo=$ac_try;;
3123 esac
3124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3125   (eval "$ac_compile") 2>conftest.er1
3126   ac_status=$?
3127   grep -v '^ *+' conftest.er1 >conftest.err
3128   rm -rf conftest.er1
3129   cat conftest.err >&5
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); } && {
3132          test -z "$ac_c_werror_flag" ||
3133          test ! -s conftest.err
3134        } && test -s conftest.$ac_objext; then
3135   :
3136 else
3137   echo "$as_me: failed program was:" >&5
3138 sed 's/^/| /' conftest.$ac_ext >&5
3139
3140         ac_c_werror_flag=$ac_save_c_werror_flag
3141          CFLAGS="-g"
3142          cat >conftest.$ac_ext <<_ACEOF
3143 /* confdefs.h.  */
3144 _ACEOF
3145 cat confdefs.h >>conftest.$ac_ext
3146 cat >>conftest.$ac_ext <<_ACEOF
3147 /* end confdefs.h.  */
3148
3149 int
3150 main ()
3151 {
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -rf conftest.$ac_objext
3158 if { (ac_try="$ac_compile"
3159 case "(($ac_try" in
3160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161   *) ac_try_echo=$ac_try;;
3162 esac
3163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3164   (eval "$ac_compile") 2>conftest.er1
3165   ac_status=$?
3166   grep -v '^ *+' conftest.er1 >conftest.err
3167   rm -rf conftest.er1
3168   cat conftest.err >&5
3169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3170   (exit $ac_status); } && {
3171          test -z "$ac_c_werror_flag" ||
3172          test ! -s conftest.err
3173        } && test -s conftest.$ac_objext; then
3174   ac_cv_prog_cc_g=yes
3175 else
3176   echo "$as_me: failed program was:" >&5
3177 sed 's/^/| /' conftest.$ac_ext >&5
3178
3179
3180 fi
3181
3182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3183 fi
3184
3185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3186 fi
3187
3188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3189    ac_c_werror_flag=$ac_save_c_werror_flag
3190 fi
3191 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3192 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3193 if test "$ac_test_CFLAGS" = set; then
3194   CFLAGS=$ac_save_CFLAGS
3195 elif test $ac_cv_prog_cc_g = yes; then
3196   if test "$GCC" = yes; then
3197     CFLAGS="-g -O2"
3198   else
3199     CFLAGS="-g"
3200   fi
3201 else
3202   if test "$GCC" = yes; then
3203     CFLAGS="-O2"
3204   else
3205     CFLAGS=
3206   fi
3207 fi
3208 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3209 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3210 if test "${ac_cv_prog_cc_c89+set}" = set; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   ac_cv_prog_cc_c89=no
3214 ac_save_CC=$CC
3215 cat >conftest.$ac_ext <<_ACEOF
3216 /* confdefs.h.  */
3217 _ACEOF
3218 cat confdefs.h >>conftest.$ac_ext
3219 cat >>conftest.$ac_ext <<_ACEOF
3220 /* end confdefs.h.  */
3221 #include <stdarg.h>
3222 #include <stdio.h>
3223 #include <sys/types.h>
3224 #include <sys/stat.h>
3225 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3226 struct buf { int x; };
3227 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3228 static char *e (p, i)
3229      char **p;
3230      int i;
3231 {
3232   return p[i];
3233 }
3234 static char *f (char * (*g) (char **, int), char **p, ...)
3235 {
3236   char *s;
3237   va_list v;
3238   va_start (v,p);
3239   s = g (p, va_arg (v,int));
3240   va_end (v);
3241   return s;
3242 }
3243
3244 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3245    function prototypes and stuff, but not '\xHH' hex character constants.
3246    These don't provoke an error unfortunately, instead are silently treated
3247    as 'x'.  The following induces an error, until -std is added to get
3248    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3249    array size at least.  It's necessary to write '\x00'==0 to get something
3250    that's true only with -std.  */
3251 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3252
3253 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3254    inside strings and character constants.  */
3255 #define FOO(x) 'x'
3256 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3257
3258 int test (int i, double x);
3259 struct s1 {int (*f) (int a);};
3260 struct s2 {int (*f) (double a);};
3261 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3262 int argc;
3263 char **argv;
3264 int
3265 main ()
3266 {
3267 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3268   ;
3269   return 0;
3270 }
3271 _ACEOF
3272 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3273         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3274 do
3275   CC="$ac_save_CC $ac_arg"
3276   rm -rf conftest.$ac_objext
3277 if { (ac_try="$ac_compile"
3278 case "(($ac_try" in
3279   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280   *) ac_try_echo=$ac_try;;
3281 esac
3282 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3283   (eval "$ac_compile") 2>conftest.er1
3284   ac_status=$?
3285   grep -v '^ *+' conftest.er1 >conftest.err
3286   rm -rf conftest.er1
3287   cat conftest.err >&5
3288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3289   (exit $ac_status); } && {
3290          test -z "$ac_c_werror_flag" ||
3291          test ! -s conftest.err
3292        } && test -s conftest.$ac_objext; then
3293   ac_cv_prog_cc_c89=$ac_arg
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 sed 's/^/| /' conftest.$ac_ext >&5
3297
3298
3299 fi
3300
3301 rm -f core conftest.err conftest.$ac_objext
3302   test "x$ac_cv_prog_cc_c89" != "xno" && break
3303 done
3304 rm -rf conftest.$ac_ext
3305 CC=$ac_save_CC
3306
3307 fi
3308 # AC_CACHE_VAL
3309 case "x$ac_cv_prog_cc_c89" in
3310   x)
3311     { echo "$as_me:$LINENO: result: none needed" >&5
3312 echo "${ECHO_T}none needed" >&6; } ;;
3313   xno)
3314     { echo "$as_me:$LINENO: result: unsupported" >&5
3315 echo "${ECHO_T}unsupported" >&6; } ;;
3316   *)
3317     CC="$CC $ac_cv_prog_cc_c89"
3318     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3319 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3320 esac
3321
3322
3323 ac_ext=c
3324 ac_cpp='$CPP $CPPFLAGS'
3325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3328
3329
3330   if test -z "$GCC"; then
3331     # not using GCC
3332     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3333 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3334     case "$host" in
3335       *-hpux* )
3336         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3337 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3338         CC="$CC -Ae"
3339       ;;
3340       *-aix* )
3341         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3342 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3343         CC="$CC -qlanglvl=ansi -qhalt=e"
3344       ;;
3345       *-dec-* )
3346         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3347 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3348         CC="$CC -std1"
3349       ;;
3350       *)
3351         { echo "$as_me:$LINENO: result: no idea" >&5
3352 echo "${ECHO_T}no idea" >&6; }
3353       ;;
3354     esac
3355   else
3356     # using GCC
3357     case "$host" in
3358       *-solaris*)
3359         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3360 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3361         CC="$CC -D__EXTENSIONS__"
3362       ;;
3363     esac
3364   fi
3365
3366   OBJCC="$CC"
3367
3368   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3369 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3370   if test "$cross_compiling" = yes; then
3371   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3372 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3373    { (exit 1); exit 1; }; }
3374 else
3375   cat >conftest.$ac_ext <<_ACEOF
3376 /* confdefs.h.  */
3377 _ACEOF
3378 cat confdefs.h >>conftest.$ac_ext
3379 cat >>conftest.$ac_ext <<_ACEOF
3380 /* end confdefs.h.  */
3381  main(int ac, char **av) { return 0; }
3382 _ACEOF
3383 rm -rf conftest$ac_exeext
3384 if { (ac_try="$ac_link"
3385 case "(($ac_try" in
3386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3387   *) ac_try_echo=$ac_try;;
3388 esac
3389 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3390   (eval "$ac_link") 2>&5
3391   ac_status=$?
3392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3394   { (case "(($ac_try" in
3395   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3396   *) ac_try_echo=$ac_try;;
3397 esac
3398 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3399   (eval "$ac_try") 2>&5
3400   ac_status=$?
3401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3402   (exit $ac_status); }; }; then
3403   { echo "$as_me:$LINENO: result: yes" >&5
3404 echo "${ECHO_T}yes" >&6; }
3405 else
3406   echo "$as_me: program exited with status $ac_status" >&5
3407 echo "$as_me: failed program was:" >&5
3408 sed 's/^/| /' conftest.$ac_ext >&5
3409
3410 ( exit $ac_status )
3411 { echo "$as_me:$LINENO: result: no" >&5
3412 echo "${ECHO_T}no" >&6; }
3413      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3414 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3415    { (exit 1); exit 1; }; }
3416 fi
3417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3418 fi
3419
3420
3421
3422   if test -n "$GCC"; then
3423     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3424 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3425     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3426     OBJCC="$OBJCC -Wall"
3427     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3428     # and so perhaps now we can do without -pedantic?
3429   else
3430     case "$host" in
3431       *-irix5* |*-irix6.0-3* )
3432         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3433 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3434         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3435       ;;
3436 #     *-dec-osf* )
3437 #       if test -z "$GCC"; then
3438 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3439 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3440 #       fi
3441 #     ;;
3442     esac
3443   fi
3444
3445 if test -n "$GCC"; then
3446    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3447 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3448 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3449   echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451   rm -rf conftest.$ac_ext
3452      touch conftest.$ac_ext
3453      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3454           grep unrecognized >/dev/null ); then
3455        ac_cv_gcc_accepts_no_overlength=no
3456      else
3457        ac_cv_gcc_accepts_no_overlength=yes
3458        CC="$CC -Wno-overlength-strings"
3459      fi
3460 fi
3461 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3462 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3463    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3464   fi
3465
3466 if test -n "$GCC"; then
3467    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3468 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3469 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3470   echo $ECHO_N "(cached) $ECHO_C" >&6
3471 else
3472   rm -rf conftest.$ac_ext
3473      touch conftest.$ac_ext
3474      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3475           grep unrecognized >/dev/null ); then
3476        ac_cv_gcc_accepts_no_decl_after=no
3477      else
3478        ac_cv_gcc_accepts_no_decl_after=yes
3479        CC="$CC -Wdeclaration-after-statement"
3480      fi
3481 fi
3482 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3483 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3484    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3485   fi
3486
3487 if test -n "$GCC"; then
3488    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3489 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3490 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   rm -rf conftest.$ac_ext
3494      touch conftest.$ac_ext
3495      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3496           grep unrecognized >/dev/null ); then
3497        ac_cv_gcc_accepts_no_cpp_precomp=no
3498      else
3499        ac_cv_gcc_accepts_no_cpp_precomp=yes
3500        CC="$CC -no-cpp-precomp"
3501      fi
3502 fi
3503 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3504 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3505    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3506   fi
3507
3508 if test -n "$GCC"; then
3509
3510   case "$host" in
3511     *-darwin* )
3512       # Fucking Apple let // comments sneak into OpenGL headers, so
3513       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3514     ;;
3515    *)
3516      if test -n "$GCC"; then
3517    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3518 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3519 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3520   echo $ECHO_N "(cached) $ECHO_C" >&6
3521 else
3522   rm -rf conftest.$ac_ext
3523      touch conftest.$ac_ext
3524      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3525           grep unrecognized >/dev/null ); then
3526        ac_cv_gcc_accepts_std=no
3527      else
3528        ac_cv_gcc_accepts_std=yes
3529        CC="$CC -std=c89"
3530      fi
3531 fi
3532 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3533 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3534    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3535   fi
3536
3537    ;;
3538   esac
3539
3540    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3541 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3542    #
3543    # The reason that // comments are banned from xscreensaver is that gcc is
3544    # basically the only compiler in the world that supports them in C code.
3545    # All other vendors support them only in their C++ compilers, not in their
3546    # ANSI C compilers.  This means that it's a portability problem: every time
3547    # these comments have snuck into the xscreensaver source code, I've gotten
3548    # complaints about it the next day.  So we turn off support for them in gcc
3549    # as well to prevent them from accidentially slipping in.
3550    #
3551    if test "$ac_gcc_accepts_std" = yes ; then
3552      #
3553      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3554      # (That appears to be the only additional preprocessor symbol
3555      # it defines, in addition to the syntax changes it makes.)
3556      #
3557      # -std=gnu89 is no good, because // comments were a GNU extension
3558      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3559      # with -std=gnu89 but not with -std=c89.)
3560      #
3561      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3562      CC="$CC -U__STRICT_ANSI__"
3563    else
3564      # The old way:
3565      CC="$CC -Wp,-lang-c89"
3566    fi
3567   fi
3568
3569 ac_ext=c
3570 ac_cpp='$CPP $CPPFLAGS'
3571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3575 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3576 # On Suns, sometimes $CPP names a directory.
3577 if test -n "$CPP" && test -d "$CPP"; then
3578   CPP=
3579 fi
3580 if test -z "$CPP"; then
3581   if test "${ac_cv_prog_CPP+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584       # Double quotes because CPP needs to be expanded
3585     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3586     do
3587       ac_preproc_ok=false
3588 for ac_c_preproc_warn_flag in '' yes
3589 do
3590   # Use a header file that comes with gcc, so configuring glibc
3591   # with a fresh cross-compiler works.
3592   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3593   # <limits.h> exists even on freestanding compilers.
3594   # On the NeXT, cc -E runs the code through the compiler's parser,
3595   # not just through cpp. "Syntax error" is here to catch this case.
3596   cat >conftest.$ac_ext <<_ACEOF
3597 /* confdefs.h.  */
3598 _ACEOF
3599 cat confdefs.h >>conftest.$ac_ext
3600 cat >>conftest.$ac_ext <<_ACEOF
3601 /* end confdefs.h.  */
3602 #ifdef __STDC__
3603 # include <limits.h>
3604 #else
3605 # include <assert.h>
3606 #endif
3607                      Syntax error
3608 _ACEOF
3609 if { (ac_try="$ac_cpp conftest.$ac_ext"
3610 case "(($ac_try" in
3611   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612   *) ac_try_echo=$ac_try;;
3613 esac
3614 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3615   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3616   ac_status=$?
3617   grep -v '^ *+' conftest.er1 >conftest.err
3618   rm -rf conftest.er1
3619   cat conftest.err >&5
3620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3621   (exit $ac_status); } >/dev/null && {
3622          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3623          test ! -s conftest.err
3624        }; then
3625   :
3626 else
3627   echo "$as_me: failed program was:" >&5
3628 sed 's/^/| /' conftest.$ac_ext >&5
3629
3630   # Broken: fails on valid input.
3631 continue
3632 fi
3633
3634 rm -rf conftest.err conftest.$ac_ext
3635
3636   # OK, works on sane cases.  Now check whether nonexistent headers
3637   # can be detected and how.
3638   cat >conftest.$ac_ext <<_ACEOF
3639 /* confdefs.h.  */
3640 _ACEOF
3641 cat confdefs.h >>conftest.$ac_ext
3642 cat >>conftest.$ac_ext <<_ACEOF
3643 /* end confdefs.h.  */
3644 #include <ac_nonexistent.h>
3645 _ACEOF
3646 if { (ac_try="$ac_cpp conftest.$ac_ext"
3647 case "(($ac_try" in
3648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3649   *) ac_try_echo=$ac_try;;
3650 esac
3651 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3652   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3653   ac_status=$?
3654   grep -v '^ *+' conftest.er1 >conftest.err
3655   rm -rf conftest.er1
3656   cat conftest.err >&5
3657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3658   (exit $ac_status); } >/dev/null && {
3659          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3660          test ! -s conftest.err
3661        }; then
3662   # Broken: success on invalid input.
3663 continue
3664 else
3665   echo "$as_me: failed program was:" >&5
3666 sed 's/^/| /' conftest.$ac_ext >&5
3667
3668   # Passes both tests.
3669 ac_preproc_ok=:
3670 break
3671 fi
3672
3673 rm -rf conftest.err conftest.$ac_ext
3674
3675 done
3676 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3677 rm -rf conftest.err conftest.$ac_ext
3678 if $ac_preproc_ok; then
3679   break
3680 fi
3681
3682     done
3683     ac_cv_prog_CPP=$CPP
3684
3685 fi
3686   CPP=$ac_cv_prog_CPP
3687 else
3688   ac_cv_prog_CPP=$CPP
3689 fi
3690 { echo "$as_me:$LINENO: result: $CPP" >&5
3691 echo "${ECHO_T}$CPP" >&6; }
3692 ac_preproc_ok=false
3693 for ac_c_preproc_warn_flag in '' yes
3694 do
3695   # Use a header file that comes with gcc, so configuring glibc
3696   # with a fresh cross-compiler works.
3697   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3698   # <limits.h> exists even on freestanding compilers.
3699   # On the NeXT, cc -E runs the code through the compiler's parser,
3700   # not just through cpp. "Syntax error" is here to catch this case.
3701   cat >conftest.$ac_ext <<_ACEOF
3702 /* confdefs.h.  */
3703 _ACEOF
3704 cat confdefs.h >>conftest.$ac_ext
3705 cat >>conftest.$ac_ext <<_ACEOF
3706 /* end confdefs.h.  */
3707 #ifdef __STDC__
3708 # include <limits.h>
3709 #else
3710 # include <assert.h>
3711 #endif
3712                      Syntax error
3713 _ACEOF
3714 if { (ac_try="$ac_cpp conftest.$ac_ext"
3715 case "(($ac_try" in
3716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717   *) ac_try_echo=$ac_try;;
3718 esac
3719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3720   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3721   ac_status=$?
3722   grep -v '^ *+' conftest.er1 >conftest.err
3723   rm -rf conftest.er1
3724   cat conftest.err >&5
3725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3726   (exit $ac_status); } >/dev/null && {
3727          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3728          test ! -s conftest.err
3729        }; then
3730   :
3731 else
3732   echo "$as_me: failed program was:" >&5
3733 sed 's/^/| /' conftest.$ac_ext >&5
3734
3735   # Broken: fails on valid input.
3736 continue
3737 fi
3738
3739 rm -rf conftest.err conftest.$ac_ext
3740
3741   # OK, works on sane cases.  Now check whether nonexistent headers
3742   # can be detected and how.
3743   cat >conftest.$ac_ext <<_ACEOF
3744 /* confdefs.h.  */
3745 _ACEOF
3746 cat confdefs.h >>conftest.$ac_ext
3747 cat >>conftest.$ac_ext <<_ACEOF
3748 /* end confdefs.h.  */
3749 #include <ac_nonexistent.h>
3750 _ACEOF
3751 if { (ac_try="$ac_cpp conftest.$ac_ext"
3752 case "(($ac_try" in
3753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3754   *) ac_try_echo=$ac_try;;
3755 esac
3756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3757   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3758   ac_status=$?
3759   grep -v '^ *+' conftest.er1 >conftest.err
3760   rm -rf conftest.er1
3761   cat conftest.err >&5
3762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763   (exit $ac_status); } >/dev/null && {
3764          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3765          test ! -s conftest.err
3766        }; then
3767   # Broken: success on invalid input.
3768 continue
3769 else
3770   echo "$as_me: failed program was:" >&5
3771 sed 's/^/| /' conftest.$ac_ext >&5
3772
3773   # Passes both tests.
3774 ac_preproc_ok=:
3775 break
3776 fi
3777
3778 rm -rf conftest.err conftest.$ac_ext
3779
3780 done
3781 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3782 rm -rf conftest.err conftest.$ac_ext
3783 if $ac_preproc_ok; then
3784   :
3785 else
3786   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3787 See \`config.log' for more details." >&5
3788 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3789 See \`config.log' for more details." >&2;}
3790    { (exit 1); exit 1; }; }
3791 fi
3792
3793 ac_ext=c
3794 ac_cpp='$CPP $CPPFLAGS'
3795 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3796 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3797 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3798
3799 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3800 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3801 if test "${ac_cv_c_const+set}" = set; then
3802   echo $ECHO_N "(cached) $ECHO_C" >&6
3803 else
3804   cat >conftest.$ac_ext <<_ACEOF
3805 /* confdefs.h.  */
3806 _ACEOF
3807 cat confdefs.h >>conftest.$ac_ext
3808 cat >>conftest.$ac_ext <<_ACEOF
3809 /* end confdefs.h.  */
3810
3811 int
3812 main ()
3813 {
3814 /* FIXME: Include the comments suggested by Paul. */
3815 #ifndef __cplusplus
3816   /* Ultrix mips cc rejects this.  */
3817   typedef int charset[2];
3818   const charset cs;
3819   /* SunOS 4.1.1 cc rejects this.  */
3820   char const *const *pcpcc;
3821   char **ppc;
3822   /* NEC SVR4.0.2 mips cc rejects this.  */
3823   struct point {int x, y;};
3824   static struct point const zero = {0,0};
3825   /* AIX XL C 1.02.0.0 rejects this.
3826      It does not let you subtract one const X* pointer from another in
3827      an arm of an if-expression whose if-part is not a constant
3828      expression */
3829   const char *g = "string";
3830   pcpcc = &g + (g ? g-g : 0);
3831   /* HPUX 7.0 cc rejects these. */
3832   ++pcpcc;
3833   ppc = (char**) pcpcc;
3834   pcpcc = (char const *const *) ppc;
3835   { /* SCO 3.2v4 cc rejects this.  */
3836     char *t;
3837     char const *s = 0 ? (char *) 0 : (char const *) 0;
3838
3839     *t++ = 0;
3840     if (s) return 0;
3841   }
3842   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3843     int x[] = {25, 17};
3844     const int *foo = &x[0];
3845     ++foo;
3846   }
3847   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3848     typedef const int *iptr;
3849     iptr p = 0;
3850     ++p;
3851   }
3852   { /* AIX XL C 1.02.0.0 rejects this saying
3853        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3854     struct s { int j; const int *ap[3]; };
3855     struct s *b; b->j = 5;
3856   }
3857   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3858     const int foo = 10;
3859     if (!foo) return 0;
3860   }
3861   return !cs[0] && !zero.x;
3862 #endif
3863
3864   ;
3865   return 0;
3866 }
3867 _ACEOF
3868 rm -rf conftest.$ac_objext
3869 if { (ac_try="$ac_compile"
3870 case "(($ac_try" in
3871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3872   *) ac_try_echo=$ac_try;;
3873 esac
3874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3875   (eval "$ac_compile") 2>conftest.er1
3876   ac_status=$?
3877   grep -v '^ *+' conftest.er1 >conftest.err
3878   rm -rf conftest.er1
3879   cat conftest.err >&5
3880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3881   (exit $ac_status); } && {
3882          test -z "$ac_c_werror_flag" ||
3883          test ! -s conftest.err
3884        } && test -s conftest.$ac_objext; then
3885   ac_cv_c_const=yes
3886 else
3887   echo "$as_me: failed program was:" >&5
3888 sed 's/^/| /' conftest.$ac_ext >&5
3889
3890         ac_cv_c_const=no
3891 fi
3892
3893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3894 fi
3895 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3896 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3897 if test $ac_cv_c_const = no; then
3898
3899 cat >>confdefs.h <<\_ACEOF
3900 #define const
3901 _ACEOF
3902
3903 fi
3904
3905 { echo "$as_me:$LINENO: checking for inline" >&5
3906 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3907 if test "${ac_cv_c_inline+set}" = set; then
3908   echo $ECHO_N "(cached) $ECHO_C" >&6
3909 else
3910   ac_cv_c_inline=no
3911 for ac_kw in inline __inline__ __inline; do
3912   cat >conftest.$ac_ext <<_ACEOF
3913 /* confdefs.h.  */
3914 _ACEOF
3915 cat confdefs.h >>conftest.$ac_ext
3916 cat >>conftest.$ac_ext <<_ACEOF
3917 /* end confdefs.h.  */
3918 #ifndef __cplusplus
3919 typedef int foo_t;
3920 static $ac_kw foo_t static_foo () {return 0; }
3921 $ac_kw foo_t foo () {return 0; }
3922 #endif
3923
3924 _ACEOF
3925 rm -rf conftest.$ac_objext
3926 if { (ac_try="$ac_compile"
3927 case "(($ac_try" in
3928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3929   *) ac_try_echo=$ac_try;;
3930 esac
3931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3932   (eval "$ac_compile") 2>conftest.er1
3933   ac_status=$?
3934   grep -v '^ *+' conftest.er1 >conftest.err
3935   rm -rf conftest.er1
3936   cat conftest.err >&5
3937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3938   (exit $ac_status); } && {
3939          test -z "$ac_c_werror_flag" ||
3940          test ! -s conftest.err
3941        } && test -s conftest.$ac_objext; then
3942   ac_cv_c_inline=$ac_kw
3943 else
3944   echo "$as_me: failed program was:" >&5
3945 sed 's/^/| /' conftest.$ac_ext >&5
3946
3947
3948 fi
3949
3950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3951   test "$ac_cv_c_inline" != no && break
3952 done
3953
3954 fi
3955 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3956 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3957
3958
3959 case $ac_cv_c_inline in
3960   inline | yes) ;;
3961   *)
3962     case $ac_cv_c_inline in
3963       no) ac_val=;;
3964       *) ac_val=$ac_cv_c_inline;;
3965     esac
3966     cat >>confdefs.h <<_ACEOF
3967 #ifndef __cplusplus
3968 #define inline $ac_val
3969 #endif
3970 _ACEOF
3971     ;;
3972 esac
3973
3974
3975 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3976   { echo "$as_me:$LINENO: checking for bc" >&5
3977 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3978   if test "$ac_bc_result" = "15" ; then
3979     { echo "$as_me:$LINENO: result: yes" >&5
3980 echo "${ECHO_T}yes" >&6; }
3981   else
3982     { echo "$as_me:$LINENO: result: no" >&5
3983 echo "${ECHO_T}no" >&6; }
3984     echo ''
3985     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3986                   part of Unix since the 1970s.  Come back when your vendor
3987                   has grown a clue." >&5
3988 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3989                   part of Unix since the 1970s.  Come back when your vendor
3990                   has grown a clue." >&2;}
3991    { (exit 1); exit 1; }; }
3992   fi
3993
3994
3995 # stuff for Makefiles
3996 # Find a good install program.  We prefer a C program (faster),
3997 # so one script is as good as another.  But avoid the broken or
3998 # incompatible versions:
3999 # SysV /etc/install, /usr/sbin/install
4000 # SunOS /usr/etc/install
4001 # IRIX /sbin/install
4002 # AIX /bin/install
4003 # AmigaOS /C/install, which installs bootblocks on floppy discs
4004 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4005 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4006 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4007 # OS/2's system install, which has a completely different semantic
4008 # ./install, which can be erroneously created by make from ./install.sh.
4009 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4010 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4011 if test -z "$INSTALL"; then
4012 if test "${ac_cv_path_install+set}" = set; then
4013   echo $ECHO_N "(cached) $ECHO_C" >&6
4014 else
4015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4016 for as_dir in $PATH
4017 do
4018   IFS=$as_save_IFS
4019   test -z "$as_dir" && as_dir=.
4020   # Account for people who put trailing slashes in PATH elements.
4021 case $as_dir/ in
4022   ./ | .// | /cC/* | \
4023   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4024   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4025   /usr/ucb/* ) ;;
4026   *)
4027     # OSF1 and SCO ODT 3.0 have their own names for install.
4028     # Don't use installbsd from OSF since it installs stuff as root
4029     # by default.
4030     for ac_prog in ginstall scoinst install; do
4031       for ac_exec_ext in '' $ac_executable_extensions; do
4032         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4033           if test $ac_prog = install &&
4034             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4035             # AIX install.  It has an incompatible calling convention.
4036             :
4037           elif test $ac_prog = install &&
4038             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4039             # program-specific install script used by HP pwplus--don't use.
4040             :
4041           else
4042             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4043             break 3
4044           fi
4045         fi
4046       done
4047     done
4048     ;;
4049 esac
4050 done
4051 IFS=$as_save_IFS
4052
4053
4054 fi
4055   if test "${ac_cv_path_install+set}" = set; then
4056     INSTALL=$ac_cv_path_install
4057   else
4058     # As a last resort, use the slow shell script.  Don't cache a
4059     # value for INSTALL within a source directory, because that will
4060     # break other packages using the cache if that directory is
4061     # removed, or if the value is a relative name.
4062     INSTALL=$ac_install_sh
4063   fi
4064 fi
4065 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4066 echo "${ECHO_T}$INSTALL" >&6; }
4067
4068 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4069 # It thinks the first close brace ends the variable substitution.
4070 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4071
4072 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4073
4074 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4075
4076 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4077 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4078 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4079   echo $ECHO_N "(cached) $ECHO_C" >&6
4080 else
4081   ac_cv_install_d_creates_dirs=no
4082      rm -rf conftestdir
4083      if mkdir conftestdir; then
4084        cd conftestdir 2>/dev/null
4085        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4086        if test -d dir1/dir2/. ; then
4087          ac_cv_install_d_creates_dirs=yes
4088        fi
4089        cd .. 2>/dev/null
4090        rm -rf conftestdir
4091      fi
4092
4093 fi
4094 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4095 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4096
4097   if test "$ac_cv_install_d_creates_dirs" = no ; then
4098     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4099 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4100 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4101   echo $ECHO_N "(cached) $ECHO_C" >&6
4102 else
4103   ac_cv_mkdir_p_creates_dirs=no
4104        rm -rf conftestdir
4105        if mkdir conftestdir; then
4106          cd conftestdir 2>/dev/null
4107          mkdir -p dir1/dir2 >/dev/null 2>&1
4108          if test -d dir1/dir2/. ; then
4109            ac_cv_mkdir_p_creates_dirs=yes
4110          fi
4111          cd .. 2>/dev/null
4112          rm -rf conftestdir
4113        fi
4114
4115 fi
4116 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4117 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4118   fi
4119
4120   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4121     INSTALL_DIRS='${INSTALL} -d'
4122   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4123     INSTALL_DIRS='mkdir -p'
4124   else
4125     # any other ideas?
4126     INSTALL_DIRS='${INSTALL} -d'
4127   fi
4128
4129 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4130 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4131 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4132 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4133   echo $ECHO_N "(cached) $ECHO_C" >&6
4134 else
4135   cat >conftest.make <<\_ACEOF
4136 SHELL = /bin/sh
4137 all:
4138         @echo '@@@%%%=$(MAKE)=@@@%%%'
4139 _ACEOF
4140 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4141 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4142   *@@@%%%=?*=@@@%%%*)
4143     eval ac_cv_prog_make_${ac_make}_set=yes;;
4144   *)
4145     eval ac_cv_prog_make_${ac_make}_set=no;;
4146 esac
4147 rm -rf conftest.make
4148 fi
4149 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4150   { echo "$as_me:$LINENO: result: yes" >&5
4151 echo "${ECHO_T}yes" >&6; }
4152   SET_MAKE=
4153 else
4154   { echo "$as_me:$LINENO: result: no" >&5
4155 echo "${ECHO_T}no" >&6; }
4156   SET_MAKE="MAKE=${MAKE-make}"
4157 fi
4158
4159
4160 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4161 # That's wrong: it should be set to '${INSTALL}', so that one can
4162 # implement the "install-strip" target properly (strip executables,
4163 # but do not try to strip scripts.)
4164 #
4165 INSTALL_SCRIPT='${INSTALL}'
4166
4167 # random libc stuff
4168
4169 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4170 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4171 if test "${ac_cv_path_GREP+set}" = set; then
4172   echo $ECHO_N "(cached) $ECHO_C" >&6
4173 else
4174   # Extract the first word of "grep ggrep" to use in msg output
4175 if test -z "$GREP"; then
4176 set dummy grep ggrep; ac_prog_name=$2
4177 if test "${ac_cv_path_GREP+set}" = set; then
4178   echo $ECHO_N "(cached) $ECHO_C" >&6
4179 else
4180   ac_path_GREP_found=false
4181 # Loop through the user's path and test for each of PROGNAME-LIST
4182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4184 do
4185   IFS=$as_save_IFS
4186   test -z "$as_dir" && as_dir=.
4187   for ac_prog in grep ggrep; do
4188   for ac_exec_ext in '' $ac_executable_extensions; do
4189     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4190     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4191     # Check for GNU ac_path_GREP and select it if it is found.
4192   # Check for GNU $ac_path_GREP
4193 case `"$ac_path_GREP" --version 2>&1` in
4194 *GNU*)
4195   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4196 *)
4197   ac_count=0
4198   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4199   while :
4200   do
4201     cat "conftest.in" "conftest.in" >"conftest.tmp"
4202     mv "conftest.tmp" "conftest.in"
4203     cp "conftest.in" "conftest.nl"
4204     echo 'GREP' >> "conftest.nl"
4205     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4206     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4207     ac_count=`expr $ac_count + 1`
4208     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4209       # Best one so far, save it but keep looking for a better one
4210       ac_cv_path_GREP="$ac_path_GREP"
4211       ac_path_GREP_max=$ac_count
4212     fi
4213     # 10*(2^10) chars as input seems more than enough
4214     test $ac_count -gt 10 && break
4215   done
4216   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4217 esac
4218
4219
4220     $ac_path_GREP_found && break 3
4221   done
4222 done
4223
4224 done
4225 IFS=$as_save_IFS
4226
4227
4228 fi
4229
4230 GREP="$ac_cv_path_GREP"
4231 if test -z "$GREP"; then
4232   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4233 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4234    { (exit 1); exit 1; }; }
4235 fi
4236
4237 else
4238   ac_cv_path_GREP=$GREP
4239 fi
4240
4241
4242 fi
4243 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4244 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4245  GREP="$ac_cv_path_GREP"
4246
4247
4248 { echo "$as_me:$LINENO: checking for egrep" >&5
4249 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4250 if test "${ac_cv_path_EGREP+set}" = set; then
4251   echo $ECHO_N "(cached) $ECHO_C" >&6
4252 else
4253   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4254    then ac_cv_path_EGREP="$GREP -E"
4255    else
4256      # Extract the first word of "egrep" to use in msg output
4257 if test -z "$EGREP"; then
4258 set dummy egrep; ac_prog_name=$2
4259 if test "${ac_cv_path_EGREP+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   ac_path_EGREP_found=false
4263 # Loop through the user's path and test for each of PROGNAME-LIST
4264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4266 do
4267   IFS=$as_save_IFS
4268   test -z "$as_dir" && as_dir=.
4269   for ac_prog in egrep; do
4270   for ac_exec_ext in '' $ac_executable_extensions; do
4271     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4272     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4273     # Check for GNU ac_path_EGREP and select it if it is found.
4274   # Check for GNU $ac_path_EGREP
4275 case `"$ac_path_EGREP" --version 2>&1` in
4276 *GNU*)
4277   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4278 *)
4279   ac_count=0
4280   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4281   while :
4282   do
4283     cat "conftest.in" "conftest.in" >"conftest.tmp"
4284     mv "conftest.tmp" "conftest.in"
4285     cp "conftest.in" "conftest.nl"
4286     echo 'EGREP' >> "conftest.nl"
4287     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4288     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4289     ac_count=`expr $ac_count + 1`
4290     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4291       # Best one so far, save it but keep looking for a better one
4292       ac_cv_path_EGREP="$ac_path_EGREP"
4293       ac_path_EGREP_max=$ac_count
4294     fi
4295     # 10*(2^10) chars as input seems more than enough
4296     test $ac_count -gt 10 && break
4297   done
4298   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4299 esac
4300
4301
4302     $ac_path_EGREP_found && break 3
4303   done
4304 done
4305
4306 done
4307 IFS=$as_save_IFS
4308
4309
4310 fi
4311
4312 EGREP="$ac_cv_path_EGREP"
4313 if test -z "$EGREP"; then
4314   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4315 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4316    { (exit 1); exit 1; }; }
4317 fi
4318
4319 else
4320   ac_cv_path_EGREP=$EGREP
4321 fi
4322
4323
4324    fi
4325 fi
4326 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4327 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4328  EGREP="$ac_cv_path_EGREP"
4329
4330
4331 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4332 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4333 if test "${ac_cv_header_stdc+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   cat >conftest.$ac_ext <<_ACEOF
4337 /* confdefs.h.  */
4338 _ACEOF
4339 cat confdefs.h >>conftest.$ac_ext
4340 cat >>conftest.$ac_ext <<_ACEOF
4341 /* end confdefs.h.  */
4342 #include <stdlib.h>
4343 #include <stdarg.h>
4344 #include <string.h>
4345 #include <float.h>
4346
4347 int
4348 main ()
4349 {
4350
4351   ;
4352   return 0;
4353 }
4354 _ACEOF
4355 rm -rf conftest.$ac_objext
4356 if { (ac_try="$ac_compile"
4357 case "(($ac_try" in
4358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4359   *) ac_try_echo=$ac_try;;
4360 esac
4361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4362   (eval "$ac_compile") 2>conftest.er1
4363   ac_status=$?
4364   grep -v '^ *+' conftest.er1 >conftest.err
4365   rm -rf conftest.er1
4366   cat conftest.err >&5
4367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4368   (exit $ac_status); } && {
4369          test -z "$ac_c_werror_flag" ||
4370          test ! -s conftest.err
4371        } && test -s conftest.$ac_objext; then
4372   ac_cv_header_stdc=yes
4373 else
4374   echo "$as_me: failed program was:" >&5
4375 sed 's/^/| /' conftest.$ac_ext >&5
4376
4377         ac_cv_header_stdc=no
4378 fi
4379
4380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381
4382 if test $ac_cv_header_stdc = yes; then
4383   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4384   cat >conftest.$ac_ext <<_ACEOF
4385 /* confdefs.h.  */
4386 _ACEOF
4387 cat confdefs.h >>conftest.$ac_ext
4388 cat >>conftest.$ac_ext <<_ACEOF
4389 /* end confdefs.h.  */
4390 #include <string.h>
4391
4392 _ACEOF
4393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394   $EGREP "memchr" >/dev/null 2>&1; then
4395   :
4396 else
4397   ac_cv_header_stdc=no
4398 fi
4399 rm -f -r conftest*
4400
4401 fi
4402
4403 if test $ac_cv_header_stdc = yes; then
4404   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4405   cat >conftest.$ac_ext <<_ACEOF
4406 /* confdefs.h.  */
4407 _ACEOF
4408 cat confdefs.h >>conftest.$ac_ext
4409 cat >>conftest.$ac_ext <<_ACEOF
4410 /* end confdefs.h.  */
4411 #include <stdlib.h>
4412
4413 _ACEOF
4414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4415   $EGREP "free" >/dev/null 2>&1; then
4416   :
4417 else
4418   ac_cv_header_stdc=no
4419 fi
4420 rm -f -r conftest*
4421
4422 fi
4423
4424 if test $ac_cv_header_stdc = yes; then
4425   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4426   if test "$cross_compiling" = yes; then
4427   :
4428 else
4429   cat >conftest.$ac_ext <<_ACEOF
4430 /* confdefs.h.  */
4431 _ACEOF
4432 cat confdefs.h >>conftest.$ac_ext
4433 cat >>conftest.$ac_ext <<_ACEOF
4434 /* end confdefs.h.  */
4435 #include <ctype.h>
4436 #include <stdlib.h>
4437 #if ((' ' & 0x0FF) == 0x020)
4438 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4439 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4440 #else
4441 # define ISLOWER(c) \
4442                    (('a' <= (c) && (c) <= 'i') \
4443                      || ('j' <= (c) && (c) <= 'r') \
4444                      || ('s' <= (c) && (c) <= 'z'))
4445 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4446 #endif
4447
4448 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4449 int
4450 main ()
4451 {
4452   int i;
4453   for (i = 0; i < 256; i++)
4454     if (XOR (islower (i), ISLOWER (i))
4455         || toupper (i) != TOUPPER (i))
4456       return 2;
4457   return 0;
4458 }
4459 _ACEOF
4460 rm -rf conftest$ac_exeext
4461 if { (ac_try="$ac_link"
4462 case "(($ac_try" in
4463   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4464   *) ac_try_echo=$ac_try;;
4465 esac
4466 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4467   (eval "$ac_link") 2>&5
4468   ac_status=$?
4469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4471   { (case "(($ac_try" in
4472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4473   *) ac_try_echo=$ac_try;;
4474 esac
4475 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4476   (eval "$ac_try") 2>&5
4477   ac_status=$?
4478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4479   (exit $ac_status); }; }; then
4480   :
4481 else
4482   echo "$as_me: program exited with status $ac_status" >&5
4483 echo "$as_me: failed program was:" >&5
4484 sed 's/^/| /' conftest.$ac_ext >&5
4485
4486 ( exit $ac_status )
4487 ac_cv_header_stdc=no
4488 fi
4489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4490 fi
4491
4492
4493 fi
4494 fi
4495 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4496 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4497 if test $ac_cv_header_stdc = yes; then
4498
4499 cat >>confdefs.h <<\_ACEOF
4500 #define STDC_HEADERS 1
4501 _ACEOF
4502
4503 fi
4504
4505 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4516                   inttypes.h stdint.h unistd.h
4517 do
4518 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4519 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4520 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4521 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4522   echo $ECHO_N "(cached) $ECHO_C" >&6
4523 else
4524   cat >conftest.$ac_ext <<_ACEOF
4525 /* confdefs.h.  */
4526 _ACEOF
4527 cat confdefs.h >>conftest.$ac_ext
4528 cat >>conftest.$ac_ext <<_ACEOF
4529 /* end confdefs.h.  */
4530 $ac_includes_default
4531
4532 #include <$ac_header>
4533 _ACEOF
4534 rm -rf conftest.$ac_objext
4535 if { (ac_try="$ac_compile"
4536 case "(($ac_try" in
4537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4538   *) ac_try_echo=$ac_try;;
4539 esac
4540 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4541   (eval "$ac_compile") 2>conftest.er1
4542   ac_status=$?
4543   grep -v '^ *+' conftest.er1 >conftest.err
4544   rm -rf conftest.er1
4545   cat conftest.err >&5
4546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547   (exit $ac_status); } && {
4548          test -z "$ac_c_werror_flag" ||
4549          test ! -s conftest.err
4550        } && test -s conftest.$ac_objext; then
4551   eval "$as_ac_Header=yes"
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556         eval "$as_ac_Header=no"
4557 fi
4558
4559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4560 fi
4561 ac_res=`eval echo '${'$as_ac_Header'}'`
4562                { echo "$as_me:$LINENO: result: $ac_res" >&5
4563 echo "${ECHO_T}$ac_res" >&6; }
4564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4565   cat >>confdefs.h <<_ACEOF
4566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4567 _ACEOF
4568
4569 fi
4570
4571 done
4572
4573
4574
4575 for ac_header in unistd.h
4576 do
4577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4578 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4579   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4580 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4581 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 fi
4584 ac_res=`eval echo '${'$as_ac_Header'}'`
4585                { echo "$as_me:$LINENO: result: $ac_res" >&5
4586 echo "${ECHO_T}$ac_res" >&6; }
4587 else
4588   # Is the header compilable?
4589 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4590 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4591 cat >conftest.$ac_ext <<_ACEOF
4592 /* confdefs.h.  */
4593 _ACEOF
4594 cat confdefs.h >>conftest.$ac_ext
4595 cat >>conftest.$ac_ext <<_ACEOF
4596 /* end confdefs.h.  */
4597 $ac_includes_default
4598 #include <$ac_header>
4599 _ACEOF
4600 rm -rf conftest.$ac_objext
4601 if { (ac_try="$ac_compile"
4602 case "(($ac_try" in
4603   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4604   *) ac_try_echo=$ac_try;;
4605 esac
4606 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4607   (eval "$ac_compile") 2>conftest.er1
4608   ac_status=$?
4609   grep -v '^ *+' conftest.er1 >conftest.err
4610   rm -rf conftest.er1
4611   cat conftest.err >&5
4612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613   (exit $ac_status); } && {
4614          test -z "$ac_c_werror_flag" ||
4615          test ! -s conftest.err
4616        } && test -s conftest.$ac_objext; then
4617   ac_header_compiler=yes
4618 else
4619   echo "$as_me: failed program was:" >&5
4620 sed 's/^/| /' conftest.$ac_ext >&5
4621
4622         ac_header_compiler=no
4623 fi
4624
4625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4626 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4627 echo "${ECHO_T}$ac_header_compiler" >&6; }
4628
4629 # Is the header present?
4630 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4631 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4632 cat >conftest.$ac_ext <<_ACEOF
4633 /* confdefs.h.  */
4634 _ACEOF
4635 cat confdefs.h >>conftest.$ac_ext
4636 cat >>conftest.$ac_ext <<_ACEOF
4637 /* end confdefs.h.  */
4638 #include <$ac_header>
4639 _ACEOF
4640 if { (ac_try="$ac_cpp conftest.$ac_ext"
4641 case "(($ac_try" in
4642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643   *) ac_try_echo=$ac_try;;
4644 esac
4645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4646   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4647   ac_status=$?
4648   grep -v '^ *+' conftest.er1 >conftest.err
4649   rm -rf conftest.er1
4650   cat conftest.err >&5
4651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652   (exit $ac_status); } >/dev/null && {
4653          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4654          test ! -s conftest.err
4655        }; then
4656   ac_header_preproc=yes
4657 else
4658   echo "$as_me: failed program was:" >&5
4659 sed 's/^/| /' conftest.$ac_ext >&5
4660
4661   ac_header_preproc=no
4662 fi
4663
4664 rm -rf conftest.err conftest.$ac_ext
4665 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4666 echo "${ECHO_T}$ac_header_preproc" >&6; }
4667
4668 # So?  What about this header?
4669 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4670   yes:no: )
4671     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4672 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4673     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4674 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4675     ac_header_preproc=yes
4676     ;;
4677   no:yes:* )
4678     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4679 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4680     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4681 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4682     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4683 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4684     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4685 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4686     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4687 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4688     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4689 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4690
4691     ;;
4692 esac
4693 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4695 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   eval "$as_ac_Header=\$ac_header_preproc"
4699 fi
4700 ac_res=`eval echo '${'$as_ac_Header'}'`
4701                { echo "$as_me:$LINENO: result: $ac_res" >&5
4702 echo "${ECHO_T}$ac_res" >&6; }
4703
4704 fi
4705 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4706   cat >>confdefs.h <<_ACEOF
4707 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4708 _ACEOF
4709
4710 fi
4711
4712 done
4713
4714 { echo "$as_me:$LINENO: checking for mode_t" >&5
4715 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4716 if test "${ac_cv_type_mode_t+set}" = set; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719   cat >conftest.$ac_ext <<_ACEOF
4720 /* confdefs.h.  */
4721 _ACEOF
4722 cat confdefs.h >>conftest.$ac_ext
4723 cat >>conftest.$ac_ext <<_ACEOF
4724 /* end confdefs.h.  */
4725 $ac_includes_default
4726 typedef mode_t ac__type_new_;
4727 int
4728 main ()
4729 {
4730 if ((ac__type_new_ *) 0)
4731   return 0;
4732 if (sizeof (ac__type_new_))
4733   return 0;
4734   ;
4735   return 0;
4736 }
4737 _ACEOF
4738 rm -rf conftest.$ac_objext
4739 if { (ac_try="$ac_compile"
4740 case "(($ac_try" in
4741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4742   *) ac_try_echo=$ac_try;;
4743 esac
4744 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4745   (eval "$ac_compile") 2>conftest.er1
4746   ac_status=$?
4747   grep -v '^ *+' conftest.er1 >conftest.err
4748   rm -rf conftest.er1
4749   cat conftest.err >&5
4750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751   (exit $ac_status); } && {
4752          test -z "$ac_c_werror_flag" ||
4753          test ! -s conftest.err
4754        } && test -s conftest.$ac_objext; then
4755   ac_cv_type_mode_t=yes
4756 else
4757   echo "$as_me: failed program was:" >&5
4758 sed 's/^/| /' conftest.$ac_ext >&5
4759
4760         ac_cv_type_mode_t=no
4761 fi
4762
4763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4764 fi
4765 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4766 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4767 if test $ac_cv_type_mode_t = yes; then
4768   :
4769 else
4770
4771 cat >>confdefs.h <<_ACEOF
4772 #define mode_t int
4773 _ACEOF
4774
4775 fi
4776
4777 { echo "$as_me:$LINENO: checking for pid_t" >&5
4778 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4779 if test "${ac_cv_type_pid_t+set}" = set; then
4780   echo $ECHO_N "(cached) $ECHO_C" >&6
4781 else
4782   cat >conftest.$ac_ext <<_ACEOF
4783 /* confdefs.h.  */
4784 _ACEOF
4785 cat confdefs.h >>conftest.$ac_ext
4786 cat >>conftest.$ac_ext <<_ACEOF
4787 /* end confdefs.h.  */
4788 $ac_includes_default
4789 typedef pid_t ac__type_new_;
4790 int
4791 main ()
4792 {
4793 if ((ac__type_new_ *) 0)
4794   return 0;
4795 if (sizeof (ac__type_new_))
4796   return 0;
4797   ;
4798   return 0;
4799 }
4800 _ACEOF
4801 rm -rf conftest.$ac_objext
4802 if { (ac_try="$ac_compile"
4803 case "(($ac_try" in
4804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4805   *) ac_try_echo=$ac_try;;
4806 esac
4807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4808   (eval "$ac_compile") 2>conftest.er1
4809   ac_status=$?
4810   grep -v '^ *+' conftest.er1 >conftest.err
4811   rm -rf conftest.er1
4812   cat conftest.err >&5
4813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814   (exit $ac_status); } && {
4815          test -z "$ac_c_werror_flag" ||
4816          test ! -s conftest.err
4817        } && test -s conftest.$ac_objext; then
4818   ac_cv_type_pid_t=yes
4819 else
4820   echo "$as_me: failed program was:" >&5
4821 sed 's/^/| /' conftest.$ac_ext >&5
4822
4823         ac_cv_type_pid_t=no
4824 fi
4825
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 fi
4828 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4829 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4830 if test $ac_cv_type_pid_t = yes; then
4831   :
4832 else
4833
4834 cat >>confdefs.h <<_ACEOF
4835 #define pid_t int
4836 _ACEOF
4837
4838 fi
4839
4840 { echo "$as_me:$LINENO: checking for size_t" >&5
4841 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4842 if test "${ac_cv_type_size_t+set}" = set; then
4843   echo $ECHO_N "(cached) $ECHO_C" >&6
4844 else
4845   cat >conftest.$ac_ext <<_ACEOF
4846 /* confdefs.h.  */
4847 _ACEOF
4848 cat confdefs.h >>conftest.$ac_ext
4849 cat >>conftest.$ac_ext <<_ACEOF
4850 /* end confdefs.h.  */
4851 $ac_includes_default
4852 typedef size_t ac__type_new_;
4853 int
4854 main ()
4855 {
4856 if ((ac__type_new_ *) 0)
4857   return 0;
4858 if (sizeof (ac__type_new_))
4859   return 0;
4860   ;
4861   return 0;
4862 }
4863 _ACEOF
4864 rm -rf conftest.$ac_objext
4865 if { (ac_try="$ac_compile"
4866 case "(($ac_try" in
4867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4868   *) ac_try_echo=$ac_try;;
4869 esac
4870 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4871   (eval "$ac_compile") 2>conftest.er1
4872   ac_status=$?
4873   grep -v '^ *+' conftest.er1 >conftest.err
4874   rm -rf conftest.er1
4875   cat conftest.err >&5
4876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877   (exit $ac_status); } && {
4878          test -z "$ac_c_werror_flag" ||
4879          test ! -s conftest.err
4880        } && test -s conftest.$ac_objext; then
4881   ac_cv_type_size_t=yes
4882 else
4883   echo "$as_me: failed program was:" >&5
4884 sed 's/^/| /' conftest.$ac_ext >&5
4885
4886         ac_cv_type_size_t=no
4887 fi
4888
4889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4890 fi
4891 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4892 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4893 if test $ac_cv_type_size_t = yes; then
4894   :
4895 else
4896
4897 cat >>confdefs.h <<_ACEOF
4898 #define size_t unsigned int
4899 _ACEOF
4900
4901 fi
4902
4903 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4904 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4905 if test "${ac_cv_type_signal+set}" = set; then
4906   echo $ECHO_N "(cached) $ECHO_C" >&6
4907 else
4908   cat >conftest.$ac_ext <<_ACEOF
4909 /* confdefs.h.  */
4910 _ACEOF
4911 cat confdefs.h >>conftest.$ac_ext
4912 cat >>conftest.$ac_ext <<_ACEOF
4913 /* end confdefs.h.  */
4914 #include <sys/types.h>
4915 #include <signal.h>
4916
4917 int
4918 main ()
4919 {
4920 return *(signal (0, 0)) (0) == 1;
4921   ;
4922   return 0;
4923 }
4924 _ACEOF
4925 rm -rf conftest.$ac_objext
4926 if { (ac_try="$ac_compile"
4927 case "(($ac_try" in
4928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4929   *) ac_try_echo=$ac_try;;
4930 esac
4931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4932   (eval "$ac_compile") 2>conftest.er1
4933   ac_status=$?
4934   grep -v '^ *+' conftest.er1 >conftest.err
4935   rm -rf conftest.er1
4936   cat conftest.err >&5
4937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938   (exit $ac_status); } && {
4939          test -z "$ac_c_werror_flag" ||
4940          test ! -s conftest.err
4941        } && test -s conftest.$ac_objext; then
4942   ac_cv_type_signal=int
4943 else
4944   echo "$as_me: failed program was:" >&5
4945 sed 's/^/| /' conftest.$ac_ext >&5
4946
4947         ac_cv_type_signal=void
4948 fi
4949
4950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4951 fi
4952 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4953 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4954
4955 cat >>confdefs.h <<_ACEOF
4956 #define RETSIGTYPE $ac_cv_type_signal
4957 _ACEOF
4958
4959
4960 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4961 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4962 if test "${ac_cv_header_time+set}" = set; then
4963   echo $ECHO_N "(cached) $ECHO_C" >&6
4964 else
4965   cat >conftest.$ac_ext <<_ACEOF
4966 /* confdefs.h.  */
4967 _ACEOF
4968 cat confdefs.h >>conftest.$ac_ext
4969 cat >>conftest.$ac_ext <<_ACEOF
4970 /* end confdefs.h.  */
4971 #include <sys/types.h>
4972 #include <sys/time.h>
4973 #include <time.h>
4974
4975 int
4976 main ()
4977 {
4978 if ((struct tm *) 0)
4979 return 0;
4980   ;
4981   return 0;
4982 }
4983 _ACEOF
4984 rm -rf conftest.$ac_objext
4985 if { (ac_try="$ac_compile"
4986 case "(($ac_try" in
4987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4988   *) ac_try_echo=$ac_try;;
4989 esac
4990 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4991   (eval "$ac_compile") 2>conftest.er1
4992   ac_status=$?
4993   grep -v '^ *+' conftest.er1 >conftest.err
4994   rm -rf conftest.er1
4995   cat conftest.err >&5
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); } && {
4998          test -z "$ac_c_werror_flag" ||
4999          test ! -s conftest.err
5000        } && test -s conftest.$ac_objext; then
5001   ac_cv_header_time=yes
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 sed 's/^/| /' conftest.$ac_ext >&5
5005
5006         ac_cv_header_time=no
5007 fi
5008
5009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5010 fi
5011 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5012 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5013 if test $ac_cv_header_time = yes; then
5014
5015 cat >>confdefs.h <<\_ACEOF
5016 #define TIME_WITH_SYS_TIME 1
5017 _ACEOF
5018
5019 fi
5020
5021 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5022 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5023 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026   cat >conftest.$ac_ext <<_ACEOF
5027 /* confdefs.h.  */
5028 _ACEOF
5029 cat confdefs.h >>conftest.$ac_ext
5030 cat >>conftest.$ac_ext <<_ACEOF
5031 /* end confdefs.h.  */
5032 #include <sys/types.h>
5033 #include <sys/wait.h>
5034 #ifndef WEXITSTATUS
5035 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5036 #endif
5037 #ifndef WIFEXITED
5038 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5039 #endif
5040
5041 int
5042 main ()
5043 {
5044   int s;
5045   wait (&s);
5046   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5047   ;
5048   return 0;
5049 }
5050 _ACEOF
5051 rm -rf conftest.$ac_objext
5052 if { (ac_try="$ac_compile"
5053 case "(($ac_try" in
5054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5055   *) ac_try_echo=$ac_try;;
5056 esac
5057 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5058   (eval "$ac_compile") 2>conftest.er1
5059   ac_status=$?
5060   grep -v '^ *+' conftest.er1 >conftest.err
5061   rm -rf conftest.er1
5062   cat conftest.err >&5
5063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064   (exit $ac_status); } && {
5065          test -z "$ac_c_werror_flag" ||
5066          test ! -s conftest.err
5067        } && test -s conftest.$ac_objext; then
5068   ac_cv_header_sys_wait_h=yes
5069 else
5070   echo "$as_me: failed program was:" >&5
5071 sed 's/^/| /' conftest.$ac_ext >&5
5072
5073         ac_cv_header_sys_wait_h=no
5074 fi
5075
5076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5077 fi
5078 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5079 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5080 if test $ac_cv_header_sys_wait_h = yes; then
5081
5082 cat >>confdefs.h <<\_ACEOF
5083 #define HAVE_SYS_WAIT_H 1
5084 _ACEOF
5085
5086 fi
5087
5088
5089
5090
5091
5092
5093 ac_header_dirent=no
5094 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5095   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5096 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5097 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5098 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101   cat >conftest.$ac_ext <<_ACEOF
5102 /* confdefs.h.  */
5103 _ACEOF
5104 cat confdefs.h >>conftest.$ac_ext
5105 cat >>conftest.$ac_ext <<_ACEOF
5106 /* end confdefs.h.  */
5107 #include <sys/types.h>
5108 #include <$ac_hdr>
5109
5110 int
5111 main ()
5112 {
5113 if ((DIR *) 0)
5114 return 0;
5115   ;
5116   return 0;
5117 }
5118 _ACEOF
5119 rm -rf conftest.$ac_objext
5120 if { (ac_try="$ac_compile"
5121 case "(($ac_try" in
5122   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5123   *) ac_try_echo=$ac_try;;
5124 esac
5125 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5126   (eval "$ac_compile") 2>conftest.er1
5127   ac_status=$?
5128   grep -v '^ *+' conftest.er1 >conftest.err
5129   rm -rf conftest.er1
5130   cat conftest.err >&5
5131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132   (exit $ac_status); } && {
5133          test -z "$ac_c_werror_flag" ||
5134          test ! -s conftest.err
5135        } && test -s conftest.$ac_objext; then
5136   eval "$as_ac_Header=yes"
5137 else
5138   echo "$as_me: failed program was:" >&5
5139 sed 's/^/| /' conftest.$ac_ext >&5
5140
5141         eval "$as_ac_Header=no"
5142 fi
5143
5144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145 fi
5146 ac_res=`eval echo '${'$as_ac_Header'}'`
5147                { echo "$as_me:$LINENO: result: $ac_res" >&5
5148 echo "${ECHO_T}$ac_res" >&6; }
5149 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5150   cat >>confdefs.h <<_ACEOF
5151 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5152 _ACEOF
5153
5154 ac_header_dirent=$ac_hdr; break
5155 fi
5156
5157 done
5158 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5159 if test $ac_header_dirent = dirent.h; then
5160   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5161 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5162 if test "${ac_cv_search_opendir+set}" = set; then
5163   echo $ECHO_N "(cached) $ECHO_C" >&6
5164 else
5165   ac_func_search_save_LIBS=$LIBS
5166 cat >conftest.$ac_ext <<_ACEOF
5167 /* confdefs.h.  */
5168 _ACEOF
5169 cat confdefs.h >>conftest.$ac_ext
5170 cat >>conftest.$ac_ext <<_ACEOF
5171 /* end confdefs.h.  */
5172
5173 /* Override any GCC internal prototype to avoid an error.
5174    Use char because int might match the return type of a GCC
5175    builtin and then its argument prototype would still apply.  */
5176 #ifdef __cplusplus
5177 extern "C"
5178 #endif
5179 char opendir ();
5180 int
5181 main ()
5182 {
5183 return opendir ();
5184   ;
5185   return 0;
5186 }
5187 _ACEOF
5188 for ac_lib in '' dir; do
5189   if test -z "$ac_lib"; then
5190     ac_res="none required"
5191   else
5192     ac_res=-l$ac_lib
5193     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5194   fi
5195   rm -rf conftest.$ac_objext conftest$ac_exeext
5196 if { (ac_try="$ac_link"
5197 case "(($ac_try" in
5198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5199   *) ac_try_echo=$ac_try;;
5200 esac
5201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5202   (eval "$ac_link") 2>conftest.er1
5203   ac_status=$?
5204   grep -v '^ *+' conftest.er1 >conftest.err
5205   rm -rf conftest.er1
5206   cat conftest.err >&5
5207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208   (exit $ac_status); } && {
5209          test -z "$ac_c_werror_flag" ||
5210          test ! -s conftest.err
5211        } && test -s conftest$ac_exeext &&
5212        $as_test_x conftest$ac_exeext; then
5213   ac_cv_search_opendir=$ac_res
5214 else
5215   echo "$as_me: failed program was:" >&5
5216 sed 's/^/| /' conftest.$ac_ext >&5
5217
5218
5219 fi
5220
5221 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5222       conftest$ac_exeext
5223   if test "${ac_cv_search_opendir+set}" = set; then
5224   break
5225 fi
5226 done
5227 if test "${ac_cv_search_opendir+set}" = set; then
5228   :
5229 else
5230   ac_cv_search_opendir=no
5231 fi
5232 rm conftest.$ac_ext
5233 LIBS=$ac_func_search_save_LIBS
5234 fi
5235 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5236 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5237 ac_res=$ac_cv_search_opendir
5238 if test "$ac_res" != no; then
5239   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5240
5241 fi
5242
5243 else
5244   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5245 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5246 if test "${ac_cv_search_opendir+set}" = set; then
5247   echo $ECHO_N "(cached) $ECHO_C" >&6
5248 else
5249   ac_func_search_save_LIBS=$LIBS
5250 cat >conftest.$ac_ext <<_ACEOF
5251 /* confdefs.h.  */
5252 _ACEOF
5253 cat confdefs.h >>conftest.$ac_ext
5254 cat >>conftest.$ac_ext <<_ACEOF
5255 /* end confdefs.h.  */
5256
5257 /* Override any GCC internal prototype to avoid an error.
5258    Use char because int might match the return type of a GCC
5259    builtin and then its argument prototype would still apply.  */
5260 #ifdef __cplusplus
5261 extern "C"
5262 #endif
5263 char opendir ();
5264 int
5265 main ()
5266 {
5267 return opendir ();
5268   ;
5269   return 0;
5270 }
5271 _ACEOF
5272 for ac_lib in '' x; do
5273   if test -z "$ac_lib"; then
5274     ac_res="none required"
5275   else
5276     ac_res=-l$ac_lib
5277     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5278   fi
5279   rm -rf conftest.$ac_objext conftest$ac_exeext
5280 if { (ac_try="$ac_link"
5281 case "(($ac_try" in
5282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5283   *) ac_try_echo=$ac_try;;
5284 esac
5285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5286   (eval "$ac_link") 2>conftest.er1
5287   ac_status=$?
5288   grep -v '^ *+' conftest.er1 >conftest.err
5289   rm -rf conftest.er1
5290   cat conftest.err >&5
5291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292   (exit $ac_status); } && {
5293          test -z "$ac_c_werror_flag" ||
5294          test ! -s conftest.err
5295        } && test -s conftest$ac_exeext &&
5296        $as_test_x conftest$ac_exeext; then
5297   ac_cv_search_opendir=$ac_res
5298 else
5299   echo "$as_me: failed program was:" >&5
5300 sed 's/^/| /' conftest.$ac_ext >&5
5301
5302
5303 fi
5304
5305 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5306       conftest$ac_exeext
5307   if test "${ac_cv_search_opendir+set}" = set; then
5308   break
5309 fi
5310 done
5311 if test "${ac_cv_search_opendir+set}" = set; then
5312   :
5313 else
5314   ac_cv_search_opendir=no
5315 fi
5316 rm conftest.$ac_ext
5317 LIBS=$ac_func_search_save_LIBS
5318 fi
5319 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5320 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5321 ac_res=$ac_cv_search_opendir
5322 if test "$ac_res" != no; then
5323   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5324
5325 fi
5326
5327 fi
5328
5329 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5330 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5331   if test "${ac_cv_gettimeofday_args+set}" = set; then
5332   echo $ECHO_N "(cached) $ECHO_C" >&6
5333 else
5334   cat >conftest.$ac_ext <<_ACEOF
5335 /* confdefs.h.  */
5336 _ACEOF
5337 cat confdefs.h >>conftest.$ac_ext
5338 cat >>conftest.$ac_ext <<_ACEOF
5339 /* end confdefs.h.  */
5340 #include <stdlib.h>
5341                     #include <sys/time.h>
5342 int
5343 main ()
5344 {
5345 struct timeval tv; struct timezone tzp;
5346                     gettimeofday(&tv, &tzp);
5347   ;
5348   return 0;
5349 }
5350 _ACEOF
5351 rm -rf conftest.$ac_objext
5352 if { (ac_try="$ac_compile"
5353 case "(($ac_try" in
5354   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5355   *) ac_try_echo=$ac_try;;
5356 esac
5357 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5358   (eval "$ac_compile") 2>conftest.er1
5359   ac_status=$?
5360   grep -v '^ *+' conftest.er1 >conftest.err
5361   rm -rf conftest.er1
5362   cat conftest.err >&5
5363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364   (exit $ac_status); } && {
5365          test -z "$ac_c_werror_flag" ||
5366          test ! -s conftest.err
5367        } && test -s conftest.$ac_objext; then
5368   ac_gettimeofday_args=2
5369 else
5370   echo "$as_me: failed program was:" >&5
5371 sed 's/^/| /' conftest.$ac_ext >&5
5372
5373         cat >conftest.$ac_ext <<_ACEOF
5374 /* confdefs.h.  */
5375 _ACEOF
5376 cat confdefs.h >>conftest.$ac_ext
5377 cat >>conftest.$ac_ext <<_ACEOF
5378 /* end confdefs.h.  */
5379 #include <stdlib.h>
5380                                     #include <sys/time.h>
5381 int
5382 main ()
5383 {
5384 struct timeval tv; gettimeofday(&tv);
5385   ;
5386   return 0;
5387 }
5388 _ACEOF
5389 rm -rf conftest.$ac_objext
5390 if { (ac_try="$ac_compile"
5391 case "(($ac_try" in
5392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5393   *) ac_try_echo=$ac_try;;
5394 esac
5395 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5396   (eval "$ac_compile") 2>conftest.er1
5397   ac_status=$?
5398   grep -v '^ *+' conftest.er1 >conftest.err
5399   rm -rf conftest.er1
5400   cat conftest.err >&5
5401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402   (exit $ac_status); } && {
5403          test -z "$ac_c_werror_flag" ||
5404          test ! -s conftest.err
5405        } && test -s conftest.$ac_objext; then
5406   ac_gettimeofday_args=1
5407 else
5408   echo "$as_me: failed program was:" >&5
5409 sed 's/^/| /' conftest.$ac_ext >&5
5410
5411         ac_gettimeofday_args=0
5412 fi
5413
5414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5415 fi
5416
5417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5418     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5419 fi
5420
5421   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5422   if test "$ac_gettimeofday_args" = 1 ; then
5423     cat >>confdefs.h <<\_ACEOF
5424 #define HAVE_GETTIMEOFDAY 1
5425 _ACEOF
5426
5427     { echo "$as_me:$LINENO: result: one argument" >&5
5428 echo "${ECHO_T}one argument" >&6; }
5429   elif test "$ac_gettimeofday_args" = 2 ; then
5430     cat >>confdefs.h <<\_ACEOF
5431 #define HAVE_GETTIMEOFDAY 1
5432 _ACEOF
5433
5434     cat >>confdefs.h <<\_ACEOF
5435 #define GETTIMEOFDAY_TWO_ARGS 1
5436 _ACEOF
5437
5438     { echo "$as_me:$LINENO: result: two arguments" >&5
5439 echo "${ECHO_T}two arguments" >&6; }
5440   else
5441     { echo "$as_me:$LINENO: result: unknown" >&5
5442 echo "${ECHO_T}unknown" >&6; }
5443   fi
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5455 do
5456 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5457 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5458 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5459 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5460   echo $ECHO_N "(cached) $ECHO_C" >&6
5461 else
5462   cat >conftest.$ac_ext <<_ACEOF
5463 /* confdefs.h.  */
5464 _ACEOF
5465 cat confdefs.h >>conftest.$ac_ext
5466 cat >>conftest.$ac_ext <<_ACEOF
5467 /* end confdefs.h.  */
5468 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5469    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5470 #define $ac_func innocuous_$ac_func
5471
5472 /* System header to define __stub macros and hopefully few prototypes,
5473     which can conflict with char $ac_func (); below.
5474     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5475     <limits.h> exists even on freestanding compilers.  */
5476
5477 #ifdef __STDC__
5478 # include <limits.h>
5479 #else
5480 # include <assert.h>
5481 #endif
5482
5483 #undef $ac_func
5484
5485 /* Override any GCC internal prototype to avoid an error.
5486    Use char because int might match the return type of a GCC
5487    builtin and then its argument prototype would still apply.  */
5488 #ifdef __cplusplus
5489 extern "C"
5490 #endif
5491 char $ac_func ();
5492 /* The GNU C library defines this for functions which it implements
5493     to always fail with ENOSYS.  Some functions are actually named
5494     something starting with __ and the normal name is an alias.  */
5495 #if defined __stub_$ac_func || defined __stub___$ac_func
5496 choke me
5497 #endif
5498
5499 int
5500 main ()
5501 {
5502 return $ac_func ();
5503   ;
5504   return 0;
5505 }
5506 _ACEOF
5507 rm -rf conftest.$ac_objext conftest$ac_exeext
5508 if { (ac_try="$ac_link"
5509 case "(($ac_try" in
5510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5511   *) ac_try_echo=$ac_try;;
5512 esac
5513 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5514   (eval "$ac_link") 2>conftest.er1
5515   ac_status=$?
5516   grep -v '^ *+' conftest.er1 >conftest.err
5517   rm -rf conftest.er1
5518   cat conftest.err >&5
5519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520   (exit $ac_status); } && {
5521          test -z "$ac_c_werror_flag" ||
5522          test ! -s conftest.err
5523        } && test -s conftest$ac_exeext &&
5524        $as_test_x conftest$ac_exeext; then
5525   eval "$as_ac_var=yes"
5526 else
5527   echo "$as_me: failed program was:" >&5
5528 sed 's/^/| /' conftest.$ac_ext >&5
5529
5530         eval "$as_ac_var=no"
5531 fi
5532
5533 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5534       conftest$ac_exeext conftest.$ac_ext
5535 fi
5536 ac_res=`eval echo '${'$as_ac_var'}'`
5537                { echo "$as_me:$LINENO: result: $ac_res" >&5
5538 echo "${ECHO_T}$ac_res" >&6; }
5539 if test `eval echo '${'$as_ac_var'}'` = yes; then
5540   cat >>confdefs.h <<_ACEOF
5541 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5542 _ACEOF
5543
5544 fi
5545 done
5546
5547
5548
5549
5550
5551 for ac_func in sigaction syslog realpath setrlimit
5552 do
5553 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5554 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5555 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5556 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5557   echo $ECHO_N "(cached) $ECHO_C" >&6
5558 else
5559   cat >conftest.$ac_ext <<_ACEOF
5560 /* confdefs.h.  */
5561 _ACEOF
5562 cat confdefs.h >>conftest.$ac_ext
5563 cat >>conftest.$ac_ext <<_ACEOF
5564 /* end confdefs.h.  */
5565 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5566    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5567 #define $ac_func innocuous_$ac_func
5568
5569 /* System header to define __stub macros and hopefully few prototypes,
5570     which can conflict with char $ac_func (); below.
5571     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5572     <limits.h> exists even on freestanding compilers.  */
5573
5574 #ifdef __STDC__
5575 # include <limits.h>
5576 #else
5577 # include <assert.h>
5578 #endif
5579
5580 #undef $ac_func
5581
5582 /* Override any GCC internal prototype to avoid an error.
5583    Use char because int might match the return type of a GCC
5584    builtin and then its argument prototype would still apply.  */
5585 #ifdef __cplusplus
5586 extern "C"
5587 #endif
5588 char $ac_func ();
5589 /* The GNU C library defines this for functions which it implements
5590     to always fail with ENOSYS.  Some functions are actually named
5591     something starting with __ and the normal name is an alias.  */
5592 #if defined __stub_$ac_func || defined __stub___$ac_func
5593 choke me
5594 #endif
5595
5596 int
5597 main ()
5598 {
5599 return $ac_func ();
5600   ;
5601   return 0;
5602 }
5603 _ACEOF
5604 rm -rf conftest.$ac_objext conftest$ac_exeext
5605 if { (ac_try="$ac_link"
5606 case "(($ac_try" in
5607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5608   *) ac_try_echo=$ac_try;;
5609 esac
5610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5611   (eval "$ac_link") 2>conftest.er1
5612   ac_status=$?
5613   grep -v '^ *+' conftest.er1 >conftest.err
5614   rm -rf conftest.er1
5615   cat conftest.err >&5
5616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617   (exit $ac_status); } && {
5618          test -z "$ac_c_werror_flag" ||
5619          test ! -s conftest.err
5620        } && test -s conftest$ac_exeext &&
5621        $as_test_x conftest$ac_exeext; then
5622   eval "$as_ac_var=yes"
5623 else
5624   echo "$as_me: failed program was:" >&5
5625 sed 's/^/| /' conftest.$ac_ext >&5
5626
5627         eval "$as_ac_var=no"
5628 fi
5629
5630 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5631       conftest$ac_exeext conftest.$ac_ext
5632 fi
5633 ac_res=`eval echo '${'$as_ac_var'}'`
5634                { echo "$as_me:$LINENO: result: $ac_res" >&5
5635 echo "${ECHO_T}$ac_res" >&6; }
5636 if test `eval echo '${'$as_ac_var'}'` = yes; then
5637   cat >>confdefs.h <<_ACEOF
5638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5639 _ACEOF
5640
5641 fi
5642 done
5643
5644
5645 for ac_func in setlocale
5646 do
5647 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5648 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5649 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5650 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5651   echo $ECHO_N "(cached) $ECHO_C" >&6
5652 else
5653   cat >conftest.$ac_ext <<_ACEOF
5654 /* confdefs.h.  */
5655 _ACEOF
5656 cat confdefs.h >>conftest.$ac_ext
5657 cat >>conftest.$ac_ext <<_ACEOF
5658 /* end confdefs.h.  */
5659 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5660    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5661 #define $ac_func innocuous_$ac_func
5662
5663 /* System header to define __stub macros and hopefully few prototypes,
5664     which can conflict with char $ac_func (); below.
5665     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5666     <limits.h> exists even on freestanding compilers.  */
5667
5668 #ifdef __STDC__
5669 # include <limits.h>
5670 #else
5671 # include <assert.h>
5672 #endif
5673
5674 #undef $ac_func
5675
5676 /* Override any GCC internal prototype to avoid an error.
5677    Use char because int might match the return type of a GCC
5678    builtin and then its argument prototype would still apply.  */
5679 #ifdef __cplusplus
5680 extern "C"
5681 #endif
5682 char $ac_func ();
5683 /* The GNU C library defines this for functions which it implements
5684     to always fail with ENOSYS.  Some functions are actually named
5685     something starting with __ and the normal name is an alias.  */
5686 #if defined __stub_$ac_func || defined __stub___$ac_func
5687 choke me
5688 #endif
5689
5690 int
5691 main ()
5692 {
5693 return $ac_func ();
5694   ;
5695   return 0;
5696 }
5697 _ACEOF
5698 rm -rf conftest.$ac_objext conftest$ac_exeext
5699 if { (ac_try="$ac_link"
5700 case "(($ac_try" in
5701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5702   *) ac_try_echo=$ac_try;;
5703 esac
5704 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5705   (eval "$ac_link") 2>conftest.er1
5706   ac_status=$?
5707   grep -v '^ *+' conftest.er1 >conftest.err
5708   rm -rf conftest.er1
5709   cat conftest.err >&5
5710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5711   (exit $ac_status); } && {
5712          test -z "$ac_c_werror_flag" ||
5713          test ! -s conftest.err
5714        } && test -s conftest$ac_exeext &&
5715        $as_test_x conftest$ac_exeext; then
5716   eval "$as_ac_var=yes"
5717 else
5718   echo "$as_me: failed program was:" >&5
5719 sed 's/^/| /' conftest.$ac_ext >&5
5720
5721         eval "$as_ac_var=no"
5722 fi
5723
5724 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5725       conftest$ac_exeext conftest.$ac_ext
5726 fi
5727 ac_res=`eval echo '${'$as_ac_var'}'`
5728                { echo "$as_me:$LINENO: result: $ac_res" >&5
5729 echo "${ECHO_T}$ac_res" >&6; }
5730 if test `eval echo '${'$as_ac_var'}'` = yes; then
5731   cat >>confdefs.h <<_ACEOF
5732 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5733 _ACEOF
5734
5735 fi
5736 done
5737
5738 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5739 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5740 if test "${ac_cv_have_icmp+set}" = set; then
5741   echo $ECHO_N "(cached) $ECHO_C" >&6
5742 else
5743   cat >conftest.$ac_ext <<_ACEOF
5744 /* confdefs.h.  */
5745 _ACEOF
5746 cat confdefs.h >>conftest.$ac_ext
5747 cat >>conftest.$ac_ext <<_ACEOF
5748 /* end confdefs.h.  */
5749 #include <stdlib.h>
5750                    #include <stdio.h>
5751                    #include <math.h>
5752                    #include <unistd.h>
5753                    #include <limits.h>
5754                    #include <signal.h>
5755                    #include <fcntl.h>
5756                    #include <sys/types.h>
5757                    #include <sys/time.h>
5758                    #include <sys/ipc.h>
5759                    #include <sys/shm.h>
5760                    #include <sys/socket.h>
5761                    #include <netinet/in_systm.h>
5762                    #include <netinet/in.h>
5763                    #include <netinet/ip.h>
5764                    #include <netinet/ip_icmp.h>
5765                    #include <netinet/udp.h>
5766                    #include <arpa/inet.h>
5767                    #include <netdb.h>
5768 int
5769 main ()
5770 {
5771 struct icmp i;
5772                    struct sockaddr s;
5773                    struct sockaddr_in si;
5774                    struct ip ip;
5775                    i.icmp_type = ICMP_ECHO;
5776                    i.icmp_code = 0;
5777                    i.icmp_cksum = 0;
5778                    i.icmp_id = 0;
5779                    i.icmp_seq = 0;
5780                    si.sin_family = AF_INET;
5781                    #if defined(__DECC) || defined(_IP_VHL)
5782                    ip.ip_vhl = 0;
5783                    #else
5784                    ip.ip_hl = 0;
5785                    #endif
5786
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 rm -rf conftest.$ac_objext
5792 if { (ac_try="$ac_compile"
5793 case "(($ac_try" in
5794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5795   *) ac_try_echo=$ac_try;;
5796 esac
5797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5798   (eval "$ac_compile") 2>conftest.er1
5799   ac_status=$?
5800   grep -v '^ *+' conftest.er1 >conftest.err
5801   rm -rf conftest.er1
5802   cat conftest.err >&5
5803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804   (exit $ac_status); } && {
5805          test -z "$ac_c_werror_flag" ||
5806          test ! -s conftest.err
5807        } && test -s conftest.$ac_objext; then
5808   ac_cv_have_icmp=yes
5809 else
5810   echo "$as_me: failed program was:" >&5
5811 sed 's/^/| /' conftest.$ac_ext >&5
5812
5813         ac_cv_have_icmp=no
5814 fi
5815
5816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5817 fi
5818 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5819 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5820  if test "$ac_cv_have_icmp" = yes ; then
5821    cat >>confdefs.h <<\_ACEOF
5822 #define HAVE_ICMP 1
5823 _ACEOF
5824
5825  fi
5826 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5827 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5828 if test "${ac_cv_have_icmphdr+set}" = set; then
5829   echo $ECHO_N "(cached) $ECHO_C" >&6
5830 else
5831   cat >conftest.$ac_ext <<_ACEOF
5832 /* confdefs.h.  */
5833 _ACEOF
5834 cat confdefs.h >>conftest.$ac_ext
5835 cat >>conftest.$ac_ext <<_ACEOF
5836 /* end confdefs.h.  */
5837 #include <stdlib.h>
5838                    #include <stdio.h>
5839                    #include <math.h>
5840                    #include <unistd.h>
5841                    #include <limits.h>
5842                    #include <signal.h>
5843                    #include <fcntl.h>
5844                    #include <sys/types.h>
5845                    #include <sys/time.h>
5846                    #include <sys/ipc.h>
5847                    #include <sys/shm.h>
5848                    #include <sys/socket.h>
5849                    #include <netinet/in_systm.h>
5850                    #include <netinet/in.h>
5851                    #include <netinet/ip.h>
5852                    #include <netinet/ip_icmp.h>
5853                    #include <netinet/udp.h>
5854                    #include <arpa/inet.h>
5855                    #include <netdb.h>
5856 int
5857 main ()
5858 {
5859 struct icmphdr i;
5860                    struct sockaddr s;
5861                    struct sockaddr_in si;
5862                    struct ip ip;
5863                    i.type = ICMP_ECHO;
5864                    i.code = 0;
5865                    i.checksum = 0;
5866                    i.un.echo.id = 0;
5867                    i.un.echo.sequence = 0;
5868                    si.sin_family = AF_INET;
5869                    ip.ip_hl = 0;
5870   ;
5871   return 0;
5872 }
5873 _ACEOF
5874 rm -rf conftest.$ac_objext
5875 if { (ac_try="$ac_compile"
5876 case "(($ac_try" in
5877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5878   *) ac_try_echo=$ac_try;;
5879 esac
5880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5881   (eval "$ac_compile") 2>conftest.er1
5882   ac_status=$?
5883   grep -v '^ *+' conftest.er1 >conftest.err
5884   rm -rf conftest.er1
5885   cat conftest.err >&5
5886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887   (exit $ac_status); } && {
5888          test -z "$ac_c_werror_flag" ||
5889          test ! -s conftest.err
5890        } && test -s conftest.$ac_objext; then
5891   ac_cv_have_icmphdr=yes
5892 else
5893   echo "$as_me: failed program was:" >&5
5894 sed 's/^/| /' conftest.$ac_ext >&5
5895
5896         ac_cv_have_icmphdr=no
5897 fi
5898
5899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900 fi
5901 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5902 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5903  if test "$ac_cv_have_icmphdr" = yes ; then
5904    cat >>confdefs.h <<\_ACEOF
5905 #define HAVE_ICMPHDR 1
5906 _ACEOF
5907
5908  fi
5909
5910
5911 for ac_header in crypt.h sys/select.h
5912 do
5913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5914 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5915   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5917 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5918   echo $ECHO_N "(cached) $ECHO_C" >&6
5919 fi
5920 ac_res=`eval echo '${'$as_ac_Header'}'`
5921                { echo "$as_me:$LINENO: result: $ac_res" >&5
5922 echo "${ECHO_T}$ac_res" >&6; }
5923 else
5924   # Is the header compilable?
5925 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5926 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5927 cat >conftest.$ac_ext <<_ACEOF
5928 /* confdefs.h.  */
5929 _ACEOF
5930 cat confdefs.h >>conftest.$ac_ext
5931 cat >>conftest.$ac_ext <<_ACEOF
5932 /* end confdefs.h.  */
5933 $ac_includes_default
5934 #include <$ac_header>
5935 _ACEOF
5936 rm -rf conftest.$ac_objext
5937 if { (ac_try="$ac_compile"
5938 case "(($ac_try" in
5939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5940   *) ac_try_echo=$ac_try;;
5941 esac
5942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5943   (eval "$ac_compile") 2>conftest.er1
5944   ac_status=$?
5945   grep -v '^ *+' conftest.er1 >conftest.err
5946   rm -rf conftest.er1
5947   cat conftest.err >&5
5948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949   (exit $ac_status); } && {
5950          test -z "$ac_c_werror_flag" ||
5951          test ! -s conftest.err
5952        } && test -s conftest.$ac_objext; then
5953   ac_header_compiler=yes
5954 else
5955   echo "$as_me: failed program was:" >&5
5956 sed 's/^/| /' conftest.$ac_ext >&5
5957
5958         ac_header_compiler=no
5959 fi
5960
5961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5962 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5963 echo "${ECHO_T}$ac_header_compiler" >&6; }
5964
5965 # Is the header present?
5966 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5967 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5968 cat >conftest.$ac_ext <<_ACEOF
5969 /* confdefs.h.  */
5970 _ACEOF
5971 cat confdefs.h >>conftest.$ac_ext
5972 cat >>conftest.$ac_ext <<_ACEOF
5973 /* end confdefs.h.  */
5974 #include <$ac_header>
5975 _ACEOF
5976 if { (ac_try="$ac_cpp conftest.$ac_ext"
5977 case "(($ac_try" in
5978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5979   *) ac_try_echo=$ac_try;;
5980 esac
5981 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5982   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5983   ac_status=$?
5984   grep -v '^ *+' conftest.er1 >conftest.err
5985   rm -rf conftest.er1
5986   cat conftest.err >&5
5987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988   (exit $ac_status); } >/dev/null && {
5989          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5990          test ! -s conftest.err
5991        }; then
5992   ac_header_preproc=yes
5993 else
5994   echo "$as_me: failed program was:" >&5
5995 sed 's/^/| /' conftest.$ac_ext >&5
5996
5997   ac_header_preproc=no
5998 fi
5999
6000 rm -rf conftest.err conftest.$ac_ext
6001 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6002 echo "${ECHO_T}$ac_header_preproc" >&6; }
6003
6004 # So?  What about this header?
6005 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6006   yes:no: )
6007     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6008 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6009     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6010 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6011     ac_header_preproc=yes
6012     ;;
6013   no:yes:* )
6014     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6015 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6016     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6017 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6018     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6019 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6020     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6021 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6022     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6023 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6024     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6025 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6026
6027     ;;
6028 esac
6029 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6030 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6031 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6032   echo $ECHO_N "(cached) $ECHO_C" >&6
6033 else
6034   eval "$as_ac_Header=\$ac_header_preproc"
6035 fi
6036 ac_res=`eval echo '${'$as_ac_Header'}'`
6037                { echo "$as_me:$LINENO: result: $ac_res" >&5
6038 echo "${ECHO_T}$ac_res" >&6; }
6039
6040 fi
6041 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6042   cat >>confdefs.h <<_ACEOF
6043 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6044 _ACEOF
6045
6046 fi
6047
6048 done
6049
6050 for ac_prog in perl5 perl
6051 do
6052   # Extract the first word of "$ac_prog", so it can be a program name with args.
6053 set dummy $ac_prog; ac_word=$2
6054 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6055 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6056 if test "${ac_cv_path_PERL+set}" = set; then
6057   echo $ECHO_N "(cached) $ECHO_C" >&6
6058 else
6059   case $PERL in
6060   [\\/]* | ?:[\\/]*)
6061   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6062   ;;
6063   *)
6064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065 for as_dir in $PATH
6066 do
6067   IFS=$as_save_IFS
6068   test -z "$as_dir" && as_dir=.
6069   for ac_exec_ext in '' $ac_executable_extensions; do
6070   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6071     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6072     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6073     break 2
6074   fi
6075 done
6076 done
6077 IFS=$as_save_IFS
6078
6079   ;;
6080 esac
6081 fi
6082 PERL=$ac_cv_path_PERL
6083 if test -n "$PERL"; then
6084   { echo "$as_me:$LINENO: result: $PERL" >&5
6085 echo "${ECHO_T}$PERL" >&6; }
6086 else
6087   { echo "$as_me:$LINENO: result: no" >&5
6088 echo "${ECHO_T}no" >&6; }
6089 fi
6090
6091
6092   test -n "$PERL" && break
6093 done
6094
6095   if test -z "$PERL" ; then
6096     PERL_VERSION=0
6097   else
6098     { echo "$as_me:$LINENO: checking perl version" >&5
6099 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6100 if test "${ac_cv_perl_version+set}" = set; then
6101   echo $ECHO_N "(cached) $ECHO_C" >&6
6102 else
6103   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6104 fi
6105 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6106 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6107     PERL_VERSION=$ac_cv_perl_version
6108   fi
6109
6110
6111 if test -z "$PERL" ; then
6112   # don't let it be blank...
6113   PERL=/usr/bin/perl
6114 fi
6115
6116 { echo "$as_me:$LINENO: checking for X" >&5
6117 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6118
6119
6120 # Check whether --with-x was given.
6121 if test "${with_x+set}" = set; then
6122   withval=$with_x;
6123 fi
6124
6125 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6126 if test "x$with_x" = xno; then
6127   # The user explicitly disabled X.
6128   have_x=disabled
6129 else
6130   case $x_includes,$x_libraries in #(
6131     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6132 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6133    { (exit 1); exit 1; }; };; #(
6134     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6135   echo $ECHO_N "(cached) $ECHO_C" >&6
6136 else
6137   # One or both of the vars are not set, and there is no cached value.
6138 ac_x_includes=no ac_x_libraries=no
6139 rm -f -r conftest.dir
6140 if mkdir conftest.dir; then
6141   cd conftest.dir
6142   cat >Imakefile <<'_ACEOF'
6143 incroot:
6144         @echo incroot='${INCROOT}'
6145 usrlibdir:
6146         @echo usrlibdir='${USRLIBDIR}'
6147 libdir:
6148         @echo libdir='${LIBDIR}'
6149 _ACEOF
6150   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6151     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6152     for ac_var in incroot usrlibdir libdir; do
6153       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6154     done
6155     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6156     for ac_extension in a so sl dylib la dll; do
6157       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6158          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6159         ac_im_usrlibdir=$ac_im_libdir; break
6160       fi
6161     done
6162     # Screen out bogus values from the imake configuration.  They are
6163     # bogus both because they are the default anyway, and because
6164     # using them would break gcc on systems where it needs fixed includes.
6165     case $ac_im_incroot in
6166         /usr/include) ac_x_includes= ;;
6167         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6168     esac
6169     case $ac_im_usrlibdir in
6170         /usr/lib | /lib) ;;
6171         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6172     esac
6173   fi
6174   cd ..
6175   rm -f -r conftest.dir
6176 fi
6177
6178 # Standard set of common directories for X headers.
6179 # Check X11 before X11Rn because it is often a symlink to the current release.
6180 ac_x_header_dirs='
6181 /usr/X11/include
6182 /usr/X11R6/include
6183 /usr/X11R5/include
6184 /usr/X11R4/include
6185
6186 /usr/include/X11
6187 /usr/include/X11R6
6188 /usr/include/X11R5
6189 /usr/include/X11R4
6190
6191 /usr/local/X11/include
6192 /usr/local/X11R6/include
6193 /usr/local/X11R5/include
6194 /usr/local/X11R4/include
6195
6196 /usr/local/include/X11
6197 /usr/local/include/X11R6
6198 /usr/local/include/X11R5
6199 /usr/local/include/X11R4
6200
6201 /usr/X386/include
6202 /usr/x386/include
6203 /usr/XFree86/include/X11
6204
6205 /usr/include
6206 /usr/local/include
6207 /usr/unsupported/include
6208 /usr/athena/include
6209 /usr/local/x11r5/include
6210 /usr/lpp/Xamples/include
6211
6212 /usr/openwin/include
6213 /usr/openwin/share/include'
6214
6215 if test "$ac_x_includes" = no; then
6216   # Guess where to find include files, by looking for Xlib.h.
6217   # First, try using that file with no special directory specified.
6218   cat >conftest.$ac_ext <<_ACEOF
6219 /* confdefs.h.  */
6220 _ACEOF
6221 cat confdefs.h >>conftest.$ac_ext
6222 cat >>conftest.$ac_ext <<_ACEOF
6223 /* end confdefs.h.  */
6224 #include <X11/Xlib.h>
6225 _ACEOF
6226 if { (ac_try="$ac_cpp conftest.$ac_ext"
6227 case "(($ac_try" in
6228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6229   *) ac_try_echo=$ac_try;;
6230 esac
6231 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6232   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6233   ac_status=$?
6234   grep -v '^ *+' conftest.er1 >conftest.err
6235   rm -rf conftest.er1
6236   cat conftest.err >&5
6237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238   (exit $ac_status); } >/dev/null && {
6239          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6240          test ! -s conftest.err
6241        }; then
6242   # We can compile using X headers with no special include directory.
6243 ac_x_includes=
6244 else
6245   echo "$as_me: failed program was:" >&5
6246 sed 's/^/| /' conftest.$ac_ext >&5
6247
6248   for ac_dir in $ac_x_header_dirs; do
6249   if test -r "$ac_dir/X11/Xlib.h"; then
6250     ac_x_includes=$ac_dir
6251     break
6252   fi
6253 done
6254 fi
6255
6256 rm -rf conftest.err conftest.$ac_ext
6257 fi # $ac_x_includes = no
6258
6259 if test "$ac_x_libraries" = no; then
6260   # Check for the libraries.
6261   # See if we find them without any special options.
6262   # Don't add to $LIBS permanently.
6263   ac_save_LIBS=$LIBS
6264   LIBS="-lX11 $LIBS"
6265   cat >conftest.$ac_ext <<_ACEOF
6266 /* confdefs.h.  */
6267 _ACEOF
6268 cat confdefs.h >>conftest.$ac_ext
6269 cat >>conftest.$ac_ext <<_ACEOF
6270 /* end confdefs.h.  */
6271 #include <X11/Xlib.h>
6272 int
6273 main ()
6274 {
6275 XrmInitialize ()
6276   ;
6277   return 0;
6278 }
6279 _ACEOF
6280 rm -rf conftest.$ac_objext conftest$ac_exeext
6281 if { (ac_try="$ac_link"
6282 case "(($ac_try" in
6283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6284   *) ac_try_echo=$ac_try;;
6285 esac
6286 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6287   (eval "$ac_link") 2>conftest.er1
6288   ac_status=$?
6289   grep -v '^ *+' conftest.er1 >conftest.err
6290   rm -rf conftest.er1
6291   cat conftest.err >&5
6292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293   (exit $ac_status); } && {
6294          test -z "$ac_c_werror_flag" ||
6295          test ! -s conftest.err
6296        } && test -s conftest$ac_exeext &&
6297        $as_test_x conftest$ac_exeext; then
6298   LIBS=$ac_save_LIBS
6299 # We can link X programs with no special library path.
6300 ac_x_libraries=
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 sed 's/^/| /' conftest.$ac_ext >&5
6304
6305         LIBS=$ac_save_LIBS
6306 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6307 do
6308   # Don't even attempt the hair of trying to link an X program!
6309   for ac_extension in a so sl dylib la dll; do
6310     if test -r "$ac_dir/libX11.$ac_extension"; then
6311       ac_x_libraries=$ac_dir
6312       break 2
6313     fi
6314   done
6315 done
6316 fi
6317
6318 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6319       conftest$ac_exeext conftest.$ac_ext
6320 fi # $ac_x_libraries = no
6321
6322 case $ac_x_includes,$ac_x_libraries in #(
6323   no,* | *,no | *\'*)
6324     # Didn't find X, or a directory has "'" in its name.
6325     ac_cv_have_x="have_x=no";; #(
6326   *)
6327     # Record where we found X for the cache.
6328     ac_cv_have_x="have_x=yes\
6329         ac_x_includes='$ac_x_includes'\
6330         ac_x_libraries='$ac_x_libraries'"
6331 esac
6332 fi
6333 ;; #(
6334     *) have_x=yes;;
6335   esac
6336   eval "$ac_cv_have_x"
6337 fi # $with_x != no
6338
6339 if test "$have_x" != yes; then
6340   { echo "$as_me:$LINENO: result: $have_x" >&5
6341 echo "${ECHO_T}$have_x" >&6; }
6342   no_x=yes
6343 else
6344   # If each of the values was on the command line, it overrides each guess.
6345   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6346   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6347   # Update the cache value to reflect the command line values.
6348   ac_cv_have_x="have_x=yes\
6349         ac_x_includes='$x_includes'\
6350         ac_x_libraries='$x_libraries'"
6351   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6352 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6353 fi
6354
6355 if test "$no_x" = yes; then
6356   # Not all programs may use this symbol, but it does not hurt to define it.
6357
6358 cat >>confdefs.h <<\_ACEOF
6359 #define X_DISPLAY_MISSING 1
6360 _ACEOF
6361
6362   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6363 else
6364   if test -n "$x_includes"; then
6365     X_CFLAGS="$X_CFLAGS -I$x_includes"
6366   fi
6367
6368   # It would also be nice to do this for all -L options, not just this one.
6369   if test -n "$x_libraries"; then
6370     X_LIBS="$X_LIBS -L$x_libraries"
6371     # For Solaris; some versions of Sun CC require a space after -R and
6372     # others require no space.  Words are not sufficient . . . .
6373     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6374 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6375     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6376     ac_xsave_c_werror_flag=$ac_c_werror_flag
6377     ac_c_werror_flag=yes
6378     cat >conftest.$ac_ext <<_ACEOF
6379 /* confdefs.h.  */
6380 _ACEOF
6381 cat confdefs.h >>conftest.$ac_ext
6382 cat >>conftest.$ac_ext <<_ACEOF
6383 /* end confdefs.h.  */
6384
6385 int
6386 main ()
6387 {
6388
6389   ;
6390   return 0;
6391 }
6392 _ACEOF
6393 rm -rf conftest.$ac_objext conftest$ac_exeext
6394 if { (ac_try="$ac_link"
6395 case "(($ac_try" in
6396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6397   *) ac_try_echo=$ac_try;;
6398 esac
6399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6400   (eval "$ac_link") 2>conftest.er1
6401   ac_status=$?
6402   grep -v '^ *+' conftest.er1 >conftest.err
6403   rm -rf conftest.er1
6404   cat conftest.err >&5
6405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6406   (exit $ac_status); } && {
6407          test -z "$ac_c_werror_flag" ||
6408          test ! -s conftest.err
6409        } && test -s conftest$ac_exeext &&
6410        $as_test_x conftest$ac_exeext; then
6411   { echo "$as_me:$LINENO: result: no" >&5
6412 echo "${ECHO_T}no" >&6; }
6413        X_LIBS="$X_LIBS -R$x_libraries"
6414 else
6415   echo "$as_me: failed program was:" >&5
6416 sed 's/^/| /' conftest.$ac_ext >&5
6417
6418         LIBS="$ac_xsave_LIBS -R $x_libraries"
6419        cat >conftest.$ac_ext <<_ACEOF
6420 /* confdefs.h.  */
6421 _ACEOF
6422 cat confdefs.h >>conftest.$ac_ext
6423 cat >>conftest.$ac_ext <<_ACEOF
6424 /* end confdefs.h.  */
6425
6426 int
6427 main ()
6428 {
6429
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -rf conftest.$ac_objext conftest$ac_exeext
6435 if { (ac_try="$ac_link"
6436 case "(($ac_try" in
6437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6438   *) ac_try_echo=$ac_try;;
6439 esac
6440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6441   (eval "$ac_link") 2>conftest.er1
6442   ac_status=$?
6443   grep -v '^ *+' conftest.er1 >conftest.err
6444   rm -rf conftest.er1
6445   cat conftest.err >&5
6446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6447   (exit $ac_status); } && {
6448          test -z "$ac_c_werror_flag" ||
6449          test ! -s conftest.err
6450        } && test -s conftest$ac_exeext &&
6451        $as_test_x conftest$ac_exeext; then
6452   { echo "$as_me:$LINENO: result: yes" >&5
6453 echo "${ECHO_T}yes" >&6; }
6454           X_LIBS="$X_LIBS -R $x_libraries"
6455 else
6456   echo "$as_me: failed program was:" >&5
6457 sed 's/^/| /' conftest.$ac_ext >&5
6458
6459         { echo "$as_me:$LINENO: result: neither works" >&5
6460 echo "${ECHO_T}neither works" >&6; }
6461 fi
6462
6463 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6464       conftest$ac_exeext conftest.$ac_ext
6465 fi
6466
6467 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6468       conftest$ac_exeext conftest.$ac_ext
6469     ac_c_werror_flag=$ac_xsave_c_werror_flag
6470     LIBS=$ac_xsave_LIBS
6471   fi
6472
6473   # Check for system-dependent libraries X programs must link with.
6474   # Do this before checking for the system-independent R6 libraries
6475   # (-lICE), since we may need -lsocket or whatever for X linking.
6476
6477   if test "$ISC" = yes; then
6478     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6479   else
6480     # Martyn Johnson says this is needed for Ultrix, if the X
6481     # libraries were built with DECnet support.  And Karl Berry says
6482     # the Alpha needs dnet_stub (dnet does not exist).
6483     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6484     cat >conftest.$ac_ext <<_ACEOF
6485 /* confdefs.h.  */
6486 _ACEOF
6487 cat confdefs.h >>conftest.$ac_ext
6488 cat >>conftest.$ac_ext <<_ACEOF
6489 /* end confdefs.h.  */
6490
6491 /* Override any GCC internal prototype to avoid an error.
6492    Use char because int might match the return type of a GCC
6493    builtin and then its argument prototype would still apply.  */
6494 #ifdef __cplusplus
6495 extern "C"
6496 #endif
6497 char XOpenDisplay ();
6498 int
6499 main ()
6500 {
6501 return XOpenDisplay ();
6502   ;
6503   return 0;
6504 }
6505 _ACEOF
6506 rm -rf conftest.$ac_objext conftest$ac_exeext
6507 if { (ac_try="$ac_link"
6508 case "(($ac_try" in
6509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6510   *) ac_try_echo=$ac_try;;
6511 esac
6512 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6513   (eval "$ac_link") 2>conftest.er1
6514   ac_status=$?
6515   grep -v '^ *+' conftest.er1 >conftest.err
6516   rm -rf conftest.er1
6517   cat conftest.err >&5
6518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519   (exit $ac_status); } && {
6520          test -z "$ac_c_werror_flag" ||
6521          test ! -s conftest.err
6522        } && test -s conftest$ac_exeext &&
6523        $as_test_x conftest$ac_exeext; then
6524   :
6525 else
6526   echo "$as_me: failed program was:" >&5
6527 sed 's/^/| /' conftest.$ac_ext >&5
6528
6529         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6530 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6531 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6532   echo $ECHO_N "(cached) $ECHO_C" >&6
6533 else
6534   ac_check_lib_save_LIBS=$LIBS
6535 LIBS="-ldnet  $LIBS"
6536 cat >conftest.$ac_ext <<_ACEOF
6537 /* confdefs.h.  */
6538 _ACEOF
6539 cat confdefs.h >>conftest.$ac_ext
6540 cat >>conftest.$ac_ext <<_ACEOF
6541 /* end confdefs.h.  */
6542
6543 /* Override any GCC internal prototype to avoid an error.
6544    Use char because int might match the return type of a GCC
6545    builtin and then its argument prototype would still apply.  */
6546 #ifdef __cplusplus
6547 extern "C"
6548 #endif
6549 char dnet_ntoa ();
6550 int
6551 main ()
6552 {
6553 return dnet_ntoa ();
6554   ;
6555   return 0;
6556 }
6557 _ACEOF
6558 rm -rf conftest.$ac_objext conftest$ac_exeext
6559 if { (ac_try="$ac_link"
6560 case "(($ac_try" in
6561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562   *) ac_try_echo=$ac_try;;
6563 esac
6564 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6565   (eval "$ac_link") 2>conftest.er1
6566   ac_status=$?
6567   grep -v '^ *+' conftest.er1 >conftest.err
6568   rm -rf conftest.er1
6569   cat conftest.err >&5
6570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571   (exit $ac_status); } && {
6572          test -z "$ac_c_werror_flag" ||
6573          test ! -s conftest.err
6574        } && test -s conftest$ac_exeext &&
6575        $as_test_x conftest$ac_exeext; then
6576   ac_cv_lib_dnet_dnet_ntoa=yes
6577 else
6578   echo "$as_me: failed program was:" >&5
6579 sed 's/^/| /' conftest.$ac_ext >&5
6580
6581         ac_cv_lib_dnet_dnet_ntoa=no
6582 fi
6583
6584 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6585       conftest$ac_exeext conftest.$ac_ext
6586 LIBS=$ac_check_lib_save_LIBS
6587 fi
6588 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6589 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6590 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6591   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6592 fi
6593
6594     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6595       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6596 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6597 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6598   echo $ECHO_N "(cached) $ECHO_C" >&6
6599 else
6600   ac_check_lib_save_LIBS=$LIBS
6601 LIBS="-ldnet_stub  $LIBS"
6602 cat >conftest.$ac_ext <<_ACEOF
6603 /* confdefs.h.  */
6604 _ACEOF
6605 cat confdefs.h >>conftest.$ac_ext
6606 cat >>conftest.$ac_ext <<_ACEOF
6607 /* end confdefs.h.  */
6608
6609 /* Override any GCC internal prototype to avoid an error.
6610    Use char because int might match the return type of a GCC
6611    builtin and then its argument prototype would still apply.  */
6612 #ifdef __cplusplus
6613 extern "C"
6614 #endif
6615 char dnet_ntoa ();
6616 int
6617 main ()
6618 {
6619 return dnet_ntoa ();
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -rf conftest.$ac_objext conftest$ac_exeext
6625 if { (ac_try="$ac_link"
6626 case "(($ac_try" in
6627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6628   *) ac_try_echo=$ac_try;;
6629 esac
6630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6631   (eval "$ac_link") 2>conftest.er1
6632   ac_status=$?
6633   grep -v '^ *+' conftest.er1 >conftest.err
6634   rm -rf conftest.er1
6635   cat conftest.err >&5
6636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637   (exit $ac_status); } && {
6638          test -z "$ac_c_werror_flag" ||
6639          test ! -s conftest.err
6640        } && test -s conftest$ac_exeext &&
6641        $as_test_x conftest$ac_exeext; then
6642   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6643 else
6644   echo "$as_me: failed program was:" >&5
6645 sed 's/^/| /' conftest.$ac_ext >&5
6646
6647         ac_cv_lib_dnet_stub_dnet_ntoa=no
6648 fi
6649
6650 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6651       conftest$ac_exeext conftest.$ac_ext
6652 LIBS=$ac_check_lib_save_LIBS
6653 fi
6654 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6655 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6656 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6657   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6658 fi
6659
6660     fi
6661 fi
6662
6663 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6664       conftest$ac_exeext conftest.$ac_ext
6665     LIBS="$ac_xsave_LIBS"
6666
6667     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6668     # to get the SysV transport functions.
6669     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6670     # needs -lnsl.
6671     # The nsl library prevents programs from opening the X display
6672     # on Irix 5.2, according to T.E. Dickey.
6673     # The functions gethostbyname, getservbyname, and inet_addr are
6674     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6675     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6676 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6677 if test "${ac_cv_func_gethostbyname+set}" = set; then
6678   echo $ECHO_N "(cached) $ECHO_C" >&6
6679 else
6680   cat >conftest.$ac_ext <<_ACEOF
6681 /* confdefs.h.  */
6682 _ACEOF
6683 cat confdefs.h >>conftest.$ac_ext
6684 cat >>conftest.$ac_ext <<_ACEOF
6685 /* end confdefs.h.  */
6686 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6687    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6688 #define gethostbyname innocuous_gethostbyname
6689
6690 /* System header to define __stub macros and hopefully few prototypes,
6691     which can conflict with char gethostbyname (); below.
6692     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6693     <limits.h> exists even on freestanding compilers.  */
6694
6695 #ifdef __STDC__
6696 # include <limits.h>
6697 #else
6698 # include <assert.h>
6699 #endif
6700
6701 #undef gethostbyname
6702
6703 /* Override any GCC internal prototype to avoid an error.
6704    Use char because int might match the return type of a GCC
6705    builtin and then its argument prototype would still apply.  */
6706 #ifdef __cplusplus
6707 extern "C"
6708 #endif
6709 char gethostbyname ();
6710 /* The GNU C library defines this for functions which it implements
6711     to always fail with ENOSYS.  Some functions are actually named
6712     something starting with __ and the normal name is an alias.  */
6713 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6714 choke me
6715 #endif
6716
6717 int
6718 main ()
6719 {
6720 return gethostbyname ();
6721   ;
6722   return 0;
6723 }
6724 _ACEOF
6725 rm -rf conftest.$ac_objext conftest$ac_exeext
6726 if { (ac_try="$ac_link"
6727 case "(($ac_try" in
6728   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6729   *) ac_try_echo=$ac_try;;
6730 esac
6731 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6732   (eval "$ac_link") 2>conftest.er1
6733   ac_status=$?
6734   grep -v '^ *+' conftest.er1 >conftest.err
6735   rm -rf conftest.er1
6736   cat conftest.err >&5
6737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738   (exit $ac_status); } && {
6739          test -z "$ac_c_werror_flag" ||
6740          test ! -s conftest.err
6741        } && test -s conftest$ac_exeext &&
6742        $as_test_x conftest$ac_exeext; then
6743   ac_cv_func_gethostbyname=yes
6744 else
6745   echo "$as_me: failed program was:" >&5
6746 sed 's/^/| /' conftest.$ac_ext >&5
6747
6748         ac_cv_func_gethostbyname=no
6749 fi
6750
6751 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6752       conftest$ac_exeext conftest.$ac_ext
6753 fi
6754 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6755 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6756
6757     if test $ac_cv_func_gethostbyname = no; then
6758       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6759 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6760 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6761   echo $ECHO_N "(cached) $ECHO_C" >&6
6762 else
6763   ac_check_lib_save_LIBS=$LIBS
6764 LIBS="-lnsl  $LIBS"
6765 cat >conftest.$ac_ext <<_ACEOF
6766 /* confdefs.h.  */
6767 _ACEOF
6768 cat confdefs.h >>conftest.$ac_ext
6769 cat >>conftest.$ac_ext <<_ACEOF
6770 /* end confdefs.h.  */
6771
6772 /* Override any GCC internal prototype to avoid an error.
6773    Use char because int might match the return type of a GCC
6774    builtin and then its argument prototype would still apply.  */
6775 #ifdef __cplusplus
6776 extern "C"
6777 #endif
6778 char gethostbyname ();
6779 int
6780 main ()
6781 {
6782 return gethostbyname ();
6783   ;
6784   return 0;
6785 }
6786 _ACEOF
6787 rm -rf conftest.$ac_objext conftest$ac_exeext
6788 if { (ac_try="$ac_link"
6789 case "(($ac_try" in
6790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6791   *) ac_try_echo=$ac_try;;
6792 esac
6793 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6794   (eval "$ac_link") 2>conftest.er1
6795   ac_status=$?
6796   grep -v '^ *+' conftest.er1 >conftest.err
6797   rm -rf conftest.er1
6798   cat conftest.err >&5
6799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800   (exit $ac_status); } && {
6801          test -z "$ac_c_werror_flag" ||
6802          test ! -s conftest.err
6803        } && test -s conftest$ac_exeext &&
6804        $as_test_x conftest$ac_exeext; then
6805   ac_cv_lib_nsl_gethostbyname=yes
6806 else
6807   echo "$as_me: failed program was:" >&5
6808 sed 's/^/| /' conftest.$ac_ext >&5
6809
6810         ac_cv_lib_nsl_gethostbyname=no
6811 fi
6812
6813 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6814       conftest$ac_exeext conftest.$ac_ext
6815 LIBS=$ac_check_lib_save_LIBS
6816 fi
6817 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6818 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6819 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6820   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6821 fi
6822
6823       if test $ac_cv_lib_nsl_gethostbyname = no; then
6824         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6825 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6826 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6827   echo $ECHO_N "(cached) $ECHO_C" >&6
6828 else
6829   ac_check_lib_save_LIBS=$LIBS
6830 LIBS="-lbsd  $LIBS"
6831 cat >conftest.$ac_ext <<_ACEOF
6832 /* confdefs.h.  */
6833 _ACEOF
6834 cat confdefs.h >>conftest.$ac_ext
6835 cat >>conftest.$ac_ext <<_ACEOF
6836 /* end confdefs.h.  */
6837
6838 /* Override any GCC internal prototype to avoid an error.
6839    Use char because int might match the return type of a GCC
6840    builtin and then its argument prototype would still apply.  */
6841 #ifdef __cplusplus
6842 extern "C"
6843 #endif
6844 char gethostbyname ();
6845 int
6846 main ()
6847 {
6848 return gethostbyname ();
6849   ;
6850   return 0;
6851 }
6852 _ACEOF
6853 rm -rf conftest.$ac_objext conftest$ac_exeext
6854 if { (ac_try="$ac_link"
6855 case "(($ac_try" in
6856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6857   *) ac_try_echo=$ac_try;;
6858 esac
6859 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6860   (eval "$ac_link") 2>conftest.er1
6861   ac_status=$?
6862   grep -v '^ *+' conftest.er1 >conftest.err
6863   rm -rf conftest.er1
6864   cat conftest.err >&5
6865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6866   (exit $ac_status); } && {
6867          test -z "$ac_c_werror_flag" ||
6868          test ! -s conftest.err
6869        } && test -s conftest$ac_exeext &&
6870        $as_test_x conftest$ac_exeext; then
6871   ac_cv_lib_bsd_gethostbyname=yes
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 sed 's/^/| /' conftest.$ac_ext >&5
6875
6876         ac_cv_lib_bsd_gethostbyname=no
6877 fi
6878
6879 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6880       conftest$ac_exeext conftest.$ac_ext
6881 LIBS=$ac_check_lib_save_LIBS
6882 fi
6883 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6884 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6885 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6886   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6887 fi
6888
6889       fi
6890     fi
6891
6892     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6893     # socket/setsockopt and other routines are undefined under SCO ODT
6894     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6895     # on later versions), says Simon Leinen: it contains gethostby*
6896     # variants that don't use the name server (or something).  -lsocket
6897     # must be given before -lnsl if both are needed.  We assume that
6898     # if connect needs -lnsl, so does gethostbyname.
6899     { echo "$as_me:$LINENO: checking for connect" >&5
6900 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6901 if test "${ac_cv_func_connect+set}" = set; then
6902   echo $ECHO_N "(cached) $ECHO_C" >&6
6903 else
6904   cat >conftest.$ac_ext <<_ACEOF
6905 /* confdefs.h.  */
6906 _ACEOF
6907 cat confdefs.h >>conftest.$ac_ext
6908 cat >>conftest.$ac_ext <<_ACEOF
6909 /* end confdefs.h.  */
6910 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6911    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6912 #define connect innocuous_connect
6913
6914 /* System header to define __stub macros and hopefully few prototypes,
6915     which can conflict with char connect (); below.
6916     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6917     <limits.h> exists even on freestanding compilers.  */
6918
6919 #ifdef __STDC__
6920 # include <limits.h>
6921 #else
6922 # include <assert.h>
6923 #endif
6924
6925 #undef connect
6926
6927 /* Override any GCC internal prototype to avoid an error.
6928    Use char because int might match the return type of a GCC
6929    builtin and then its argument prototype would still apply.  */
6930 #ifdef __cplusplus
6931 extern "C"
6932 #endif
6933 char connect ();
6934 /* The GNU C library defines this for functions which it implements
6935     to always fail with ENOSYS.  Some functions are actually named
6936     something starting with __ and the normal name is an alias.  */
6937 #if defined __stub_connect || defined __stub___connect
6938 choke me
6939 #endif
6940
6941 int
6942 main ()
6943 {
6944 return connect ();
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -rf conftest.$ac_objext conftest$ac_exeext
6950 if { (ac_try="$ac_link"
6951 case "(($ac_try" in
6952   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6953   *) ac_try_echo=$ac_try;;
6954 esac
6955 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6956   (eval "$ac_link") 2>conftest.er1
6957   ac_status=$?
6958   grep -v '^ *+' conftest.er1 >conftest.err
6959   rm -rf conftest.er1
6960   cat conftest.err >&5
6961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962   (exit $ac_status); } && {
6963          test -z "$ac_c_werror_flag" ||
6964          test ! -s conftest.err
6965        } && test -s conftest$ac_exeext &&
6966        $as_test_x conftest$ac_exeext; then
6967   ac_cv_func_connect=yes
6968 else
6969   echo "$as_me: failed program was:" >&5
6970 sed 's/^/| /' conftest.$ac_ext >&5
6971
6972         ac_cv_func_connect=no
6973 fi
6974
6975 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6976       conftest$ac_exeext conftest.$ac_ext
6977 fi
6978 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6979 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6980
6981     if test $ac_cv_func_connect = no; then
6982       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6983 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6984 if test "${ac_cv_lib_socket_connect+set}" = set; then
6985   echo $ECHO_N "(cached) $ECHO_C" >&6
6986 else
6987   ac_check_lib_save_LIBS=$LIBS
6988 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6989 cat >conftest.$ac_ext <<_ACEOF
6990 /* confdefs.h.  */
6991 _ACEOF
6992 cat confdefs.h >>conftest.$ac_ext
6993 cat >>conftest.$ac_ext <<_ACEOF
6994 /* end confdefs.h.  */
6995
6996 /* Override any GCC internal prototype to avoid an error.
6997    Use char because int might match the return type of a GCC
6998    builtin and then its argument prototype would still apply.  */
6999 #ifdef __cplusplus
7000 extern "C"
7001 #endif
7002 char connect ();
7003 int
7004 main ()
7005 {
7006 return connect ();
7007   ;
7008   return 0;
7009 }
7010 _ACEOF
7011 rm -rf conftest.$ac_objext conftest$ac_exeext
7012 if { (ac_try="$ac_link"
7013 case "(($ac_try" in
7014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7015   *) ac_try_echo=$ac_try;;
7016 esac
7017 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7018   (eval "$ac_link") 2>conftest.er1
7019   ac_status=$?
7020   grep -v '^ *+' conftest.er1 >conftest.err
7021   rm -rf conftest.er1
7022   cat conftest.err >&5
7023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024   (exit $ac_status); } && {
7025          test -z "$ac_c_werror_flag" ||
7026          test ! -s conftest.err
7027        } && test -s conftest$ac_exeext &&
7028        $as_test_x conftest$ac_exeext; then
7029   ac_cv_lib_socket_connect=yes
7030 else
7031   echo "$as_me: failed program was:" >&5
7032 sed 's/^/| /' conftest.$ac_ext >&5
7033
7034         ac_cv_lib_socket_connect=no
7035 fi
7036
7037 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7038       conftest$ac_exeext conftest.$ac_ext
7039 LIBS=$ac_check_lib_save_LIBS
7040 fi
7041 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7042 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7043 if test $ac_cv_lib_socket_connect = yes; then
7044   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7045 fi
7046
7047     fi
7048
7049     # Guillermo Gomez says -lposix is necessary on A/UX.
7050     { echo "$as_me:$LINENO: checking for remove" >&5
7051 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7052 if test "${ac_cv_func_remove+set}" = set; then
7053   echo $ECHO_N "(cached) $ECHO_C" >&6
7054 else
7055   cat >conftest.$ac_ext <<_ACEOF
7056 /* confdefs.h.  */
7057 _ACEOF
7058 cat confdefs.h >>conftest.$ac_ext
7059 cat >>conftest.$ac_ext <<_ACEOF
7060 /* end confdefs.h.  */
7061 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7062    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7063 #define remove innocuous_remove
7064
7065 /* System header to define __stub macros and hopefully few prototypes,
7066     which can conflict with char remove (); below.
7067     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7068     <limits.h> exists even on freestanding compilers.  */
7069
7070 #ifdef __STDC__
7071 # include <limits.h>
7072 #else
7073 # include <assert.h>
7074 #endif
7075
7076 #undef remove
7077
7078 /* Override any GCC internal prototype to avoid an error.
7079    Use char because int might match the return type of a GCC
7080    builtin and then its argument prototype would still apply.  */
7081 #ifdef __cplusplus
7082 extern "C"
7083 #endif
7084 char remove ();
7085 /* The GNU C library defines this for functions which it implements
7086     to always fail with ENOSYS.  Some functions are actually named
7087     something starting with __ and the normal name is an alias.  */
7088 #if defined __stub_remove || defined __stub___remove
7089 choke me
7090 #endif
7091
7092 int
7093 main ()
7094 {
7095 return remove ();
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -rf conftest.$ac_objext conftest$ac_exeext
7101 if { (ac_try="$ac_link"
7102 case "(($ac_try" in
7103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7104   *) ac_try_echo=$ac_try;;
7105 esac
7106 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7107   (eval "$ac_link") 2>conftest.er1
7108   ac_status=$?
7109   grep -v '^ *+' conftest.er1 >conftest.err
7110   rm -rf conftest.er1
7111   cat conftest.err >&5
7112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113   (exit $ac_status); } && {
7114          test -z "$ac_c_werror_flag" ||
7115          test ! -s conftest.err
7116        } && test -s conftest$ac_exeext &&
7117        $as_test_x conftest$ac_exeext; then
7118   ac_cv_func_remove=yes
7119 else
7120   echo "$as_me: failed program was:" >&5
7121 sed 's/^/| /' conftest.$ac_ext >&5
7122
7123         ac_cv_func_remove=no
7124 fi
7125
7126 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7127       conftest$ac_exeext conftest.$ac_ext
7128 fi
7129 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7130 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7131
7132     if test $ac_cv_func_remove = no; then
7133       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7134 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7135 if test "${ac_cv_lib_posix_remove+set}" = set; then
7136   echo $ECHO_N "(cached) $ECHO_C" >&6
7137 else
7138   ac_check_lib_save_LIBS=$LIBS
7139 LIBS="-lposix  $LIBS"
7140 cat >conftest.$ac_ext <<_ACEOF
7141 /* confdefs.h.  */
7142 _ACEOF
7143 cat confdefs.h >>conftest.$ac_ext
7144 cat >>conftest.$ac_ext <<_ACEOF
7145 /* end confdefs.h.  */
7146
7147 /* Override any GCC internal prototype to avoid an error.
7148    Use char because int might match the return type of a GCC
7149    builtin and then its argument prototype would still apply.  */
7150 #ifdef __cplusplus
7151 extern "C"
7152 #endif
7153 char remove ();
7154 int
7155 main ()
7156 {
7157 return remove ();
7158   ;
7159   return 0;
7160 }
7161 _ACEOF
7162 rm -rf conftest.$ac_objext conftest$ac_exeext
7163 if { (ac_try="$ac_link"
7164 case "(($ac_try" in
7165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7166   *) ac_try_echo=$ac_try;;
7167 esac
7168 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7169   (eval "$ac_link") 2>conftest.er1
7170   ac_status=$?
7171   grep -v '^ *+' conftest.er1 >conftest.err
7172   rm -rf conftest.er1
7173   cat conftest.err >&5
7174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175   (exit $ac_status); } && {
7176          test -z "$ac_c_werror_flag" ||
7177          test ! -s conftest.err
7178        } && test -s conftest$ac_exeext &&
7179        $as_test_x conftest$ac_exeext; then
7180   ac_cv_lib_posix_remove=yes
7181 else
7182   echo "$as_me: failed program was:" >&5
7183 sed 's/^/| /' conftest.$ac_ext >&5
7184
7185         ac_cv_lib_posix_remove=no
7186 fi
7187
7188 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7189       conftest$ac_exeext conftest.$ac_ext
7190 LIBS=$ac_check_lib_save_LIBS
7191 fi
7192 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7193 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7194 if test $ac_cv_lib_posix_remove = yes; then
7195   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7196 fi
7197
7198     fi
7199
7200     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7201     { echo "$as_me:$LINENO: checking for shmat" >&5
7202 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7203 if test "${ac_cv_func_shmat+set}" = set; then
7204   echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206   cat >conftest.$ac_ext <<_ACEOF
7207 /* confdefs.h.  */
7208 _ACEOF
7209 cat confdefs.h >>conftest.$ac_ext
7210 cat >>conftest.$ac_ext <<_ACEOF
7211 /* end confdefs.h.  */
7212 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7213    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7214 #define shmat innocuous_shmat
7215
7216 /* System header to define __stub macros and hopefully few prototypes,
7217     which can conflict with char shmat (); below.
7218     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7219     <limits.h> exists even on freestanding compilers.  */
7220
7221 #ifdef __STDC__
7222 # include <limits.h>
7223 #else
7224 # include <assert.h>
7225 #endif
7226
7227 #undef shmat
7228
7229 /* Override any GCC internal prototype to avoid an error.
7230    Use char because int might match the return type of a GCC
7231    builtin and then its argument prototype would still apply.  */
7232 #ifdef __cplusplus
7233 extern "C"
7234 #endif
7235 char shmat ();
7236 /* The GNU C library defines this for functions which it implements
7237     to always fail with ENOSYS.  Some functions are actually named
7238     something starting with __ and the normal name is an alias.  */
7239 #if defined __stub_shmat || defined __stub___shmat
7240 choke me
7241 #endif
7242
7243 int
7244 main ()
7245 {
7246 return shmat ();
7247   ;
7248   return 0;
7249 }
7250 _ACEOF
7251 rm -rf conftest.$ac_objext conftest$ac_exeext
7252 if { (ac_try="$ac_link"
7253 case "(($ac_try" in
7254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7255   *) ac_try_echo=$ac_try;;
7256 esac
7257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7258   (eval "$ac_link") 2>conftest.er1
7259   ac_status=$?
7260   grep -v '^ *+' conftest.er1 >conftest.err
7261   rm -rf conftest.er1
7262   cat conftest.err >&5
7263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7264   (exit $ac_status); } && {
7265          test -z "$ac_c_werror_flag" ||
7266          test ! -s conftest.err
7267        } && test -s conftest$ac_exeext &&
7268        $as_test_x conftest$ac_exeext; then
7269   ac_cv_func_shmat=yes
7270 else
7271   echo "$as_me: failed program was:" >&5
7272 sed 's/^/| /' conftest.$ac_ext >&5
7273
7274         ac_cv_func_shmat=no
7275 fi
7276
7277 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7278       conftest$ac_exeext conftest.$ac_ext
7279 fi
7280 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7281 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7282
7283     if test $ac_cv_func_shmat = no; then
7284       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7285 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7286 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7287   echo $ECHO_N "(cached) $ECHO_C" >&6
7288 else
7289   ac_check_lib_save_LIBS=$LIBS
7290 LIBS="-lipc  $LIBS"
7291 cat >conftest.$ac_ext <<_ACEOF
7292 /* confdefs.h.  */
7293 _ACEOF
7294 cat confdefs.h >>conftest.$ac_ext
7295 cat >>conftest.$ac_ext <<_ACEOF
7296 /* end confdefs.h.  */
7297
7298 /* Override any GCC internal prototype to avoid an error.
7299    Use char because int might match the return type of a GCC
7300    builtin and then its argument prototype would still apply.  */
7301 #ifdef __cplusplus
7302 extern "C"
7303 #endif
7304 char shmat ();
7305 int
7306 main ()
7307 {
7308 return shmat ();
7309   ;
7310   return 0;
7311 }
7312 _ACEOF
7313 rm -rf conftest.$ac_objext conftest$ac_exeext
7314 if { (ac_try="$ac_link"
7315 case "(($ac_try" in
7316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7317   *) ac_try_echo=$ac_try;;
7318 esac
7319 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7320   (eval "$ac_link") 2>conftest.er1
7321   ac_status=$?
7322   grep -v '^ *+' conftest.er1 >conftest.err
7323   rm -rf conftest.er1
7324   cat conftest.err >&5
7325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7326   (exit $ac_status); } && {
7327          test -z "$ac_c_werror_flag" ||
7328          test ! -s conftest.err
7329        } && test -s conftest$ac_exeext &&
7330        $as_test_x conftest$ac_exeext; then
7331   ac_cv_lib_ipc_shmat=yes
7332 else
7333   echo "$as_me: failed program was:" >&5
7334 sed 's/^/| /' conftest.$ac_ext >&5
7335
7336         ac_cv_lib_ipc_shmat=no
7337 fi
7338
7339 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7340       conftest$ac_exeext conftest.$ac_ext
7341 LIBS=$ac_check_lib_save_LIBS
7342 fi
7343 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7344 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7345 if test $ac_cv_lib_ipc_shmat = yes; then
7346   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7347 fi
7348
7349     fi
7350   fi
7351
7352   # Check for libraries that X11R6 Xt/Xaw programs need.
7353   ac_save_LDFLAGS=$LDFLAGS
7354   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7355   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7356   # check for ICE first), but we must link in the order -lSM -lICE or
7357   # we get undefined symbols.  So assume we have SM if we have ICE.
7358   # These have to be linked with before -lX11, unlike the other
7359   # libraries we check for below, so use a different variable.
7360   # John Interrante, Karl Berry
7361   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7362 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7363 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7364   echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366   ac_check_lib_save_LIBS=$LIBS
7367 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7368 cat >conftest.$ac_ext <<_ACEOF
7369 /* confdefs.h.  */
7370 _ACEOF
7371 cat confdefs.h >>conftest.$ac_ext
7372 cat >>conftest.$ac_ext <<_ACEOF
7373 /* end confdefs.h.  */
7374
7375 /* Override any GCC internal prototype to avoid an error.
7376    Use char because int might match the return type of a GCC
7377    builtin and then its argument prototype would still apply.  */
7378 #ifdef __cplusplus
7379 extern "C"
7380 #endif
7381 char IceConnectionNumber ();
7382 int
7383 main ()
7384 {
7385 return IceConnectionNumber ();
7386   ;
7387   return 0;
7388 }
7389 _ACEOF
7390 rm -rf conftest.$ac_objext conftest$ac_exeext
7391 if { (ac_try="$ac_link"
7392 case "(($ac_try" in
7393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7394   *) ac_try_echo=$ac_try;;
7395 esac
7396 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7397   (eval "$ac_link") 2>conftest.er1
7398   ac_status=$?
7399   grep -v '^ *+' conftest.er1 >conftest.err
7400   rm -rf conftest.er1
7401   cat conftest.err >&5
7402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403   (exit $ac_status); } && {
7404          test -z "$ac_c_werror_flag" ||
7405          test ! -s conftest.err
7406        } && test -s conftest$ac_exeext &&
7407        $as_test_x conftest$ac_exeext; then
7408   ac_cv_lib_ICE_IceConnectionNumber=yes
7409 else
7410   echo "$as_me: failed program was:" >&5
7411 sed 's/^/| /' conftest.$ac_ext >&5
7412
7413         ac_cv_lib_ICE_IceConnectionNumber=no
7414 fi
7415
7416 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7417       conftest$ac_exeext conftest.$ac_ext
7418 LIBS=$ac_check_lib_save_LIBS
7419 fi
7420 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7421 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7422 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7423   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7424 fi
7425
7426   LDFLAGS=$ac_save_LDFLAGS
7427
7428 fi
7429
7430
7431 if test "$have_x" != yes; then
7432   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7433 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7434    { (exit 1); exit 1; }; }
7435 fi
7436
7437
7438     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7439 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7440 if test "${ac_cv_x_app_defaults+set}" = set; then
7441   echo $ECHO_N "(cached) $ECHO_C" >&6
7442 else
7443
7444   rm -fr conftestdir
7445   if mkdir conftestdir; then
7446     cd conftestdir 2>/dev/null
7447     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7448     cat > Imakefile <<'EOF'
7449 acfindx:
7450         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7451 EOF
7452     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7453       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7454       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7455     fi
7456     cd .. 2>/dev/null
7457     rm -fr conftestdir
7458   fi
7459       if test x"$ac_x_app_defaults" = x; then
7460
7461   # Look for the directory under a standard set of common directories.
7462   # Check X11 before X11Rn because it's often a symlink to the current release.
7463   for ac_dir in                                 \
7464     /usr/X11/lib/app-defaults                   \
7465     /usr/X11R6/lib/app-defaults                 \
7466     /usr/X11R6/lib/X11/app-defaults             \
7467     /usr/X11R5/lib/app-defaults                 \
7468     /usr/X11R5/lib/X11/app-defaults             \
7469     /usr/X11R4/lib/app-defaults                 \
7470     /usr/X11R4/lib/X11/app-defaults             \
7471                                                 \
7472     /usr/lib/X11/app-defaults                   \
7473     /usr/lib/X11R6/app-defaults                 \
7474     /usr/lib/X11R5/app-defaults                 \
7475     /usr/lib/X11R4/app-defaults                 \
7476                                                 \
7477     /usr/local/X11/lib/app-defaults             \
7478     /usr/local/X11R6/lib/app-defaults           \
7479     /usr/local/X11R5/lib/app-defaults           \
7480     /usr/local/X11R4/lib/app-defaults           \
7481                                                 \
7482     /usr/local/lib/X11/app-defaults             \
7483     /usr/local/lib/X11R6/app-defaults           \
7484     /usr/local/lib/X11R6/X11/app-defaults       \
7485     /usr/local/lib/X11R5/app-defaults           \
7486     /usr/local/lib/X11R5/X11/app-defaults       \
7487     /usr/local/lib/X11R4/app-defaults           \
7488     /usr/local/lib/X11R4/X11/app-defaults       \
7489                                                 \
7490     /usr/X386/lib/X11/app-defaults              \
7491     /usr/x386/lib/X11/app-defaults              \
7492     /usr/XFree86/lib/X11/app-defaults           \
7493                                                 \
7494     /usr/lib/X11/app-defaults                   \
7495     /usr/local/lib/X11/app-defaults             \
7496     /usr/unsupported/lib/X11/app-defaults       \
7497     /usr/athena/lib/X11/app-defaults            \
7498     /usr/local/x11r5/lib/X11/app-defaults       \
7499     /usr/lpp/Xamples/lib/X11/app-defaults       \
7500     /lib/usr/lib/X11/app-defaults               \
7501                                                 \
7502     /usr/openwin/lib/app-defaults               \
7503     /usr/openwin/lib/X11/app-defaults           \
7504     /usr/openwin/share/lib/app-defaults         \
7505     /usr/openwin/share/lib/X11/app-defaults     \
7506                                                 \
7507     /X11R6/lib/app-defaults                     \
7508     /X11R5/lib/app-defaults                     \
7509     /X11R4/lib/app-defaults                     \
7510     ; \
7511   do
7512     if test -d "$ac_dir"; then
7513       ac_x_app_defaults=$ac_dir
7514       break
7515     fi
7516   done
7517
7518       fi
7519       if test x"$ac_x_app_defaults" = x; then
7520         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7521       else
7522         # Record where we found app-defaults for the cache.
7523         ac_cv_x_app_defaults="$ac_x_app_defaults"
7524       fi
7525 fi
7526 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7527 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7528     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7529 case "$host" in
7530     *-hpux*)
7531
7532       # The following arcana was gleaned from conversations with
7533       # Eric Schwartz <erics@col.hp.com>:
7534       #
7535       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7536       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7537       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7538       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7539       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7540       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7541       # you don't need any -I or -L arguments.
7542       #
7543       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7544       # are the same division as 10.x.  However, there are no symlinks to
7545       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7546       # arguments are always necessary.
7547       #
7548       # However, X11R6 was available on HPUX 9.x as a patch: if that
7549       # patch was installed, then all of X11R6 went in to
7550       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7551       #
7552       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7553       # whether R5 was available as a patch; R6 undoubtedly was not.)
7554       #
7555       # So.  We try and use the highest numbered pair of
7556       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7557       # that are available.  We do not mix and match different versions
7558       # of X.
7559       #
7560       # Question I still don't know the answer to: (do you?)
7561       #
7562       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7563       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7564       #     that contrib directory?  Did it contain so-called "standard"
7565       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7566       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7567       #     be a situation where one had to reach into the R5 headers and
7568       #     libs to find Xmu?  That is, must both R6 and R5 directories
7569       #     be on the -I and -L lists in that case?
7570       #
7571       for version in X11R6 X11R5 X11R4 ; do
7572         # if either pair of directories exists...
7573         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7574         then
7575            # if contrib exists, use it...
7576            if test -d /usr/contrib/$version/include ; then
7577              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7578              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7579            fi
7580            # if the "standard" one exists, use it.
7581            if test -d /usr/include/$version ; then
7582              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7583              X_LIBS="$X_LIBS -L/usr/lib/$version"
7584            fi
7585            # since at least one of the pair exists, go no farther.
7586            break
7587         fi
7588       done
7589
7590       # Now find Motif.  Thanks for not making xmkmf find this by
7591       # default, you losers.
7592       #
7593       if test -d /usr/include/Motif2.1 ; then
7594         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7595         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7596       elif test -d /usr/include/Motif1.2 ; then
7597         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7598         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7599       elif test -d /usr/include/Motif1.1 ; then
7600         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7601         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7602       fi
7603
7604       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7605       #
7606       if test -d /opt/graphics/OpenGL/include ; then
7607         # HP-UX 10.20 puts it here
7608         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7609         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7610       elif test -d /opt/Mesa/lib ; then
7611         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7612         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7613       fi
7614
7615
7616       if test -d /opt/xpm/lib/X11 ; then
7617         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7618         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7619       fi
7620
7621       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7622       # in /usr/local/, unless there is already an xscreensaver in
7623       # /usr/local/bin/.  This can be overridden with the --prefix arg
7624       # to configure.  I'm not sure this is the right thing to do, but
7625       # Richard Lloyd says so...
7626       #
7627       if test \! -x /usr/local/bin/xscreensaver ; then
7628         ac_default_prefix=/opt/xscreensaver
7629       fi
7630
7631     ;;
7632     *-solaris*)
7633
7634       # Thanks for not making xmkmf find this by default, pinheads.
7635       # And thanks for moving things around again, too.  Is this
7636       # really the standard location now?  What happened to the
7637       # joke that this kind of thing went in /opt?
7638       # cthomp says "answer: CDE (Common Disorganized Environment)"
7639       #
7640       if test -f /usr/dt/include/Xm/Xm.h ; then
7641         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7642         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7643
7644         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7645         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7646 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7647 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7648   echo $ECHO_N "(cached) $ECHO_C" >&6
7649 else
7650   ac_check_lib_save_LIBS=$LIBS
7651 LIBS="-lgen  $LIBS"
7652 cat >conftest.$ac_ext <<_ACEOF
7653 /* confdefs.h.  */
7654 _ACEOF
7655 cat confdefs.h >>conftest.$ac_ext
7656 cat >>conftest.$ac_ext <<_ACEOF
7657 /* end confdefs.h.  */
7658
7659 /* Override any GCC internal prototype to avoid an error.
7660    Use char because int might match the return type of a GCC
7661    builtin and then its argument prototype would still apply.  */
7662 #ifdef __cplusplus
7663 extern "C"
7664 #endif
7665 char regcmp ();
7666 int
7667 main ()
7668 {
7669 return regcmp ();
7670   ;
7671   return 0;
7672 }
7673 _ACEOF
7674 rm -rf conftest.$ac_objext conftest$ac_exeext
7675 if { (ac_try="$ac_link"
7676 case "(($ac_try" in
7677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7678   *) ac_try_echo=$ac_try;;
7679 esac
7680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7681   (eval "$ac_link") 2>conftest.er1
7682   ac_status=$?
7683   grep -v '^ *+' conftest.er1 >conftest.err
7684   rm -rf conftest.er1
7685   cat conftest.err >&5
7686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687   (exit $ac_status); } && {
7688          test -z "$ac_c_werror_flag" ||
7689          test ! -s conftest.err
7690        } && test -s conftest$ac_exeext &&
7691        $as_test_x conftest$ac_exeext; then
7692   ac_cv_lib_gen_regcmp=yes
7693 else
7694   echo "$as_me: failed program was:" >&5
7695 sed 's/^/| /' conftest.$ac_ext >&5
7696
7697         ac_cv_lib_gen_regcmp=no
7698 fi
7699
7700 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7701       conftest$ac_exeext conftest.$ac_ext
7702 LIBS=$ac_check_lib_save_LIBS
7703 fi
7704 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7705 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7706 if test $ac_cv_lib_gen_regcmp = yes; then
7707   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7708 fi
7709
7710       fi
7711
7712     ;;
7713     *-darwin*)
7714
7715       # On MacOS X (10.x with "fink"), many things are under /sw/.
7716       #
7717       if test -d /sw/include ; then
7718         X_CFLAGS="-I/sw/include $X_CFLAGS"
7719         X_LIBS="-L/sw/lib $X_LIBS"
7720       fi
7721     ;;
7722   esac
7723 { echo "$as_me:$LINENO: checking for XPointer" >&5
7724 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7725 if test "${ac_cv_xpointer+set}" = set; then
7726   echo $ECHO_N "(cached) $ECHO_C" >&6
7727 else
7728
7729   ac_save_CPPFLAGS="$CPPFLAGS"
7730   if test \! -z "$includedir" ; then
7731     CPPFLAGS="$CPPFLAGS -I$includedir"
7732   fi
7733   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7734   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7735   cat >conftest.$ac_ext <<_ACEOF
7736 /* confdefs.h.  */
7737 _ACEOF
7738 cat confdefs.h >>conftest.$ac_ext
7739 cat >>conftest.$ac_ext <<_ACEOF
7740 /* end confdefs.h.  */
7741 #include <X11/Xlib.h>
7742 int
7743 main ()
7744 {
7745 XPointer foo = (XPointer) 0;
7746   ;
7747   return 0;
7748 }
7749 _ACEOF
7750 rm -rf conftest.$ac_objext
7751 if { (ac_try="$ac_compile"
7752 case "(($ac_try" in
7753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7754   *) ac_try_echo=$ac_try;;
7755 esac
7756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7757   (eval "$ac_compile") 2>conftest.er1
7758   ac_status=$?
7759   grep -v '^ *+' conftest.er1 >conftest.err
7760   rm -rf conftest.er1
7761   cat conftest.err >&5
7762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763   (exit $ac_status); } && {
7764          test -z "$ac_c_werror_flag" ||
7765          test ! -s conftest.err
7766        } && test -s conftest.$ac_objext; then
7767   ac_cv_xpointer=yes
7768 else
7769   echo "$as_me: failed program was:" >&5
7770 sed 's/^/| /' conftest.$ac_ext >&5
7771
7772         ac_cv_xpointer=no
7773 fi
7774
7775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7776   CPPFLAGS="$ac_save_CPPFLAGS"
7777 fi
7778 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7779 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7780   if test "$ac_cv_xpointer" != yes; then
7781    cat >>confdefs.h <<\_ACEOF
7782 #define XPointer char*
7783 _ACEOF
7784
7785   fi
7786
7787 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7788 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7789   ac_macosx=no
7790   case "$host" in
7791     *-apple-darwin* )
7792       ac_macosx=yes
7793     ;;
7794   esac
7795 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7796 echo "${ECHO_T}$ac_macosx" >&6; }
7797
7798
7799 ###############################################################################
7800 #
7801 #       Gettext support
7802 #
7803 ###############################################################################
7804
7805
7806
7807 if test -n ""; then
7808     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7809 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7810
7811     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7812     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7813
7814     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7815
7816
7817     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7818         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7819 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7820     else
7821         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7822 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7823         exit 1
7824     fi
7825 fi
7826
7827   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'
7828 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'
7829      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'
7830       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7831      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'
7832    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'
7833     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'
7834 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'
7835        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'
7836       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'
7837     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'
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851 # Use the tools built into the package, not the ones that are installed.
7852
7853 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7854 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7855 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7856
7857
7858
7859
7860
7861 # Extract the first word of "perl", so it can be a program name with args.
7862 set dummy perl; ac_word=$2
7863 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7864 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7865 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7866   echo $ECHO_N "(cached) $ECHO_C" >&6
7867 else
7868   case $INTLTOOL_PERL in
7869   [\\/]* | ?:[\\/]*)
7870   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7871   ;;
7872   *)
7873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7874 for as_dir in $PATH
7875 do
7876   IFS=$as_save_IFS
7877   test -z "$as_dir" && as_dir=.
7878   for ac_exec_ext in '' $ac_executable_extensions; do
7879   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7880     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7881     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7882     break 2
7883   fi
7884 done
7885 done
7886 IFS=$as_save_IFS
7887
7888   ;;
7889 esac
7890 fi
7891 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7892 if test -n "$INTLTOOL_PERL"; then
7893   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7894 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7895 else
7896   { echo "$as_me:$LINENO: result: no" >&5
7897 echo "${ECHO_T}no" >&6; }
7898 fi
7899
7900
7901 if test -z "$INTLTOOL_PERL"; then
7902    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7903 echo "$as_me: error: perl not found; required for intltool" >&2;}
7904    { (exit 1); exit 1; }; }
7905 fi
7906 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7907    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7908 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7909    { (exit 1); exit 1; }; }
7910 fi
7911
7912 # Remove file type tags (using []) from po/POTFILES.
7913
7914
7915
7916
7917
7918
7919
7920 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7921
7922 ac_config_commands="$ac_config_commands default-1"
7923
7924
7925
7926 GETTEXT_PACKAGE=xscreensaver
7927
7928 cat >>confdefs.h <<_ACEOF
7929 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7930 _ACEOF
7931
7932
7933 cat >>confdefs.h <<_ACEOF
7934 #define PACKAGE "$GETTEXT_PACKAGE"
7935 _ACEOF
7936
7937
7938
7939 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"
7940 if test -n "$ac_tool_prefix"; then
7941   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7942 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7943 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7945 if test "${ac_cv_prog_RANLIB+set}" = set; then
7946   echo $ECHO_N "(cached) $ECHO_C" >&6
7947 else
7948   if test -n "$RANLIB"; then
7949   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7950 else
7951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952 for as_dir in $PATH
7953 do
7954   IFS=$as_save_IFS
7955   test -z "$as_dir" && as_dir=.
7956   for ac_exec_ext in '' $ac_executable_extensions; do
7957   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7958     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7959     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7960     break 2
7961   fi
7962 done
7963 done
7964 IFS=$as_save_IFS
7965
7966 fi
7967 fi
7968 RANLIB=$ac_cv_prog_RANLIB
7969 if test -n "$RANLIB"; then
7970   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7971 echo "${ECHO_T}$RANLIB" >&6; }
7972 else
7973   { echo "$as_me:$LINENO: result: no" >&5
7974 echo "${ECHO_T}no" >&6; }
7975 fi
7976
7977
7978 fi
7979 if test -z "$ac_cv_prog_RANLIB"; then
7980   ac_ct_RANLIB=$RANLIB
7981   # Extract the first word of "ranlib", so it can be a program name with args.
7982 set dummy ranlib; ac_word=$2
7983 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7984 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7985 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7986   echo $ECHO_N "(cached) $ECHO_C" >&6
7987 else
7988   if test -n "$ac_ct_RANLIB"; then
7989   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7990 else
7991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7992 for as_dir in $PATH
7993 do
7994   IFS=$as_save_IFS
7995   test -z "$as_dir" && as_dir=.
7996   for ac_exec_ext in '' $ac_executable_extensions; do
7997   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7998     ac_cv_prog_ac_ct_RANLIB="ranlib"
7999     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8000     break 2
8001   fi
8002 done
8003 done
8004 IFS=$as_save_IFS
8005
8006 fi
8007 fi
8008 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8009 if test -n "$ac_ct_RANLIB"; then
8010   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8011 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8012 else
8013   { echo "$as_me:$LINENO: result: no" >&5
8014 echo "${ECHO_T}no" >&6; }
8015 fi
8016
8017   if test "x$ac_ct_RANLIB" = x; then
8018     RANLIB=":"
8019   else
8020     case $cross_compiling:$ac_tool_warned in
8021 yes:)
8022 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8023 whose name does not start with the host triplet.  If you think this
8024 configuration is useful to you, please write to autoconf@gnu.org." >&5
8025 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8026 whose name does not start with the host triplet.  If you think this
8027 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8028 ac_tool_warned=yes ;;
8029 esac
8030     RANLIB=$ac_ct_RANLIB
8031   fi
8032 else
8033   RANLIB="$ac_cv_prog_RANLIB"
8034 fi
8035
8036 { echo "$as_me:$LINENO: checking for off_t" >&5
8037 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8038 if test "${ac_cv_type_off_t+set}" = set; then
8039   echo $ECHO_N "(cached) $ECHO_C" >&6
8040 else
8041   cat >conftest.$ac_ext <<_ACEOF
8042 /* confdefs.h.  */
8043 _ACEOF
8044 cat confdefs.h >>conftest.$ac_ext
8045 cat >>conftest.$ac_ext <<_ACEOF
8046 /* end confdefs.h.  */
8047 $ac_includes_default
8048 typedef off_t ac__type_new_;
8049 int
8050 main ()
8051 {
8052 if ((ac__type_new_ *) 0)
8053   return 0;
8054 if (sizeof (ac__type_new_))
8055   return 0;
8056   ;
8057   return 0;
8058 }
8059 _ACEOF
8060 rm -rf conftest.$ac_objext
8061 if { (ac_try="$ac_compile"
8062 case "(($ac_try" in
8063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8064   *) ac_try_echo=$ac_try;;
8065 esac
8066 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8067   (eval "$ac_compile") 2>conftest.er1
8068   ac_status=$?
8069   grep -v '^ *+' conftest.er1 >conftest.err
8070   rm -rf conftest.er1
8071   cat conftest.err >&5
8072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073   (exit $ac_status); } && {
8074          test -z "$ac_c_werror_flag" ||
8075          test ! -s conftest.err
8076        } && test -s conftest.$ac_objext; then
8077   ac_cv_type_off_t=yes
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 sed 's/^/| /' conftest.$ac_ext >&5
8081
8082         ac_cv_type_off_t=no
8083 fi
8084
8085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8086 fi
8087 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8088 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8089 if test $ac_cv_type_off_t = yes; then
8090   :
8091 else
8092
8093 cat >>confdefs.h <<_ACEOF
8094 #define off_t long int
8095 _ACEOF
8096
8097 fi
8098
8099 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8100 # for constant arguments.  Useless!
8101 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8102 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8103 if test "${ac_cv_working_alloca_h+set}" = set; then
8104   echo $ECHO_N "(cached) $ECHO_C" >&6
8105 else
8106   cat >conftest.$ac_ext <<_ACEOF
8107 /* confdefs.h.  */
8108 _ACEOF
8109 cat confdefs.h >>conftest.$ac_ext
8110 cat >>conftest.$ac_ext <<_ACEOF
8111 /* end confdefs.h.  */
8112 #include <alloca.h>
8113 int
8114 main ()
8115 {
8116 char *p = (char *) alloca (2 * sizeof (int));
8117                           if (p) return 0;
8118   ;
8119   return 0;
8120 }
8121 _ACEOF
8122 rm -rf conftest.$ac_objext conftest$ac_exeext
8123 if { (ac_try="$ac_link"
8124 case "(($ac_try" in
8125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8126   *) ac_try_echo=$ac_try;;
8127 esac
8128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8129   (eval "$ac_link") 2>conftest.er1
8130   ac_status=$?
8131   grep -v '^ *+' conftest.er1 >conftest.err
8132   rm -rf conftest.er1
8133   cat conftest.err >&5
8134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135   (exit $ac_status); } && {
8136          test -z "$ac_c_werror_flag" ||
8137          test ! -s conftest.err
8138        } && test -s conftest$ac_exeext &&
8139        $as_test_x conftest$ac_exeext; then
8140   ac_cv_working_alloca_h=yes
8141 else
8142   echo "$as_me: failed program was:" >&5
8143 sed 's/^/| /' conftest.$ac_ext >&5
8144
8145         ac_cv_working_alloca_h=no
8146 fi
8147
8148 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8149       conftest$ac_exeext conftest.$ac_ext
8150 fi
8151 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8152 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8153 if test $ac_cv_working_alloca_h = yes; then
8154
8155 cat >>confdefs.h <<\_ACEOF
8156 #define HAVE_ALLOCA_H 1
8157 _ACEOF
8158
8159 fi
8160
8161 { echo "$as_me:$LINENO: checking for alloca" >&5
8162 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8163 if test "${ac_cv_func_alloca_works+set}" = set; then
8164   echo $ECHO_N "(cached) $ECHO_C" >&6
8165 else
8166   cat >conftest.$ac_ext <<_ACEOF
8167 /* confdefs.h.  */
8168 _ACEOF
8169 cat confdefs.h >>conftest.$ac_ext
8170 cat >>conftest.$ac_ext <<_ACEOF
8171 /* end confdefs.h.  */
8172 #ifdef __GNUC__
8173 # define alloca __builtin_alloca
8174 #else
8175 # ifdef _MSC_VER
8176 #  include <malloc.h>
8177 #  define alloca _alloca
8178 # else
8179 #  ifdef HAVE_ALLOCA_H
8180 #   include <alloca.h>
8181 #  else
8182 #   ifdef _AIX
8183  #pragma alloca
8184 #   else
8185 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8186 char *alloca ();
8187 #    endif
8188 #   endif
8189 #  endif
8190 # endif
8191 #endif
8192
8193 int
8194 main ()
8195 {
8196 char *p = (char *) alloca (1);
8197                                     if (p) return 0;
8198   ;
8199   return 0;
8200 }
8201 _ACEOF
8202 rm -rf conftest.$ac_objext conftest$ac_exeext
8203 if { (ac_try="$ac_link"
8204 case "(($ac_try" in
8205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206   *) ac_try_echo=$ac_try;;
8207 esac
8208 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8209   (eval "$ac_link") 2>conftest.er1
8210   ac_status=$?
8211   grep -v '^ *+' conftest.er1 >conftest.err
8212   rm -rf conftest.er1
8213   cat conftest.err >&5
8214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215   (exit $ac_status); } && {
8216          test -z "$ac_c_werror_flag" ||
8217          test ! -s conftest.err
8218        } && test -s conftest$ac_exeext &&
8219        $as_test_x conftest$ac_exeext; then
8220   ac_cv_func_alloca_works=yes
8221 else
8222   echo "$as_me: failed program was:" >&5
8223 sed 's/^/| /' conftest.$ac_ext >&5
8224
8225         ac_cv_func_alloca_works=no
8226 fi
8227
8228 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8229       conftest$ac_exeext conftest.$ac_ext
8230 fi
8231 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8232 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8233
8234 if test $ac_cv_func_alloca_works = yes; then
8235
8236 cat >>confdefs.h <<\_ACEOF
8237 #define HAVE_ALLOCA 1
8238 _ACEOF
8239
8240 else
8241   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8242 # that cause trouble.  Some versions do not even contain alloca or
8243 # contain a buggy version.  If you still want to use their alloca,
8244 # use ar to extract alloca.o from them instead of compiling alloca.c.
8245
8246 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8247
8248 cat >>confdefs.h <<\_ACEOF
8249 #define C_ALLOCA 1
8250 _ACEOF
8251
8252
8253 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8254 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8255 if test "${ac_cv_os_cray+set}" = set; then
8256   echo $ECHO_N "(cached) $ECHO_C" >&6
8257 else
8258   cat >conftest.$ac_ext <<_ACEOF
8259 /* confdefs.h.  */
8260 _ACEOF
8261 cat confdefs.h >>conftest.$ac_ext
8262 cat >>conftest.$ac_ext <<_ACEOF
8263 /* end confdefs.h.  */
8264 #if defined CRAY && ! defined CRAY2
8265 webecray
8266 #else
8267 wenotbecray
8268 #endif
8269
8270 _ACEOF
8271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8272   $EGREP "webecray" >/dev/null 2>&1; then
8273   ac_cv_os_cray=yes
8274 else
8275   ac_cv_os_cray=no
8276 fi
8277 rm -f -r conftest*
8278
8279 fi
8280 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8281 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8282 if test $ac_cv_os_cray = yes; then
8283   for ac_func in _getb67 GETB67 getb67; do
8284     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8285 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8286 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8287 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8288   echo $ECHO_N "(cached) $ECHO_C" >&6
8289 else
8290   cat >conftest.$ac_ext <<_ACEOF
8291 /* confdefs.h.  */
8292 _ACEOF
8293 cat confdefs.h >>conftest.$ac_ext
8294 cat >>conftest.$ac_ext <<_ACEOF
8295 /* end confdefs.h.  */
8296 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8297    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8298 #define $ac_func innocuous_$ac_func
8299
8300 /* System header to define __stub macros and hopefully few prototypes,
8301     which can conflict with char $ac_func (); below.
8302     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8303     <limits.h> exists even on freestanding compilers.  */
8304
8305 #ifdef __STDC__
8306 # include <limits.h>
8307 #else
8308 # include <assert.h>
8309 #endif
8310
8311 #undef $ac_func
8312
8313 /* Override any GCC internal prototype to avoid an error.
8314    Use char because int might match the return type of a GCC
8315    builtin and then its argument prototype would still apply.  */
8316 #ifdef __cplusplus
8317 extern "C"
8318 #endif
8319 char $ac_func ();
8320 /* The GNU C library defines this for functions which it implements
8321     to always fail with ENOSYS.  Some functions are actually named
8322     something starting with __ and the normal name is an alias.  */
8323 #if defined __stub_$ac_func || defined __stub___$ac_func
8324 choke me
8325 #endif
8326
8327 int
8328 main ()
8329 {
8330 return $ac_func ();
8331   ;
8332   return 0;
8333 }
8334 _ACEOF
8335 rm -rf conftest.$ac_objext conftest$ac_exeext
8336 if { (ac_try="$ac_link"
8337 case "(($ac_try" in
8338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8339   *) ac_try_echo=$ac_try;;
8340 esac
8341 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8342   (eval "$ac_link") 2>conftest.er1
8343   ac_status=$?
8344   grep -v '^ *+' conftest.er1 >conftest.err
8345   rm -rf conftest.er1
8346   cat conftest.err >&5
8347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348   (exit $ac_status); } && {
8349          test -z "$ac_c_werror_flag" ||
8350          test ! -s conftest.err
8351        } && test -s conftest$ac_exeext &&
8352        $as_test_x conftest$ac_exeext; then
8353   eval "$as_ac_var=yes"
8354 else
8355   echo "$as_me: failed program was:" >&5
8356 sed 's/^/| /' conftest.$ac_ext >&5
8357
8358         eval "$as_ac_var=no"
8359 fi
8360
8361 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8362       conftest$ac_exeext conftest.$ac_ext
8363 fi
8364 ac_res=`eval echo '${'$as_ac_var'}'`
8365                { echo "$as_me:$LINENO: result: $ac_res" >&5
8366 echo "${ECHO_T}$ac_res" >&6; }
8367 if test `eval echo '${'$as_ac_var'}'` = yes; then
8368
8369 cat >>confdefs.h <<_ACEOF
8370 #define CRAY_STACKSEG_END $ac_func
8371 _ACEOF
8372
8373     break
8374 fi
8375
8376   done
8377 fi
8378
8379 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8380 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8381 if test "${ac_cv_c_stack_direction+set}" = set; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   if test "$cross_compiling" = yes; then
8385   ac_cv_c_stack_direction=0
8386 else
8387   cat >conftest.$ac_ext <<_ACEOF
8388 /* confdefs.h.  */
8389 _ACEOF
8390 cat confdefs.h >>conftest.$ac_ext
8391 cat >>conftest.$ac_ext <<_ACEOF
8392 /* end confdefs.h.  */
8393 $ac_includes_default
8394 int
8395 find_stack_direction ()
8396 {
8397   static char *addr = 0;
8398   auto char dummy;
8399   if (addr == 0)
8400     {
8401       addr = &dummy;
8402       return find_stack_direction ();
8403     }
8404   else
8405     return (&dummy > addr) ? 1 : -1;
8406 }
8407
8408 int
8409 main ()
8410 {
8411   return find_stack_direction () < 0;
8412 }
8413 _ACEOF
8414 rm -rf conftest$ac_exeext
8415 if { (ac_try="$ac_link"
8416 case "(($ac_try" in
8417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8418   *) ac_try_echo=$ac_try;;
8419 esac
8420 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8421   (eval "$ac_link") 2>&5
8422   ac_status=$?
8423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8425   { (case "(($ac_try" in
8426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8427   *) ac_try_echo=$ac_try;;
8428 esac
8429 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8430   (eval "$ac_try") 2>&5
8431   ac_status=$?
8432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433   (exit $ac_status); }; }; then
8434   ac_cv_c_stack_direction=1
8435 else
8436   echo "$as_me: program exited with status $ac_status" >&5
8437 echo "$as_me: failed program was:" >&5
8438 sed 's/^/| /' conftest.$ac_ext >&5
8439
8440 ( exit $ac_status )
8441 ac_cv_c_stack_direction=-1
8442 fi
8443 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8444 fi
8445
8446
8447 fi
8448 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8449 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8450
8451 cat >>confdefs.h <<_ACEOF
8452 #define STACK_DIRECTION $ac_cv_c_stack_direction
8453 _ACEOF
8454
8455
8456 fi
8457
8458
8459
8460 for ac_header in stdlib.h unistd.h
8461 do
8462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8463 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8464   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8466 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8467   echo $ECHO_N "(cached) $ECHO_C" >&6
8468 fi
8469 ac_res=`eval echo '${'$as_ac_Header'}'`
8470                { echo "$as_me:$LINENO: result: $ac_res" >&5
8471 echo "${ECHO_T}$ac_res" >&6; }
8472 else
8473   # Is the header compilable?
8474 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8475 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8476 cat >conftest.$ac_ext <<_ACEOF
8477 /* confdefs.h.  */
8478 _ACEOF
8479 cat confdefs.h >>conftest.$ac_ext
8480 cat >>conftest.$ac_ext <<_ACEOF
8481 /* end confdefs.h.  */
8482 $ac_includes_default
8483 #include <$ac_header>
8484 _ACEOF
8485 rm -rf conftest.$ac_objext
8486 if { (ac_try="$ac_compile"
8487 case "(($ac_try" in
8488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8489   *) ac_try_echo=$ac_try;;
8490 esac
8491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8492   (eval "$ac_compile") 2>conftest.er1
8493   ac_status=$?
8494   grep -v '^ *+' conftest.er1 >conftest.err
8495   rm -rf conftest.er1
8496   cat conftest.err >&5
8497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8498   (exit $ac_status); } && {
8499          test -z "$ac_c_werror_flag" ||
8500          test ! -s conftest.err
8501        } && test -s conftest.$ac_objext; then
8502   ac_header_compiler=yes
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 sed 's/^/| /' conftest.$ac_ext >&5
8506
8507         ac_header_compiler=no
8508 fi
8509
8510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8511 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8512 echo "${ECHO_T}$ac_header_compiler" >&6; }
8513
8514 # Is the header present?
8515 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8516 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8517 cat >conftest.$ac_ext <<_ACEOF
8518 /* confdefs.h.  */
8519 _ACEOF
8520 cat confdefs.h >>conftest.$ac_ext
8521 cat >>conftest.$ac_ext <<_ACEOF
8522 /* end confdefs.h.  */
8523 #include <$ac_header>
8524 _ACEOF
8525 if { (ac_try="$ac_cpp conftest.$ac_ext"
8526 case "(($ac_try" in
8527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8528   *) ac_try_echo=$ac_try;;
8529 esac
8530 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8531   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8532   ac_status=$?
8533   grep -v '^ *+' conftest.er1 >conftest.err
8534   rm -rf conftest.er1
8535   cat conftest.err >&5
8536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537   (exit $ac_status); } >/dev/null && {
8538          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8539          test ! -s conftest.err
8540        }; then
8541   ac_header_preproc=yes
8542 else
8543   echo "$as_me: failed program was:" >&5
8544 sed 's/^/| /' conftest.$ac_ext >&5
8545
8546   ac_header_preproc=no
8547 fi
8548
8549 rm -rf conftest.err conftest.$ac_ext
8550 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8551 echo "${ECHO_T}$ac_header_preproc" >&6; }
8552
8553 # So?  What about this header?
8554 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8555   yes:no: )
8556     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8557 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8558     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8559 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8560     ac_header_preproc=yes
8561     ;;
8562   no:yes:* )
8563     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8564 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8565     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8566 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8567     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8568 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8569     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8570 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8571     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8572 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8573     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8574 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8575
8576     ;;
8577 esac
8578 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8580 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8581   echo $ECHO_N "(cached) $ECHO_C" >&6
8582 else
8583   eval "$as_ac_Header=\$ac_header_preproc"
8584 fi
8585 ac_res=`eval echo '${'$as_ac_Header'}'`
8586                { echo "$as_me:$LINENO: result: $ac_res" >&5
8587 echo "${ECHO_T}$ac_res" >&6; }
8588
8589 fi
8590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8591   cat >>confdefs.h <<_ACEOF
8592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8593 _ACEOF
8594
8595 fi
8596
8597 done
8598
8599
8600 for ac_func in getpagesize
8601 do
8602 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8603 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8604 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8605 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8606   echo $ECHO_N "(cached) $ECHO_C" >&6
8607 else
8608   cat >conftest.$ac_ext <<_ACEOF
8609 /* confdefs.h.  */
8610 _ACEOF
8611 cat confdefs.h >>conftest.$ac_ext
8612 cat >>conftest.$ac_ext <<_ACEOF
8613 /* end confdefs.h.  */
8614 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8615    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8616 #define $ac_func innocuous_$ac_func
8617
8618 /* System header to define __stub macros and hopefully few prototypes,
8619     which can conflict with char $ac_func (); below.
8620     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8621     <limits.h> exists even on freestanding compilers.  */
8622
8623 #ifdef __STDC__
8624 # include <limits.h>
8625 #else
8626 # include <assert.h>
8627 #endif
8628
8629 #undef $ac_func
8630
8631 /* Override any GCC internal prototype to avoid an error.
8632    Use char because int might match the return type of a GCC
8633    builtin and then its argument prototype would still apply.  */
8634 #ifdef __cplusplus
8635 extern "C"
8636 #endif
8637 char $ac_func ();
8638 /* The GNU C library defines this for functions which it implements
8639     to always fail with ENOSYS.  Some functions are actually named
8640     something starting with __ and the normal name is an alias.  */
8641 #if defined __stub_$ac_func || defined __stub___$ac_func
8642 choke me
8643 #endif
8644
8645 int
8646 main ()
8647 {
8648 return $ac_func ();
8649   ;
8650   return 0;
8651 }
8652 _ACEOF
8653 rm -rf conftest.$ac_objext conftest$ac_exeext
8654 if { (ac_try="$ac_link"
8655 case "(($ac_try" in
8656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8657   *) ac_try_echo=$ac_try;;
8658 esac
8659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8660   (eval "$ac_link") 2>conftest.er1
8661   ac_status=$?
8662   grep -v '^ *+' conftest.er1 >conftest.err
8663   rm -rf conftest.er1
8664   cat conftest.err >&5
8665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666   (exit $ac_status); } && {
8667          test -z "$ac_c_werror_flag" ||
8668          test ! -s conftest.err
8669        } && test -s conftest$ac_exeext &&
8670        $as_test_x conftest$ac_exeext; then
8671   eval "$as_ac_var=yes"
8672 else
8673   echo "$as_me: failed program was:" >&5
8674 sed 's/^/| /' conftest.$ac_ext >&5
8675
8676         eval "$as_ac_var=no"
8677 fi
8678
8679 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8680       conftest$ac_exeext conftest.$ac_ext
8681 fi
8682 ac_res=`eval echo '${'$as_ac_var'}'`
8683                { echo "$as_me:$LINENO: result: $ac_res" >&5
8684 echo "${ECHO_T}$ac_res" >&6; }
8685 if test `eval echo '${'$as_ac_var'}'` = yes; then
8686   cat >>confdefs.h <<_ACEOF
8687 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8688 _ACEOF
8689
8690 fi
8691 done
8692
8693 { echo "$as_me:$LINENO: checking for working mmap" >&5
8694 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8695 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8696   echo $ECHO_N "(cached) $ECHO_C" >&6
8697 else
8698   if test "$cross_compiling" = yes; then
8699   ac_cv_func_mmap_fixed_mapped=no
8700 else
8701   cat >conftest.$ac_ext <<_ACEOF
8702 /* confdefs.h.  */
8703 _ACEOF
8704 cat confdefs.h >>conftest.$ac_ext
8705 cat >>conftest.$ac_ext <<_ACEOF
8706 /* end confdefs.h.  */
8707 $ac_includes_default
8708 /* malloc might have been renamed as rpl_malloc. */
8709 #undef malloc
8710
8711 /* Thanks to Mike Haertel and Jim Avera for this test.
8712    Here is a matrix of mmap possibilities:
8713         mmap private not fixed
8714         mmap private fixed at somewhere currently unmapped
8715         mmap private fixed at somewhere already mapped
8716         mmap shared not fixed
8717         mmap shared fixed at somewhere currently unmapped
8718         mmap shared fixed at somewhere already mapped
8719    For private mappings, we should verify that changes cannot be read()
8720    back from the file, nor mmap's back from the file at a different
8721    address.  (There have been systems where private was not correctly
8722    implemented like the infamous i386 svr4.0, and systems where the
8723    VM page cache was not coherent with the file system buffer cache
8724    like early versions of FreeBSD and possibly contemporary NetBSD.)
8725    For shared mappings, we should conversely verify that changes get
8726    propagated back to all the places they're supposed to be.
8727
8728    Grep wants private fixed already mapped.
8729    The main things grep needs to know about mmap are:
8730    * does it exist and is it safe to write into the mmap'd area
8731    * how to use it (BSD variants)  */
8732
8733 #include <fcntl.h>
8734 #include <sys/mman.h>
8735
8736 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8737 char *malloc ();
8738 #endif
8739
8740 /* This mess was copied from the GNU getpagesize.h.  */
8741 #ifndef HAVE_GETPAGESIZE
8742 /* Assume that all systems that can run configure have sys/param.h.  */
8743 # ifndef HAVE_SYS_PARAM_H
8744 #  define HAVE_SYS_PARAM_H 1
8745 # endif
8746
8747 # ifdef _SC_PAGESIZE
8748 #  define getpagesize() sysconf(_SC_PAGESIZE)
8749 # else /* no _SC_PAGESIZE */
8750 #  ifdef HAVE_SYS_PARAM_H
8751 #   include <sys/param.h>
8752 #   ifdef EXEC_PAGESIZE
8753 #    define getpagesize() EXEC_PAGESIZE
8754 #   else /* no EXEC_PAGESIZE */
8755 #    ifdef NBPG
8756 #     define getpagesize() NBPG * CLSIZE
8757 #     ifndef CLSIZE
8758 #      define CLSIZE 1
8759 #     endif /* no CLSIZE */
8760 #    else /* no NBPG */
8761 #     ifdef NBPC
8762 #      define getpagesize() NBPC
8763 #     else /* no NBPC */
8764 #      ifdef PAGESIZE
8765 #       define getpagesize() PAGESIZE
8766 #      endif /* PAGESIZE */
8767 #     endif /* no NBPC */
8768 #    endif /* no NBPG */
8769 #   endif /* no EXEC_PAGESIZE */
8770 #  else /* no HAVE_SYS_PARAM_H */
8771 #   define getpagesize() 8192   /* punt totally */
8772 #  endif /* no HAVE_SYS_PARAM_H */
8773 # endif /* no _SC_PAGESIZE */
8774
8775 #endif /* no HAVE_GETPAGESIZE */
8776
8777 int
8778 main ()
8779 {
8780   char *data, *data2, *data3;
8781   int i, pagesize;
8782   int fd;
8783
8784   pagesize = getpagesize ();
8785
8786   /* First, make a file with some known garbage in it. */
8787   data = (char *) malloc (pagesize);
8788   if (!data)
8789     return 1;
8790   for (i = 0; i < pagesize; ++i)
8791     *(data + i) = rand ();
8792   umask (0);
8793   fd = creat ("conftest.mmap", 0600);
8794   if (fd < 0)
8795     return 1;
8796   if (write (fd, data, pagesize) != pagesize)
8797     return 1;
8798   close (fd);
8799
8800   /* Next, try to mmap the file at a fixed address which already has
8801      something else allocated at it.  If we can, also make sure that
8802      we see the same garbage.  */
8803   fd = open ("conftest.mmap", O_RDWR);
8804   if (fd < 0)
8805     return 1;
8806   data2 = (char *) malloc (2 * pagesize);
8807   if (!data2)
8808     return 1;
8809   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8810   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8811                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8812     return 1;
8813   for (i = 0; i < pagesize; ++i)
8814     if (*(data + i) != *(data2 + i))
8815       return 1;
8816
8817   /* Finally, make sure that changes to the mapped area do not
8818      percolate back to the file as seen by read().  (This is a bug on
8819      some variants of i386 svr4.0.)  */
8820   for (i = 0; i < pagesize; ++i)
8821     *(data2 + i) = *(data2 + i) + 1;
8822   data3 = (char *) malloc (pagesize);
8823   if (!data3)
8824     return 1;
8825   if (read (fd, data3, pagesize) != pagesize)
8826     return 1;
8827   for (i = 0; i < pagesize; ++i)
8828     if (*(data + i) != *(data3 + i))
8829       return 1;
8830   close (fd);
8831   return 0;
8832 }
8833 _ACEOF
8834 rm -rf conftest$ac_exeext
8835 if { (ac_try="$ac_link"
8836 case "(($ac_try" in
8837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8838   *) ac_try_echo=$ac_try;;
8839 esac
8840 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8841   (eval "$ac_link") 2>&5
8842   ac_status=$?
8843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8844   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8845   { (case "(($ac_try" in
8846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8847   *) ac_try_echo=$ac_try;;
8848 esac
8849 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8850   (eval "$ac_try") 2>&5
8851   ac_status=$?
8852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8853   (exit $ac_status); }; }; then
8854   ac_cv_func_mmap_fixed_mapped=yes
8855 else
8856   echo "$as_me: program exited with status $ac_status" >&5
8857 echo "$as_me: failed program was:" >&5
8858 sed 's/^/| /' conftest.$ac_ext >&5
8859
8860 ( exit $ac_status )
8861 ac_cv_func_mmap_fixed_mapped=no
8862 fi
8863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8864 fi
8865
8866
8867 fi
8868 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8869 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8870 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8871
8872 cat >>confdefs.h <<\_ACEOF
8873 #define HAVE_MMAP 1
8874 _ACEOF
8875
8876 fi
8877 rm -rf conftest.mmap
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8889 unistd.h sys/param.h
8890 do
8891 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8892 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8893   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8894 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8895 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8896   echo $ECHO_N "(cached) $ECHO_C" >&6
8897 fi
8898 ac_res=`eval echo '${'$as_ac_Header'}'`
8899                { echo "$as_me:$LINENO: result: $ac_res" >&5
8900 echo "${ECHO_T}$ac_res" >&6; }
8901 else
8902   # Is the header compilable?
8903 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8904 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8905 cat >conftest.$ac_ext <<_ACEOF
8906 /* confdefs.h.  */
8907 _ACEOF
8908 cat confdefs.h >>conftest.$ac_ext
8909 cat >>conftest.$ac_ext <<_ACEOF
8910 /* end confdefs.h.  */
8911 $ac_includes_default
8912 #include <$ac_header>
8913 _ACEOF
8914 rm -rf conftest.$ac_objext
8915 if { (ac_try="$ac_compile"
8916 case "(($ac_try" in
8917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8918   *) ac_try_echo=$ac_try;;
8919 esac
8920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8921   (eval "$ac_compile") 2>conftest.er1
8922   ac_status=$?
8923   grep -v '^ *+' conftest.er1 >conftest.err
8924   rm -rf conftest.er1
8925   cat conftest.err >&5
8926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927   (exit $ac_status); } && {
8928          test -z "$ac_c_werror_flag" ||
8929          test ! -s conftest.err
8930        } && test -s conftest.$ac_objext; then
8931   ac_header_compiler=yes
8932 else
8933   echo "$as_me: failed program was:" >&5
8934 sed 's/^/| /' conftest.$ac_ext >&5
8935
8936         ac_header_compiler=no
8937 fi
8938
8939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8940 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8941 echo "${ECHO_T}$ac_header_compiler" >&6; }
8942
8943 # Is the header present?
8944 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8945 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8946 cat >conftest.$ac_ext <<_ACEOF
8947 /* confdefs.h.  */
8948 _ACEOF
8949 cat confdefs.h >>conftest.$ac_ext
8950 cat >>conftest.$ac_ext <<_ACEOF
8951 /* end confdefs.h.  */
8952 #include <$ac_header>
8953 _ACEOF
8954 if { (ac_try="$ac_cpp conftest.$ac_ext"
8955 case "(($ac_try" in
8956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957   *) ac_try_echo=$ac_try;;
8958 esac
8959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8960   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8961   ac_status=$?
8962   grep -v '^ *+' conftest.er1 >conftest.err
8963   rm -rf conftest.er1
8964   cat conftest.err >&5
8965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966   (exit $ac_status); } >/dev/null && {
8967          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8968          test ! -s conftest.err
8969        }; then
8970   ac_header_preproc=yes
8971 else
8972   echo "$as_me: failed program was:" >&5
8973 sed 's/^/| /' conftest.$ac_ext >&5
8974
8975   ac_header_preproc=no
8976 fi
8977
8978 rm -rf conftest.err conftest.$ac_ext
8979 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8980 echo "${ECHO_T}$ac_header_preproc" >&6; }
8981
8982 # So?  What about this header?
8983 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8984   yes:no: )
8985     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8986 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8987     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8988 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8989     ac_header_preproc=yes
8990     ;;
8991   no:yes:* )
8992     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8993 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8994     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8995 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8996     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8997 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8998     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8999 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9000     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9001 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9002     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9003 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9004
9005     ;;
9006 esac
9007 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9008 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9009 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9010   echo $ECHO_N "(cached) $ECHO_C" >&6
9011 else
9012   eval "$as_ac_Header=\$ac_header_preproc"
9013 fi
9014 ac_res=`eval echo '${'$as_ac_Header'}'`
9015                { echo "$as_me:$LINENO: result: $ac_res" >&5
9016 echo "${ECHO_T}$ac_res" >&6; }
9017
9018 fi
9019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9020   cat >>confdefs.h <<_ACEOF
9021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9022 _ACEOF
9023
9024 fi
9025
9026 done
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9040 strdup __argz_count __argz_stringify __argz_next
9041 do
9042 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9043 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9044 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9045 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9046   echo $ECHO_N "(cached) $ECHO_C" >&6
9047 else
9048   cat >conftest.$ac_ext <<_ACEOF
9049 /* confdefs.h.  */
9050 _ACEOF
9051 cat confdefs.h >>conftest.$ac_ext
9052 cat >>conftest.$ac_ext <<_ACEOF
9053 /* end confdefs.h.  */
9054 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9055    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9056 #define $ac_func innocuous_$ac_func
9057
9058 /* System header to define __stub macros and hopefully few prototypes,
9059     which can conflict with char $ac_func (); below.
9060     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9061     <limits.h> exists even on freestanding compilers.  */
9062
9063 #ifdef __STDC__
9064 # include <limits.h>
9065 #else
9066 # include <assert.h>
9067 #endif
9068
9069 #undef $ac_func
9070
9071 /* Override any GCC internal prototype to avoid an error.
9072    Use char because int might match the return type of a GCC
9073    builtin and then its argument prototype would still apply.  */
9074 #ifdef __cplusplus
9075 extern "C"
9076 #endif
9077 char $ac_func ();
9078 /* The GNU C library defines this for functions which it implements
9079     to always fail with ENOSYS.  Some functions are actually named
9080     something starting with __ and the normal name is an alias.  */
9081 #if defined __stub_$ac_func || defined __stub___$ac_func
9082 choke me
9083 #endif
9084
9085 int
9086 main ()
9087 {
9088 return $ac_func ();
9089   ;
9090   return 0;
9091 }
9092 _ACEOF
9093 rm -rf conftest.$ac_objext conftest$ac_exeext
9094 if { (ac_try="$ac_link"
9095 case "(($ac_try" in
9096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9097   *) ac_try_echo=$ac_try;;
9098 esac
9099 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9100   (eval "$ac_link") 2>conftest.er1
9101   ac_status=$?
9102   grep -v '^ *+' conftest.er1 >conftest.err
9103   rm -rf conftest.er1
9104   cat conftest.err >&5
9105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106   (exit $ac_status); } && {
9107          test -z "$ac_c_werror_flag" ||
9108          test ! -s conftest.err
9109        } && test -s conftest$ac_exeext &&
9110        $as_test_x conftest$ac_exeext; then
9111   eval "$as_ac_var=yes"
9112 else
9113   echo "$as_me: failed program was:" >&5
9114 sed 's/^/| /' conftest.$ac_ext >&5
9115
9116         eval "$as_ac_var=no"
9117 fi
9118
9119 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9120       conftest$ac_exeext conftest.$ac_ext
9121 fi
9122 ac_res=`eval echo '${'$as_ac_var'}'`
9123                { echo "$as_me:$LINENO: result: $ac_res" >&5
9124 echo "${ECHO_T}$ac_res" >&6; }
9125 if test `eval echo '${'$as_ac_var'}'` = yes; then
9126   cat >>confdefs.h <<_ACEOF
9127 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9128 _ACEOF
9129
9130 fi
9131 done
9132
9133
9134    if test $ac_cv_header_locale_h = yes; then
9135     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9136 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9137 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9138   echo $ECHO_N "(cached) $ECHO_C" >&6
9139 else
9140   cat >conftest.$ac_ext <<_ACEOF
9141 /* confdefs.h.  */
9142 _ACEOF
9143 cat confdefs.h >>conftest.$ac_ext
9144 cat >>conftest.$ac_ext <<_ACEOF
9145 /* end confdefs.h.  */
9146 #include <locale.h>
9147 int
9148 main ()
9149 {
9150 return LC_MESSAGES
9151   ;
9152   return 0;
9153 }
9154 _ACEOF
9155 rm -rf conftest.$ac_objext conftest$ac_exeext
9156 if { (ac_try="$ac_link"
9157 case "(($ac_try" in
9158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159   *) ac_try_echo=$ac_try;;
9160 esac
9161 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9162   (eval "$ac_link") 2>conftest.er1
9163   ac_status=$?
9164   grep -v '^ *+' conftest.er1 >conftest.err
9165   rm -rf conftest.er1
9166   cat conftest.err >&5
9167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168   (exit $ac_status); } && {
9169          test -z "$ac_c_werror_flag" ||
9170          test ! -s conftest.err
9171        } && test -s conftest$ac_exeext &&
9172        $as_test_x conftest$ac_exeext; then
9173   am_cv_val_LC_MESSAGES=yes
9174 else
9175   echo "$as_me: failed program was:" >&5
9176 sed 's/^/| /' conftest.$ac_ext >&5
9177
9178         am_cv_val_LC_MESSAGES=no
9179 fi
9180
9181 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9182       conftest$ac_exeext conftest.$ac_ext
9183 fi
9184 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9185 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9186     if test $am_cv_val_LC_MESSAGES = yes; then
9187
9188 cat >>confdefs.h <<\_ACEOF
9189 #define HAVE_LC_MESSAGES 1
9190 _ACEOF
9191
9192     fi
9193   fi
9194      USE_NLS=yes
9195
9196
9197         nls_cv_force_use_gnu_gettext="no"
9198
9199     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9200     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9201                               nls_cv_header_intl=
9202       nls_cv_header_libgt=
9203       CATOBJEXT=NONE
9204
9205       if test "${ac_cv_header_libintl_h+set}" = set; then
9206   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9207 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9208 if test "${ac_cv_header_libintl_h+set}" = set; then
9209   echo $ECHO_N "(cached) $ECHO_C" >&6
9210 fi
9211 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9212 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9213 else
9214   # Is the header compilable?
9215 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9216 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9217 cat >conftest.$ac_ext <<_ACEOF
9218 /* confdefs.h.  */
9219 _ACEOF
9220 cat confdefs.h >>conftest.$ac_ext
9221 cat >>conftest.$ac_ext <<_ACEOF
9222 /* end confdefs.h.  */
9223 $ac_includes_default
9224 #include <libintl.h>
9225 _ACEOF
9226 rm -rf conftest.$ac_objext
9227 if { (ac_try="$ac_compile"
9228 case "(($ac_try" in
9229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230   *) ac_try_echo=$ac_try;;
9231 esac
9232 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233   (eval "$ac_compile") 2>conftest.er1
9234   ac_status=$?
9235   grep -v '^ *+' conftest.er1 >conftest.err
9236   rm -rf conftest.er1
9237   cat conftest.err >&5
9238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9239   (exit $ac_status); } && {
9240          test -z "$ac_c_werror_flag" ||
9241          test ! -s conftest.err
9242        } && test -s conftest.$ac_objext; then
9243   ac_header_compiler=yes
9244 else
9245   echo "$as_me: failed program was:" >&5
9246 sed 's/^/| /' conftest.$ac_ext >&5
9247
9248         ac_header_compiler=no
9249 fi
9250
9251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9252 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9253 echo "${ECHO_T}$ac_header_compiler" >&6; }
9254
9255 # Is the header present?
9256 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9257 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9258 cat >conftest.$ac_ext <<_ACEOF
9259 /* confdefs.h.  */
9260 _ACEOF
9261 cat confdefs.h >>conftest.$ac_ext
9262 cat >>conftest.$ac_ext <<_ACEOF
9263 /* end confdefs.h.  */
9264 #include <libintl.h>
9265 _ACEOF
9266 if { (ac_try="$ac_cpp conftest.$ac_ext"
9267 case "(($ac_try" in
9268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9269   *) ac_try_echo=$ac_try;;
9270 esac
9271 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9272   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9273   ac_status=$?
9274   grep -v '^ *+' conftest.er1 >conftest.err
9275   rm -rf conftest.er1
9276   cat conftest.err >&5
9277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278   (exit $ac_status); } >/dev/null && {
9279          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9280          test ! -s conftest.err
9281        }; then
9282   ac_header_preproc=yes
9283 else
9284   echo "$as_me: failed program was:" >&5
9285 sed 's/^/| /' conftest.$ac_ext >&5
9286
9287   ac_header_preproc=no
9288 fi
9289
9290 rm -rf conftest.err conftest.$ac_ext
9291 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9292 echo "${ECHO_T}$ac_header_preproc" >&6; }
9293
9294 # So?  What about this header?
9295 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9296   yes:no: )
9297     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9298 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9299     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9300 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9301     ac_header_preproc=yes
9302     ;;
9303   no:yes:* )
9304     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9305 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9306     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9307 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9308     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9309 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9310     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9311 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9312     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9313 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9314     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9315 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9316
9317     ;;
9318 esac
9319 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9320 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9321 if test "${ac_cv_header_libintl_h+set}" = set; then
9322   echo $ECHO_N "(cached) $ECHO_C" >&6
9323 else
9324   ac_cv_header_libintl_h=$ac_header_preproc
9325 fi
9326 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9327 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9328
9329 fi
9330 if test $ac_cv_header_libintl_h = yes; then
9331   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9332 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9333 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9334   echo $ECHO_N "(cached) $ECHO_C" >&6
9335 else
9336   cat >conftest.$ac_ext <<_ACEOF
9337 /* confdefs.h.  */
9338 _ACEOF
9339 cat confdefs.h >>conftest.$ac_ext
9340 cat >>conftest.$ac_ext <<_ACEOF
9341 /* end confdefs.h.  */
9342 #include <libintl.h>
9343 int
9344 main ()
9345 {
9346 return (int) dgettext ("","")
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 rm -rf conftest.$ac_objext conftest$ac_exeext
9352 if { (ac_try="$ac_link"
9353 case "(($ac_try" in
9354   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9355   *) ac_try_echo=$ac_try;;
9356 esac
9357 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9358   (eval "$ac_link") 2>conftest.er1
9359   ac_status=$?
9360   grep -v '^ *+' conftest.er1 >conftest.err
9361   rm -rf conftest.er1
9362   cat conftest.err >&5
9363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364   (exit $ac_status); } && {
9365          test -z "$ac_c_werror_flag" ||
9366          test ! -s conftest.err
9367        } && test -s conftest$ac_exeext &&
9368        $as_test_x conftest$ac_exeext; then
9369   gt_cv_func_dgettext_libc=yes
9370 else
9371   echo "$as_me: failed program was:" >&5
9372 sed 's/^/| /' conftest.$ac_ext >&5
9373
9374         gt_cv_func_dgettext_libc=no
9375 fi
9376
9377 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9378       conftest$ac_exeext conftest.$ac_ext
9379 fi
9380 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9381 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9382
9383           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9384             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9385 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9386 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9387   echo $ECHO_N "(cached) $ECHO_C" >&6
9388 else
9389   ac_check_lib_save_LIBS=$LIBS
9390 LIBS="-lintl  $LIBS"
9391 cat >conftest.$ac_ext <<_ACEOF
9392 /* confdefs.h.  */
9393 _ACEOF
9394 cat confdefs.h >>conftest.$ac_ext
9395 cat >>conftest.$ac_ext <<_ACEOF
9396 /* end confdefs.h.  */
9397
9398 /* Override any GCC internal prototype to avoid an error.
9399    Use char because int might match the return type of a GCC
9400    builtin and then its argument prototype would still apply.  */
9401 #ifdef __cplusplus
9402 extern "C"
9403 #endif
9404 char bindtextdomain ();
9405 int
9406 main ()
9407 {
9408 return bindtextdomain ();
9409   ;
9410   return 0;
9411 }
9412 _ACEOF
9413 rm -rf conftest.$ac_objext conftest$ac_exeext
9414 if { (ac_try="$ac_link"
9415 case "(($ac_try" in
9416   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9417   *) ac_try_echo=$ac_try;;
9418 esac
9419 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9420   (eval "$ac_link") 2>conftest.er1
9421   ac_status=$?
9422   grep -v '^ *+' conftest.er1 >conftest.err
9423   rm -rf conftest.er1
9424   cat conftest.err >&5
9425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9426   (exit $ac_status); } && {
9427          test -z "$ac_c_werror_flag" ||
9428          test ! -s conftest.err
9429        } && test -s conftest$ac_exeext &&
9430        $as_test_x conftest$ac_exeext; then
9431   ac_cv_lib_intl_bindtextdomain=yes
9432 else
9433   echo "$as_me: failed program was:" >&5
9434 sed 's/^/| /' conftest.$ac_ext >&5
9435
9436         ac_cv_lib_intl_bindtextdomain=no
9437 fi
9438
9439 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9440       conftest$ac_exeext conftest.$ac_ext
9441 LIBS=$ac_check_lib_save_LIBS
9442 fi
9443 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9444 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9445 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9446   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9447 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9448 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9449   echo $ECHO_N "(cached) $ECHO_C" >&6
9450 else
9451   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9452 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9453 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9454   echo $ECHO_N "(cached) $ECHO_C" >&6
9455 else
9456   ac_check_lib_save_LIBS=$LIBS
9457 LIBS="-lintl  $LIBS"
9458 cat >conftest.$ac_ext <<_ACEOF
9459 /* confdefs.h.  */
9460 _ACEOF
9461 cat confdefs.h >>conftest.$ac_ext
9462 cat >>conftest.$ac_ext <<_ACEOF
9463 /* end confdefs.h.  */
9464
9465 /* Override any GCC internal prototype to avoid an error.
9466    Use char because int might match the return type of a GCC
9467    builtin and then its argument prototype would still apply.  */
9468 #ifdef __cplusplus
9469 extern "C"
9470 #endif
9471 char dgettext ();
9472 int
9473 main ()
9474 {
9475 return dgettext ();
9476   ;
9477   return 0;
9478 }
9479 _ACEOF
9480 rm -rf conftest.$ac_objext conftest$ac_exeext
9481 if { (ac_try="$ac_link"
9482 case "(($ac_try" in
9483   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9484   *) ac_try_echo=$ac_try;;
9485 esac
9486 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9487   (eval "$ac_link") 2>conftest.er1
9488   ac_status=$?
9489   grep -v '^ *+' conftest.er1 >conftest.err
9490   rm -rf conftest.er1
9491   cat conftest.err >&5
9492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9493   (exit $ac_status); } && {
9494          test -z "$ac_c_werror_flag" ||
9495          test ! -s conftest.err
9496        } && test -s conftest$ac_exeext &&
9497        $as_test_x conftest$ac_exeext; then
9498   ac_cv_lib_intl_dgettext=yes
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 sed 's/^/| /' conftest.$ac_ext >&5
9502
9503         ac_cv_lib_intl_dgettext=no
9504 fi
9505
9506 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9507       conftest$ac_exeext conftest.$ac_ext
9508 LIBS=$ac_check_lib_save_LIBS
9509 fi
9510 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9511 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9512 if test $ac_cv_lib_intl_dgettext = yes; then
9513   gt_cv_func_dgettext_libintl=yes
9514 else
9515   gt_cv_func_dgettext_libintl=no
9516 fi
9517
9518 fi
9519 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9520 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9521 fi
9522
9523           fi
9524
9525           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9526             LIBS="$LIBS -lintl";
9527           fi
9528
9529           if test "$gt_cv_func_dgettext_libc" = "yes" \
9530             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9531
9532 cat >>confdefs.h <<\_ACEOF
9533 #define HAVE_GETTEXT 1
9534 _ACEOF
9535
9536             # Extract the first word of "msgfmt", so it can be a program name with args.
9537 set dummy msgfmt; ac_word=$2
9538 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9540 if test "${ac_cv_path_MSGFMT+set}" = set; then
9541   echo $ECHO_N "(cached) $ECHO_C" >&6
9542 else
9543   case "$MSGFMT" in
9544   /*)
9545   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9546   ;;
9547   *)
9548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9549   for ac_dir in $PATH; do
9550     test -z "$ac_dir" && ac_dir=.
9551     if test -f $ac_dir/$ac_word; then
9552       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9553         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9554         break
9555       fi
9556     fi
9557   done
9558   IFS="$ac_save_ifs"
9559   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9560   ;;
9561 esac
9562 fi
9563 MSGFMT="$ac_cv_path_MSGFMT"
9564 if test -n "$MSGFMT"; then
9565   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9566 echo "${ECHO_T}$MSGFMT" >&6; }
9567 else
9568   { echo "$as_me:$LINENO: result: no" >&5
9569 echo "${ECHO_T}no" >&6; }
9570 fi
9571             if test "$MSGFMT" != "no"; then
9572
9573 for ac_func in dcgettext
9574 do
9575 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9576 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9577 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9578 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9579   echo $ECHO_N "(cached) $ECHO_C" >&6
9580 else
9581   cat >conftest.$ac_ext <<_ACEOF
9582 /* confdefs.h.  */
9583 _ACEOF
9584 cat confdefs.h >>conftest.$ac_ext
9585 cat >>conftest.$ac_ext <<_ACEOF
9586 /* end confdefs.h.  */
9587 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9588    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9589 #define $ac_func innocuous_$ac_func
9590
9591 /* System header to define __stub macros and hopefully few prototypes,
9592     which can conflict with char $ac_func (); below.
9593     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9594     <limits.h> exists even on freestanding compilers.  */
9595
9596 #ifdef __STDC__
9597 # include <limits.h>
9598 #else
9599 # include <assert.h>
9600 #endif
9601
9602 #undef $ac_func
9603
9604 /* Override any GCC internal prototype to avoid an error.
9605    Use char because int might match the return type of a GCC
9606    builtin and then its argument prototype would still apply.  */
9607 #ifdef __cplusplus
9608 extern "C"
9609 #endif
9610 char $ac_func ();
9611 /* The GNU C library defines this for functions which it implements
9612     to always fail with ENOSYS.  Some functions are actually named
9613     something starting with __ and the normal name is an alias.  */
9614 #if defined __stub_$ac_func || defined __stub___$ac_func
9615 choke me
9616 #endif
9617
9618 int
9619 main ()
9620 {
9621 return $ac_func ();
9622   ;
9623   return 0;
9624 }
9625 _ACEOF
9626 rm -rf conftest.$ac_objext conftest$ac_exeext
9627 if { (ac_try="$ac_link"
9628 case "(($ac_try" in
9629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9630   *) ac_try_echo=$ac_try;;
9631 esac
9632 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9633   (eval "$ac_link") 2>conftest.er1
9634   ac_status=$?
9635   grep -v '^ *+' conftest.er1 >conftest.err
9636   rm -rf conftest.er1
9637   cat conftest.err >&5
9638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639   (exit $ac_status); } && {
9640          test -z "$ac_c_werror_flag" ||
9641          test ! -s conftest.err
9642        } && test -s conftest$ac_exeext &&
9643        $as_test_x conftest$ac_exeext; then
9644   eval "$as_ac_var=yes"
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 sed 's/^/| /' conftest.$ac_ext >&5
9648
9649         eval "$as_ac_var=no"
9650 fi
9651
9652 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9653       conftest$ac_exeext conftest.$ac_ext
9654 fi
9655 ac_res=`eval echo '${'$as_ac_var'}'`
9656                { echo "$as_me:$LINENO: result: $ac_res" >&5
9657 echo "${ECHO_T}$ac_res" >&6; }
9658 if test `eval echo '${'$as_ac_var'}'` = yes; then
9659   cat >>confdefs.h <<_ACEOF
9660 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9661 _ACEOF
9662
9663 fi
9664 done
9665
9666               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9667 set dummy gmsgfmt; ac_word=$2
9668 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9670 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9671   echo $ECHO_N "(cached) $ECHO_C" >&6
9672 else
9673   case $GMSGFMT in
9674   [\\/]* | ?:[\\/]*)
9675   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9676   ;;
9677   *)
9678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679 for as_dir in $PATH
9680 do
9681   IFS=$as_save_IFS
9682   test -z "$as_dir" && as_dir=.
9683   for ac_exec_ext in '' $ac_executable_extensions; do
9684   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9685     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9686     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9687     break 2
9688   fi
9689 done
9690 done
9691 IFS=$as_save_IFS
9692
9693   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9694   ;;
9695 esac
9696 fi
9697 GMSGFMT=$ac_cv_path_GMSGFMT
9698 if test -n "$GMSGFMT"; then
9699   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9700 echo "${ECHO_T}$GMSGFMT" >&6; }
9701 else
9702   { echo "$as_me:$LINENO: result: no" >&5
9703 echo "${ECHO_T}no" >&6; }
9704 fi
9705
9706
9707               # Extract the first word of "xgettext", so it can be a program name with args.
9708 set dummy xgettext; ac_word=$2
9709 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9710 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9711 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9712   echo $ECHO_N "(cached) $ECHO_C" >&6
9713 else
9714   case "$XGETTEXT" in
9715   /*)
9716   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9717   ;;
9718   *)
9719   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9720   for ac_dir in $PATH; do
9721     test -z "$ac_dir" && ac_dir=.
9722     if test -f $ac_dir/$ac_word; then
9723       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9724         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9725         break
9726       fi
9727     fi
9728   done
9729   IFS="$ac_save_ifs"
9730   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9731   ;;
9732 esac
9733 fi
9734 XGETTEXT="$ac_cv_path_XGETTEXT"
9735 if test -n "$XGETTEXT"; then
9736   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9737 echo "${ECHO_T}$XGETTEXT" >&6; }
9738 else
9739   { echo "$as_me:$LINENO: result: no" >&5
9740 echo "${ECHO_T}no" >&6; }
9741 fi
9742
9743               cat >conftest.$ac_ext <<_ACEOF
9744 /* confdefs.h.  */
9745 _ACEOF
9746 cat confdefs.h >>conftest.$ac_ext
9747 cat >>conftest.$ac_ext <<_ACEOF
9748 /* end confdefs.h.  */
9749
9750 int
9751 main ()
9752 {
9753 extern int _nl_msg_cat_cntr;
9754                              return _nl_msg_cat_cntr
9755   ;
9756   return 0;
9757 }
9758 _ACEOF
9759 rm -rf conftest.$ac_objext conftest$ac_exeext
9760 if { (ac_try="$ac_link"
9761 case "(($ac_try" in
9762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9763   *) ac_try_echo=$ac_try;;
9764 esac
9765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9766   (eval "$ac_link") 2>conftest.er1
9767   ac_status=$?
9768   grep -v '^ *+' conftest.er1 >conftest.err
9769   rm -rf conftest.er1
9770   cat conftest.err >&5
9771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772   (exit $ac_status); } && {
9773          test -z "$ac_c_werror_flag" ||
9774          test ! -s conftest.err
9775        } && test -s conftest$ac_exeext &&
9776        $as_test_x conftest$ac_exeext; then
9777   CATOBJEXT=.gmo
9778                  DATADIRNAME=share
9779 else
9780   echo "$as_me: failed program was:" >&5
9781 sed 's/^/| /' conftest.$ac_ext >&5
9782
9783         CATOBJEXT=.mo
9784                  DATADIRNAME=lib
9785 fi
9786
9787 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9788       conftest$ac_exeext conftest.$ac_ext
9789               INSTOBJEXT=.mo
9790             fi
9791           fi
9792
9793           # Added by Martin Baulig 12/15/98 for libc5 systems
9794           if test "$gt_cv_func_dgettext_libc" != "yes" \
9795             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9796             INTLLIBS=-lintl
9797             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9798           fi
9799
9800 fi
9801
9802
9803
9804       if test "$CATOBJEXT" = "NONE"; then
9805                         nls_cv_use_gnu_gettext=yes
9806       fi
9807     fi
9808
9809     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9810
9811 cat >>confdefs.h <<\_ACEOF
9812 #define ENABLE_NLS 1
9813 _ACEOF
9814
9815     else
9816             CATOBJEXT=
9817     fi
9818
9819         if test "$XGETTEXT" != ":"; then
9820                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9821         : ;
9822       else
9823         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9824 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9825         XGETTEXT=":"
9826       fi
9827     fi
9828
9829     # We need to process the po/ directory.
9830     POSUB=po
9831
9832     ac_config_commands="$ac_config_commands default-2"
9833
9834
9835                 for lang in $ALL_LINGUAS; do
9836       GMOFILES="$GMOFILES $lang.gmo"
9837       POFILES="$POFILES $lang.po"
9838     done
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852    if test "x$CATOBJEXT" != "x"; then
9853      if test "x$ALL_LINGUAS" = "x"; then
9854        LINGUAS=
9855      else
9856        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9857 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9858        NEW_LINGUAS=
9859        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9860          case "$ALL_LINGUAS" in
9861           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9862          esac
9863        done
9864        LINGUAS=$NEW_LINGUAS
9865        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9866 echo "${ECHO_T}$LINGUAS" >&6; }
9867      fi
9868
9869           if test -n "$LINGUAS"; then
9870        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9871      fi
9872    fi
9873
9874             test -d po || mkdir po
9875    if test "$CATOBJEXT" = ".cat"; then
9876      if test "${ac_cv_header_linux_version_h+set}" = set; then
9877   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9878 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9879 if test "${ac_cv_header_linux_version_h+set}" = set; then
9880   echo $ECHO_N "(cached) $ECHO_C" >&6
9881 fi
9882 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9883 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9884 else
9885   # Is the header compilable?
9886 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9887 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9888 cat >conftest.$ac_ext <<_ACEOF
9889 /* confdefs.h.  */
9890 _ACEOF
9891 cat confdefs.h >>conftest.$ac_ext
9892 cat >>conftest.$ac_ext <<_ACEOF
9893 /* end confdefs.h.  */
9894 $ac_includes_default
9895 #include <linux/version.h>
9896 _ACEOF
9897 rm -rf conftest.$ac_objext
9898 if { (ac_try="$ac_compile"
9899 case "(($ac_try" in
9900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9901   *) ac_try_echo=$ac_try;;
9902 esac
9903 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9904   (eval "$ac_compile") 2>conftest.er1
9905   ac_status=$?
9906   grep -v '^ *+' conftest.er1 >conftest.err
9907   rm -rf conftest.er1
9908   cat conftest.err >&5
9909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910   (exit $ac_status); } && {
9911          test -z "$ac_c_werror_flag" ||
9912          test ! -s conftest.err
9913        } && test -s conftest.$ac_objext; then
9914   ac_header_compiler=yes
9915 else
9916   echo "$as_me: failed program was:" >&5
9917 sed 's/^/| /' conftest.$ac_ext >&5
9918
9919         ac_header_compiler=no
9920 fi
9921
9922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9923 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9924 echo "${ECHO_T}$ac_header_compiler" >&6; }
9925
9926 # Is the header present?
9927 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9928 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9929 cat >conftest.$ac_ext <<_ACEOF
9930 /* confdefs.h.  */
9931 _ACEOF
9932 cat confdefs.h >>conftest.$ac_ext
9933 cat >>conftest.$ac_ext <<_ACEOF
9934 /* end confdefs.h.  */
9935 #include <linux/version.h>
9936 _ACEOF
9937 if { (ac_try="$ac_cpp conftest.$ac_ext"
9938 case "(($ac_try" in
9939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9940   *) ac_try_echo=$ac_try;;
9941 esac
9942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9943   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9944   ac_status=$?
9945   grep -v '^ *+' conftest.er1 >conftest.err
9946   rm -rf conftest.er1
9947   cat conftest.err >&5
9948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949   (exit $ac_status); } >/dev/null && {
9950          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9951          test ! -s conftest.err
9952        }; then
9953   ac_header_preproc=yes
9954 else
9955   echo "$as_me: failed program was:" >&5
9956 sed 's/^/| /' conftest.$ac_ext >&5
9957
9958   ac_header_preproc=no
9959 fi
9960
9961 rm -rf conftest.err conftest.$ac_ext
9962 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9963 echo "${ECHO_T}$ac_header_preproc" >&6; }
9964
9965 # So?  What about this header?
9966 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9967   yes:no: )
9968     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9969 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9971 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9972     ac_header_preproc=yes
9973     ;;
9974   no:yes:* )
9975     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9976 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9977     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9978 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9979     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9980 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9981     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9982 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9983     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9984 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9985     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9986 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9987
9988     ;;
9989 esac
9990 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9991 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9992 if test "${ac_cv_header_linux_version_h+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   ac_cv_header_linux_version_h=$ac_header_preproc
9996 fi
9997 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9998 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9999
10000 fi
10001 if test $ac_cv_header_linux_version_h = yes; then
10002   msgformat=linux
10003 else
10004   msgformat=xopen
10005 fi
10006
10007
10008
10009                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10010    fi
10011
10012             MKINSTALLDIRS=
10013 #
10014 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10015 #
10016 #   if test -n "$ac_aux_dir"; then
10017 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10018 #   fi
10019    if test -z "$MKINSTALLDIRS"; then
10020      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10021    fi
10022
10023    # jwz: you know what, screw it.  Let's just use the version that I
10024    # already computed in configure.in, instead of this version that came
10025    # with the i18n crud, ok?
10026    MKINSTALLDIRS="$INSTALL_DIRS"
10027
10028
10029
10030
10031          test -d po || mkdir po
10032    if test "x$srcdir" != "x."; then
10033      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10034        posrcprefix="$srcdir/"
10035      else
10036        posrcprefix="../$srcdir/"
10037      fi
10038    else
10039      posrcprefix="../"
10040    fi
10041    rm -f po/POTFILES
10042    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10043         < $srcdir/po/POTFILES.in > po/POTFILES
10044
10045 MKINSTALLDIRS="$INSTALL_DIRS"
10046
10047
10048 ###############################################################################
10049 #
10050 #       Check for -lXmu (some fucked up vendors don't ship it...)
10051 #
10052 ###############################################################################
10053
10054 have_xmu=no
10055
10056   ac_save_CPPFLAGS="$CPPFLAGS"
10057   if test \! -z "$includedir" ; then
10058     CPPFLAGS="$CPPFLAGS -I$includedir"
10059   fi
10060   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10061   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10062   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10063 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10064 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10065   echo $ECHO_N "(cached) $ECHO_C" >&6
10066 else
10067   cat >conftest.$ac_ext <<_ACEOF
10068 /* confdefs.h.  */
10069 _ACEOF
10070 cat confdefs.h >>conftest.$ac_ext
10071 cat >>conftest.$ac_ext <<_ACEOF
10072 /* end confdefs.h.  */
10073 #include <stdlib.h>
10074                    #include <stdio.h>
10075                    #include <X11/Intrinsic.h>
10076
10077 #include <X11/Xmu/Error.h>
10078 _ACEOF
10079 rm -rf conftest.$ac_objext
10080 if { (ac_try="$ac_compile"
10081 case "(($ac_try" in
10082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10083   *) ac_try_echo=$ac_try;;
10084 esac
10085 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10086   (eval "$ac_compile") 2>conftest.er1
10087   ac_status=$?
10088   grep -v '^ *+' conftest.er1 >conftest.err
10089   rm -rf conftest.er1
10090   cat conftest.err >&5
10091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092   (exit $ac_status); } && {
10093          test -z "$ac_c_werror_flag" ||
10094          test ! -s conftest.err
10095        } && test -s conftest.$ac_objext; then
10096   ac_cv_header_X11_Xmu_Error_h=yes
10097 else
10098   echo "$as_me: failed program was:" >&5
10099 sed 's/^/| /' conftest.$ac_ext >&5
10100
10101         ac_cv_header_X11_Xmu_Error_h=no
10102 fi
10103
10104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10107 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10108 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10109   have_xmu=yes
10110 fi
10111
10112
10113   CPPFLAGS="$ac_save_CPPFLAGS"
10114 if test "$have_xmu" = no ; then
10115   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10116   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10117   XMU_LIBS=''
10118 else
10119   XMU_SRCS=''
10120   XMU_OBJS=''
10121   XMU_LIBS='-lXmu'
10122   cat >>confdefs.h <<\_ACEOF
10123 #define HAVE_XMU 1
10124 _ACEOF
10125
10126 fi
10127
10128
10129 ###############################################################################
10130 #
10131 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10132 #       See comp.windows.x FAQ question 124.  The right fix is to
10133 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10134 #
10135 ###############################################################################
10136
10137 if test "$have_xmu" = yes ; then
10138   case "$host" in
10139     *-sunos4*)
10140     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10141 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10142 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10143   echo $ECHO_N "(cached) $ECHO_C" >&6
10144 else
10145   ac_save_LDFLAGS="$LDFLAGS"
10146                     if test \! -z "$x_libraries" ; then
10147                       LDFLAGS="$LDFLAGS -L$x_libraries"
10148                     fi
10149                     # Note: this trick never works!  (Generally.)
10150                     # We're only getting away with using AC_TRY_LINK
10151                     # with X libraries because we know it's SunOS.
10152                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10153                     cat >conftest.$ac_ext <<_ACEOF
10154 /* confdefs.h.  */
10155 _ACEOF
10156 cat confdefs.h >>conftest.$ac_ext
10157 cat >>conftest.$ac_ext <<_ACEOF
10158 /* end confdefs.h.  */
10159
10160 int
10161 main ()
10162 {
10163
10164   ;
10165   return 0;
10166 }
10167 _ACEOF
10168 rm -rf conftest.$ac_objext conftest$ac_exeext
10169 if { (ac_try="$ac_link"
10170 case "(($ac_try" in
10171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172   *) ac_try_echo=$ac_try;;
10173 esac
10174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10175   (eval "$ac_link") 2>conftest.er1
10176   ac_status=$?
10177   grep -v '^ *+' conftest.er1 >conftest.err
10178   rm -rf conftest.er1
10179   cat conftest.err >&5
10180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181   (exit $ac_status); } && {
10182          test -z "$ac_c_werror_flag" ||
10183          test ! -s conftest.err
10184        } && test -s conftest$ac_exeext &&
10185        $as_test_x conftest$ac_exeext; then
10186   ac_cv_sunos_xmu_bug=no
10187 else
10188   echo "$as_me: failed program was:" >&5
10189 sed 's/^/| /' conftest.$ac_ext >&5
10190
10191         ac_cv_sunos_xmu_bug=yes
10192 fi
10193
10194 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10195       conftest$ac_exeext conftest.$ac_ext
10196                     LDFLAGS="$ac_save_LDFLAGS"
10197 fi
10198 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10199 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10200     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10201       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10202 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10203 if test "${ac_cv_ld_static+set}" = set; then
10204   echo $ECHO_N "(cached) $ECHO_C" >&6
10205 else
10206   ac_save_LDFLAGS="$LDFLAGS"
10207                       LDFLAGS="$LDFLAGS -static"
10208                       cat >conftest.$ac_ext <<_ACEOF
10209 /* confdefs.h.  */
10210 _ACEOF
10211 cat confdefs.h >>conftest.$ac_ext
10212 cat >>conftest.$ac_ext <<_ACEOF
10213 /* end confdefs.h.  */
10214
10215 int
10216 main ()
10217 {
10218
10219   ;
10220   return 0;
10221 }
10222 _ACEOF
10223 rm -rf conftest.$ac_objext conftest$ac_exeext
10224 if { (ac_try="$ac_link"
10225 case "(($ac_try" in
10226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10227   *) ac_try_echo=$ac_try;;
10228 esac
10229 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10230   (eval "$ac_link") 2>conftest.er1
10231   ac_status=$?
10232   grep -v '^ *+' conftest.er1 >conftest.err
10233   rm -rf conftest.er1
10234   cat conftest.err >&5
10235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236   (exit $ac_status); } && {
10237          test -z "$ac_c_werror_flag" ||
10238          test ! -s conftest.err
10239        } && test -s conftest$ac_exeext &&
10240        $as_test_x conftest$ac_exeext; then
10241   ac_cv_ld_static=yes
10242 else
10243   echo "$as_me: failed program was:" >&5
10244 sed 's/^/| /' conftest.$ac_ext >&5
10245
10246         ac_cv_ld_static=no
10247 fi
10248
10249 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10250       conftest$ac_exeext conftest.$ac_ext
10251                     LDFLAGS="$ac_save_LDFLAGS"
10252 fi
10253 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10254 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10255       if test "$ac_cv_ld_static" = yes ; then
10256         LDFLAGS="$LDFLAGS -static"
10257       else
10258         LDFLAGS="$LDFLAGS -Bstatic"
10259       fi
10260     fi
10261     ;;
10262   esac
10263 fi
10264
10265
10266 ###############################################################################
10267 #
10268 #       Handle the --with-hackdir option
10269 #
10270 ###############################################################################
10271
10272 have_hackdir=yes
10273 with_hackdir_req=unspecified
10274
10275 # Check whether --with-hackdir was given.
10276 if test "${with_hackdir+set}" = set; then
10277   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10278 else
10279   with_hackdir=yes
10280 fi
10281
10282
10283 if test x"$with_hackdir" = xyes; then
10284   HACKDIR='${libexecdir}/xscreensaver'
10285 elif test x"$with_hackdir" = xno; then
10286   HACKDIR='${bindir}'
10287 else
10288   HACKDIR=$with_hackdir
10289 fi
10290
10291 # canonicalize slashes.
10292 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10293
10294 # Expand HACKDIR as HACKDIR_FULL
10295 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10296
10297 # This option used to be called --enable-subdir; make sure that is no longer
10298 # used, since configure brain-damagedly ignores unknown --enable options.
10299
10300 obsolete_enable=
10301 # Check whether --enable-subdir was given.
10302 if test "${enable_subdir+set}" = set; then
10303   enableval=$enable_subdir; obsolete_enable=yes
10304 fi
10305
10306 if test -n "$obsolete_enable"; then
10307   echo "error: the --enable-subdir option has been replaced with"
10308   echo "       the new --with-hackdir option; see \`configure --help'"
10309   echo "       for more information."
10310   exit 1
10311 fi
10312
10313
10314 ###############################################################################
10315 #
10316 #       Handle the --with-configdir option
10317 #       Help for --with-x-app-defaults option added..
10318 #
10319 ###############################################################################
10320
10321 have_configdir=yes
10322 with_configdir_req=unspecified
10323
10324 # Check whether --with-configdir was given.
10325 if test "${with_configdir+set}" = set; then
10326   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10327 else
10328   with_configdir=yes
10329 fi
10330
10331
10332 if test x"$with_configdir" = xyes; then
10333   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10334 elif test x"$with_configdir" = xno; then
10335   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10336   exit 1
10337 else
10338   # there must be a better way than this...
10339   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10340     # absolute path
10341     HACK_CONF_DIR=$with_configdir
10342   else
10343     # relative path
10344     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10345   fi
10346 fi
10347
10348
10349
10350
10351 ###############################################################################
10352 #
10353 #       Check for the SGI SCREEN_SAVER server extension.
10354 #
10355 ###############################################################################
10356
10357 have_sgi=no
10358 with_sgi_req=unspecified
10359
10360 # Check whether --with-sgi-ext was given.
10361 if test "${with_sgi_ext+set}" = set; then
10362   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10363 else
10364   with_sgi=yes
10365 fi
10366
10367
10368
10369    case "$with_sgi" in
10370     yes) ;;
10371     no)  ;;
10372
10373     /*)
10374      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10375 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10376      d=$with_sgi/include
10377      if test -d $d; then
10378        X_CFLAGS="-I$d $X_CFLAGS"
10379        { echo "$as_me:$LINENO: result: $d" >&5
10380 echo "${ECHO_T}$d" >&6; }
10381      else
10382        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10383 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10384      fi
10385
10386      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10387 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10388      d=$with_sgi/lib
10389      if test -d $d; then
10390        X_LIBS="-L$d $X_LIBS"
10391        { echo "$as_me:$LINENO: result: $d" >&5
10392 echo "${ECHO_T}$d" >&6; }
10393      else
10394        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10395 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10396      fi
10397
10398      # replace the directory string with "yes".
10399      with_sgi_req="yes"
10400      with_sgi=$with_sgi_req
10401      ;;
10402
10403     *)
10404      echo ""
10405      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10406      echo "       If it is a directory, then \`DIR/include' will be added to"
10407      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10408      exit 1
10409      ;;
10410    esac
10411
10412
10413 if test "$with_sgi" = yes; then
10414
10415   ac_save_CPPFLAGS="$CPPFLAGS"
10416   if test \! -z "$includedir" ; then
10417     CPPFLAGS="$CPPFLAGS -I$includedir"
10418   fi
10419   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10420   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10421   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10422 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10423 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426   cat >conftest.$ac_ext <<_ACEOF
10427 /* confdefs.h.  */
10428 _ACEOF
10429 cat confdefs.h >>conftest.$ac_ext
10430 cat >>conftest.$ac_ext <<_ACEOF
10431 /* end confdefs.h.  */
10432 #include <X11/Xlib.h>
10433
10434 #include <X11/extensions/XScreenSaver.h>
10435 _ACEOF
10436 rm -rf conftest.$ac_objext
10437 if { (ac_try="$ac_compile"
10438 case "(($ac_try" in
10439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10440   *) ac_try_echo=$ac_try;;
10441 esac
10442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10443   (eval "$ac_compile") 2>conftest.er1
10444   ac_status=$?
10445   grep -v '^ *+' conftest.er1 >conftest.err
10446   rm -rf conftest.er1
10447   cat conftest.err >&5
10448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449   (exit $ac_status); } && {
10450          test -z "$ac_c_werror_flag" ||
10451          test ! -s conftest.err
10452        } && test -s conftest.$ac_objext; then
10453   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10454 else
10455   echo "$as_me: failed program was:" >&5
10456 sed 's/^/| /' conftest.$ac_ext >&5
10457
10458         ac_cv_header_X11_extensions_XScreenSaver_h=no
10459 fi
10460
10461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10462 fi
10463 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10464 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10465 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10466   have_sgi=yes
10467                      cat >>confdefs.h <<\_ACEOF
10468 #define HAVE_SGI_SAVER_EXTENSION 1
10469 _ACEOF
10470
10471 fi
10472
10473
10474   CPPFLAGS="$ac_save_CPPFLAGS"
10475
10476 elif test "$with_sgi" != no; then
10477   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10478   exit 1
10479 fi
10480
10481
10482 ###############################################################################
10483 #
10484 #       Check for the XIDLE server extension.
10485 #
10486 ###############################################################################
10487
10488 have_xidle=no
10489 with_xidle_req=unspecified
10490
10491 # Check whether --with-xidle-ext was given.
10492 if test "${with_xidle_ext+set}" = set; then
10493   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10494 else
10495   with_xidle=yes
10496 fi
10497
10498
10499
10500    case "$with_xidle" in
10501     yes) ;;
10502     no)  ;;
10503
10504     /*)
10505      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10506 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10507      d=$with_xidle/include
10508      if test -d $d; then
10509        X_CFLAGS="-I$d $X_CFLAGS"
10510        { echo "$as_me:$LINENO: result: $d" >&5
10511 echo "${ECHO_T}$d" >&6; }
10512      else
10513        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10514 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10515      fi
10516
10517      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10518 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10519      d=$with_xidle/lib
10520      if test -d $d; then
10521        X_LIBS="-L$d $X_LIBS"
10522        { echo "$as_me:$LINENO: result: $d" >&5
10523 echo "${ECHO_T}$d" >&6; }
10524      else
10525        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10526 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10527      fi
10528
10529      # replace the directory string with "yes".
10530      with_xidle_req="yes"
10531      with_xidle=$with_xidle_req
10532      ;;
10533
10534     *)
10535      echo ""
10536      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10537      echo "       If it is a directory, then \`DIR/include' will be added to"
10538      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10539      exit 1
10540      ;;
10541    esac
10542
10543
10544 if test "$with_xidle" = yes; then
10545
10546   ac_save_CPPFLAGS="$CPPFLAGS"
10547   if test \! -z "$includedir" ; then
10548     CPPFLAGS="$CPPFLAGS -I$includedir"
10549   fi
10550   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10551   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10552   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10553 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10554 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10555   echo $ECHO_N "(cached) $ECHO_C" >&6
10556 else
10557   cat >conftest.$ac_ext <<_ACEOF
10558 /* confdefs.h.  */
10559 _ACEOF
10560 cat confdefs.h >>conftest.$ac_ext
10561 cat >>conftest.$ac_ext <<_ACEOF
10562 /* end confdefs.h.  */
10563 #include <X11/Xlib.h>
10564
10565 #include <X11/extensions/xidle.h>
10566 _ACEOF
10567 rm -rf conftest.$ac_objext
10568 if { (ac_try="$ac_compile"
10569 case "(($ac_try" in
10570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10571   *) ac_try_echo=$ac_try;;
10572 esac
10573 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10574   (eval "$ac_compile") 2>conftest.er1
10575   ac_status=$?
10576   grep -v '^ *+' conftest.er1 >conftest.err
10577   rm -rf conftest.er1
10578   cat conftest.err >&5
10579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580   (exit $ac_status); } && {
10581          test -z "$ac_c_werror_flag" ||
10582          test ! -s conftest.err
10583        } && test -s conftest.$ac_objext; then
10584   ac_cv_header_X11_extensions_xidle_h=yes
10585 else
10586   echo "$as_me: failed program was:" >&5
10587 sed 's/^/| /' conftest.$ac_ext >&5
10588
10589         ac_cv_header_X11_extensions_xidle_h=no
10590 fi
10591
10592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10593 fi
10594 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10595 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10596 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10597   have_xidle=yes
10598                      cat >>confdefs.h <<\_ACEOF
10599 #define HAVE_XIDLE_EXTENSION 1
10600 _ACEOF
10601
10602 fi
10603
10604
10605   CPPFLAGS="$ac_save_CPPFLAGS"
10606 elif test "$with_xidle" != no; then
10607   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10608   exit 1
10609 fi
10610
10611
10612 ###############################################################################
10613 #
10614 #       Check for the SGI-VIDEO-CONTROL server extension.
10615 #
10616 ###############################################################################
10617
10618 have_sgivc=no
10619 with_sgivc_req=unspecified
10620
10621 # Check whether --with-sgivc-ext was given.
10622 if test "${with_sgivc_ext+set}" = set; then
10623   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10624 else
10625   with_sgivc=yes
10626 fi
10627
10628
10629
10630    case "$with_sgivc" in
10631     yes) ;;
10632     no)  ;;
10633
10634     /*)
10635      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10636 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10637      d=$with_sgivc/include
10638      if test -d $d; then
10639        X_CFLAGS="-I$d $X_CFLAGS"
10640        { echo "$as_me:$LINENO: result: $d" >&5
10641 echo "${ECHO_T}$d" >&6; }
10642      else
10643        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10644 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10645      fi
10646
10647      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10648 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10649      d=$with_sgivc/lib
10650      if test -d $d; then
10651        X_LIBS="-L$d $X_LIBS"
10652        { echo "$as_me:$LINENO: result: $d" >&5
10653 echo "${ECHO_T}$d" >&6; }
10654      else
10655        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10656 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10657      fi
10658
10659      # replace the directory string with "yes".
10660      with_sgivc_req="yes"
10661      with_sgivc=$with_sgivc_req
10662      ;;
10663
10664     *)
10665      echo ""
10666      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10667      echo "       If it is a directory, then \`DIR/include' will be added to"
10668      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10669      exit 1
10670      ;;
10671    esac
10672
10673
10674 if test "$with_sgivc" = yes; then
10675
10676   # first check for XSGIvc.h
10677
10678   ac_save_CPPFLAGS="$CPPFLAGS"
10679   if test \! -z "$includedir" ; then
10680     CPPFLAGS="$CPPFLAGS -I$includedir"
10681   fi
10682   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10683   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10684   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10685 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10686 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10687   echo $ECHO_N "(cached) $ECHO_C" >&6
10688 else
10689   cat >conftest.$ac_ext <<_ACEOF
10690 /* confdefs.h.  */
10691 _ACEOF
10692 cat confdefs.h >>conftest.$ac_ext
10693 cat >>conftest.$ac_ext <<_ACEOF
10694 /* end confdefs.h.  */
10695 #include <X11/Xlib.h>
10696
10697 #include <X11/extensions/XSGIvc.h>
10698 _ACEOF
10699 rm -rf conftest.$ac_objext
10700 if { (ac_try="$ac_compile"
10701 case "(($ac_try" in
10702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10703   *) ac_try_echo=$ac_try;;
10704 esac
10705 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10706   (eval "$ac_compile") 2>conftest.er1
10707   ac_status=$?
10708   grep -v '^ *+' conftest.er1 >conftest.err
10709   rm -rf conftest.er1
10710   cat conftest.err >&5
10711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10712   (exit $ac_status); } && {
10713          test -z "$ac_c_werror_flag" ||
10714          test ! -s conftest.err
10715        } && test -s conftest.$ac_objext; then
10716   ac_cv_header_X11_extensions_XSGIvc_h=yes
10717 else
10718   echo "$as_me: failed program was:" >&5
10719 sed 's/^/| /' conftest.$ac_ext >&5
10720
10721         ac_cv_header_X11_extensions_XSGIvc_h=no
10722 fi
10723
10724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10725 fi
10726 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10727 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10728 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10729   have_sgivc=yes
10730 fi
10731
10732
10733   CPPFLAGS="$ac_save_CPPFLAGS"
10734
10735   # if that succeeded, then check for the -lXsgivc
10736   if test "$have_sgivc" = yes; then
10737     have_sgivc=no
10738
10739   ac_save_CPPFLAGS="$CPPFLAGS"
10740   ac_save_LDFLAGS="$LDFLAGS"
10741 #  ac_save_LIBS="$LIBS"
10742
10743   if test \! -z "$includedir" ; then
10744     CPPFLAGS="$CPPFLAGS -I$includedir"
10745   fi
10746   # note: $X_CFLAGS includes $x_includes
10747   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10748
10749   if test \! -z "$libdir" ; then
10750     LDFLAGS="$LDFLAGS -L$libdir"
10751   fi
10752   # note: $X_LIBS includes $x_libraries
10753   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10754
10755   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10756   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10757   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10758 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10759 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10760   echo $ECHO_N "(cached) $ECHO_C" >&6
10761 else
10762   ac_check_lib_save_LIBS=$LIBS
10763 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10764 cat >conftest.$ac_ext <<_ACEOF
10765 /* confdefs.h.  */
10766 _ACEOF
10767 cat confdefs.h >>conftest.$ac_ext
10768 cat >>conftest.$ac_ext <<_ACEOF
10769 /* end confdefs.h.  */
10770
10771 /* Override any GCC internal prototype to avoid an error.
10772    Use char because int might match the return type of a GCC
10773    builtin and then its argument prototype would still apply.  */
10774 #ifdef __cplusplus
10775 extern "C"
10776 #endif
10777 char XSGIvcQueryGammaMap ();
10778 int
10779 main ()
10780 {
10781 return XSGIvcQueryGammaMap ();
10782   ;
10783   return 0;
10784 }
10785 _ACEOF
10786 rm -rf conftest.$ac_objext conftest$ac_exeext
10787 if { (ac_try="$ac_link"
10788 case "(($ac_try" in
10789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790   *) ac_try_echo=$ac_try;;
10791 esac
10792 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793   (eval "$ac_link") 2>conftest.er1
10794   ac_status=$?
10795   grep -v '^ *+' conftest.er1 >conftest.err
10796   rm -rf conftest.er1
10797   cat conftest.err >&5
10798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799   (exit $ac_status); } && {
10800          test -z "$ac_c_werror_flag" ||
10801          test ! -s conftest.err
10802        } && test -s conftest$ac_exeext &&
10803        $as_test_x conftest$ac_exeext; then
10804   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10805 else
10806   echo "$as_me: failed program was:" >&5
10807 sed 's/^/| /' conftest.$ac_ext >&5
10808
10809         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10810 fi
10811
10812 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10813       conftest$ac_exeext conftest.$ac_ext
10814 LIBS=$ac_check_lib_save_LIBS
10815 fi
10816 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10817 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10818 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10819   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10820 else
10821   true
10822 fi
10823
10824   CPPFLAGS="$ac_save_CPPFLAGS"
10825   LDFLAGS="$ac_save_LDFLAGS"
10826 #  LIBS="$ac_save_LIBS"
10827
10828   fi
10829
10830   # if that succeeded, then we've really got it.
10831   if test "$have_sgivc" = yes; then
10832     cat >>confdefs.h <<\_ACEOF
10833 #define HAVE_SGI_VC_EXTENSION 1
10834 _ACEOF
10835
10836   fi
10837
10838 elif test "$with_sgivc" != no; then
10839   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10840   exit 1
10841 fi
10842
10843
10844 ###############################################################################
10845 #
10846 #       Check for the DPMS server extension.
10847 #
10848 ###############################################################################
10849
10850 have_dpms=no
10851 with_dpms_req=unspecified
10852
10853 # Check whether --with-dpms-ext was given.
10854 if test "${with_dpms_ext+set}" = set; then
10855   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10856 else
10857   with_dpms=yes
10858 fi
10859
10860
10861
10862    case "$with_dpms" in
10863     yes) ;;
10864     no)  ;;
10865
10866     /*)
10867      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10868 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10869      d=$with_dpms/include
10870      if test -d $d; then
10871        X_CFLAGS="-I$d $X_CFLAGS"
10872        { echo "$as_me:$LINENO: result: $d" >&5
10873 echo "${ECHO_T}$d" >&6; }
10874      else
10875        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10876 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10877      fi
10878
10879      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10880 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10881      d=$with_dpms/lib
10882      if test -d $d; then
10883        X_LIBS="-L$d $X_LIBS"
10884        { echo "$as_me:$LINENO: result: $d" >&5
10885 echo "${ECHO_T}$d" >&6; }
10886      else
10887        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10888 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10889      fi
10890
10891      # replace the directory string with "yes".
10892      with_dpms_req="yes"
10893      with_dpms=$with_dpms_req
10894      ;;
10895
10896     *)
10897      echo ""
10898      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10899      echo "       If it is a directory, then \`DIR/include' will be added to"
10900      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10901      exit 1
10902      ;;
10903    esac
10904
10905
10906 if test "$with_dpms" = yes; then
10907
10908   # first check for dpms.h
10909
10910   ac_save_CPPFLAGS="$CPPFLAGS"
10911   if test \! -z "$includedir" ; then
10912     CPPFLAGS="$CPPFLAGS -I$includedir"
10913   fi
10914   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10915   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10916   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10917 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10918 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10919   echo $ECHO_N "(cached) $ECHO_C" >&6
10920 else
10921   cat >conftest.$ac_ext <<_ACEOF
10922 /* confdefs.h.  */
10923 _ACEOF
10924 cat confdefs.h >>conftest.$ac_ext
10925 cat >>conftest.$ac_ext <<_ACEOF
10926 /* end confdefs.h.  */
10927 #include <X11/Xlib.h>
10928                      #include <X11/Xmd.h>
10929
10930 #include <X11/extensions/dpms.h>
10931 _ACEOF
10932 rm -rf conftest.$ac_objext
10933 if { (ac_try="$ac_compile"
10934 case "(($ac_try" in
10935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10936   *) ac_try_echo=$ac_try;;
10937 esac
10938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10939   (eval "$ac_compile") 2>conftest.er1
10940   ac_status=$?
10941   grep -v '^ *+' conftest.er1 >conftest.err
10942   rm -rf conftest.er1
10943   cat conftest.err >&5
10944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10945   (exit $ac_status); } && {
10946          test -z "$ac_c_werror_flag" ||
10947          test ! -s conftest.err
10948        } && test -s conftest.$ac_objext; then
10949   ac_cv_header_X11_extensions_dpms_h=yes
10950 else
10951   echo "$as_me: failed program was:" >&5
10952 sed 's/^/| /' conftest.$ac_ext >&5
10953
10954         ac_cv_header_X11_extensions_dpms_h=no
10955 fi
10956
10957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10958 fi
10959 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10960 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10961 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10962   have_dpms=yes
10963 fi
10964
10965
10966   CPPFLAGS="$ac_save_CPPFLAGS"
10967
10968   # if that succeeded, then check for the DPMS code in the libraries
10969   if test "$have_dpms" = yes; then
10970
10971     # first look in -lXext (this is where it is with XFree86 4.0)
10972     have_dpms=no
10973
10974   ac_save_CPPFLAGS="$CPPFLAGS"
10975   ac_save_LDFLAGS="$LDFLAGS"
10976 #  ac_save_LIBS="$LIBS"
10977
10978   if test \! -z "$includedir" ; then
10979     CPPFLAGS="$CPPFLAGS -I$includedir"
10980   fi
10981   # note: $X_CFLAGS includes $x_includes
10982   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10983
10984   if test \! -z "$libdir" ; then
10985     LDFLAGS="$LDFLAGS -L$libdir"
10986   fi
10987   # note: $X_LIBS includes $x_libraries
10988   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10989
10990   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10991   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10992   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10993 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10994 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10995   echo $ECHO_N "(cached) $ECHO_C" >&6
10996 else
10997   ac_check_lib_save_LIBS=$LIBS
10998 LIBS="-lXext -lXext -lX11 $LIBS"
10999 cat >conftest.$ac_ext <<_ACEOF
11000 /* confdefs.h.  */
11001 _ACEOF
11002 cat confdefs.h >>conftest.$ac_ext
11003 cat >>conftest.$ac_ext <<_ACEOF
11004 /* end confdefs.h.  */
11005
11006 /* Override any GCC internal prototype to avoid an error.
11007    Use char because int might match the return type of a GCC
11008    builtin and then its argument prototype would still apply.  */
11009 #ifdef __cplusplus
11010 extern "C"
11011 #endif
11012 char DPMSInfo ();
11013 int
11014 main ()
11015 {
11016 return DPMSInfo ();
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -rf conftest.$ac_objext conftest$ac_exeext
11022 if { (ac_try="$ac_link"
11023 case "(($ac_try" in
11024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11025   *) ac_try_echo=$ac_try;;
11026 esac
11027 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11028   (eval "$ac_link") 2>conftest.er1
11029   ac_status=$?
11030   grep -v '^ *+' conftest.er1 >conftest.err
11031   rm -rf conftest.er1
11032   cat conftest.err >&5
11033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11034   (exit $ac_status); } && {
11035          test -z "$ac_c_werror_flag" ||
11036          test ! -s conftest.err
11037        } && test -s conftest$ac_exeext &&
11038        $as_test_x conftest$ac_exeext; then
11039   ac_cv_lib_Xext_DPMSInfo=yes
11040 else
11041   echo "$as_me: failed program was:" >&5
11042 sed 's/^/| /' conftest.$ac_ext >&5
11043
11044         ac_cv_lib_Xext_DPMSInfo=no
11045 fi
11046
11047 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11048       conftest$ac_exeext conftest.$ac_ext
11049 LIBS=$ac_check_lib_save_LIBS
11050 fi
11051 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11052 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11053 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11054   have_dpms=yes
11055 else
11056   true
11057 fi
11058
11059   CPPFLAGS="$ac_save_CPPFLAGS"
11060   LDFLAGS="$ac_save_LDFLAGS"
11061 #  LIBS="$ac_save_LIBS"
11062
11063
11064     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11065     if test "$have_dpms" = no; then
11066
11067   ac_save_CPPFLAGS="$CPPFLAGS"
11068   ac_save_LDFLAGS="$LDFLAGS"
11069 #  ac_save_LIBS="$LIBS"
11070
11071   if test \! -z "$includedir" ; then
11072     CPPFLAGS="$CPPFLAGS -I$includedir"
11073   fi
11074   # note: $X_CFLAGS includes $x_includes
11075   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11076
11077   if test \! -z "$libdir" ; then
11078     LDFLAGS="$LDFLAGS -L$libdir"
11079   fi
11080   # note: $X_LIBS includes $x_libraries
11081   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11082
11083   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11084   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11085   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11086 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11087 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11088   echo $ECHO_N "(cached) $ECHO_C" >&6
11089 else
11090   ac_check_lib_save_LIBS=$LIBS
11091 LIBS="-lXdpms -lXext -lX11 $LIBS"
11092 cat >conftest.$ac_ext <<_ACEOF
11093 /* confdefs.h.  */
11094 _ACEOF
11095 cat confdefs.h >>conftest.$ac_ext
11096 cat >>conftest.$ac_ext <<_ACEOF
11097 /* end confdefs.h.  */
11098
11099 /* Override any GCC internal prototype to avoid an error.
11100    Use char because int might match the return type of a GCC
11101    builtin and then its argument prototype would still apply.  */
11102 #ifdef __cplusplus
11103 extern "C"
11104 #endif
11105 char DPMSInfo ();
11106 int
11107 main ()
11108 {
11109 return DPMSInfo ();
11110   ;
11111   return 0;
11112 }
11113 _ACEOF
11114 rm -rf conftest.$ac_objext conftest$ac_exeext
11115 if { (ac_try="$ac_link"
11116 case "(($ac_try" in
11117   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11118   *) ac_try_echo=$ac_try;;
11119 esac
11120 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11121   (eval "$ac_link") 2>conftest.er1
11122   ac_status=$?
11123   grep -v '^ *+' conftest.er1 >conftest.err
11124   rm -rf conftest.er1
11125   cat conftest.err >&5
11126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11127   (exit $ac_status); } && {
11128          test -z "$ac_c_werror_flag" ||
11129          test ! -s conftest.err
11130        } && test -s conftest$ac_exeext &&
11131        $as_test_x conftest$ac_exeext; then
11132   ac_cv_lib_Xdpms_DPMSInfo=yes
11133 else
11134   echo "$as_me: failed program was:" >&5
11135 sed 's/^/| /' conftest.$ac_ext >&5
11136
11137         ac_cv_lib_Xdpms_DPMSInfo=no
11138 fi
11139
11140 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11141       conftest$ac_exeext conftest.$ac_ext
11142 LIBS=$ac_check_lib_save_LIBS
11143 fi
11144 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11145 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11146 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11147   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11148 else
11149   true
11150 fi
11151
11152   CPPFLAGS="$ac_save_CPPFLAGS"
11153   LDFLAGS="$ac_save_LDFLAGS"
11154 #  LIBS="$ac_save_LIBS"
11155
11156     fi
11157   fi
11158
11159
11160   # if that succeeded, then we've really got it.
11161   if test "$have_dpms" = yes; then
11162     cat >>confdefs.h <<\_ACEOF
11163 #define HAVE_DPMS_EXTENSION 1
11164 _ACEOF
11165
11166   fi
11167
11168 elif test "$with_dpms" != no; then
11169   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11170   exit 1
11171 fi
11172
11173
11174 ###############################################################################
11175 #
11176 #       Check for the XINERAMA server extension.
11177 #
11178 ###############################################################################
11179
11180 have_xinerama=no
11181 with_xinerama_req=unspecified
11182
11183 # Check whether --with-xinerama-ext was given.
11184 if test "${with_xinerama_ext+set}" = set; then
11185   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11186 else
11187   with_xinerama=yes
11188 fi
11189
11190
11191
11192    case "$with_xinerama" in
11193     yes) ;;
11194     no)  ;;
11195
11196     /*)
11197      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11198 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11199      d=$with_xinerama/include
11200      if test -d $d; then
11201        X_CFLAGS="-I$d $X_CFLAGS"
11202        { echo "$as_me:$LINENO: result: $d" >&5
11203 echo "${ECHO_T}$d" >&6; }
11204      else
11205        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11206 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11207      fi
11208
11209      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11210 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11211      d=$with_xinerama/lib
11212      if test -d $d; then
11213        X_LIBS="-L$d $X_LIBS"
11214        { echo "$as_me:$LINENO: result: $d" >&5
11215 echo "${ECHO_T}$d" >&6; }
11216      else
11217        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11218 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11219      fi
11220
11221      # replace the directory string with "yes".
11222      with_xinerama_req="yes"
11223      with_xinerama=$with_xinerama_req
11224      ;;
11225
11226     *)
11227      echo ""
11228      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11229      echo "       If it is a directory, then \`DIR/include' will be added to"
11230      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11231      exit 1
11232      ;;
11233    esac
11234
11235
11236 if test "$with_xinerama" = yes; then
11237
11238   # first check for Xinerama.h
11239
11240   ac_save_CPPFLAGS="$CPPFLAGS"
11241   if test \! -z "$includedir" ; then
11242     CPPFLAGS="$CPPFLAGS -I$includedir"
11243   fi
11244   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11245   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11246   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11247 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11248 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11249   echo $ECHO_N "(cached) $ECHO_C" >&6
11250 else
11251   cat >conftest.$ac_ext <<_ACEOF
11252 /* confdefs.h.  */
11253 _ACEOF
11254 cat confdefs.h >>conftest.$ac_ext
11255 cat >>conftest.$ac_ext <<_ACEOF
11256 /* end confdefs.h.  */
11257 #include <X11/Xlib.h>
11258
11259 #include <X11/extensions/Xinerama.h>
11260 _ACEOF
11261 rm -rf conftest.$ac_objext
11262 if { (ac_try="$ac_compile"
11263 case "(($ac_try" in
11264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265   *) ac_try_echo=$ac_try;;
11266 esac
11267 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11268   (eval "$ac_compile") 2>conftest.er1
11269   ac_status=$?
11270   grep -v '^ *+' conftest.er1 >conftest.err
11271   rm -rf conftest.er1
11272   cat conftest.err >&5
11273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274   (exit $ac_status); } && {
11275          test -z "$ac_c_werror_flag" ||
11276          test ! -s conftest.err
11277        } && test -s conftest.$ac_objext; then
11278   ac_cv_header_X11_extensions_Xinerama_h=yes
11279 else
11280   echo "$as_me: failed program was:" >&5
11281 sed 's/^/| /' conftest.$ac_ext >&5
11282
11283         ac_cv_header_X11_extensions_Xinerama_h=no
11284 fi
11285
11286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287 fi
11288 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11289 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11290 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11291   have_xinerama=yes
11292 fi
11293
11294
11295   CPPFLAGS="$ac_save_CPPFLAGS"
11296
11297   # if that succeeded, then check for the XINERAMA code in the libraries
11298   if test "$have_xinerama" = yes; then
11299
11300     # first look in -lXext
11301     have_xinerama=no
11302
11303   ac_save_CPPFLAGS="$CPPFLAGS"
11304   ac_save_LDFLAGS="$LDFLAGS"
11305 #  ac_save_LIBS="$LIBS"
11306
11307   if test \! -z "$includedir" ; then
11308     CPPFLAGS="$CPPFLAGS -I$includedir"
11309   fi
11310   # note: $X_CFLAGS includes $x_includes
11311   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11312
11313   if test \! -z "$libdir" ; then
11314     LDFLAGS="$LDFLAGS -L$libdir"
11315   fi
11316   # note: $X_LIBS includes $x_libraries
11317   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11318
11319   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11320   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11321   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11322 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11323 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11324   echo $ECHO_N "(cached) $ECHO_C" >&6
11325 else
11326   ac_check_lib_save_LIBS=$LIBS
11327 LIBS="-lXext -lXext -lX11 $LIBS"
11328 cat >conftest.$ac_ext <<_ACEOF
11329 /* confdefs.h.  */
11330 _ACEOF
11331 cat confdefs.h >>conftest.$ac_ext
11332 cat >>conftest.$ac_ext <<_ACEOF
11333 /* end confdefs.h.  */
11334
11335 /* Override any GCC internal prototype to avoid an error.
11336    Use char because int might match the return type of a GCC
11337    builtin and then its argument prototype would still apply.  */
11338 #ifdef __cplusplus
11339 extern "C"
11340 #endif
11341 char XineramaQueryScreens ();
11342 int
11343 main ()
11344 {
11345 return XineramaQueryScreens ();
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 rm -rf conftest.$ac_objext conftest$ac_exeext
11351 if { (ac_try="$ac_link"
11352 case "(($ac_try" in
11353   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11354   *) ac_try_echo=$ac_try;;
11355 esac
11356 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11357   (eval "$ac_link") 2>conftest.er1
11358   ac_status=$?
11359   grep -v '^ *+' conftest.er1 >conftest.err
11360   rm -rf conftest.er1
11361   cat conftest.err >&5
11362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11363   (exit $ac_status); } && {
11364          test -z "$ac_c_werror_flag" ||
11365          test ! -s conftest.err
11366        } && test -s conftest$ac_exeext &&
11367        $as_test_x conftest$ac_exeext; then
11368   ac_cv_lib_Xext_XineramaQueryScreens=yes
11369 else
11370   echo "$as_me: failed program was:" >&5
11371 sed 's/^/| /' conftest.$ac_ext >&5
11372
11373         ac_cv_lib_Xext_XineramaQueryScreens=no
11374 fi
11375
11376 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11377       conftest$ac_exeext conftest.$ac_ext
11378 LIBS=$ac_check_lib_save_LIBS
11379 fi
11380 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11381 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11382 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11383   have_xinerama=yes
11384 else
11385   true
11386 fi
11387
11388   CPPFLAGS="$ac_save_CPPFLAGS"
11389   LDFLAGS="$ac_save_LDFLAGS"
11390 #  LIBS="$ac_save_LIBS"
11391
11392
11393     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11394     if test "$have_xinerama" = no; then
11395
11396   ac_save_CPPFLAGS="$CPPFLAGS"
11397   ac_save_LDFLAGS="$LDFLAGS"
11398 #  ac_save_LIBS="$LIBS"
11399
11400   if test \! -z "$includedir" ; then
11401     CPPFLAGS="$CPPFLAGS -I$includedir"
11402   fi
11403   # note: $X_CFLAGS includes $x_includes
11404   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11405
11406   if test \! -z "$libdir" ; then
11407     LDFLAGS="$LDFLAGS -L$libdir"
11408   fi
11409   # note: $X_LIBS includes $x_libraries
11410   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11411
11412   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11413   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11414   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11415 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11416 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11417   echo $ECHO_N "(cached) $ECHO_C" >&6
11418 else
11419   ac_check_lib_save_LIBS=$LIBS
11420 LIBS="-lXinerama -lXext -lX11 $LIBS"
11421 cat >conftest.$ac_ext <<_ACEOF
11422 /* confdefs.h.  */
11423 _ACEOF
11424 cat confdefs.h >>conftest.$ac_ext
11425 cat >>conftest.$ac_ext <<_ACEOF
11426 /* end confdefs.h.  */
11427
11428 /* Override any GCC internal prototype to avoid an error.
11429    Use char because int might match the return type of a GCC
11430    builtin and then its argument prototype would still apply.  */
11431 #ifdef __cplusplus
11432 extern "C"
11433 #endif
11434 char XineramaQueryScreens ();
11435 int
11436 main ()
11437 {
11438 return XineramaQueryScreens ();
11439   ;
11440   return 0;
11441 }
11442 _ACEOF
11443 rm -rf conftest.$ac_objext conftest$ac_exeext
11444 if { (ac_try="$ac_link"
11445 case "(($ac_try" in
11446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11447   *) ac_try_echo=$ac_try;;
11448 esac
11449 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11450   (eval "$ac_link") 2>conftest.er1
11451   ac_status=$?
11452   grep -v '^ *+' conftest.er1 >conftest.err
11453   rm -rf conftest.er1
11454   cat conftest.err >&5
11455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456   (exit $ac_status); } && {
11457          test -z "$ac_c_werror_flag" ||
11458          test ! -s conftest.err
11459        } && test -s conftest$ac_exeext &&
11460        $as_test_x conftest$ac_exeext; then
11461   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11462 else
11463   echo "$as_me: failed program was:" >&5
11464 sed 's/^/| /' conftest.$ac_ext >&5
11465
11466         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11467 fi
11468
11469 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11470       conftest$ac_exeext conftest.$ac_ext
11471 LIBS=$ac_check_lib_save_LIBS
11472 fi
11473 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11474 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11475 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11476   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11477 else
11478   true
11479 fi
11480
11481   CPPFLAGS="$ac_save_CPPFLAGS"
11482   LDFLAGS="$ac_save_LDFLAGS"
11483 #  LIBS="$ac_save_LIBS"
11484
11485     fi
11486   fi
11487
11488   # if that succeeded, then we've really got it.
11489   if test "$have_xinerama" = yes; then
11490     cat >>confdefs.h <<\_ACEOF
11491 #define HAVE_XINERAMA 1
11492 _ACEOF
11493
11494   fi
11495
11496 elif test "$with_xinerama" != no; then
11497   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11498   exit 1
11499 fi
11500
11501
11502 ###############################################################################
11503 #
11504 #       Check for the XF86VMODE server extension (for virtual screens.)
11505 #
11506 ###############################################################################
11507
11508 have_xf86vmode=no
11509 with_xf86vmode_req=unspecified
11510
11511 # Check whether --with-xf86vmode-ext was given.
11512 if test "${with_xf86vmode_ext+set}" = set; then
11513   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11514 else
11515   with_xf86vmode=yes
11516 fi
11517
11518
11519
11520    case "$with_xf86vmode" in
11521     yes) ;;
11522     no)  ;;
11523
11524     /*)
11525      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11526 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11527      d=$with_xf86vmode/include
11528      if test -d $d; then
11529        X_CFLAGS="-I$d $X_CFLAGS"
11530        { echo "$as_me:$LINENO: result: $d" >&5
11531 echo "${ECHO_T}$d" >&6; }
11532      else
11533        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11534 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11535      fi
11536
11537      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11538 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11539      d=$with_xf86vmode/lib
11540      if test -d $d; then
11541        X_LIBS="-L$d $X_LIBS"
11542        { echo "$as_me:$LINENO: result: $d" >&5
11543 echo "${ECHO_T}$d" >&6; }
11544      else
11545        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11546 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11547      fi
11548
11549      # replace the directory string with "yes".
11550      with_xf86vmode_req="yes"
11551      with_xf86vmode=$with_xf86vmode_req
11552      ;;
11553
11554     *)
11555      echo ""
11556      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11557      echo "       If it is a directory, then \`DIR/include' will be added to"
11558      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11559      exit 1
11560      ;;
11561    esac
11562
11563
11564 VIDMODE_LIBS=""
11565
11566 if test "$with_xf86vmode" = yes; then
11567
11568   # first check for xf86vmode.h
11569
11570   ac_save_CPPFLAGS="$CPPFLAGS"
11571   if test \! -z "$includedir" ; then
11572     CPPFLAGS="$CPPFLAGS -I$includedir"
11573   fi
11574   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11575   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11576   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11577 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11578 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11579   echo $ECHO_N "(cached) $ECHO_C" >&6
11580 else
11581   cat >conftest.$ac_ext <<_ACEOF
11582 /* confdefs.h.  */
11583 _ACEOF
11584 cat confdefs.h >>conftest.$ac_ext
11585 cat >>conftest.$ac_ext <<_ACEOF
11586 /* end confdefs.h.  */
11587 #include <X11/Xlib.h>
11588
11589 #include <X11/extensions/xf86vmode.h>
11590 _ACEOF
11591 rm -rf conftest.$ac_objext
11592 if { (ac_try="$ac_compile"
11593 case "(($ac_try" in
11594   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595   *) ac_try_echo=$ac_try;;
11596 esac
11597 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11598   (eval "$ac_compile") 2>conftest.er1
11599   ac_status=$?
11600   grep -v '^ *+' conftest.er1 >conftest.err
11601   rm -rf conftest.er1
11602   cat conftest.err >&5
11603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604   (exit $ac_status); } && {
11605          test -z "$ac_c_werror_flag" ||
11606          test ! -s conftest.err
11607        } && test -s conftest.$ac_objext; then
11608   ac_cv_header_X11_extensions_xf86vmode_h=yes
11609 else
11610   echo "$as_me: failed program was:" >&5
11611 sed 's/^/| /' conftest.$ac_ext >&5
11612
11613         ac_cv_header_X11_extensions_xf86vmode_h=no
11614 fi
11615
11616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11617 fi
11618 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11619 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11620 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11621   have_xf86vmode=yes
11622 fi
11623
11624
11625   CPPFLAGS="$ac_save_CPPFLAGS"
11626
11627   # if that succeeded, then check for the -lXxf86vm
11628   if test "$have_xf86vmode" = yes; then
11629     have_xf86vmode=no
11630
11631   ac_save_CPPFLAGS="$CPPFLAGS"
11632   ac_save_LDFLAGS="$LDFLAGS"
11633 #  ac_save_LIBS="$LIBS"
11634
11635   if test \! -z "$includedir" ; then
11636     CPPFLAGS="$CPPFLAGS -I$includedir"
11637   fi
11638   # note: $X_CFLAGS includes $x_includes
11639   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11640
11641   if test \! -z "$libdir" ; then
11642     LDFLAGS="$LDFLAGS -L$libdir"
11643   fi
11644   # note: $X_LIBS includes $x_libraries
11645   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11646
11647   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11648   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11649   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11650 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11651 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11652   echo $ECHO_N "(cached) $ECHO_C" >&6
11653 else
11654   ac_check_lib_save_LIBS=$LIBS
11655 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11656 cat >conftest.$ac_ext <<_ACEOF
11657 /* confdefs.h.  */
11658 _ACEOF
11659 cat confdefs.h >>conftest.$ac_ext
11660 cat >>conftest.$ac_ext <<_ACEOF
11661 /* end confdefs.h.  */
11662
11663 /* Override any GCC internal prototype to avoid an error.
11664    Use char because int might match the return type of a GCC
11665    builtin and then its argument prototype would still apply.  */
11666 #ifdef __cplusplus
11667 extern "C"
11668 #endif
11669 char XF86VidModeGetViewPort ();
11670 int
11671 main ()
11672 {
11673 return XF86VidModeGetViewPort ();
11674   ;
11675   return 0;
11676 }
11677 _ACEOF
11678 rm -rf conftest.$ac_objext conftest$ac_exeext
11679 if { (ac_try="$ac_link"
11680 case "(($ac_try" in
11681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11682   *) ac_try_echo=$ac_try;;
11683 esac
11684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11685   (eval "$ac_link") 2>conftest.er1
11686   ac_status=$?
11687   grep -v '^ *+' conftest.er1 >conftest.err
11688   rm -rf conftest.er1
11689   cat conftest.err >&5
11690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691   (exit $ac_status); } && {
11692          test -z "$ac_c_werror_flag" ||
11693          test ! -s conftest.err
11694        } && test -s conftest$ac_exeext &&
11695        $as_test_x conftest$ac_exeext; then
11696   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11697 else
11698   echo "$as_me: failed program was:" >&5
11699 sed 's/^/| /' conftest.$ac_ext >&5
11700
11701         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11702 fi
11703
11704 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11705       conftest$ac_exeext conftest.$ac_ext
11706 LIBS=$ac_check_lib_save_LIBS
11707 fi
11708 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11709 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11710 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11711   have_xf86vmode=yes;
11712                    VIDMODE_LIBS="-lXxf86vm";
11713                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11714 else
11715   true
11716 fi
11717
11718   CPPFLAGS="$ac_save_CPPFLAGS"
11719   LDFLAGS="$ac_save_LDFLAGS"
11720 #  LIBS="$ac_save_LIBS"
11721
11722   fi
11723
11724   # if that succeeded, then we've really got it.
11725   if test "$have_xf86vmode" = yes; then
11726     cat >>confdefs.h <<\_ACEOF
11727 #define HAVE_XF86VMODE 1
11728 _ACEOF
11729
11730   fi
11731
11732 elif test "$with_xf86vmode" != no; then
11733   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11734   exit 1
11735 fi
11736
11737
11738 ###############################################################################
11739 #
11740 #       Check for the XF86VMODE server extension (for gamma fading.)
11741 #
11742 ###############################################################################
11743
11744 have_xf86gamma=no
11745 have_xf86gamma_ramp=no
11746 with_xf86gamma_req=unspecified
11747
11748 # Check whether --with-xf86gamma-ext was given.
11749 if test "${with_xf86gamma_ext+set}" = set; then
11750   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11751 else
11752   with_xf86gamma=yes
11753 fi
11754
11755
11756
11757    case "$with_xf86gamma" in
11758     yes) ;;
11759     no)  ;;
11760
11761     /*)
11762      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11763 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11764      d=$with_xf86gamma/include
11765      if test -d $d; then
11766        X_CFLAGS="-I$d $X_CFLAGS"
11767        { echo "$as_me:$LINENO: result: $d" >&5
11768 echo "${ECHO_T}$d" >&6; }
11769      else
11770        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11771 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11772      fi
11773
11774      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11775 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11776      d=$with_xf86gamma/lib
11777      if test -d $d; then
11778        X_LIBS="-L$d $X_LIBS"
11779        { echo "$as_me:$LINENO: result: $d" >&5
11780 echo "${ECHO_T}$d" >&6; }
11781      else
11782        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11783 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11784      fi
11785
11786      # replace the directory string with "yes".
11787      with_xf86gamma_req="yes"
11788      with_xf86gamma=$with_xf86gamma_req
11789      ;;
11790
11791     *)
11792      echo ""
11793      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11794      echo "       If it is a directory, then \`DIR/include' will be added to"
11795      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11796      exit 1
11797      ;;
11798    esac
11799
11800
11801 if test "$with_xf86gamma" = yes; then
11802
11803   # first check for xf86vmode.h, if we haven't already
11804   if test "$have_xf86vmode" = yes; then
11805     have_xf86gamma=yes
11806   else
11807
11808   ac_save_CPPFLAGS="$CPPFLAGS"
11809   if test \! -z "$includedir" ; then
11810     CPPFLAGS="$CPPFLAGS -I$includedir"
11811   fi
11812   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11813   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11814   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11815 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11816 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11817   echo $ECHO_N "(cached) $ECHO_C" >&6
11818 else
11819   cat >conftest.$ac_ext <<_ACEOF
11820 /* confdefs.h.  */
11821 _ACEOF
11822 cat confdefs.h >>conftest.$ac_ext
11823 cat >>conftest.$ac_ext <<_ACEOF
11824 /* end confdefs.h.  */
11825 #include <X11/Xlib.h>
11826
11827 #include <X11/extensions/xf86vmode.h>
11828 _ACEOF
11829 rm -rf conftest.$ac_objext
11830 if { (ac_try="$ac_compile"
11831 case "(($ac_try" in
11832   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11833   *) ac_try_echo=$ac_try;;
11834 esac
11835 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11836   (eval "$ac_compile") 2>conftest.er1
11837   ac_status=$?
11838   grep -v '^ *+' conftest.er1 >conftest.err
11839   rm -rf conftest.er1
11840   cat conftest.err >&5
11841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11842   (exit $ac_status); } && {
11843          test -z "$ac_c_werror_flag" ||
11844          test ! -s conftest.err
11845        } && test -s conftest.$ac_objext; then
11846   ac_cv_header_X11_extensions_xf86vmode_h=yes
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 sed 's/^/| /' conftest.$ac_ext >&5
11850
11851         ac_cv_header_X11_extensions_xf86vmode_h=no
11852 fi
11853
11854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855 fi
11856 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11857 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11858 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11859   have_xf86gamma=yes
11860 fi
11861
11862
11863   CPPFLAGS="$ac_save_CPPFLAGS"
11864   fi
11865
11866   # if that succeeded, then check for the -lXxf86vm
11867   if test "$have_xf86gamma" = yes; then
11868     have_xf86gamma=no
11869
11870   ac_save_CPPFLAGS="$CPPFLAGS"
11871   ac_save_LDFLAGS="$LDFLAGS"
11872 #  ac_save_LIBS="$LIBS"
11873
11874   if test \! -z "$includedir" ; then
11875     CPPFLAGS="$CPPFLAGS -I$includedir"
11876   fi
11877   # note: $X_CFLAGS includes $x_includes
11878   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11879
11880   if test \! -z "$libdir" ; then
11881     LDFLAGS="$LDFLAGS -L$libdir"
11882   fi
11883   # note: $X_LIBS includes $x_libraries
11884   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11885
11886   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11887   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11888   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11889 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11890 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11891   echo $ECHO_N "(cached) $ECHO_C" >&6
11892 else
11893   ac_check_lib_save_LIBS=$LIBS
11894 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11895 cat >conftest.$ac_ext <<_ACEOF
11896 /* confdefs.h.  */
11897 _ACEOF
11898 cat confdefs.h >>conftest.$ac_ext
11899 cat >>conftest.$ac_ext <<_ACEOF
11900 /* end confdefs.h.  */
11901
11902 /* Override any GCC internal prototype to avoid an error.
11903    Use char because int might match the return type of a GCC
11904    builtin and then its argument prototype would still apply.  */
11905 #ifdef __cplusplus
11906 extern "C"
11907 #endif
11908 char XF86VidModeSetGamma ();
11909 int
11910 main ()
11911 {
11912 return XF86VidModeSetGamma ();
11913   ;
11914   return 0;
11915 }
11916 _ACEOF
11917 rm -rf conftest.$ac_objext conftest$ac_exeext
11918 if { (ac_try="$ac_link"
11919 case "(($ac_try" in
11920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11921   *) ac_try_echo=$ac_try;;
11922 esac
11923 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11924   (eval "$ac_link") 2>conftest.er1
11925   ac_status=$?
11926   grep -v '^ *+' conftest.er1 >conftest.err
11927   rm -rf conftest.er1
11928   cat conftest.err >&5
11929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11930   (exit $ac_status); } && {
11931          test -z "$ac_c_werror_flag" ||
11932          test ! -s conftest.err
11933        } && test -s conftest$ac_exeext &&
11934        $as_test_x conftest$ac_exeext; then
11935   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 sed 's/^/| /' conftest.$ac_ext >&5
11939
11940         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11941 fi
11942
11943 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11944       conftest$ac_exeext conftest.$ac_ext
11945 LIBS=$ac_check_lib_save_LIBS
11946 fi
11947 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11948 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11949 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11950   have_xf86gamma=yes
11951 else
11952   true
11953 fi
11954
11955   CPPFLAGS="$ac_save_CPPFLAGS"
11956   LDFLAGS="$ac_save_LDFLAGS"
11957 #  LIBS="$ac_save_LIBS"
11958
11959   fi
11960
11961   # check for the Ramp versions of the functions too.
11962   if test "$have_xf86gamma" = yes; then
11963     have_xf86gamma_ramp=no
11964
11965   ac_save_CPPFLAGS="$CPPFLAGS"
11966   ac_save_LDFLAGS="$LDFLAGS"
11967 #  ac_save_LIBS="$LIBS"
11968
11969   if test \! -z "$includedir" ; then
11970     CPPFLAGS="$CPPFLAGS -I$includedir"
11971   fi
11972   # note: $X_CFLAGS includes $x_includes
11973   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11974
11975   if test \! -z "$libdir" ; then
11976     LDFLAGS="$LDFLAGS -L$libdir"
11977   fi
11978   # note: $X_LIBS includes $x_libraries
11979   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11980
11981   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11982   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11983   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11984 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11985 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11986   echo $ECHO_N "(cached) $ECHO_C" >&6
11987 else
11988   ac_check_lib_save_LIBS=$LIBS
11989 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11990 cat >conftest.$ac_ext <<_ACEOF
11991 /* confdefs.h.  */
11992 _ACEOF
11993 cat confdefs.h >>conftest.$ac_ext
11994 cat >>conftest.$ac_ext <<_ACEOF
11995 /* end confdefs.h.  */
11996
11997 /* Override any GCC internal prototype to avoid an error.
11998    Use char because int might match the return type of a GCC
11999    builtin and then its argument prototype would still apply.  */
12000 #ifdef __cplusplus
12001 extern "C"
12002 #endif
12003 char XF86VidModeSetGammaRamp ();
12004 int
12005 main ()
12006 {
12007 return XF86VidModeSetGammaRamp ();
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 rm -rf conftest.$ac_objext conftest$ac_exeext
12013 if { (ac_try="$ac_link"
12014 case "(($ac_try" in
12015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12016   *) ac_try_echo=$ac_try;;
12017 esac
12018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12019   (eval "$ac_link") 2>conftest.er1
12020   ac_status=$?
12021   grep -v '^ *+' conftest.er1 >conftest.err
12022   rm -rf conftest.er1
12023   cat conftest.err >&5
12024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025   (exit $ac_status); } && {
12026          test -z "$ac_c_werror_flag" ||
12027          test ! -s conftest.err
12028        } && test -s conftest$ac_exeext &&
12029        $as_test_x conftest$ac_exeext; then
12030   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12031 else
12032   echo "$as_me: failed program was:" >&5
12033 sed 's/^/| /' conftest.$ac_ext >&5
12034
12035         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12036 fi
12037
12038 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12039       conftest$ac_exeext conftest.$ac_ext
12040 LIBS=$ac_check_lib_save_LIBS
12041 fi
12042 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12043 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12044 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12045   have_xf86gamma_ramp=yes
12046 else
12047   true
12048 fi
12049
12050   CPPFLAGS="$ac_save_CPPFLAGS"
12051   LDFLAGS="$ac_save_LDFLAGS"
12052 #  LIBS="$ac_save_LIBS"
12053
12054   fi
12055
12056   # if those tests succeeded, then we've really got the functions.
12057   if test "$have_xf86gamma" = yes; then
12058     cat >>confdefs.h <<\_ACEOF
12059 #define HAVE_XF86VMODE_GAMMA 1
12060 _ACEOF
12061
12062   fi
12063
12064   if test "$have_xf86gamma_ramp" = yes; then
12065     cat >>confdefs.h <<\_ACEOF
12066 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12067 _ACEOF
12068
12069   fi
12070
12071   # pull in the lib, if we haven't already
12072   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12073     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12074   fi
12075
12076 elif test "$with_xf86gamma" != no; then
12077   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12078   exit 1
12079 fi
12080
12081
12082 ###############################################################################
12083 #
12084 #       Check for the RANDR (Resize and Rotate) server extension.
12085 #
12086 #       We need this to detect when the resolution of the desktop
12087 #       has changed out from under us (this is a newer, different
12088 #       mechanism than the XF86VMODE virtual viewports.)
12089 #
12090 ###############################################################################
12091
12092 have_randr=no
12093 with_randr_req=unspecified
12094
12095 # Check whether --with-randr-ext was given.
12096 if test "${with_randr_ext+set}" = set; then
12097   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12098 else
12099   with_randr=yes
12100 fi
12101
12102
12103
12104    case "$with_randr" in
12105     yes) ;;
12106     no)  ;;
12107
12108     /*)
12109      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12110 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12111      d=$with_randr/include
12112      if test -d $d; then
12113        X_CFLAGS="-I$d $X_CFLAGS"
12114        { echo "$as_me:$LINENO: result: $d" >&5
12115 echo "${ECHO_T}$d" >&6; }
12116      else
12117        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12118 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12119      fi
12120
12121      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12122 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12123      d=$with_randr/lib
12124      if test -d $d; then
12125        X_LIBS="-L$d $X_LIBS"
12126        { echo "$as_me:$LINENO: result: $d" >&5
12127 echo "${ECHO_T}$d" >&6; }
12128      else
12129        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12130 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12131      fi
12132
12133      # replace the directory string with "yes".
12134      with_randr_req="yes"
12135      with_randr=$with_randr_req
12136      ;;
12137
12138     *)
12139      echo ""
12140      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12141      echo "       If it is a directory, then \`DIR/include' will be added to"
12142      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12143      exit 1
12144      ;;
12145    esac
12146
12147
12148 if test "$with_randr" = yes; then
12149
12150   # first check for Xrandr.h
12151
12152   ac_save_CPPFLAGS="$CPPFLAGS"
12153   if test \! -z "$includedir" ; then
12154     CPPFLAGS="$CPPFLAGS -I$includedir"
12155   fi
12156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12157   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12158   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12159 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12160 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12161   echo $ECHO_N "(cached) $ECHO_C" >&6
12162 else
12163   cat >conftest.$ac_ext <<_ACEOF
12164 /* confdefs.h.  */
12165 _ACEOF
12166 cat confdefs.h >>conftest.$ac_ext
12167 cat >>conftest.$ac_ext <<_ACEOF
12168 /* end confdefs.h.  */
12169 #include <X11/Xlib.h>
12170
12171 #include <X11/extensions/Xrandr.h>
12172 _ACEOF
12173 rm -rf conftest.$ac_objext
12174 if { (ac_try="$ac_compile"
12175 case "(($ac_try" in
12176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177   *) ac_try_echo=$ac_try;;
12178 esac
12179 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180   (eval "$ac_compile") 2>conftest.er1
12181   ac_status=$?
12182   grep -v '^ *+' conftest.er1 >conftest.err
12183   rm -rf conftest.er1
12184   cat conftest.err >&5
12185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186   (exit $ac_status); } && {
12187          test -z "$ac_c_werror_flag" ||
12188          test ! -s conftest.err
12189        } && test -s conftest.$ac_objext; then
12190   ac_cv_header_X11_extensions_Xrandr_h=yes
12191 else
12192   echo "$as_me: failed program was:" >&5
12193 sed 's/^/| /' conftest.$ac_ext >&5
12194
12195         ac_cv_header_X11_extensions_Xrandr_h=no
12196 fi
12197
12198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199 fi
12200 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12201 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12202 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12203   have_randr=yes
12204 fi
12205
12206
12207   CPPFLAGS="$ac_save_CPPFLAGS"
12208
12209   # if that succeeded, then check for the XRR code in the libraries
12210   if test "$have_randr" = yes; then
12211
12212     # RANDR probably needs -lXrender
12213     xrender_libs=
12214
12215   ac_save_CPPFLAGS="$CPPFLAGS"
12216   ac_save_LDFLAGS="$LDFLAGS"
12217 #  ac_save_LIBS="$LIBS"
12218
12219   if test \! -z "$includedir" ; then
12220     CPPFLAGS="$CPPFLAGS -I$includedir"
12221   fi
12222   # note: $X_CFLAGS includes $x_includes
12223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12224
12225   if test \! -z "$libdir" ; then
12226     LDFLAGS="$LDFLAGS -L$libdir"
12227   fi
12228   # note: $X_LIBS includes $x_libraries
12229   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12230
12231   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12232   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12233   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12234 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12235 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12236   echo $ECHO_N "(cached) $ECHO_C" >&6
12237 else
12238   ac_check_lib_save_LIBS=$LIBS
12239 LIBS="-lXrender -lXext -lX11 $LIBS"
12240 cat >conftest.$ac_ext <<_ACEOF
12241 /* confdefs.h.  */
12242 _ACEOF
12243 cat confdefs.h >>conftest.$ac_ext
12244 cat >>conftest.$ac_ext <<_ACEOF
12245 /* end confdefs.h.  */
12246
12247 /* Override any GCC internal prototype to avoid an error.
12248    Use char because int might match the return type of a GCC
12249    builtin and then its argument prototype would still apply.  */
12250 #ifdef __cplusplus
12251 extern "C"
12252 #endif
12253 char XRenderSetSubpixelOrder ();
12254 int
12255 main ()
12256 {
12257 return XRenderSetSubpixelOrder ();
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -rf conftest.$ac_objext conftest$ac_exeext
12263 if { (ac_try="$ac_link"
12264 case "(($ac_try" in
12265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12266   *) ac_try_echo=$ac_try;;
12267 esac
12268 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12269   (eval "$ac_link") 2>conftest.er1
12270   ac_status=$?
12271   grep -v '^ *+' conftest.er1 >conftest.err
12272   rm -rf conftest.er1
12273   cat conftest.err >&5
12274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275   (exit $ac_status); } && {
12276          test -z "$ac_c_werror_flag" ||
12277          test ! -s conftest.err
12278        } && test -s conftest$ac_exeext &&
12279        $as_test_x conftest$ac_exeext; then
12280   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 sed 's/^/| /' conftest.$ac_ext >&5
12284
12285         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12286 fi
12287
12288 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12289       conftest$ac_exeext conftest.$ac_ext
12290 LIBS=$ac_check_lib_save_LIBS
12291 fi
12292 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12293 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12294 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12295   xrender_libs="-lXrender"
12296 else
12297   true
12298 fi
12299
12300   CPPFLAGS="$ac_save_CPPFLAGS"
12301   LDFLAGS="$ac_save_LDFLAGS"
12302 #  LIBS="$ac_save_LIBS"
12303
12304
12305     # first look for RANDR in -lXext
12306     have_randr=no
12307
12308   ac_save_CPPFLAGS="$CPPFLAGS"
12309   ac_save_LDFLAGS="$LDFLAGS"
12310 #  ac_save_LIBS="$LIBS"
12311
12312   if test \! -z "$includedir" ; then
12313     CPPFLAGS="$CPPFLAGS -I$includedir"
12314   fi
12315   # note: $X_CFLAGS includes $x_includes
12316   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12317
12318   if test \! -z "$libdir" ; then
12319     LDFLAGS="$LDFLAGS -L$libdir"
12320   fi
12321   # note: $X_LIBS includes $x_libraries
12322   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12323
12324   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12325   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12326   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12327 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12328 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12329   echo $ECHO_N "(cached) $ECHO_C" >&6
12330 else
12331   ac_check_lib_save_LIBS=$LIBS
12332 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12333 cat >conftest.$ac_ext <<_ACEOF
12334 /* confdefs.h.  */
12335 _ACEOF
12336 cat confdefs.h >>conftest.$ac_ext
12337 cat >>conftest.$ac_ext <<_ACEOF
12338 /* end confdefs.h.  */
12339
12340 /* Override any GCC internal prototype to avoid an error.
12341    Use char because int might match the return type of a GCC
12342    builtin and then its argument prototype would still apply.  */
12343 #ifdef __cplusplus
12344 extern "C"
12345 #endif
12346 char XRRGetScreenInfo ();
12347 int
12348 main ()
12349 {
12350 return XRRGetScreenInfo ();
12351   ;
12352   return 0;
12353 }
12354 _ACEOF
12355 rm -rf conftest.$ac_objext conftest$ac_exeext
12356 if { (ac_try="$ac_link"
12357 case "(($ac_try" in
12358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12359   *) ac_try_echo=$ac_try;;
12360 esac
12361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12362   (eval "$ac_link") 2>conftest.er1
12363   ac_status=$?
12364   grep -v '^ *+' conftest.er1 >conftest.err
12365   rm -rf conftest.er1
12366   cat conftest.err >&5
12367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368   (exit $ac_status); } && {
12369          test -z "$ac_c_werror_flag" ||
12370          test ! -s conftest.err
12371        } && test -s conftest$ac_exeext &&
12372        $as_test_x conftest$ac_exeext; then
12373   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12374 else
12375   echo "$as_me: failed program was:" >&5
12376 sed 's/^/| /' conftest.$ac_ext >&5
12377
12378         ac_cv_lib_Xext_XRRGetScreenInfo=no
12379 fi
12380
12381 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12382       conftest$ac_exeext conftest.$ac_ext
12383 LIBS=$ac_check_lib_save_LIBS
12384 fi
12385 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12386 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12387 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12388   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12389 else
12390   true
12391 fi
12392
12393   CPPFLAGS="$ac_save_CPPFLAGS"
12394   LDFLAGS="$ac_save_LDFLAGS"
12395 #  LIBS="$ac_save_LIBS"
12396
12397
12398     # if that failed, look in -lXrandr
12399     if test "$have_randr" = no; then
12400
12401   ac_save_CPPFLAGS="$CPPFLAGS"
12402   ac_save_LDFLAGS="$LDFLAGS"
12403 #  ac_save_LIBS="$LIBS"
12404
12405   if test \! -z "$includedir" ; then
12406     CPPFLAGS="$CPPFLAGS -I$includedir"
12407   fi
12408   # note: $X_CFLAGS includes $x_includes
12409   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12410
12411   if test \! -z "$libdir" ; then
12412     LDFLAGS="$LDFLAGS -L$libdir"
12413   fi
12414   # note: $X_LIBS includes $x_libraries
12415   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12416
12417   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12418   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12419   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12420 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12421 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12422   echo $ECHO_N "(cached) $ECHO_C" >&6
12423 else
12424   ac_check_lib_save_LIBS=$LIBS
12425 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12426 cat >conftest.$ac_ext <<_ACEOF
12427 /* confdefs.h.  */
12428 _ACEOF
12429 cat confdefs.h >>conftest.$ac_ext
12430 cat >>conftest.$ac_ext <<_ACEOF
12431 /* end confdefs.h.  */
12432
12433 /* Override any GCC internal prototype to avoid an error.
12434    Use char because int might match the return type of a GCC
12435    builtin and then its argument prototype would still apply.  */
12436 #ifdef __cplusplus
12437 extern "C"
12438 #endif
12439 char XRRGetScreenInfo ();
12440 int
12441 main ()
12442 {
12443 return XRRGetScreenInfo ();
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448 rm -rf conftest.$ac_objext conftest$ac_exeext
12449 if { (ac_try="$ac_link"
12450 case "(($ac_try" in
12451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12452   *) ac_try_echo=$ac_try;;
12453 esac
12454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12455   (eval "$ac_link") 2>conftest.er1
12456   ac_status=$?
12457   grep -v '^ *+' conftest.er1 >conftest.err
12458   rm -rf conftest.er1
12459   cat conftest.err >&5
12460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461   (exit $ac_status); } && {
12462          test -z "$ac_c_werror_flag" ||
12463          test ! -s conftest.err
12464        } && test -s conftest$ac_exeext &&
12465        $as_test_x conftest$ac_exeext; then
12466   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 sed 's/^/| /' conftest.$ac_ext >&5
12470
12471         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12472 fi
12473
12474 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12475       conftest$ac_exeext conftest.$ac_ext
12476 LIBS=$ac_check_lib_save_LIBS
12477 fi
12478 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12479 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12480 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12481   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12482 else
12483   true
12484 fi
12485
12486   CPPFLAGS="$ac_save_CPPFLAGS"
12487   LDFLAGS="$ac_save_LDFLAGS"
12488 #  LIBS="$ac_save_LIBS"
12489
12490     fi
12491   fi
12492
12493   # if that succeeded, then we've really got it.
12494   if test "$have_randr" = yes; then
12495     cat >>confdefs.h <<\_ACEOF
12496 #define HAVE_RANDR 1
12497 _ACEOF
12498
12499
12500     # Now check for version 1.2 in the same libs.
12501     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12502     { echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12503 echo $ECHO_N "checking for XRRGetScreenResources... $ECHO_C" >&6; }
12504 if test "${ac_cv_randr_12+set}" = set; then
12505   echo $ECHO_N "(cached) $ECHO_C" >&6
12506 else
12507   ac_cv_randr_12=no
12508
12509   ac_save_CPPFLAGS="$CPPFLAGS"
12510   if test \! -z "$includedir" ; then
12511     CPPFLAGS="$CPPFLAGS -I$includedir"
12512   fi
12513   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12514   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12515   cat >conftest.$ac_ext <<_ACEOF
12516 /* confdefs.h.  */
12517 _ACEOF
12518 cat confdefs.h >>conftest.$ac_ext
12519 cat >>conftest.$ac_ext <<_ACEOF
12520 /* end confdefs.h.  */
12521 #include <stdlib.h>
12522                          #include <X11/Xlib.h>
12523                          #include <X11/extensions/Xrandr.h>
12524 int
12525 main ()
12526 {
12527 XRRScreenResources *res =
12528                            XRRGetScreenResources (0, 0);
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -rf conftest.$ac_objext
12534 if { (ac_try="$ac_compile"
12535 case "(($ac_try" in
12536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12537   *) ac_try_echo=$ac_try;;
12538 esac
12539 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12540   (eval "$ac_compile") 2>conftest.er1
12541   ac_status=$?
12542   grep -v '^ *+' conftest.er1 >conftest.err
12543   rm -rf conftest.er1
12544   cat conftest.err >&5
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); } && {
12547          test -z "$ac_c_werror_flag" ||
12548          test ! -s conftest.err
12549        } && test -s conftest.$ac_objext; then
12550   ac_cv_randr_12=yes
12551 else
12552   echo "$as_me: failed program was:" >&5
12553 sed 's/^/| /' conftest.$ac_ext >&5
12554
12555         ac_cv_randr_12=no
12556 fi
12557
12558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12559   CPPFLAGS="$ac_save_CPPFLAGS"
12560 fi
12561 { echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12562 echo "${ECHO_T}$ac_cv_randr_12" >&6; }
12563     if test "$ac_cv_randr_12" = yes ; then
12564       cat >>confdefs.h <<\_ACEOF
12565 #define HAVE_RANDR_12 1
12566 _ACEOF
12567
12568     fi
12569 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
12570 #                  [true], $SAVER_LIBS)
12571   fi
12572
12573
12574 elif test "$with_randr" != no; then
12575   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12576   exit 1
12577 fi
12578
12579
12580 ###############################################################################
12581 #
12582 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12583 #       using other XF86 stuff.)
12584 #
12585 ###############################################################################
12586
12587 have_xf86miscsetgrabkeysstate=no
12588 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12589
12590   ac_save_CPPFLAGS="$CPPFLAGS"
12591   ac_save_LDFLAGS="$LDFLAGS"
12592 #  ac_save_LIBS="$LIBS"
12593
12594   if test \! -z "$includedir" ; then
12595     CPPFLAGS="$CPPFLAGS -I$includedir"
12596   fi
12597   # note: $X_CFLAGS includes $x_includes
12598   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12599
12600   if test \! -z "$libdir" ; then
12601     LDFLAGS="$LDFLAGS -L$libdir"
12602   fi
12603   # note: $X_LIBS includes $x_libraries
12604   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12605
12606   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12607   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12608   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12609 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12610 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12611   echo $ECHO_N "(cached) $ECHO_C" >&6
12612 else
12613   ac_check_lib_save_LIBS=$LIBS
12614 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12615 cat >conftest.$ac_ext <<_ACEOF
12616 /* confdefs.h.  */
12617 _ACEOF
12618 cat confdefs.h >>conftest.$ac_ext
12619 cat >>conftest.$ac_ext <<_ACEOF
12620 /* end confdefs.h.  */
12621
12622 /* Override any GCC internal prototype to avoid an error.
12623    Use char because int might match the return type of a GCC
12624    builtin and then its argument prototype would still apply.  */
12625 #ifdef __cplusplus
12626 extern "C"
12627 #endif
12628 char XF86MiscSetGrabKeysState ();
12629 int
12630 main ()
12631 {
12632 return XF86MiscSetGrabKeysState ();
12633   ;
12634   return 0;
12635 }
12636 _ACEOF
12637 rm -rf conftest.$ac_objext conftest$ac_exeext
12638 if { (ac_try="$ac_link"
12639 case "(($ac_try" in
12640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12641   *) ac_try_echo=$ac_try;;
12642 esac
12643 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12644   (eval "$ac_link") 2>conftest.er1
12645   ac_status=$?
12646   grep -v '^ *+' conftest.er1 >conftest.err
12647   rm -rf conftest.er1
12648   cat conftest.err >&5
12649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650   (exit $ac_status); } && {
12651          test -z "$ac_c_werror_flag" ||
12652          test ! -s conftest.err
12653        } && test -s conftest$ac_exeext &&
12654        $as_test_x conftest$ac_exeext; then
12655   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 sed 's/^/| /' conftest.$ac_ext >&5
12659
12660         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12661 fi
12662
12663 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12664       conftest$ac_exeext conftest.$ac_ext
12665 LIBS=$ac_check_lib_save_LIBS
12666 fi
12667 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12668 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12669 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12670   have_xf86miscsetgrabkeysstate=yes
12671 else
12672   true
12673 fi
12674
12675   CPPFLAGS="$ac_save_CPPFLAGS"
12676   LDFLAGS="$ac_save_LDFLAGS"
12677 #  LIBS="$ac_save_LIBS"
12678
12679   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12680     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12681     cat >>confdefs.h <<\_ACEOF
12682 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12683 _ACEOF
12684
12685   fi
12686 fi
12687
12688
12689 ###############################################################################
12690 #
12691 #       Check for HP XHPDisableReset and XHPEnableReset.
12692 #
12693 ###############################################################################
12694
12695 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12696 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12697
12698   ac_save_CPPFLAGS="$CPPFLAGS"
12699   if test \! -z "$includedir" ; then
12700     CPPFLAGS="$CPPFLAGS -I$includedir"
12701   fi
12702   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12703   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12704   cat >conftest.$ac_ext <<_ACEOF
12705 /* confdefs.h.  */
12706 _ACEOF
12707 cat confdefs.h >>conftest.$ac_ext
12708 cat >>conftest.$ac_ext <<_ACEOF
12709 /* end confdefs.h.  */
12710 #include <X11/XHPlib.h>
12711
12712 _ACEOF
12713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12714   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12715   cat >>confdefs.h <<\_ACEOF
12716 #define HAVE_XHPDISABLERESET 1
12717 _ACEOF
12718
12719                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12720                    { echo "$as_me:$LINENO: result: yes" >&5
12721 echo "${ECHO_T}yes" >&6; }
12722 else
12723   { echo "$as_me:$LINENO: result: no" >&5
12724 echo "${ECHO_T}no" >&6; }
12725 fi
12726 rm -f -r conftest*
12727
12728   CPPFLAGS="$ac_save_CPPFLAGS"
12729
12730
12731 ###############################################################################
12732 #
12733 #       Check for /proc/interrupts.
12734 #
12735 ###############################################################################
12736
12737 have_proc_interrupts=no
12738 with_proc_interrupts_req=unspecified
12739
12740 # Check whether --with-proc-interrupts was given.
12741 if test "${with_proc_interrupts+set}" = set; then
12742   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12743 else
12744   with_proc_interrupts=yes
12745 fi
12746
12747
12748 if test "$with_proc_interrupts" = yes; then
12749
12750   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12751   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12752   # check that it has the bits we need, but otherwise we'll just go on faith.
12753   #
12754   have_proc_interrupts=yes
12755
12756   if test -f /proc/interrupts; then
12757    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12758 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12759 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12760   echo $ECHO_N "(cached) $ECHO_C" >&6
12761 else
12762   ac_cv_have_proc_interrupts=no
12763      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12764        ac_cv_have_proc_interrupts=yes
12765      fi
12766
12767 fi
12768 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12769 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12770    have_proc_interrupts=$ac_cv_have_proc_interrupts
12771   fi
12772
12773   if test "$have_proc_interrupts" = yes; then
12774     cat >>confdefs.h <<\_ACEOF
12775 #define HAVE_PROC_INTERRUPTS 1
12776 _ACEOF
12777
12778   fi
12779
12780 elif test "$with_proc_interrupts" != no; then
12781   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12782   exit 1
12783 fi
12784
12785
12786 ###############################################################################
12787 #
12788 #       The --enable-locking option
12789 #
12790 ###############################################################################
12791
12792 # Check whether --enable-locking was given.
12793 if test "${enable_locking+set}" = set; then
12794   enableval=$enable_locking; enable_locking="$enableval"
12795 else
12796   if test "$ac_macosx" = yes; then
12797     # We can't lock on MacOS X, so default to not compiling in support for it.
12798     # But allow --enable-locking to override that, so I can debug Linux locking
12799     # under MacOS X11.
12800     enable_locking=no
12801    else
12802     enable_locking=yes
12803    fi
12804 fi
12805
12806 if test "$enable_locking" = yes; then
12807   true
12808 elif test "$enable_locking" = no; then
12809   cat >>confdefs.h <<\_ACEOF
12810 #define NO_LOCKING 1
12811 _ACEOF
12812
12813 else
12814   echo "error: must be yes or no: --enable-locking=$enable_locking"
12815   exit 1
12816 fi
12817
12818
12819 ###############################################################################
12820 #
12821 #       Whether to allow root password to unblank.
12822 #
12823 ###############################################################################
12824 # Check whether --enable-root-passwd was given.
12825 if test "${enable_root_passwd+set}" = set; then
12826   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12827 else
12828   enable_root_passwd=yes
12829 fi
12830
12831 if test "$enable_root_passwd" = yes; then
12832   cat >>confdefs.h <<\_ACEOF
12833 #define ALLOW_ROOT_PASSWD 1
12834 _ACEOF
12835
12836   true
12837 elif test "$enable_root_passwd" != no; then
12838   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12839   exit 1
12840 fi
12841
12842 ###############################################################################
12843 #
12844 #       Check for PAM.
12845 #
12846 ###############################################################################
12847
12848 case "$host" in
12849   *-solaris*)
12850    # Solaris systems tend to come with PAM misconfigured.
12851    #  Don't build it by default, even if the headers exist.
12852    with_pam_default=no
12853    ;;
12854   *)
12855    # Default to building PAM support on all other systems, if it exists.
12856    with_pam_default=yes
12857   ;;
12858 esac
12859
12860 have_pam=no
12861 with_pam_req=unspecified
12862
12863
12864 # Check whether --with-pam was given.
12865 if test "${with_pam+set}" = set; then
12866   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12867 else
12868   with_pam=$with_pam_default
12869 fi
12870
12871
12872
12873 # Check whether --with-pam_service_name was given.
12874 if test "${with_pam_service_name+set}" = set; then
12875   withval=$with_pam_service_name; pam_service_name="$withval"
12876 else
12877   pam_service_name="xscreensaver"
12878 fi
12879
12880
12881
12882    case "$with_pam" in
12883     yes) ;;
12884     no)  ;;
12885
12886     /*)
12887      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12888 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12889      d=$with_pam/include
12890      if test -d $d; then
12891        X_CFLAGS="-I$d $X_CFLAGS"
12892        { echo "$as_me:$LINENO: result: $d" >&5
12893 echo "${ECHO_T}$d" >&6; }
12894      else
12895        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12896 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12897      fi
12898
12899      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12900 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12901      d=$with_pam/lib
12902      if test -d $d; then
12903        X_LIBS="-L$d $X_LIBS"
12904        { echo "$as_me:$LINENO: result: $d" >&5
12905 echo "${ECHO_T}$d" >&6; }
12906      else
12907        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12908 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12909      fi
12910
12911      # replace the directory string with "yes".
12912      with_pam_req="yes"
12913      with_pam=$with_pam_req
12914      ;;
12915
12916     *)
12917      echo ""
12918      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12919      echo "       If it is a directory, then \`DIR/include' will be added to"
12920      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12921      exit 1
12922      ;;
12923    esac
12924
12925
12926 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12927   { echo "$as_me:$LINENO: checking for PAM" >&5
12928 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12929 if test "${ac_cv_pam+set}" = set; then
12930   echo $ECHO_N "(cached) $ECHO_C" >&6
12931 else
12932
12933   ac_save_CPPFLAGS="$CPPFLAGS"
12934   if test \! -z "$includedir" ; then
12935     CPPFLAGS="$CPPFLAGS -I$includedir"
12936   fi
12937   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12938   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12939   cat >conftest.$ac_ext <<_ACEOF
12940 /* confdefs.h.  */
12941 _ACEOF
12942 cat confdefs.h >>conftest.$ac_ext
12943 cat >>conftest.$ac_ext <<_ACEOF
12944 /* end confdefs.h.  */
12945 #include <security/pam_appl.h>
12946 int
12947 main ()
12948 {
12949
12950   ;
12951   return 0;
12952 }
12953 _ACEOF
12954 rm -rf conftest.$ac_objext
12955 if { (ac_try="$ac_compile"
12956 case "(($ac_try" in
12957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12958   *) ac_try_echo=$ac_try;;
12959 esac
12960 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12961   (eval "$ac_compile") 2>conftest.er1
12962   ac_status=$?
12963   grep -v '^ *+' conftest.er1 >conftest.err
12964   rm -rf conftest.er1
12965   cat conftest.err >&5
12966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967   (exit $ac_status); } && {
12968          test -z "$ac_c_werror_flag" ||
12969          test ! -s conftest.err
12970        } && test -s conftest.$ac_objext; then
12971   ac_cv_pam=yes
12972 else
12973   echo "$as_me: failed program was:" >&5
12974 sed 's/^/| /' conftest.$ac_ext >&5
12975
12976         ac_cv_pam=no
12977 fi
12978
12979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12980   CPPFLAGS="$ac_save_CPPFLAGS"
12981 fi
12982 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12983 echo "${ECHO_T}$ac_cv_pam" >&6; }
12984   if test "$ac_cv_pam" = yes ; then
12985     have_pam=yes
12986     cat >>confdefs.h <<\_ACEOF
12987 #define HAVE_PAM 1
12988 _ACEOF
12989
12990     cat >>confdefs.h <<_ACEOF
12991 #define PAM_SERVICE_NAME "$pam_service_name"
12992 _ACEOF
12993
12994
12995     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12996
12997     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12998     # those are in libc.  On Linux and Solaris, they're in libdl.
12999     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13000 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13001 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13002   echo $ECHO_N "(cached) $ECHO_C" >&6
13003 else
13004   ac_check_lib_save_LIBS=$LIBS
13005 LIBS="-ldl  $LIBS"
13006 cat >conftest.$ac_ext <<_ACEOF
13007 /* confdefs.h.  */
13008 _ACEOF
13009 cat confdefs.h >>conftest.$ac_ext
13010 cat >>conftest.$ac_ext <<_ACEOF
13011 /* end confdefs.h.  */
13012
13013 /* Override any GCC internal prototype to avoid an error.
13014    Use char because int might match the return type of a GCC
13015    builtin and then its argument prototype would still apply.  */
13016 #ifdef __cplusplus
13017 extern "C"
13018 #endif
13019 char dlopen ();
13020 int
13021 main ()
13022 {
13023 return dlopen ();
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -rf conftest.$ac_objext conftest$ac_exeext
13029 if { (ac_try="$ac_link"
13030 case "(($ac_try" in
13031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13032   *) ac_try_echo=$ac_try;;
13033 esac
13034 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13035   (eval "$ac_link") 2>conftest.er1
13036   ac_status=$?
13037   grep -v '^ *+' conftest.er1 >conftest.err
13038   rm -rf conftest.er1
13039   cat conftest.err >&5
13040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13041   (exit $ac_status); } && {
13042          test -z "$ac_c_werror_flag" ||
13043          test ! -s conftest.err
13044        } && test -s conftest$ac_exeext &&
13045        $as_test_x conftest$ac_exeext; then
13046   ac_cv_lib_dl_dlopen=yes
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 sed 's/^/| /' conftest.$ac_ext >&5
13050
13051         ac_cv_lib_dl_dlopen=no
13052 fi
13053
13054 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13055       conftest$ac_exeext conftest.$ac_ext
13056 LIBS=$ac_check_lib_save_LIBS
13057 fi
13058 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13059 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13060 if test $ac_cv_lib_dl_dlopen = yes; then
13061   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13062 fi
13063
13064
13065     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13066     have_timedwait=no
13067     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13068 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13069 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13070   echo $ECHO_N "(cached) $ECHO_C" >&6
13071 else
13072   ac_check_lib_save_LIBS=$LIBS
13073 LIBS="-lc  $LIBS"
13074 cat >conftest.$ac_ext <<_ACEOF
13075 /* confdefs.h.  */
13076 _ACEOF
13077 cat confdefs.h >>conftest.$ac_ext
13078 cat >>conftest.$ac_ext <<_ACEOF
13079 /* end confdefs.h.  */
13080
13081 /* Override any GCC internal prototype to avoid an error.
13082    Use char because int might match the return type of a GCC
13083    builtin and then its argument prototype would still apply.  */
13084 #ifdef __cplusplus
13085 extern "C"
13086 #endif
13087 char sigtimedwait ();
13088 int
13089 main ()
13090 {
13091 return sigtimedwait ();
13092   ;
13093   return 0;
13094 }
13095 _ACEOF
13096 rm -rf conftest.$ac_objext conftest$ac_exeext
13097 if { (ac_try="$ac_link"
13098 case "(($ac_try" in
13099   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13100   *) ac_try_echo=$ac_try;;
13101 esac
13102 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13103   (eval "$ac_link") 2>conftest.er1
13104   ac_status=$?
13105   grep -v '^ *+' conftest.er1 >conftest.err
13106   rm -rf conftest.er1
13107   cat conftest.err >&5
13108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109   (exit $ac_status); } && {
13110          test -z "$ac_c_werror_flag" ||
13111          test ! -s conftest.err
13112        } && test -s conftest$ac_exeext &&
13113        $as_test_x conftest$ac_exeext; then
13114   ac_cv_lib_c_sigtimedwait=yes
13115 else
13116   echo "$as_me: failed program was:" >&5
13117 sed 's/^/| /' conftest.$ac_ext >&5
13118
13119         ac_cv_lib_c_sigtimedwait=no
13120 fi
13121
13122 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13123       conftest$ac_exeext conftest.$ac_ext
13124 LIBS=$ac_check_lib_save_LIBS
13125 fi
13126 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13127 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13128 if test $ac_cv_lib_c_sigtimedwait = yes; then
13129   have_timedwait=yes
13130                   cat >>confdefs.h <<\_ACEOF
13131 #define HAVE_SIGTIMEDWAIT 1
13132 _ACEOF
13133
13134 fi
13135
13136     if test "$have_timedwait" = no ; then
13137       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13138 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13139 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13140   echo $ECHO_N "(cached) $ECHO_C" >&6
13141 else
13142   ac_check_lib_save_LIBS=$LIBS
13143 LIBS="-lrt  $LIBS"
13144 cat >conftest.$ac_ext <<_ACEOF
13145 /* confdefs.h.  */
13146 _ACEOF
13147 cat confdefs.h >>conftest.$ac_ext
13148 cat >>conftest.$ac_ext <<_ACEOF
13149 /* end confdefs.h.  */
13150
13151 /* Override any GCC internal prototype to avoid an error.
13152    Use char because int might match the return type of a GCC
13153    builtin and then its argument prototype would still apply.  */
13154 #ifdef __cplusplus
13155 extern "C"
13156 #endif
13157 char sigtimedwait ();
13158 int
13159 main ()
13160 {
13161 return sigtimedwait ();
13162   ;
13163   return 0;
13164 }
13165 _ACEOF
13166 rm -rf conftest.$ac_objext conftest$ac_exeext
13167 if { (ac_try="$ac_link"
13168 case "(($ac_try" in
13169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13170   *) ac_try_echo=$ac_try;;
13171 esac
13172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13173   (eval "$ac_link") 2>conftest.er1
13174   ac_status=$?
13175   grep -v '^ *+' conftest.er1 >conftest.err
13176   rm -rf conftest.er1
13177   cat conftest.err >&5
13178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13179   (exit $ac_status); } && {
13180          test -z "$ac_c_werror_flag" ||
13181          test ! -s conftest.err
13182        } && test -s conftest$ac_exeext &&
13183        $as_test_x conftest$ac_exeext; then
13184   ac_cv_lib_rt_sigtimedwait=yes
13185 else
13186   echo "$as_me: failed program was:" >&5
13187 sed 's/^/| /' conftest.$ac_ext >&5
13188
13189         ac_cv_lib_rt_sigtimedwait=no
13190 fi
13191
13192 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13193       conftest$ac_exeext conftest.$ac_ext
13194 LIBS=$ac_check_lib_save_LIBS
13195 fi
13196 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13197 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13198 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13199   have_timedwait=yes
13200                                       cat >>confdefs.h <<\_ACEOF
13201 #define HAVE_SIGTIMEDWAIT 1
13202 _ACEOF
13203
13204                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13205 fi
13206
13207     fi
13208
13209     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13210 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13211     if test "${ac_cv_pam_strerror_args+set}" = set; then
13212   echo $ECHO_N "(cached) $ECHO_C" >&6
13213 else
13214
13215   ac_save_CPPFLAGS="$CPPFLAGS"
13216   if test \! -z "$includedir" ; then
13217     CPPFLAGS="$CPPFLAGS -I$includedir"
13218   fi
13219   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13220   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13221   cat >conftest.$ac_ext <<_ACEOF
13222 /* confdefs.h.  */
13223 _ACEOF
13224 cat confdefs.h >>conftest.$ac_ext
13225 cat >>conftest.$ac_ext <<_ACEOF
13226 /* end confdefs.h.  */
13227 #include <stdio.h>
13228                         #include <stdlib.h>
13229                         #include <security/pam_appl.h>
13230 int
13231 main ()
13232 {
13233 pam_handle_t *pamh = 0;
13234                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13235   ;
13236   return 0;
13237 }
13238 _ACEOF
13239 rm -rf conftest.$ac_objext
13240 if { (ac_try="$ac_compile"
13241 case "(($ac_try" in
13242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13243   *) ac_try_echo=$ac_try;;
13244 esac
13245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13246   (eval "$ac_compile") 2>conftest.er1
13247   ac_status=$?
13248   grep -v '^ *+' conftest.er1 >conftest.err
13249   rm -rf conftest.er1
13250   cat conftest.err >&5
13251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13252   (exit $ac_status); } && {
13253          test -z "$ac_c_werror_flag" ||
13254          test ! -s conftest.err
13255        } && test -s conftest.$ac_objext; then
13256   ac_pam_strerror_args=2
13257 else
13258   echo "$as_me: failed program was:" >&5
13259 sed 's/^/| /' conftest.$ac_ext >&5
13260
13261
13262   ac_save_CPPFLAGS="$CPPFLAGS"
13263   if test \! -z "$includedir" ; then
13264     CPPFLAGS="$CPPFLAGS -I$includedir"
13265   fi
13266   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13267   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13268   cat >conftest.$ac_ext <<_ACEOF
13269 /* confdefs.h.  */
13270 _ACEOF
13271 cat confdefs.h >>conftest.$ac_ext
13272 cat >>conftest.$ac_ext <<_ACEOF
13273 /* end confdefs.h.  */
13274 #include <stdio.h>
13275                                           #include <stdlib.h>
13276                                           #include <security/pam_appl.h>
13277 int
13278 main ()
13279 {
13280 char *s =
13281                                            pam_strerror(PAM_SUCCESS);
13282   ;
13283   return 0;
13284 }
13285 _ACEOF
13286 rm -rf conftest.$ac_objext
13287 if { (ac_try="$ac_compile"
13288 case "(($ac_try" in
13289   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13290   *) ac_try_echo=$ac_try;;
13291 esac
13292 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13293   (eval "$ac_compile") 2>conftest.er1
13294   ac_status=$?
13295   grep -v '^ *+' conftest.er1 >conftest.err
13296   rm -rf conftest.er1
13297   cat conftest.err >&5
13298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13299   (exit $ac_status); } && {
13300          test -z "$ac_c_werror_flag" ||
13301          test ! -s conftest.err
13302        } && test -s conftest.$ac_objext; then
13303   ac_pam_strerror_args=1
13304 else
13305   echo "$as_me: failed program was:" >&5
13306 sed 's/^/| /' conftest.$ac_ext >&5
13307
13308         ac_pam_strerror_args=0
13309 fi
13310
13311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312   CPPFLAGS="$ac_save_CPPFLAGS"
13313 fi
13314
13315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316   CPPFLAGS="$ac_save_CPPFLAGS"
13317       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13318 fi
13319
13320     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13321     if test "$ac_pam_strerror_args" = 1 ; then
13322       { echo "$as_me:$LINENO: result: one argument" >&5
13323 echo "${ECHO_T}one argument" >&6; }
13324     elif test "$ac_pam_strerror_args" = 2 ; then
13325       cat >>confdefs.h <<\_ACEOF
13326 #define PAM_STRERROR_TWO_ARGS 1
13327 _ACEOF
13328
13329       { echo "$as_me:$LINENO: result: two arguments" >&5
13330 echo "${ECHO_T}two arguments" >&6; }
13331     else
13332       { echo "$as_me:$LINENO: result: unknown" >&5
13333 echo "${ECHO_T}unknown" >&6; }
13334     fi
13335
13336 # Check pam_fail_delay
13337     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13338 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13339     if test "${ac_cv_pam_fail_delay+set}" = set; then
13340   echo $ECHO_N "(cached) $ECHO_C" >&6
13341 else
13342   ac_save_LDFLAGS="$LDFLAGS"
13343       LDFLAGS="-lpam"
13344       cat >conftest.$ac_ext <<_ACEOF
13345 /* confdefs.h.  */
13346 _ACEOF
13347 cat confdefs.h >>conftest.$ac_ext
13348 cat >>conftest.$ac_ext <<_ACEOF
13349 /* end confdefs.h.  */
13350 #include <security/pam_appl.h>
13351 int
13352 main ()
13353 {
13354 pam_handle_t *pamh = 0;
13355                    unsigned int usec = 1;
13356                    int status = pam_fail_delay (pamh, usec);
13357   ;
13358   return 0;
13359 }
13360 _ACEOF
13361 rm -rf conftest.$ac_objext conftest$ac_exeext
13362 if { (ac_try="$ac_link"
13363 case "(($ac_try" in
13364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13365   *) ac_try_echo=$ac_try;;
13366 esac
13367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13368   (eval "$ac_link") 2>conftest.er1
13369   ac_status=$?
13370   grep -v '^ *+' conftest.er1 >conftest.err
13371   rm -rf conftest.er1
13372   cat conftest.err >&5
13373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374   (exit $ac_status); } && {
13375          test -z "$ac_c_werror_flag" ||
13376          test ! -s conftest.err
13377        } && test -s conftest$ac_exeext &&
13378        $as_test_x conftest$ac_exeext; then
13379   ac_pam_fail_delay=yes
13380 else
13381   echo "$as_me: failed program was:" >&5
13382 sed 's/^/| /' conftest.$ac_ext >&5
13383
13384         ac_pam_fail_delay=no
13385 fi
13386
13387 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13388       conftest$ac_exeext conftest.$ac_ext
13389       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13390       LDFLAGS=$ac_save_LDFLAGS
13391 fi
13392
13393
13394       if test "$ac_pam_fail_delay" = yes ; then
13395         { echo "$as_me:$LINENO: result: yes" >&5
13396 echo "${ECHO_T}yes" >&6; }
13397         cat >>confdefs.h <<\_ACEOF
13398 #define HAVE_PAM_FAIL_DELAY 1
13399 _ACEOF
13400
13401       else
13402         { echo "$as_me:$LINENO: result: no" >&5
13403 echo "${ECHO_T}no" >&6; }
13404       fi
13405
13406   fi
13407 fi
13408
13409
13410 ###############################################################################
13411 #
13412 #       Check for Kerberos.
13413 #
13414 ###############################################################################
13415
13416 have_kerberos=no
13417 have_kerberos5=no
13418 with_kerberos_req=unspecified
13419
13420
13421 # Check whether --with-kerberos was given.
13422 if test "${with_kerberos+set}" = set; then
13423   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13424 else
13425   with_kerberos=yes
13426 fi
13427
13428
13429
13430    case "$with_kerberos" in
13431     yes) ;;
13432     no)  ;;
13433
13434     /*)
13435      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13436 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13437      d=$with_kerberos/include
13438      if test -d $d; then
13439        X_CFLAGS="-I$d $X_CFLAGS"
13440        { echo "$as_me:$LINENO: result: $d" >&5
13441 echo "${ECHO_T}$d" >&6; }
13442      else
13443        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13444 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13445      fi
13446
13447      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13448 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13449      d=$with_kerberos/lib
13450      if test -d $d; then
13451        X_LIBS="-L$d $X_LIBS"
13452        { echo "$as_me:$LINENO: result: $d" >&5
13453 echo "${ECHO_T}$d" >&6; }
13454      else
13455        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13456 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13457      fi
13458
13459      # replace the directory string with "yes".
13460      with_kerberos_req="yes"
13461      with_kerberos=$with_kerberos_req
13462      ;;
13463
13464     *)
13465      echo ""
13466      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13467      echo "       If it is a directory, then \`DIR/include' will be added to"
13468      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13469      exit 1
13470      ;;
13471    esac
13472
13473
13474 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13475   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13476 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13477 if test "${ac_cv_kerberos+set}" = set; then
13478   echo $ECHO_N "(cached) $ECHO_C" >&6
13479 else
13480
13481   ac_save_CPPFLAGS="$CPPFLAGS"
13482   if test \! -z "$includedir" ; then
13483     CPPFLAGS="$CPPFLAGS -I$includedir"
13484   fi
13485   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13487   cat >conftest.$ac_ext <<_ACEOF
13488 /* confdefs.h.  */
13489 _ACEOF
13490 cat confdefs.h >>conftest.$ac_ext
13491 cat >>conftest.$ac_ext <<_ACEOF
13492 /* end confdefs.h.  */
13493 #include <krb.h>
13494 int
13495 main ()
13496 {
13497
13498   ;
13499   return 0;
13500 }
13501 _ACEOF
13502 rm -rf conftest.$ac_objext
13503 if { (ac_try="$ac_compile"
13504 case "(($ac_try" in
13505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13506   *) ac_try_echo=$ac_try;;
13507 esac
13508 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13509   (eval "$ac_compile") 2>conftest.er1
13510   ac_status=$?
13511   grep -v '^ *+' conftest.er1 >conftest.err
13512   rm -rf conftest.er1
13513   cat conftest.err >&5
13514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515   (exit $ac_status); } && {
13516          test -z "$ac_c_werror_flag" ||
13517          test ! -s conftest.err
13518        } && test -s conftest.$ac_objext; then
13519   ac_cv_kerberos=yes
13520 else
13521   echo "$as_me: failed program was:" >&5
13522 sed 's/^/| /' conftest.$ac_ext >&5
13523
13524         ac_cv_kerberos=no
13525 fi
13526
13527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528   CPPFLAGS="$ac_save_CPPFLAGS"
13529 fi
13530 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13531 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13532   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13533 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13534 if test "${ac_cv_kerberos5+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537
13538   ac_save_CPPFLAGS="$CPPFLAGS"
13539   if test \! -z "$includedir" ; then
13540     CPPFLAGS="$CPPFLAGS -I$includedir"
13541   fi
13542   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13543   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13544   cat >conftest.$ac_ext <<_ACEOF
13545 /* confdefs.h.  */
13546 _ACEOF
13547 cat confdefs.h >>conftest.$ac_ext
13548 cat >>conftest.$ac_ext <<_ACEOF
13549 /* end confdefs.h.  */
13550 #include <kerberosIV/krb.h>
13551 int
13552 main ()
13553 {
13554
13555   ;
13556   return 0;
13557 }
13558 _ACEOF
13559 rm -rf conftest.$ac_objext
13560 if { (ac_try="$ac_compile"
13561 case "(($ac_try" in
13562   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13563   *) ac_try_echo=$ac_try;;
13564 esac
13565 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13566   (eval "$ac_compile") 2>conftest.er1
13567   ac_status=$?
13568   grep -v '^ *+' conftest.er1 >conftest.err
13569   rm -rf conftest.er1
13570   cat conftest.err >&5
13571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572   (exit $ac_status); } && {
13573          test -z "$ac_c_werror_flag" ||
13574          test ! -s conftest.err
13575        } && test -s conftest.$ac_objext; then
13576   ac_cv_kerberos5=yes
13577 else
13578   echo "$as_me: failed program was:" >&5
13579 sed 's/^/| /' conftest.$ac_ext >&5
13580
13581         ac_cv_kerberos5=no
13582 fi
13583
13584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585   CPPFLAGS="$ac_save_CPPFLAGS"
13586 fi
13587 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13588 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13589
13590   if test "$ac_cv_kerberos" = yes ; then
13591     have_kerberos=yes
13592     cat >>confdefs.h <<\_ACEOF
13593 #define HAVE_KERBEROS 1
13594 _ACEOF
13595
13596   fi
13597
13598   if test "$ac_cv_kerberos5" = yes ; then
13599
13600     # Andrew Snare <ajs@pigpond.com> wrote:
13601     #
13602     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13603     # (krb4) was also available.  This turns out not to be the case with
13604     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13605     # is optional.
13606     #
13607     # So, disable kerberosV support if libkrb4 can't be found.
13608     # This is not the best solution, but it makes the compile not fail.
13609     #
13610
13611   ac_save_CPPFLAGS="$CPPFLAGS"
13612   ac_save_LDFLAGS="$LDFLAGS"
13613 #  ac_save_LIBS="$LIBS"
13614
13615   if test \! -z "$includedir" ; then
13616     CPPFLAGS="$CPPFLAGS -I$includedir"
13617   fi
13618   # note: $X_CFLAGS includes $x_includes
13619   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13620
13621   if test \! -z "$libdir" ; then
13622     LDFLAGS="$LDFLAGS -L$libdir"
13623   fi
13624   # note: $X_LIBS includes $x_libraries
13625   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13626
13627   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13628   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13629   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13630 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13631 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13632   echo $ECHO_N "(cached) $ECHO_C" >&6
13633 else
13634   ac_check_lib_save_LIBS=$LIBS
13635 LIBS="-lkrb4  $LIBS"
13636 cat >conftest.$ac_ext <<_ACEOF
13637 /* confdefs.h.  */
13638 _ACEOF
13639 cat confdefs.h >>conftest.$ac_ext
13640 cat >>conftest.$ac_ext <<_ACEOF
13641 /* end confdefs.h.  */
13642
13643 /* Override any GCC internal prototype to avoid an error.
13644    Use char because int might match the return type of a GCC
13645    builtin and then its argument prototype would still apply.  */
13646 #ifdef __cplusplus
13647 extern "C"
13648 #endif
13649 char krb_get_tf_realm ();
13650 int
13651 main ()
13652 {
13653 return krb_get_tf_realm ();
13654   ;
13655   return 0;
13656 }
13657 _ACEOF
13658 rm -rf conftest.$ac_objext conftest$ac_exeext
13659 if { (ac_try="$ac_link"
13660 case "(($ac_try" in
13661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13662   *) ac_try_echo=$ac_try;;
13663 esac
13664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13665   (eval "$ac_link") 2>conftest.er1
13666   ac_status=$?
13667   grep -v '^ *+' conftest.er1 >conftest.err
13668   rm -rf conftest.er1
13669   cat conftest.err >&5
13670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671   (exit $ac_status); } && {
13672          test -z "$ac_c_werror_flag" ||
13673          test ! -s conftest.err
13674        } && test -s conftest$ac_exeext &&
13675        $as_test_x conftest$ac_exeext; then
13676   ac_cv_lib_krb4_krb_get_tf_realm=yes
13677 else
13678   echo "$as_me: failed program was:" >&5
13679 sed 's/^/| /' conftest.$ac_ext >&5
13680
13681         ac_cv_lib_krb4_krb_get_tf_realm=no
13682 fi
13683
13684 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13685       conftest$ac_exeext conftest.$ac_ext
13686 LIBS=$ac_check_lib_save_LIBS
13687 fi
13688 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13689 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13690 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13691   have_kerberos=yes
13692 else
13693   have_kerberos=no
13694 fi
13695
13696   CPPFLAGS="$ac_save_CPPFLAGS"
13697   LDFLAGS="$ac_save_LDFLAGS"
13698 #  LIBS="$ac_save_LIBS"
13699
13700     if test "$have_kerberos" = yes ; then
13701       have_kerberos5=yes
13702       cat >>confdefs.h <<\_ACEOF
13703 #define HAVE_KERBEROS 1
13704 _ACEOF
13705
13706       cat >>confdefs.h <<\_ACEOF
13707 #define HAVE_KERBEROS5 1
13708 _ACEOF
13709
13710     else
13711       have_kerberos5=no
13712       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13713 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13714     fi
13715
13716   fi
13717
13718   if test "$have_kerberos5" = yes ; then
13719     # from Matt Knopp <mhat@infocalypse.netlag.com>
13720     # (who got it from amu@mit.edu)
13721
13722     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13723
13724     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13725
13726   ac_save_CPPFLAGS="$CPPFLAGS"
13727   ac_save_LDFLAGS="$LDFLAGS"
13728 #  ac_save_LIBS="$LIBS"
13729
13730   if test \! -z "$includedir" ; then
13731     CPPFLAGS="$CPPFLAGS -I$includedir"
13732   fi
13733   # note: $X_CFLAGS includes $x_includes
13734   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13735
13736   if test \! -z "$libdir" ; then
13737     LDFLAGS="$LDFLAGS -L$libdir"
13738   fi
13739   # note: $X_LIBS includes $x_libraries
13740   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13741
13742   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13743   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13744   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13745 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13746 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   ac_check_lib_save_LIBS=$LIBS
13750 LIBS="-lcrypt  $LIBS"
13751 cat >conftest.$ac_ext <<_ACEOF
13752 /* confdefs.h.  */
13753 _ACEOF
13754 cat confdefs.h >>conftest.$ac_ext
13755 cat >>conftest.$ac_ext <<_ACEOF
13756 /* end confdefs.h.  */
13757
13758 /* Override any GCC internal prototype to avoid an error.
13759    Use char because int might match the return type of a GCC
13760    builtin and then its argument prototype would still apply.  */
13761 #ifdef __cplusplus
13762 extern "C"
13763 #endif
13764 char crypt ();
13765 int
13766 main ()
13767 {
13768 return crypt ();
13769   ;
13770   return 0;
13771 }
13772 _ACEOF
13773 rm -rf conftest.$ac_objext conftest$ac_exeext
13774 if { (ac_try="$ac_link"
13775 case "(($ac_try" in
13776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13777   *) ac_try_echo=$ac_try;;
13778 esac
13779 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13780   (eval "$ac_link") 2>conftest.er1
13781   ac_status=$?
13782   grep -v '^ *+' conftest.er1 >conftest.err
13783   rm -rf conftest.er1
13784   cat conftest.err >&5
13785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13786   (exit $ac_status); } && {
13787          test -z "$ac_c_werror_flag" ||
13788          test ! -s conftest.err
13789        } && test -s conftest$ac_exeext &&
13790        $as_test_x conftest$ac_exeext; then
13791   ac_cv_lib_crypt_crypt=yes
13792 else
13793   echo "$as_me: failed program was:" >&5
13794 sed 's/^/| /' conftest.$ac_ext >&5
13795
13796         ac_cv_lib_crypt_crypt=no
13797 fi
13798
13799 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13800       conftest$ac_exeext conftest.$ac_ext
13801 LIBS=$ac_check_lib_save_LIBS
13802 fi
13803 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13804 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13805 if test $ac_cv_lib_crypt_crypt = yes; then
13806   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13807 fi
13808
13809   CPPFLAGS="$ac_save_CPPFLAGS"
13810   LDFLAGS="$ac_save_LDFLAGS"
13811 #  LIBS="$ac_save_LIBS"
13812
13813
13814   elif test "$have_kerberos" = yes ; then
13815     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13816     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13817   fi
13818
13819   if test "$have_kerberos" = yes ; then
13820     { echo "$as_me:$LINENO: checking for res_search" >&5
13821 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13822 if test "${ac_cv_func_res_search+set}" = set; then
13823   echo $ECHO_N "(cached) $ECHO_C" >&6
13824 else
13825   cat >conftest.$ac_ext <<_ACEOF
13826 /* confdefs.h.  */
13827 _ACEOF
13828 cat confdefs.h >>conftest.$ac_ext
13829 cat >>conftest.$ac_ext <<_ACEOF
13830 /* end confdefs.h.  */
13831 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13832    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13833 #define res_search innocuous_res_search
13834
13835 /* System header to define __stub macros and hopefully few prototypes,
13836     which can conflict with char res_search (); below.
13837     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13838     <limits.h> exists even on freestanding compilers.  */
13839
13840 #ifdef __STDC__
13841 # include <limits.h>
13842 #else
13843 # include <assert.h>
13844 #endif
13845
13846 #undef res_search
13847
13848 /* Override any GCC internal prototype to avoid an error.
13849    Use char because int might match the return type of a GCC
13850    builtin and then its argument prototype would still apply.  */
13851 #ifdef __cplusplus
13852 extern "C"
13853 #endif
13854 char res_search ();
13855 /* The GNU C library defines this for functions which it implements
13856     to always fail with ENOSYS.  Some functions are actually named
13857     something starting with __ and the normal name is an alias.  */
13858 #if defined __stub_res_search || defined __stub___res_search
13859 choke me
13860 #endif
13861
13862 int
13863 main ()
13864 {
13865 return res_search ();
13866   ;
13867   return 0;
13868 }
13869 _ACEOF
13870 rm -rf conftest.$ac_objext conftest$ac_exeext
13871 if { (ac_try="$ac_link"
13872 case "(($ac_try" in
13873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13874   *) ac_try_echo=$ac_try;;
13875 esac
13876 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13877   (eval "$ac_link") 2>conftest.er1
13878   ac_status=$?
13879   grep -v '^ *+' conftest.er1 >conftest.err
13880   rm -rf conftest.er1
13881   cat conftest.err >&5
13882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883   (exit $ac_status); } && {
13884          test -z "$ac_c_werror_flag" ||
13885          test ! -s conftest.err
13886        } && test -s conftest$ac_exeext &&
13887        $as_test_x conftest$ac_exeext; then
13888   ac_cv_func_res_search=yes
13889 else
13890   echo "$as_me: failed program was:" >&5
13891 sed 's/^/| /' conftest.$ac_ext >&5
13892
13893         ac_cv_func_res_search=no
13894 fi
13895
13896 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13897       conftest$ac_exeext conftest.$ac_ext
13898 fi
13899 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13900 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13901 if test $ac_cv_func_res_search = yes; then
13902   :
13903 else
13904   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13905 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13906 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13907   echo $ECHO_N "(cached) $ECHO_C" >&6
13908 else
13909   ac_check_lib_save_LIBS=$LIBS
13910 LIBS="-lresolv  $LIBS"
13911 cat >conftest.$ac_ext <<_ACEOF
13912 /* confdefs.h.  */
13913 _ACEOF
13914 cat confdefs.h >>conftest.$ac_ext
13915 cat >>conftest.$ac_ext <<_ACEOF
13916 /* end confdefs.h.  */
13917
13918 /* Override any GCC internal prototype to avoid an error.
13919    Use char because int might match the return type of a GCC
13920    builtin and then its argument prototype would still apply.  */
13921 #ifdef __cplusplus
13922 extern "C"
13923 #endif
13924 char res_search ();
13925 int
13926 main ()
13927 {
13928 return res_search ();
13929   ;
13930   return 0;
13931 }
13932 _ACEOF
13933 rm -rf conftest.$ac_objext conftest$ac_exeext
13934 if { (ac_try="$ac_link"
13935 case "(($ac_try" in
13936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13937   *) ac_try_echo=$ac_try;;
13938 esac
13939 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13940   (eval "$ac_link") 2>conftest.er1
13941   ac_status=$?
13942   grep -v '^ *+' conftest.er1 >conftest.err
13943   rm -rf conftest.er1
13944   cat conftest.err >&5
13945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13946   (exit $ac_status); } && {
13947          test -z "$ac_c_werror_flag" ||
13948          test ! -s conftest.err
13949        } && test -s conftest$ac_exeext &&
13950        $as_test_x conftest$ac_exeext; then
13951   ac_cv_lib_resolv_res_search=yes
13952 else
13953   echo "$as_me: failed program was:" >&5
13954 sed 's/^/| /' conftest.$ac_ext >&5
13955
13956         ac_cv_lib_resolv_res_search=no
13957 fi
13958
13959 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13960       conftest$ac_exeext conftest.$ac_ext
13961 LIBS=$ac_check_lib_save_LIBS
13962 fi
13963 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13964 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13965 if test $ac_cv_lib_resolv_res_search = yes; then
13966   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13967 else
13968   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13969 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13970
13971 fi
13972
13973 fi
13974
13975   fi
13976 fi
13977
13978
13979 ###############################################################################
13980 #
13981 #       Check for the nine billion variants of shadow passwords...
13982 #
13983 ###############################################################################
13984
13985 need_setuid=no
13986
13987 have_shadow=no
13988 with_shadow_req=unspecified
13989
13990
13991 # Check whether --with-shadow was given.
13992 if test "${with_shadow+set}" = set; then
13993   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13994 else
13995   with_shadow=yes
13996 fi
13997
13998
13999
14000    case "$with_shadow" in
14001     yes) ;;
14002     no)  ;;
14003
14004     /*)
14005      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14006 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14007      d=$with_shadow/include
14008      if test -d $d; then
14009        X_CFLAGS="-I$d $X_CFLAGS"
14010        { echo "$as_me:$LINENO: result: $d" >&5
14011 echo "${ECHO_T}$d" >&6; }
14012      else
14013        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14014 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14015      fi
14016
14017      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14018 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14019      d=$with_shadow/lib
14020      if test -d $d; then
14021        X_LIBS="-L$d $X_LIBS"
14022        { echo "$as_me:$LINENO: result: $d" >&5
14023 echo "${ECHO_T}$d" >&6; }
14024      else
14025        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14026 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14027      fi
14028
14029      # replace the directory string with "yes".
14030      with_shadow_req="yes"
14031      with_shadow=$with_shadow_req
14032      ;;
14033
14034     *)
14035      echo ""
14036      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14037      echo "       If it is a directory, then \`DIR/include' will be added to"
14038      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14039      exit 1
14040      ;;
14041    esac
14042
14043
14044 if test "$enable_locking" = no ; then
14045   with_shadow_req=no
14046   with_shadow=no
14047 fi
14048
14049
14050 ###############################################################################
14051 #
14052 #       Check for Sun "adjunct" passwords.
14053 #
14054 ###############################################################################
14055
14056 if test "$with_shadow" = yes ; then
14057   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14058 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14059 if test "${ac_cv_sun_adjunct+set}" = set; then
14060   echo $ECHO_N "(cached) $ECHO_C" >&6
14061 else
14062
14063   ac_save_CPPFLAGS="$CPPFLAGS"
14064   if test \! -z "$includedir" ; then
14065     CPPFLAGS="$CPPFLAGS -I$includedir"
14066   fi
14067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14068   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14069   cat >conftest.$ac_ext <<_ACEOF
14070 /* confdefs.h.  */
14071 _ACEOF
14072 cat confdefs.h >>conftest.$ac_ext
14073 cat >>conftest.$ac_ext <<_ACEOF
14074 /* end confdefs.h.  */
14075 #include <stdlib.h>
14076                                     #include <unistd.h>
14077                                     #include <sys/types.h>
14078                                     #include <sys/label.h>
14079                                     #include <sys/audit.h>
14080                                     #include <pwdadj.h>
14081 int
14082 main ()
14083 {
14084 struct passwd_adjunct *p = getpwanam("nobody");
14085                        const char *pw = p->pwa_passwd;
14086   ;
14087   return 0;
14088 }
14089 _ACEOF
14090 rm -rf conftest.$ac_objext
14091 if { (ac_try="$ac_compile"
14092 case "(($ac_try" in
14093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094   *) ac_try_echo=$ac_try;;
14095 esac
14096 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14097   (eval "$ac_compile") 2>conftest.er1
14098   ac_status=$?
14099   grep -v '^ *+' conftest.er1 >conftest.err
14100   rm -rf conftest.er1
14101   cat conftest.err >&5
14102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103   (exit $ac_status); } && {
14104          test -z "$ac_c_werror_flag" ||
14105          test ! -s conftest.err
14106        } && test -s conftest.$ac_objext; then
14107   ac_cv_sun_adjunct=yes
14108 else
14109   echo "$as_me: failed program was:" >&5
14110 sed 's/^/| /' conftest.$ac_ext >&5
14111
14112         ac_cv_sun_adjunct=no
14113 fi
14114
14115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14116   CPPFLAGS="$ac_save_CPPFLAGS"
14117 fi
14118 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14119 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14120   if test "$ac_cv_sun_adjunct" = yes; then
14121     have_shadow_adjunct=yes
14122     have_shadow=yes
14123     need_setuid=yes
14124   fi
14125 fi
14126
14127
14128 ###############################################################################
14129 #
14130 #       Check for DEC and SCO so-called "enhanced" security.
14131 #
14132 ###############################################################################
14133
14134 if test "$with_shadow" = yes ; then
14135   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14136 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14137 if test "${ac_cv_enhanced_passwd+set}" = set; then
14138   echo $ECHO_N "(cached) $ECHO_C" >&6
14139 else
14140
14141   ac_save_CPPFLAGS="$CPPFLAGS"
14142   if test \! -z "$includedir" ; then
14143     CPPFLAGS="$CPPFLAGS -I$includedir"
14144   fi
14145   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14146   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14147   cat >conftest.$ac_ext <<_ACEOF
14148 /* confdefs.h.  */
14149 _ACEOF
14150 cat confdefs.h >>conftest.$ac_ext
14151 cat >>conftest.$ac_ext <<_ACEOF
14152 /* end confdefs.h.  */
14153 #include <stdlib.h>
14154                                     #include <unistd.h>
14155                                     #include <sys/types.h>
14156                                     #include <pwd.h>
14157                                     #include <sys/security.h>
14158                                     #include <prot.h>
14159 int
14160 main ()
14161 {
14162 struct pr_passwd *p;
14163                        const char *pw;
14164                        set_auth_parameters(0, 0);
14165                        check_auth_parameters();
14166                        p = getprpwnam("nobody");
14167                        pw = p->ufld.fd_encrypt;
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 rm -rf conftest.$ac_objext
14173 if { (ac_try="$ac_compile"
14174 case "(($ac_try" in
14175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14176   *) ac_try_echo=$ac_try;;
14177 esac
14178 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14179   (eval "$ac_compile") 2>conftest.er1
14180   ac_status=$?
14181   grep -v '^ *+' conftest.er1 >conftest.err
14182   rm -rf conftest.er1
14183   cat conftest.err >&5
14184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185   (exit $ac_status); } && {
14186          test -z "$ac_c_werror_flag" ||
14187          test ! -s conftest.err
14188        } && test -s conftest.$ac_objext; then
14189   ac_cv_enhanced_passwd=yes
14190 else
14191   echo "$as_me: failed program was:" >&5
14192 sed 's/^/| /' conftest.$ac_ext >&5
14193
14194         ac_cv_enhanced_passwd=no
14195 fi
14196
14197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14198   CPPFLAGS="$ac_save_CPPFLAGS"
14199 fi
14200 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14201 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14202   if test $ac_cv_enhanced_passwd = yes; then
14203     have_shadow_enhanced=yes
14204     have_shadow=yes
14205     need_setuid=yes
14206
14207     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14208     # (I'm told it needs -lcurses too, but I don't understand why.)
14209     # But on DEC, it's in -lsecurity.
14210     #
14211     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14212 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14213 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14214   echo $ECHO_N "(cached) $ECHO_C" >&6
14215 else
14216   ac_check_lib_save_LIBS=$LIBS
14217 LIBS="-lprot -lx $LIBS"
14218 cat >conftest.$ac_ext <<_ACEOF
14219 /* confdefs.h.  */
14220 _ACEOF
14221 cat confdefs.h >>conftest.$ac_ext
14222 cat >>conftest.$ac_ext <<_ACEOF
14223 /* end confdefs.h.  */
14224
14225 /* Override any GCC internal prototype to avoid an error.
14226    Use char because int might match the return type of a GCC
14227    builtin and then its argument prototype would still apply.  */
14228 #ifdef __cplusplus
14229 extern "C"
14230 #endif
14231 char getprpwnam ();
14232 int
14233 main ()
14234 {
14235 return getprpwnam ();
14236   ;
14237   return 0;
14238 }
14239 _ACEOF
14240 rm -rf conftest.$ac_objext conftest$ac_exeext
14241 if { (ac_try="$ac_link"
14242 case "(($ac_try" in
14243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244   *) ac_try_echo=$ac_try;;
14245 esac
14246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14247   (eval "$ac_link") 2>conftest.er1
14248   ac_status=$?
14249   grep -v '^ *+' conftest.er1 >conftest.err
14250   rm -rf conftest.er1
14251   cat conftest.err >&5
14252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253   (exit $ac_status); } && {
14254          test -z "$ac_c_werror_flag" ||
14255          test ! -s conftest.err
14256        } && test -s conftest$ac_exeext &&
14257        $as_test_x conftest$ac_exeext; then
14258   ac_cv_lib_prot_getprpwnam=yes
14259 else
14260   echo "$as_me: failed program was:" >&5
14261 sed 's/^/| /' conftest.$ac_ext >&5
14262
14263         ac_cv_lib_prot_getprpwnam=no
14264 fi
14265
14266 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14267       conftest$ac_exeext conftest.$ac_ext
14268 LIBS=$ac_check_lib_save_LIBS
14269 fi
14270 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14271 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14272 if test $ac_cv_lib_prot_getprpwnam = yes; then
14273   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14274 else
14275   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14276 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14277 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14278   echo $ECHO_N "(cached) $ECHO_C" >&6
14279 else
14280   ac_check_lib_save_LIBS=$LIBS
14281 LIBS="-lsecurity  $LIBS"
14282 cat >conftest.$ac_ext <<_ACEOF
14283 /* confdefs.h.  */
14284 _ACEOF
14285 cat confdefs.h >>conftest.$ac_ext
14286 cat >>conftest.$ac_ext <<_ACEOF
14287 /* end confdefs.h.  */
14288
14289 /* Override any GCC internal prototype to avoid an error.
14290    Use char because int might match the return type of a GCC
14291    builtin and then its argument prototype would still apply.  */
14292 #ifdef __cplusplus
14293 extern "C"
14294 #endif
14295 char getprpwnam ();
14296 int
14297 main ()
14298 {
14299 return getprpwnam ();
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -rf conftest.$ac_objext conftest$ac_exeext
14305 if { (ac_try="$ac_link"
14306 case "(($ac_try" in
14307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14308   *) ac_try_echo=$ac_try;;
14309 esac
14310 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14311   (eval "$ac_link") 2>conftest.er1
14312   ac_status=$?
14313   grep -v '^ *+' conftest.er1 >conftest.err
14314   rm -rf conftest.er1
14315   cat conftest.err >&5
14316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317   (exit $ac_status); } && {
14318          test -z "$ac_c_werror_flag" ||
14319          test ! -s conftest.err
14320        } && test -s conftest$ac_exeext &&
14321        $as_test_x conftest$ac_exeext; then
14322   ac_cv_lib_security_getprpwnam=yes
14323 else
14324   echo "$as_me: failed program was:" >&5
14325 sed 's/^/| /' conftest.$ac_ext >&5
14326
14327         ac_cv_lib_security_getprpwnam=no
14328 fi
14329
14330 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14331       conftest$ac_exeext conftest.$ac_ext
14332 LIBS=$ac_check_lib_save_LIBS
14333 fi
14334 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14335 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14336 if test $ac_cv_lib_security_getprpwnam = yes; then
14337   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14338 fi
14339
14340 fi
14341
14342   fi
14343 fi
14344
14345 ###############################################################################
14346 #
14347 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14348 #
14349 ###############################################################################
14350
14351 if test "$with_shadow" = yes ; then
14352   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14353 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14354 if test "${ac_cv_hpux_passwd+set}" = set; then
14355   echo $ECHO_N "(cached) $ECHO_C" >&6
14356 else
14357
14358   ac_save_CPPFLAGS="$CPPFLAGS"
14359   if test \! -z "$includedir" ; then
14360     CPPFLAGS="$CPPFLAGS -I$includedir"
14361   fi
14362   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14363   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14364   cat >conftest.$ac_ext <<_ACEOF
14365 /* confdefs.h.  */
14366 _ACEOF
14367 cat confdefs.h >>conftest.$ac_ext
14368 cat >>conftest.$ac_ext <<_ACEOF
14369 /* end confdefs.h.  */
14370 #include <stdlib.h>
14371                                     #include <unistd.h>
14372                                     #include <sys/types.h>
14373                                     #include <pwd.h>
14374                                     #include <hpsecurity.h>
14375                                     #include <prot.h>
14376 int
14377 main ()
14378 {
14379 struct s_passwd *p = getspwnam("nobody");
14380                        const char *pw = p->pw_passwd;
14381   ;
14382   return 0;
14383 }
14384 _ACEOF
14385 rm -rf conftest.$ac_objext
14386 if { (ac_try="$ac_compile"
14387 case "(($ac_try" in
14388   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14389   *) ac_try_echo=$ac_try;;
14390 esac
14391 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14392   (eval "$ac_compile") 2>conftest.er1
14393   ac_status=$?
14394   grep -v '^ *+' conftest.er1 >conftest.err
14395   rm -rf conftest.er1
14396   cat conftest.err >&5
14397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398   (exit $ac_status); } && {
14399          test -z "$ac_c_werror_flag" ||
14400          test ! -s conftest.err
14401        } && test -s conftest.$ac_objext; then
14402   ac_cv_hpux_passwd=yes
14403 else
14404   echo "$as_me: failed program was:" >&5
14405 sed 's/^/| /' conftest.$ac_ext >&5
14406
14407         ac_cv_hpux_passwd=no
14408 fi
14409
14410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14411   CPPFLAGS="$ac_save_CPPFLAGS"
14412 fi
14413 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14414 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14415   if test "$ac_cv_hpux_passwd" = yes; then
14416     have_shadow_hpux=yes
14417     have_shadow=yes
14418     need_setuid=yes
14419
14420     # on HPUX, bigcrypt is in -lsec
14421     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14422 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14423 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14424   echo $ECHO_N "(cached) $ECHO_C" >&6
14425 else
14426   ac_check_lib_save_LIBS=$LIBS
14427 LIBS="-lsec  $LIBS"
14428 cat >conftest.$ac_ext <<_ACEOF
14429 /* confdefs.h.  */
14430 _ACEOF
14431 cat confdefs.h >>conftest.$ac_ext
14432 cat >>conftest.$ac_ext <<_ACEOF
14433 /* end confdefs.h.  */
14434
14435 /* Override any GCC internal prototype to avoid an error.
14436    Use char because int might match the return type of a GCC
14437    builtin and then its argument prototype would still apply.  */
14438 #ifdef __cplusplus
14439 extern "C"
14440 #endif
14441 char bigcrypt ();
14442 int
14443 main ()
14444 {
14445 return bigcrypt ();
14446   ;
14447   return 0;
14448 }
14449 _ACEOF
14450 rm -rf conftest.$ac_objext conftest$ac_exeext
14451 if { (ac_try="$ac_link"
14452 case "(($ac_try" in
14453   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14454   *) ac_try_echo=$ac_try;;
14455 esac
14456 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14457   (eval "$ac_link") 2>conftest.er1
14458   ac_status=$?
14459   grep -v '^ *+' conftest.er1 >conftest.err
14460   rm -rf conftest.er1
14461   cat conftest.err >&5
14462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14463   (exit $ac_status); } && {
14464          test -z "$ac_c_werror_flag" ||
14465          test ! -s conftest.err
14466        } && test -s conftest$ac_exeext &&
14467        $as_test_x conftest$ac_exeext; then
14468   ac_cv_lib_sec_bigcrypt=yes
14469 else
14470   echo "$as_me: failed program was:" >&5
14471 sed 's/^/| /' conftest.$ac_ext >&5
14472
14473         ac_cv_lib_sec_bigcrypt=no
14474 fi
14475
14476 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14477       conftest$ac_exeext conftest.$ac_ext
14478 LIBS=$ac_check_lib_save_LIBS
14479 fi
14480 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14481 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14482 if test $ac_cv_lib_sec_bigcrypt = yes; then
14483   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14484 fi
14485
14486   fi
14487 fi
14488
14489
14490 ###############################################################################
14491 #
14492 #       Check for FreeBSD-style shadow passwords.
14493 #
14494 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14495 #       password systems -- except you only get stuff in the pw_passwd field
14496 #       if the running program is setuid.  So, guess that we've got this
14497 #       lossage to contend with if /etc/master.passwd exists, and default to
14498 #       a setuid installation.
14499 #
14500 ###############################################################################
14501
14502 if test "$with_shadow" = yes ; then
14503   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14504 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14505 if test "${ac_cv_master_passwd+set}" = set; then
14506   echo $ECHO_N "(cached) $ECHO_C" >&6
14507 else
14508   if test -f /etc/master.passwd ; then
14509                     ac_cv_master_passwd=yes
14510                   else
14511                     ac_cv_master_passwd=no
14512                   fi
14513 fi
14514 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14515 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14516   if test "$ac_cv_master_passwd" = yes; then
14517     need_setuid=yes
14518   fi
14519 fi
14520
14521
14522 ###############################################################################
14523 #
14524 #       Check for traditional (ha!) shadow passwords.
14525 #
14526 ###############################################################################
14527
14528 if test "$with_shadow" = yes ; then
14529   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14530 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14531 if test "${ac_cv_shadow+set}" = set; then
14532   echo $ECHO_N "(cached) $ECHO_C" >&6
14533 else
14534
14535   ac_save_CPPFLAGS="$CPPFLAGS"
14536   if test \! -z "$includedir" ; then
14537     CPPFLAGS="$CPPFLAGS -I$includedir"
14538   fi
14539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14540   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14541   cat >conftest.$ac_ext <<_ACEOF
14542 /* confdefs.h.  */
14543 _ACEOF
14544 cat confdefs.h >>conftest.$ac_ext
14545 cat >>conftest.$ac_ext <<_ACEOF
14546 /* end confdefs.h.  */
14547 #include <stdlib.h>
14548                                     #include <unistd.h>
14549                                     #include <sys/types.h>
14550                                     #include <pwd.h>
14551                                     #include <shadow.h>
14552 int
14553 main ()
14554 {
14555 struct spwd *p = getspnam("nobody");
14556                        const char *pw = p->sp_pwdp;
14557   ;
14558   return 0;
14559 }
14560 _ACEOF
14561 rm -rf conftest.$ac_objext
14562 if { (ac_try="$ac_compile"
14563 case "(($ac_try" in
14564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14565   *) ac_try_echo=$ac_try;;
14566 esac
14567 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14568   (eval "$ac_compile") 2>conftest.er1
14569   ac_status=$?
14570   grep -v '^ *+' conftest.er1 >conftest.err
14571   rm -rf conftest.er1
14572   cat conftest.err >&5
14573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14574   (exit $ac_status); } && {
14575          test -z "$ac_c_werror_flag" ||
14576          test ! -s conftest.err
14577        } && test -s conftest.$ac_objext; then
14578   ac_cv_shadow=yes
14579 else
14580   echo "$as_me: failed program was:" >&5
14581 sed 's/^/| /' conftest.$ac_ext >&5
14582
14583         ac_cv_shadow=no
14584 fi
14585
14586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14587   CPPFLAGS="$ac_save_CPPFLAGS"
14588 fi
14589 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14590 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14591   if test "$ac_cv_shadow" = yes; then
14592     have_shadow=yes
14593     need_setuid=yes
14594
14595     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14596     have_getspnam=no
14597     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14598 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14599 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14600   echo $ECHO_N "(cached) $ECHO_C" >&6
14601 else
14602   ac_check_lib_save_LIBS=$LIBS
14603 LIBS="-lc  $LIBS"
14604 cat >conftest.$ac_ext <<_ACEOF
14605 /* confdefs.h.  */
14606 _ACEOF
14607 cat confdefs.h >>conftest.$ac_ext
14608 cat >>conftest.$ac_ext <<_ACEOF
14609 /* end confdefs.h.  */
14610
14611 /* Override any GCC internal prototype to avoid an error.
14612    Use char because int might match the return type of a GCC
14613    builtin and then its argument prototype would still apply.  */
14614 #ifdef __cplusplus
14615 extern "C"
14616 #endif
14617 char getspnam ();
14618 int
14619 main ()
14620 {
14621 return getspnam ();
14622   ;
14623   return 0;
14624 }
14625 _ACEOF
14626 rm -rf conftest.$ac_objext conftest$ac_exeext
14627 if { (ac_try="$ac_link"
14628 case "(($ac_try" in
14629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14630   *) ac_try_echo=$ac_try;;
14631 esac
14632 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14633   (eval "$ac_link") 2>conftest.er1
14634   ac_status=$?
14635   grep -v '^ *+' conftest.er1 >conftest.err
14636   rm -rf conftest.er1
14637   cat conftest.err >&5
14638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639   (exit $ac_status); } && {
14640          test -z "$ac_c_werror_flag" ||
14641          test ! -s conftest.err
14642        } && test -s conftest$ac_exeext &&
14643        $as_test_x conftest$ac_exeext; then
14644   ac_cv_lib_c_getspnam=yes
14645 else
14646   echo "$as_me: failed program was:" >&5
14647 sed 's/^/| /' conftest.$ac_ext >&5
14648
14649         ac_cv_lib_c_getspnam=no
14650 fi
14651
14652 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14653       conftest$ac_exeext conftest.$ac_ext
14654 LIBS=$ac_check_lib_save_LIBS
14655 fi
14656 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14657 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14658 if test $ac_cv_lib_c_getspnam = yes; then
14659   have_getspnam=yes
14660 fi
14661
14662     if test "$have_getspnam" = no ; then
14663       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14664 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14665 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14666   echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668   ac_check_lib_save_LIBS=$LIBS
14669 LIBS="-lgen  $LIBS"
14670 cat >conftest.$ac_ext <<_ACEOF
14671 /* confdefs.h.  */
14672 _ACEOF
14673 cat confdefs.h >>conftest.$ac_ext
14674 cat >>conftest.$ac_ext <<_ACEOF
14675 /* end confdefs.h.  */
14676
14677 /* Override any GCC internal prototype to avoid an error.
14678    Use char because int might match the return type of a GCC
14679    builtin and then its argument prototype would still apply.  */
14680 #ifdef __cplusplus
14681 extern "C"
14682 #endif
14683 char getspnam ();
14684 int
14685 main ()
14686 {
14687 return getspnam ();
14688   ;
14689   return 0;
14690 }
14691 _ACEOF
14692 rm -rf conftest.$ac_objext conftest$ac_exeext
14693 if { (ac_try="$ac_link"
14694 case "(($ac_try" in
14695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14696   *) ac_try_echo=$ac_try;;
14697 esac
14698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14699   (eval "$ac_link") 2>conftest.er1
14700   ac_status=$?
14701   grep -v '^ *+' conftest.er1 >conftest.err
14702   rm -rf conftest.er1
14703   cat conftest.err >&5
14704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705   (exit $ac_status); } && {
14706          test -z "$ac_c_werror_flag" ||
14707          test ! -s conftest.err
14708        } && test -s conftest$ac_exeext &&
14709        $as_test_x conftest$ac_exeext; then
14710   ac_cv_lib_gen_getspnam=yes
14711 else
14712   echo "$as_me: failed program was:" >&5
14713 sed 's/^/| /' conftest.$ac_ext >&5
14714
14715         ac_cv_lib_gen_getspnam=no
14716 fi
14717
14718 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14719       conftest$ac_exeext conftest.$ac_ext
14720 LIBS=$ac_check_lib_save_LIBS
14721 fi
14722 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14723 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14724 if test $ac_cv_lib_gen_getspnam = yes; then
14725   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14726 fi
14727
14728     fi
14729   fi
14730 fi
14731
14732
14733 ###############################################################################
14734 #
14735 #       Check for other libraries needed for non-shadow passwords.
14736 #
14737 ###############################################################################
14738
14739 if test "$enable_locking" = yes ; then
14740
14741   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14742   have_crypt=no
14743   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14744 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14745 if test "${ac_cv_lib_c_crypt+set}" = set; then
14746   echo $ECHO_N "(cached) $ECHO_C" >&6
14747 else
14748   ac_check_lib_save_LIBS=$LIBS
14749 LIBS="-lc  $LIBS"
14750 cat >conftest.$ac_ext <<_ACEOF
14751 /* confdefs.h.  */
14752 _ACEOF
14753 cat confdefs.h >>conftest.$ac_ext
14754 cat >>conftest.$ac_ext <<_ACEOF
14755 /* end confdefs.h.  */
14756
14757 /* Override any GCC internal prototype to avoid an error.
14758    Use char because int might match the return type of a GCC
14759    builtin and then its argument prototype would still apply.  */
14760 #ifdef __cplusplus
14761 extern "C"
14762 #endif
14763 char crypt ();
14764 int
14765 main ()
14766 {
14767 return crypt ();
14768   ;
14769   return 0;
14770 }
14771 _ACEOF
14772 rm -rf conftest.$ac_objext conftest$ac_exeext
14773 if { (ac_try="$ac_link"
14774 case "(($ac_try" in
14775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14776   *) ac_try_echo=$ac_try;;
14777 esac
14778 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14779   (eval "$ac_link") 2>conftest.er1
14780   ac_status=$?
14781   grep -v '^ *+' conftest.er1 >conftest.err
14782   rm -rf conftest.er1
14783   cat conftest.err >&5
14784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785   (exit $ac_status); } && {
14786          test -z "$ac_c_werror_flag" ||
14787          test ! -s conftest.err
14788        } && test -s conftest$ac_exeext &&
14789        $as_test_x conftest$ac_exeext; then
14790   ac_cv_lib_c_crypt=yes
14791 else
14792   echo "$as_me: failed program was:" >&5
14793 sed 's/^/| /' conftest.$ac_ext >&5
14794
14795         ac_cv_lib_c_crypt=no
14796 fi
14797
14798 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14799       conftest$ac_exeext conftest.$ac_ext
14800 LIBS=$ac_check_lib_save_LIBS
14801 fi
14802 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14803 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14804 if test $ac_cv_lib_c_crypt = yes; then
14805   have_crypt=yes
14806 fi
14807
14808   if test "$have_crypt" = no ; then
14809     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14810 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14811 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14812   echo $ECHO_N "(cached) $ECHO_C" >&6
14813 else
14814   ac_check_lib_save_LIBS=$LIBS
14815 LIBS="-lcrypt  $LIBS"
14816 cat >conftest.$ac_ext <<_ACEOF
14817 /* confdefs.h.  */
14818 _ACEOF
14819 cat confdefs.h >>conftest.$ac_ext
14820 cat >>conftest.$ac_ext <<_ACEOF
14821 /* end confdefs.h.  */
14822
14823 /* Override any GCC internal prototype to avoid an error.
14824    Use char because int might match the return type of a GCC
14825    builtin and then its argument prototype would still apply.  */
14826 #ifdef __cplusplus
14827 extern "C"
14828 #endif
14829 char crypt ();
14830 int
14831 main ()
14832 {
14833 return crypt ();
14834   ;
14835   return 0;
14836 }
14837 _ACEOF
14838 rm -rf conftest.$ac_objext conftest$ac_exeext
14839 if { (ac_try="$ac_link"
14840 case "(($ac_try" in
14841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14842   *) ac_try_echo=$ac_try;;
14843 esac
14844 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14845   (eval "$ac_link") 2>conftest.er1
14846   ac_status=$?
14847   grep -v '^ *+' conftest.er1 >conftest.err
14848   rm -rf conftest.er1
14849   cat conftest.err >&5
14850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14851   (exit $ac_status); } && {
14852          test -z "$ac_c_werror_flag" ||
14853          test ! -s conftest.err
14854        } && test -s conftest$ac_exeext &&
14855        $as_test_x conftest$ac_exeext; then
14856   ac_cv_lib_crypt_crypt=yes
14857 else
14858   echo "$as_me: failed program was:" >&5
14859 sed 's/^/| /' conftest.$ac_ext >&5
14860
14861         ac_cv_lib_crypt_crypt=no
14862 fi
14863
14864 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14865       conftest$ac_exeext conftest.$ac_ext
14866 LIBS=$ac_check_lib_save_LIBS
14867 fi
14868 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14869 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14870 if test $ac_cv_lib_crypt_crypt = yes; then
14871   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14872 fi
14873
14874   fi
14875 fi
14876
14877
14878 # Most of the above shadow mechanisms will have set need_setuid to yes,
14879 # if they were found.  But, on some systems, we need setuid even when
14880 # using plain old vanilla passwords.
14881 #
14882 if test "$enable_locking" = yes ; then
14883   case "$host" in
14884     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14885       need_setuid=yes
14886     ;;
14887   esac
14888 fi
14889
14890
14891 if test "$have_shadow_adjunct" = yes ; then
14892   cat >>confdefs.h <<\_ACEOF
14893 #define HAVE_ADJUNCT_PASSWD 1
14894 _ACEOF
14895
14896 elif test "$have_shadow_enhanced" = yes ; then
14897   cat >>confdefs.h <<\_ACEOF
14898 #define HAVE_ENHANCED_PASSWD 1
14899 _ACEOF
14900
14901 elif test "$have_shadow_hpux" = yes ; then
14902   cat >>confdefs.h <<\_ACEOF
14903 #define HAVE_HPUX_PASSWD 1
14904 _ACEOF
14905
14906 elif test "$have_shadow" = yes ; then
14907   cat >>confdefs.h <<\_ACEOF
14908 #define HAVE_SHADOW_PASSWD 1
14909 _ACEOF
14910
14911 fi
14912
14913
14914 ###############################################################################
14915 #
14916 #       Check for external password helper
14917 #       On SuSE, instead of having xscreensaver be a setuid program, they
14918 #       fork an external program that takes the password on stdin, and
14919 #       returns true if that password is a valid one.  Then only that
14920 #       smaller program needs to be setuid.
14921 #
14922 #       (Note that this external program is not a GUI: the GUI is still
14923 #       all in xscreensaver itself; the external program just does auth.)
14924 #
14925 ###############################################################################
14926
14927 have_passwd_helper=no
14928 with_passwd_helper_req=unspecified
14929
14930
14931 # Check whether --with-passwd-helper was given.
14932 if test "${with_passwd_helper+set}" = set; then
14933   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14934 else
14935   with_passwd_helper=no
14936 fi
14937
14938 # no HANDLE_X_PATH_ARG for this one
14939
14940 if test "$enable_locking" = no ; then
14941   with_passwd_helper_req=no
14942   with_passwd_helper=no
14943 fi
14944
14945 case "$with_passwd_helper" in
14946   ""|no) : ;;
14947   /*)
14948     cat >>confdefs.h <<_ACEOF
14949 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14950 _ACEOF
14951
14952     have_passwd_helper=yes;;
14953   *)
14954     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14955     exit 1
14956 esac
14957
14958
14959 ###############################################################################
14960 #
14961 #       Check for a login manager for a "New Login" button on the lock dialog.
14962 #       Usually this will be "/usr/bin/gdmflexiserver".
14963 #
14964 ###############################################################################
14965
14966 have_login_manager=no
14967 with_login_manager_req=unspecified
14968 default_login_manager='gdmflexiserver -ls'
14969
14970
14971 # Check whether --with-login-manager was given.
14972 if test "${with_login_manager+set}" = set; then
14973   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14974 else
14975   with_login_manager=no
14976 fi
14977
14978 # no HANDLE_X_PATH_ARG for this one
14979
14980 if test "$enable_locking" = no ; then
14981   with_login_manager_req=no
14982   with_login_manager=no
14983 fi
14984
14985 if test -n "$with_login_manager_req" ; then
14986   ac_cv_login_manager_program=""
14987
14988  if test "$with_login_manager_req" = "yes" ; then
14989    with_login_manager_req=$default_login_manager
14990  fi
14991
14992   case "$with_login_manager_req" in
14993     no)
14994       with_login_manager=""
14995     ;;
14996     /*)
14997       # absolute path
14998       set dummy $with_login_manager_req ; login_manager_tmp=$2
14999       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15000 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15001       if test -x "$login_manager_tmp" ; then
15002         { echo "$as_me:$LINENO: result: yes" >&5
15003 echo "${ECHO_T}yes" >&6; }
15004       else
15005         { echo "$as_me:$LINENO: result: no" >&5
15006 echo "${ECHO_T}no" >&6; }
15007         with_login_manager=""
15008       fi
15009     ;;
15010     *)
15011       # relative path
15012       set dummy $with_login_manager_req ; login_manager_tmp=$2
15013       # don't cache
15014       unset ac_cv_path_login_manager_tmp
15015       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15016 set dummy $login_manager_tmp; ac_word=$2
15017 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15019 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15020   echo $ECHO_N "(cached) $ECHO_C" >&6
15021 else
15022   case $login_manager_tmp in
15023   [\\/]* | ?:[\\/]*)
15024   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15025   ;;
15026   *)
15027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15028 for as_dir in $PATH
15029 do
15030   IFS=$as_save_IFS
15031   test -z "$as_dir" && as_dir=.
15032   for ac_exec_ext in '' $ac_executable_extensions; do
15033   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15034     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15035     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15036     break 2
15037   fi
15038 done
15039 done
15040 IFS=$as_save_IFS
15041
15042   ;;
15043 esac
15044 fi
15045 login_manager_tmp=$ac_cv_path_login_manager_tmp
15046 if test -n "$login_manager_tmp"; then
15047   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15048 echo "${ECHO_T}$login_manager_tmp" >&6; }
15049 else
15050   { echo "$as_me:$LINENO: result: no" >&5
15051 echo "${ECHO_T}no" >&6; }
15052 fi
15053
15054
15055       if test -z "$login_manager_tmp" ; then
15056         with_login_manager=""
15057       else
15058         with_login_manager="$login_manager_tmp"
15059       fi
15060     ;;
15061   esac
15062   ac_cv_login_manager_program="$with_login_manager"
15063
15064 elif test -n "$ac_cv_login_manager_program"; then
15065   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15066 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15067 fi
15068
15069 NEW_LOGIN_COMMAND_P=''
15070 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15071
15072 if test -z "$NEW_LOGIN_COMMAND" ; then
15073   NEW_LOGIN_COMMAND="$default_login_manager"
15074   NEW_LOGIN_COMMAND_P='! '
15075 fi
15076
15077
15078
15079 ###############################################################################
15080 #
15081 #       Check for -lgtk (and Gnome stuff)
15082 #
15083 ###############################################################################
15084
15085 have_gtk=no
15086 with_gtk_req=unspecified
15087
15088 # Check whether --with-gtk was given.
15089 if test "${with_gtk+set}" = set; then
15090   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15091 else
15092   with_gtk=yes
15093 fi
15094
15095
15096 # if --with-gtk=/directory/ was specified, remember that directory so that
15097 # we can also look for the `gtk-config' program in that directory.
15098 case "$with_gtk" in
15099   /*)
15100     gtk_dir="$with_gtk"
15101     ;;
15102   *)
15103     gtk_dir=""
15104     ;;
15105 esac
15106
15107
15108    case "$with_gtk" in
15109     yes) ;;
15110     no)  ;;
15111
15112     /*)
15113      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15114 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15115      d=$with_gtk/include
15116      if test -d $d; then
15117        X_CFLAGS="-I$d $X_CFLAGS"
15118        { echo "$as_me:$LINENO: result: $d" >&5
15119 echo "${ECHO_T}$d" >&6; }
15120      else
15121        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15122 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15123      fi
15124
15125      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15126 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15127      d=$with_gtk/lib
15128      if test -d $d; then
15129        X_LIBS="-L$d $X_LIBS"
15130        { echo "$as_me:$LINENO: result: $d" >&5
15131 echo "${ECHO_T}$d" >&6; }
15132      else
15133        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15134 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15135      fi
15136
15137      # replace the directory string with "yes".
15138      with_gtk_req="yes"
15139      with_gtk=$with_gtk_req
15140      ;;
15141
15142     *)
15143      echo ""
15144      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15145      echo "       If it is a directory, then \`DIR/include' will be added to"
15146      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15147      exit 1
15148      ;;
15149    esac
15150
15151
15152 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15153   echo "error: must be yes or no: --with-gtk=$with_gtk"
15154   exit 1
15155 fi
15156
15157
15158 parse_gtk_version_string() {
15159   # M4 sucks!!
15160
15161   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15162   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15163
15164   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15165   if test -z "$ac_gtk_version"; then
15166     ac_gtk_version=unknown
15167     ac_gtk_version_string=unknown
15168   fi
15169 }
15170
15171 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15172 # if the user specified --with-gtk=/foo/ then look there.
15173 #
15174 gtk_path="$PATH"
15175 if test ! -z "$gtk_dir"; then
15176   # canonicalize slashes.
15177   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15178   gtk_path="$foo:$gtk_path"
15179 fi
15180
15181 for ac_prog in pkg-config
15182 do
15183   # Extract the first word of "$ac_prog", so it can be a program name with args.
15184 set dummy $ac_prog; ac_word=$2
15185 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15187 if test "${ac_cv_path_pkg_config+set}" = set; then
15188   echo $ECHO_N "(cached) $ECHO_C" >&6
15189 else
15190   case $pkg_config in
15191   [\\/]* | ?:[\\/]*)
15192   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15193   ;;
15194   *)
15195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15196 for as_dir in $gtk_path
15197 do
15198   IFS=$as_save_IFS
15199   test -z "$as_dir" && as_dir=.
15200   for ac_exec_ext in '' $ac_executable_extensions; do
15201   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15202     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15203     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15204     break 2
15205   fi
15206 done
15207 done
15208 IFS=$as_save_IFS
15209
15210   ;;
15211 esac
15212 fi
15213 pkg_config=$ac_cv_path_pkg_config
15214 if test -n "$pkg_config"; then
15215   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15216 echo "${ECHO_T}$pkg_config" >&6; }
15217 else
15218   { echo "$as_me:$LINENO: result: no" >&5
15219 echo "${ECHO_T}no" >&6; }
15220 fi
15221
15222
15223   test -n "$pkg_config" && break
15224 done
15225
15226
15227 if test -z "$pkg_config" ; then
15228   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15229 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15230   pkg_config="false"
15231 fi
15232
15233
15234 # Utility function for running pkg-config-based tests...
15235 #
15236 pkgs=''
15237 pkg_check_version() {
15238   if test "$ok" = yes ; then
15239     req="$1"
15240     min="$2"
15241     { echo "$as_me:$LINENO: checking for $req" >&5
15242 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15243     if $pkg_config --exists "$req" ; then
15244       vers=`$pkg_config --modversion "$req"`
15245       if $pkg_config --exists "$req >= $min" ; then
15246         { echo "$as_me:$LINENO: result: $vers" >&5
15247 echo "${ECHO_T}$vers" >&6; }
15248         pkgs="$pkgs $req"
15249         return 1
15250       else
15251         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15252 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15253         ok=no
15254         return 0
15255       fi
15256     else
15257       { echo "$as_me:$LINENO: result: no" >&5
15258 echo "${ECHO_T}no" >&6; }
15259       ok=no
15260       return 0
15261     fi
15262   fi
15263 }
15264
15265
15266 jurassic_gtk=no
15267 gtk_halfassed=no
15268
15269 if test "$with_gtk" = yes; then
15270   have_gtk=no
15271
15272   ok="yes"
15273   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15274   pkg_check_version         gmodule-2.0  2.0.0
15275   pkg_check_version          libxml-2.0  2.4.6
15276   pkg_check_version        libglade-2.0  1.99.0
15277   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15278   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15279   have_gtk="$ok"
15280
15281   if test "$have_gtk" = no; then
15282     if test -n "$ac_gtk_version_string" ; then
15283       gtk_halfassed="$ac_gtk_version_string"
15284       gtk_halfassed_lib="$req"
15285     fi
15286   fi
15287
15288   if test "$have_gtk" = yes; then
15289     parse_gtk_version_string
15290     jurassic_gtk=no
15291   fi
15292
15293   if test "$have_gtk" = yes; then
15294     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15295 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15296 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15297   echo $ECHO_N "(cached) $ECHO_C" >&6
15298 else
15299   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15300 fi
15301 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15302 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15303     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15304 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15305 if test "${ac_cv_gtk_config_libs+set}" = set; then
15306   echo $ECHO_N "(cached) $ECHO_C" >&6
15307 else
15308   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15309 fi
15310 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15311 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15312   fi
15313
15314   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15315   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15316
15317   GTK_EXTRA_OBJS=""
15318   GTK_DATADIR=""
15319   if test "$have_gtk" = yes; then
15320     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15321     GTK_DATADIR="$GTK_DATADIR/share"
15322   fi
15323
15324   if test "$have_gtk" = yes; then
15325     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15326     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15327     cat >>confdefs.h <<\_ACEOF
15328 #define HAVE_GTK 1
15329 _ACEOF
15330
15331     cat >>confdefs.h <<\_ACEOF
15332 #define HAVE_GTK2 1
15333 _ACEOF
15334
15335     cat >>confdefs.h <<\_ACEOF
15336 #define HAVE_XML 1
15337 _ACEOF
15338
15339   fi
15340
15341 fi
15342
15343
15344 # Check for the various Gnome help and URL loading programs.
15345 #
15346 WITH_BROWSER=gnome-open
15347 if test "$have_gtk" = yes; then
15348   for ac_prog in gnome-open
15349 do
15350   # Extract the first word of "$ac_prog", so it can be a program name with args.
15351 set dummy $ac_prog; ac_word=$2
15352 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15353 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15354 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15355   echo $ECHO_N "(cached) $ECHO_C" >&6
15356 else
15357   if test -n "$gnome_open_program"; then
15358   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15359 else
15360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15361 for as_dir in $PATH
15362 do
15363   IFS=$as_save_IFS
15364   test -z "$as_dir" && as_dir=.
15365   for ac_exec_ext in '' $ac_executable_extensions; do
15366   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15367     ac_cv_prog_gnome_open_program="$ac_prog"
15368     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15369     break 2
15370   fi
15371 done
15372 done
15373 IFS=$as_save_IFS
15374
15375 fi
15376 fi
15377 gnome_open_program=$ac_cv_prog_gnome_open_program
15378 if test -n "$gnome_open_program"; then
15379   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15380 echo "${ECHO_T}$gnome_open_program" >&6; }
15381 else
15382   { echo "$as_me:$LINENO: result: no" >&5
15383 echo "${ECHO_T}no" >&6; }
15384 fi
15385
15386
15387   test -n "$gnome_open_program" && break
15388 done
15389
15390   for ac_prog in gnome-url-show
15391 do
15392   # Extract the first word of "$ac_prog", so it can be a program name with args.
15393 set dummy $ac_prog; ac_word=$2
15394 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15396 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15397   echo $ECHO_N "(cached) $ECHO_C" >&6
15398 else
15399   if test -n "$gnome_url_show_program"; then
15400   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15401 else
15402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15403 for as_dir in $PATH
15404 do
15405   IFS=$as_save_IFS
15406   test -z "$as_dir" && as_dir=.
15407   for ac_exec_ext in '' $ac_executable_extensions; do
15408   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15409     ac_cv_prog_gnome_url_show_program="$ac_prog"
15410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15411     break 2
15412   fi
15413 done
15414 done
15415 IFS=$as_save_IFS
15416
15417 fi
15418 fi
15419 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15420 if test -n "$gnome_url_show_program"; then
15421   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15422 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15423 else
15424   { echo "$as_me:$LINENO: result: no" >&5
15425 echo "${ECHO_T}no" >&6; }
15426 fi
15427
15428
15429   test -n "$gnome_url_show_program" && break
15430 done
15431
15432 fi
15433
15434
15435 ###############################################################################
15436 #
15437 #       Check for -lXm.
15438 #
15439 ###############################################################################
15440
15441 have_motif=no
15442 with_motif_req=unspecified
15443
15444 # Check whether --with-motif was given.
15445 if test "${with_motif+set}" = set; then
15446   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15447 else
15448   with_motif=no
15449 fi
15450
15451
15452
15453    case "$with_motif" in
15454     yes) ;;
15455     no)  ;;
15456
15457     /*)
15458      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15459 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15460      d=$with_motif/include
15461      if test -d $d; then
15462        X_CFLAGS="-I$d $X_CFLAGS"
15463        { echo "$as_me:$LINENO: result: $d" >&5
15464 echo "${ECHO_T}$d" >&6; }
15465      else
15466        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15467 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15468      fi
15469
15470      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15471 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15472      d=$with_motif/lib
15473      if test -d $d; then
15474        X_LIBS="-L$d $X_LIBS"
15475        { echo "$as_me:$LINENO: result: $d" >&5
15476 echo "${ECHO_T}$d" >&6; }
15477      else
15478        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15479 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15480      fi
15481
15482      # replace the directory string with "yes".
15483      with_motif_req="yes"
15484      with_motif=$with_motif_req
15485      ;;
15486
15487     *)
15488      echo ""
15489      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15490      echo "       If it is a directory, then \`DIR/include' will be added to"
15491      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15492      exit 1
15493      ;;
15494    esac
15495
15496
15497 if test "$with_motif" != yes -a "$with_motif" != no ; then
15498   echo "error: must be yes or no: --with-motif=$with_motif"
15499   exit 1
15500 fi
15501
15502 if test "$with_motif" = yes; then
15503   have_motif=no
15504
15505   ac_save_CPPFLAGS="$CPPFLAGS"
15506   if test \! -z "$includedir" ; then
15507     CPPFLAGS="$CPPFLAGS -I$includedir"
15508   fi
15509   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15510   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15511   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15512 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15513 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15514   echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516   cat >conftest.$ac_ext <<_ACEOF
15517 /* confdefs.h.  */
15518 _ACEOF
15519 cat confdefs.h >>conftest.$ac_ext
15520 cat >>conftest.$ac_ext <<_ACEOF
15521 /* end confdefs.h.  */
15522 #include <stdlib.h>
15523                      #include <stdio.h>
15524                      #include <X11/Intrinsic.h>
15525
15526 #include <Xm/Xm.h>
15527 _ACEOF
15528 rm -rf conftest.$ac_objext
15529 if { (ac_try="$ac_compile"
15530 case "(($ac_try" in
15531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15532   *) ac_try_echo=$ac_try;;
15533 esac
15534 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15535   (eval "$ac_compile") 2>conftest.er1
15536   ac_status=$?
15537   grep -v '^ *+' conftest.er1 >conftest.err
15538   rm -rf conftest.er1
15539   cat conftest.err >&5
15540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15541   (exit $ac_status); } && {
15542          test -z "$ac_c_werror_flag" ||
15543          test ! -s conftest.err
15544        } && test -s conftest.$ac_objext; then
15545   ac_cv_header_Xm_Xm_h=yes
15546 else
15547   echo "$as_me: failed program was:" >&5
15548 sed 's/^/| /' conftest.$ac_ext >&5
15549
15550         ac_cv_header_Xm_Xm_h=no
15551 fi
15552
15553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15554 fi
15555 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15556 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15557 if test $ac_cv_header_Xm_Xm_h = yes; then
15558   have_motif=yes
15559                      cat >>confdefs.h <<\_ACEOF
15560 #define HAVE_MOTIF 1
15561 _ACEOF
15562
15563                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15564 fi
15565
15566
15567   CPPFLAGS="$ac_save_CPPFLAGS"
15568 fi
15569
15570
15571 if test "$have_motif" = yes; then
15572
15573   ac_save_CPPFLAGS="$CPPFLAGS"
15574   if test \! -z "$includedir" ; then
15575     CPPFLAGS="$CPPFLAGS -I$includedir"
15576   fi
15577   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15578   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15579   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15580 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15581 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15582   echo $ECHO_N "(cached) $ECHO_C" >&6
15583 else
15584   cat >conftest.$ac_ext <<_ACEOF
15585 /* confdefs.h.  */
15586 _ACEOF
15587 cat confdefs.h >>conftest.$ac_ext
15588 cat >>conftest.$ac_ext <<_ACEOF
15589 /* end confdefs.h.  */
15590 #include <stdlib.h>
15591                      #include <stdio.h>
15592                      #include <X11/Intrinsic.h>
15593
15594 #include <Xm/ComboBox.h>
15595 _ACEOF
15596 rm -rf conftest.$ac_objext
15597 if { (ac_try="$ac_compile"
15598 case "(($ac_try" in
15599   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15600   *) ac_try_echo=$ac_try;;
15601 esac
15602 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15603   (eval "$ac_compile") 2>conftest.er1
15604   ac_status=$?
15605   grep -v '^ *+' conftest.er1 >conftest.err
15606   rm -rf conftest.er1
15607   cat conftest.err >&5
15608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15609   (exit $ac_status); } && {
15610          test -z "$ac_c_werror_flag" ||
15611          test ! -s conftest.err
15612        } && test -s conftest.$ac_objext; then
15613   ac_cv_header_Xm_ComboBox_h=yes
15614 else
15615   echo "$as_me: failed program was:" >&5
15616 sed 's/^/| /' conftest.$ac_ext >&5
15617
15618         ac_cv_header_Xm_ComboBox_h=no
15619 fi
15620
15621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15622 fi
15623 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15624 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15625 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15626   cat >>confdefs.h <<\_ACEOF
15627 #define HAVE_XMCOMBOBOX 1
15628 _ACEOF
15629
15630 fi
15631
15632
15633   CPPFLAGS="$ac_save_CPPFLAGS"
15634 fi
15635
15636
15637 ###############################################################################
15638 #
15639 #       Checking whether Motif is really Lesstif.
15640 #
15641 ###############################################################################
15642
15643 have_lesstif=no
15644 if test "$have_motif" = yes ; then
15645   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15646 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15647 if test "${ac_cv_have_lesstif+set}" = set; then
15648   echo $ECHO_N "(cached) $ECHO_C" >&6
15649 else
15650
15651   ac_save_CPPFLAGS="$CPPFLAGS"
15652   if test \! -z "$includedir" ; then
15653     CPPFLAGS="$CPPFLAGS -I$includedir"
15654   fi
15655   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15656   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15657   cat >conftest.$ac_ext <<_ACEOF
15658 /* confdefs.h.  */
15659 _ACEOF
15660 cat confdefs.h >>conftest.$ac_ext
15661 cat >>conftest.$ac_ext <<_ACEOF
15662 /* end confdefs.h.  */
15663 #include <Xm/Xm.h>
15664 int
15665 main ()
15666 {
15667 long vers = LesstifVersion;
15668   ;
15669   return 0;
15670 }
15671 _ACEOF
15672 rm -rf conftest.$ac_objext
15673 if { (ac_try="$ac_compile"
15674 case "(($ac_try" in
15675   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15676   *) ac_try_echo=$ac_try;;
15677 esac
15678 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15679   (eval "$ac_compile") 2>conftest.er1
15680   ac_status=$?
15681   grep -v '^ *+' conftest.er1 >conftest.err
15682   rm -rf conftest.er1
15683   cat conftest.err >&5
15684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685   (exit $ac_status); } && {
15686          test -z "$ac_c_werror_flag" ||
15687          test ! -s conftest.err
15688        } && test -s conftest.$ac_objext; then
15689   ac_cv_have_lesstif=yes
15690 else
15691   echo "$as_me: failed program was:" >&5
15692 sed 's/^/| /' conftest.$ac_ext >&5
15693
15694         ac_cv_have_lesstif=no
15695 fi
15696
15697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15698   CPPFLAGS="$ac_save_CPPFLAGS"
15699 fi
15700 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15701 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15702   have_lesstif=$ac_cv_have_lesstif
15703 fi
15704
15705
15706 lesstif_version=unknown
15707 lesstif_version_string=unknown
15708
15709 if test "$have_lesstif" = yes ; then
15710   ltv=unknown
15711   echo unknown > conftest-lt
15712   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15713 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15714 if test "${ac_cv_lesstif_version_string+set}" = set; then
15715   echo $ECHO_N "(cached) $ECHO_C" >&6
15716 else
15717
15718   ac_save_CPPFLAGS="$CPPFLAGS"
15719   if test \! -z "$includedir" ; then
15720     CPPFLAGS="$CPPFLAGS -I$includedir"
15721   fi
15722   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15723   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15724   if test "$cross_compiling" = yes; then
15725   ac_cv_lesstif_version=unknown
15726                      ac_cv_lesstif_version_string=unknown
15727 else
15728   cat >conftest.$ac_ext <<_ACEOF
15729 /* confdefs.h.  */
15730 _ACEOF
15731 cat confdefs.h >>conftest.$ac_ext
15732 cat >>conftest.$ac_ext <<_ACEOF
15733 /* end confdefs.h.  */
15734 #include <stdio.h>
15735                      #include <Xm/Xm.h>
15736                      int main() {
15737                        FILE *f = fopen("conftest-lt", "w");
15738                        if (!f) exit(1);
15739                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15740                           LESSTIF_VERSION, LESSTIF_REVISION);
15741                        fclose(f);
15742                        exit(0);
15743                      }
15744 _ACEOF
15745 rm -rf conftest$ac_exeext
15746 if { (ac_try="$ac_link"
15747 case "(($ac_try" in
15748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15749   *) ac_try_echo=$ac_try;;
15750 esac
15751 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15752   (eval "$ac_link") 2>&5
15753   ac_status=$?
15754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15756   { (case "(($ac_try" in
15757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15758   *) ac_try_echo=$ac_try;;
15759 esac
15760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15761   (eval "$ac_try") 2>&5
15762   ac_status=$?
15763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   ltv=`cat conftest-lt`
15766                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15767                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15768 else
15769   echo "$as_me: program exited with status $ac_status" >&5
15770 echo "$as_me: failed program was:" >&5
15771 sed 's/^/| /' conftest.$ac_ext >&5
15772
15773 ( exit $ac_status )
15774 ac_cv_lesstif_version=unknown
15775                      ac_cv_lesstif_version_string=unknown
15776 fi
15777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15778 fi
15779
15780
15781   CPPFLAGS="$ac_save_CPPFLAGS"
15782 fi
15783 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15784 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15785   rm -rf conftest-lt
15786   lesstif_version=$ac_cv_lesstif_version
15787   lesstif_version_string=$ac_cv_lesstif_version_string
15788
15789 fi
15790
15791
15792 if test "$have_motif" = yes ; then
15793   mtv=unknown
15794   echo unknown > conftest-mt
15795   { echo "$as_me:$LINENO: checking Motif version number" >&5
15796 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15797 if test "${ac_cv_motif_version_string+set}" = set; then
15798   echo $ECHO_N "(cached) $ECHO_C" >&6
15799 else
15800
15801   ac_save_CPPFLAGS="$CPPFLAGS"
15802   if test \! -z "$includedir" ; then
15803     CPPFLAGS="$CPPFLAGS -I$includedir"
15804   fi
15805   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15806   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15807   if test "$cross_compiling" = yes; then
15808   ac_cv_motif_version=unknown
15809                      ac_cv_motif_version_string=unknown
15810 else
15811   cat >conftest.$ac_ext <<_ACEOF
15812 /* confdefs.h.  */
15813 _ACEOF
15814 cat confdefs.h >>conftest.$ac_ext
15815 cat >>conftest.$ac_ext <<_ACEOF
15816 /* end confdefs.h.  */
15817 #include <stdio.h>
15818                      #include <Xm/Xm.h>
15819                      int main() {
15820                        FILE *f = fopen("conftest-mt", "w");
15821                        if (!f) exit(1);
15822                        fprintf(f, "%d %d.%d\n", XmVersion,
15823                           XmVERSION, XmREVISION);
15824                        fclose(f);
15825                        exit(0);
15826                      }
15827 _ACEOF
15828 rm -rf conftest$ac_exeext
15829 if { (ac_try="$ac_link"
15830 case "(($ac_try" in
15831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15832   *) ac_try_echo=$ac_try;;
15833 esac
15834 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15835   (eval "$ac_link") 2>&5
15836   ac_status=$?
15837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15838   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15839   { (case "(($ac_try" in
15840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15841   *) ac_try_echo=$ac_try;;
15842 esac
15843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15844   (eval "$ac_try") 2>&5
15845   ac_status=$?
15846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847   (exit $ac_status); }; }; then
15848   mtv=`cat conftest-mt`
15849                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15850                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15851 else
15852   echo "$as_me: program exited with status $ac_status" >&5
15853 echo "$as_me: failed program was:" >&5
15854 sed 's/^/| /' conftest.$ac_ext >&5
15855
15856 ( exit $ac_status )
15857 ac_cv_motif_version=unknown
15858                      ac_cv_motif_version_string=unknown
15859 fi
15860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15861 fi
15862
15863
15864   CPPFLAGS="$ac_save_CPPFLAGS"
15865 fi
15866 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15867 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15868   rm -rf conftest-mt
15869   motif_version=$ac_cv_motif_version
15870   motif_version_string=$ac_cv_motif_version_string
15871
15872 fi
15873
15874
15875 ###############################################################################
15876 #
15877 #       Checking whether Motif requires -lXpm.
15878 #
15879 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15880 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15881 #       of the library whether to build the XPM code into libXm, or whether
15882 #       to rely on an external libXm.  So the only way to tell whether XPM is
15883 #       a link-time requirement is to examine libXm.a, which is very
15884 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15885 #       always link against XPM if the XPM lib exists (and this will be a
15886 #       no-op if libXm happens to already have the XPM code in it.)
15887 #
15888 ###############################################################################
15889
15890 motif_requires_xpm=no
15891 if test "$have_motif" = yes ; then
15892    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15893 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15894    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15895    then
15896      motif_requires_xpm=yes
15897      { echo "$as_me:$LINENO: result: maybe" >&5
15898 echo "${ECHO_T}maybe" >&6; }
15899    else
15900      { echo "$as_me:$LINENO: result: no" >&5
15901 echo "${ECHO_T}no" >&6; }
15902    fi
15903 fi
15904
15905
15906 ###############################################################################
15907 #
15908 #       Checking whether Motif requires -lXp.
15909 #
15910 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15911 #       Extension".   Why this extension isn't in -lXext with all the others,
15912 #       I have no idea.
15913 #
15914 ###############################################################################
15915
15916 have_xp_ext=no
15917 if test "$have_motif" = yes ; then
15918    have_xp_ext=no
15919
15920   ac_save_CPPFLAGS="$CPPFLAGS"
15921   ac_save_LDFLAGS="$LDFLAGS"
15922 #  ac_save_LIBS="$LIBS"
15923
15924   if test \! -z "$includedir" ; then
15925     CPPFLAGS="$CPPFLAGS -I$includedir"
15926   fi
15927   # note: $X_CFLAGS includes $x_includes
15928   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15929
15930   if test \! -z "$libdir" ; then
15931     LDFLAGS="$LDFLAGS -L$libdir"
15932   fi
15933   # note: $X_LIBS includes $x_libraries
15934   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15935
15936   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15937   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15938   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15939 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15940 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15941   echo $ECHO_N "(cached) $ECHO_C" >&6
15942 else
15943   ac_check_lib_save_LIBS=$LIBS
15944 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15945 cat >conftest.$ac_ext <<_ACEOF
15946 /* confdefs.h.  */
15947 _ACEOF
15948 cat confdefs.h >>conftest.$ac_ext
15949 cat >>conftest.$ac_ext <<_ACEOF
15950 /* end confdefs.h.  */
15951
15952 /* Override any GCC internal prototype to avoid an error.
15953    Use char because int might match the return type of a GCC
15954    builtin and then its argument prototype would still apply.  */
15955 #ifdef __cplusplus
15956 extern "C"
15957 #endif
15958 char XpQueryExtension ();
15959 int
15960 main ()
15961 {
15962 return XpQueryExtension ();
15963   ;
15964   return 0;
15965 }
15966 _ACEOF
15967 rm -rf conftest.$ac_objext conftest$ac_exeext
15968 if { (ac_try="$ac_link"
15969 case "(($ac_try" in
15970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15971   *) ac_try_echo=$ac_try;;
15972 esac
15973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15974   (eval "$ac_link") 2>conftest.er1
15975   ac_status=$?
15976   grep -v '^ *+' conftest.er1 >conftest.err
15977   rm -rf conftest.er1
15978   cat conftest.err >&5
15979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15980   (exit $ac_status); } && {
15981          test -z "$ac_c_werror_flag" ||
15982          test ! -s conftest.err
15983        } && test -s conftest$ac_exeext &&
15984        $as_test_x conftest$ac_exeext; then
15985   ac_cv_lib_Xp_XpQueryExtension=yes
15986 else
15987   echo "$as_me: failed program was:" >&5
15988 sed 's/^/| /' conftest.$ac_ext >&5
15989
15990         ac_cv_lib_Xp_XpQueryExtension=no
15991 fi
15992
15993 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15994       conftest$ac_exeext conftest.$ac_ext
15995 LIBS=$ac_check_lib_save_LIBS
15996 fi
15997 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15998 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
15999 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16000   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16001 else
16002   true
16003 fi
16004
16005   CPPFLAGS="$ac_save_CPPFLAGS"
16006   LDFLAGS="$ac_save_LDFLAGS"
16007 #  LIBS="$ac_save_LIBS"
16008
16009 fi
16010
16011
16012 ###############################################################################
16013 #
16014 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16015 #
16016 ###############################################################################
16017
16018 have_xintl=no
16019 if test "$have_motif" = yes ; then
16020
16021   ac_save_CPPFLAGS="$CPPFLAGS"
16022   ac_save_LDFLAGS="$LDFLAGS"
16023 #  ac_save_LIBS="$LIBS"
16024
16025   if test \! -z "$includedir" ; then
16026     CPPFLAGS="$CPPFLAGS -I$includedir"
16027   fi
16028   # note: $X_CFLAGS includes $x_includes
16029   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16030
16031   if test \! -z "$libdir" ; then
16032     LDFLAGS="$LDFLAGS -L$libdir"
16033   fi
16034   # note: $X_LIBS includes $x_libraries
16035   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16036
16037   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16038   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16039   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16040 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16041 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16042   echo $ECHO_N "(cached) $ECHO_C" >&6
16043 else
16044   ac_check_lib_save_LIBS=$LIBS
16045 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16046 cat >conftest.$ac_ext <<_ACEOF
16047 /* confdefs.h.  */
16048 _ACEOF
16049 cat confdefs.h >>conftest.$ac_ext
16050 cat >>conftest.$ac_ext <<_ACEOF
16051 /* end confdefs.h.  */
16052
16053 /* Override any GCC internal prototype to avoid an error.
16054    Use char because int might match the return type of a GCC
16055    builtin and then its argument prototype would still apply.  */
16056 #ifdef __cplusplus
16057 extern "C"
16058 #endif
16059 char _Xsetlocale ();
16060 int
16061 main ()
16062 {
16063 return _Xsetlocale ();
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 rm -rf conftest.$ac_objext conftest$ac_exeext
16069 if { (ac_try="$ac_link"
16070 case "(($ac_try" in
16071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16072   *) ac_try_echo=$ac_try;;
16073 esac
16074 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16075   (eval "$ac_link") 2>conftest.er1
16076   ac_status=$?
16077   grep -v '^ *+' conftest.er1 >conftest.err
16078   rm -rf conftest.er1
16079   cat conftest.err >&5
16080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081   (exit $ac_status); } && {
16082          test -z "$ac_c_werror_flag" ||
16083          test ! -s conftest.err
16084        } && test -s conftest$ac_exeext &&
16085        $as_test_x conftest$ac_exeext; then
16086   ac_cv_lib_Xintl__Xsetlocale=yes
16087 else
16088   echo "$as_me: failed program was:" >&5
16089 sed 's/^/| /' conftest.$ac_ext >&5
16090
16091         ac_cv_lib_Xintl__Xsetlocale=no
16092 fi
16093
16094 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16095       conftest$ac_exeext conftest.$ac_ext
16096 LIBS=$ac_check_lib_save_LIBS
16097 fi
16098 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16099 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16100 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16101   have_xintl=yes
16102 else
16103   have_xintl=no
16104 fi
16105
16106   CPPFLAGS="$ac_save_CPPFLAGS"
16107   LDFLAGS="$ac_save_LDFLAGS"
16108 #  LIBS="$ac_save_LIBS"
16109
16110   if test "$have_xintl" = yes; then
16111     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16112   fi
16113 fi
16114
16115
16116 ###############################################################################
16117 #
16118 #       Check for -lGL or -lMesaGL.
16119 #
16120 ###############################################################################
16121
16122 have_gl=no
16123 ac_have_mesa_gl=no
16124 with_gl_req=unspecified
16125 gl_halfassed=no
16126
16127 # Check whether --with-gl was given.
16128 if test "${with_gl+set}" = set; then
16129   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16130 else
16131   with_gl=yes
16132 fi
16133
16134
16135
16136    case "$with_gl" in
16137     yes) ;;
16138     no)  ;;
16139
16140     /*)
16141      { echo "$as_me:$LINENO: checking for GL headers" >&5
16142 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16143      d=$with_gl/include
16144      if test -d $d; then
16145        X_CFLAGS="-I$d $X_CFLAGS"
16146        { echo "$as_me:$LINENO: result: $d" >&5
16147 echo "${ECHO_T}$d" >&6; }
16148      else
16149        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16150 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16151      fi
16152
16153      { echo "$as_me:$LINENO: checking for GL libs" >&5
16154 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16155      d=$with_gl/lib
16156      if test -d $d; then
16157        X_LIBS="-L$d $X_LIBS"
16158        { echo "$as_me:$LINENO: result: $d" >&5
16159 echo "${ECHO_T}$d" >&6; }
16160      else
16161        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16162 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16163      fi
16164
16165      # replace the directory string with "yes".
16166      with_gl_req="yes"
16167      with_gl=$with_gl_req
16168      ;;
16169
16170     *)
16171      echo ""
16172      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16173      echo "       If it is a directory, then \`DIR/include' will be added to"
16174      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16175      exit 1
16176      ;;
16177    esac
16178
16179
16180 ac_mesagl_version=unknown
16181 ac_mesagl_version_string=unknown
16182
16183 if test "$with_gl" = yes; then
16184
16185   ac_save_CPPFLAGS="$CPPFLAGS"
16186   if test \! -z "$includedir" ; then
16187     CPPFLAGS="$CPPFLAGS -I$includedir"
16188   fi
16189   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16190   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16191   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16192   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16193 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16194 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16195   echo $ECHO_N "(cached) $ECHO_C" >&6
16196 fi
16197 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16198 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16199 else
16200   # Is the header compilable?
16201 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16202 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16203 cat >conftest.$ac_ext <<_ACEOF
16204 /* confdefs.h.  */
16205 _ACEOF
16206 cat confdefs.h >>conftest.$ac_ext
16207 cat >>conftest.$ac_ext <<_ACEOF
16208 /* end confdefs.h.  */
16209 $ac_includes_default
16210 #include <GL/gl.h>
16211 _ACEOF
16212 rm -rf conftest.$ac_objext
16213 if { (ac_try="$ac_compile"
16214 case "(($ac_try" in
16215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16216   *) ac_try_echo=$ac_try;;
16217 esac
16218 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16219   (eval "$ac_compile") 2>conftest.er1
16220   ac_status=$?
16221   grep -v '^ *+' conftest.er1 >conftest.err
16222   rm -rf conftest.er1
16223   cat conftest.err >&5
16224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16225   (exit $ac_status); } && {
16226          test -z "$ac_c_werror_flag" ||
16227          test ! -s conftest.err
16228        } && test -s conftest.$ac_objext; then
16229   ac_header_compiler=yes
16230 else
16231   echo "$as_me: failed program was:" >&5
16232 sed 's/^/| /' conftest.$ac_ext >&5
16233
16234         ac_header_compiler=no
16235 fi
16236
16237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16238 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16239 echo "${ECHO_T}$ac_header_compiler" >&6; }
16240
16241 # Is the header present?
16242 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16243 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16244 cat >conftest.$ac_ext <<_ACEOF
16245 /* confdefs.h.  */
16246 _ACEOF
16247 cat confdefs.h >>conftest.$ac_ext
16248 cat >>conftest.$ac_ext <<_ACEOF
16249 /* end confdefs.h.  */
16250 #include <GL/gl.h>
16251 _ACEOF
16252 if { (ac_try="$ac_cpp conftest.$ac_ext"
16253 case "(($ac_try" in
16254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16255   *) ac_try_echo=$ac_try;;
16256 esac
16257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16258   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16259   ac_status=$?
16260   grep -v '^ *+' conftest.er1 >conftest.err
16261   rm -rf conftest.er1
16262   cat conftest.err >&5
16263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264   (exit $ac_status); } >/dev/null && {
16265          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16266          test ! -s conftest.err
16267        }; then
16268   ac_header_preproc=yes
16269 else
16270   echo "$as_me: failed program was:" >&5
16271 sed 's/^/| /' conftest.$ac_ext >&5
16272
16273   ac_header_preproc=no
16274 fi
16275
16276 rm -rf conftest.err conftest.$ac_ext
16277 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16278 echo "${ECHO_T}$ac_header_preproc" >&6; }
16279
16280 # So?  What about this header?
16281 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16282   yes:no: )
16283     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16284 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16285     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16286 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16287     ac_header_preproc=yes
16288     ;;
16289   no:yes:* )
16290     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16291 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16292     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16293 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16294     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16295 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16296     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16297 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16298     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16299 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16300     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16301 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16302
16303     ;;
16304 esac
16305 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16306 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16307 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16308   echo $ECHO_N "(cached) $ECHO_C" >&6
16309 else
16310   ac_cv_header_GL_gl_h=$ac_header_preproc
16311 fi
16312 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16313 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16314
16315 fi
16316 if test $ac_cv_header_GL_gl_h = yes; then
16317   have_gl=yes
16318 else
16319   have_gl=no
16320 fi
16321
16322
16323   CPPFLAGS="$ac_save_CPPFLAGS"
16324   if test "$have_gl" = yes ; then
16325
16326   ac_save_CPPFLAGS="$CPPFLAGS"
16327   if test \! -z "$includedir" ; then
16328     CPPFLAGS="$CPPFLAGS -I$includedir"
16329   fi
16330   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16331   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16332   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16333 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16334 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16335   echo $ECHO_N "(cached) $ECHO_C" >&6
16336 else
16337   cat >conftest.$ac_ext <<_ACEOF
16338 /* confdefs.h.  */
16339 _ACEOF
16340 cat confdefs.h >>conftest.$ac_ext
16341 cat >>conftest.$ac_ext <<_ACEOF
16342 /* end confdefs.h.  */
16343 #include <GL/gl.h>
16344
16345 #include <GL/glx.h>
16346 _ACEOF
16347 rm -rf conftest.$ac_objext
16348 if { (ac_try="$ac_compile"
16349 case "(($ac_try" in
16350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16351   *) ac_try_echo=$ac_try;;
16352 esac
16353 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16354   (eval "$ac_compile") 2>conftest.er1
16355   ac_status=$?
16356   grep -v '^ *+' conftest.er1 >conftest.err
16357   rm -rf conftest.er1
16358   cat conftest.err >&5
16359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16360   (exit $ac_status); } && {
16361          test -z "$ac_c_werror_flag" ||
16362          test ! -s conftest.err
16363        } && test -s conftest.$ac_objext; then
16364   ac_cv_header_GL_glx_h=yes
16365 else
16366   echo "$as_me: failed program was:" >&5
16367 sed 's/^/| /' conftest.$ac_ext >&5
16368
16369         ac_cv_header_GL_glx_h=no
16370 fi
16371
16372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16373 fi
16374 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16375 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16376 if test $ac_cv_header_GL_glx_h = yes; then
16377   have_gl=yes
16378 else
16379   have_gl=no
16380 fi
16381
16382
16383   CPPFLAGS="$ac_save_CPPFLAGS"
16384   fi
16385
16386   # If we have the headers, try and figure out which vendor it's from.
16387   #
16388   if test "$have_gl" = yes ; then
16389
16390     # We need to know whether it's MesaGL so that we know which libraries
16391     # to link against.
16392     #
16393     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16394 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16395 if test "${ac_cv_have_mesa_gl+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398   ac_cv_have_mesa_gl=no
16399        if test "$ac_macosx" = no; then
16400          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16401          # It's not really Mesa, is it?
16402
16403   ac_save_CPPFLAGS="$CPPFLAGS"
16404   if test \! -z "$includedir" ; then
16405     CPPFLAGS="$CPPFLAGS -I$includedir"
16406   fi
16407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16408   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16409   cat >conftest.$ac_ext <<_ACEOF
16410 /* confdefs.h.  */
16411 _ACEOF
16412 cat confdefs.h >>conftest.$ac_ext
16413 cat >>conftest.$ac_ext <<_ACEOF
16414 /* end confdefs.h.  */
16415 #include <GL/glx.h>
16416
16417 _ACEOF
16418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16419   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16420   ac_cv_have_mesa_gl=yes
16421 fi
16422 rm -f -r conftest*
16423
16424   CPPFLAGS="$ac_save_CPPFLAGS"
16425        fi
16426 fi
16427 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16428 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16429     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16430
16431     gl_lib_1=""
16432     GL_LIBS=""
16433
16434     if test "$ac_macosx" = yes; then
16435
16436       # Without these, every link against libGL gets a bunch of useless
16437       # warnings.
16438       #
16439       osx_crud="-bind_at_load -multiply_defined suppress"
16440       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16441 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16442       GL_LIBS="$GL_LIBS $osx_crud"
16443       unset osx_crud
16444
16445       # New lossage in 10.5.0: without this, we get:
16446       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16447       #
16448       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16449       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16450
16451       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16452 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16453       GL_LIBS="$GL_LIBS $osx_crud"
16454       unset osx_crud
16455     fi
16456
16457
16458     # Some versions of MesaGL are compiled to require -lpthread.
16459     # So if the Mesa headers exist, and -lpthread exists, then always
16460     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16461     #
16462     if test "$ac_have_mesa_gl" = yes; then
16463       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16464 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16465 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16466   echo $ECHO_N "(cached) $ECHO_C" >&6
16467 else
16468   ac_check_lib_save_LIBS=$LIBS
16469 LIBS="-lpthread  $LIBS"
16470 cat >conftest.$ac_ext <<_ACEOF
16471 /* confdefs.h.  */
16472 _ACEOF
16473 cat confdefs.h >>conftest.$ac_ext
16474 cat >>conftest.$ac_ext <<_ACEOF
16475 /* end confdefs.h.  */
16476
16477 /* Override any GCC internal prototype to avoid an error.
16478    Use char because int might match the return type of a GCC
16479    builtin and then its argument prototype would still apply.  */
16480 #ifdef __cplusplus
16481 extern "C"
16482 #endif
16483 char pthread_create ();
16484 int
16485 main ()
16486 {
16487 return pthread_create ();
16488   ;
16489   return 0;
16490 }
16491 _ACEOF
16492 rm -rf conftest.$ac_objext conftest$ac_exeext
16493 if { (ac_try="$ac_link"
16494 case "(($ac_try" in
16495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16496   *) ac_try_echo=$ac_try;;
16497 esac
16498 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16499   (eval "$ac_link") 2>conftest.er1
16500   ac_status=$?
16501   grep -v '^ *+' conftest.er1 >conftest.err
16502   rm -rf conftest.er1
16503   cat conftest.err >&5
16504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16505   (exit $ac_status); } && {
16506          test -z "$ac_c_werror_flag" ||
16507          test ! -s conftest.err
16508        } && test -s conftest$ac_exeext &&
16509        $as_test_x conftest$ac_exeext; then
16510   ac_cv_lib_pthread_pthread_create=yes
16511 else
16512   echo "$as_me: failed program was:" >&5
16513 sed 's/^/| /' conftest.$ac_ext >&5
16514
16515         ac_cv_lib_pthread_pthread_create=no
16516 fi
16517
16518 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16519       conftest$ac_exeext conftest.$ac_ext
16520 LIBS=$ac_check_lib_save_LIBS
16521 fi
16522 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16523 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16524 if test $ac_cv_lib_pthread_pthread_create = yes; then
16525   GL_LIBS="-lpthread"
16526 fi
16527
16528     fi
16529
16530
16531     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16532     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16533     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16534     #
16535
16536     if test "$ac_have_mesa_gl" = yes ; then
16537
16538   ac_save_CPPFLAGS="$CPPFLAGS"
16539   ac_save_LDFLAGS="$LDFLAGS"
16540 #  ac_save_LIBS="$LIBS"
16541
16542   if test \! -z "$includedir" ; then
16543     CPPFLAGS="$CPPFLAGS -I$includedir"
16544   fi
16545   # note: $X_CFLAGS includes $x_includes
16546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16547
16548   if test \! -z "$libdir" ; then
16549     LDFLAGS="$LDFLAGS -L$libdir"
16550   fi
16551   # note: $X_LIBS includes $x_libraries
16552   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16553
16554   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16555   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16556   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16557 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16558 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16559   echo $ECHO_N "(cached) $ECHO_C" >&6
16560 else
16561   ac_check_lib_save_LIBS=$LIBS
16562 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16563 cat >conftest.$ac_ext <<_ACEOF
16564 /* confdefs.h.  */
16565 _ACEOF
16566 cat confdefs.h >>conftest.$ac_ext
16567 cat >>conftest.$ac_ext <<_ACEOF
16568 /* end confdefs.h.  */
16569
16570 /* Override any GCC internal prototype to avoid an error.
16571    Use char because int might match the return type of a GCC
16572    builtin and then its argument prototype would still apply.  */
16573 #ifdef __cplusplus
16574 extern "C"
16575 #endif
16576 char glXCreateContext ();
16577 int
16578 main ()
16579 {
16580 return glXCreateContext ();
16581   ;
16582   return 0;
16583 }
16584 _ACEOF
16585 rm -rf conftest.$ac_objext conftest$ac_exeext
16586 if { (ac_try="$ac_link"
16587 case "(($ac_try" in
16588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589   *) ac_try_echo=$ac_try;;
16590 esac
16591 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16592   (eval "$ac_link") 2>conftest.er1
16593   ac_status=$?
16594   grep -v '^ *+' conftest.er1 >conftest.err
16595   rm -rf conftest.er1
16596   cat conftest.err >&5
16597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16598   (exit $ac_status); } && {
16599          test -z "$ac_c_werror_flag" ||
16600          test ! -s conftest.err
16601        } && test -s conftest$ac_exeext &&
16602        $as_test_x conftest$ac_exeext; then
16603   ac_cv_lib_MesaGL_glXCreateContext=yes
16604 else
16605   echo "$as_me: failed program was:" >&5
16606 sed 's/^/| /' conftest.$ac_ext >&5
16607
16608         ac_cv_lib_MesaGL_glXCreateContext=no
16609 fi
16610
16611 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16612       conftest$ac_exeext conftest.$ac_ext
16613 LIBS=$ac_check_lib_save_LIBS
16614 fi
16615 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16616 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16617 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16618   gl_lib_1="MesaGL"
16619                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16620 fi
16621
16622   CPPFLAGS="$ac_save_CPPFLAGS"
16623   LDFLAGS="$ac_save_LDFLAGS"
16624 #  LIBS="$ac_save_LIBS"
16625
16626     fi
16627
16628     if test "$gl_lib_1" = "" ; then
16629
16630   ac_save_CPPFLAGS="$CPPFLAGS"
16631   ac_save_LDFLAGS="$LDFLAGS"
16632 #  ac_save_LIBS="$LIBS"
16633
16634   if test \! -z "$includedir" ; then
16635     CPPFLAGS="$CPPFLAGS -I$includedir"
16636   fi
16637   # note: $X_CFLAGS includes $x_includes
16638   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16639
16640   if test \! -z "$libdir" ; then
16641     LDFLAGS="$LDFLAGS -L$libdir"
16642   fi
16643   # note: $X_LIBS includes $x_libraries
16644   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16645
16646   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16647   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16648   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16649 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16650 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16651   echo $ECHO_N "(cached) $ECHO_C" >&6
16652 else
16653   ac_check_lib_save_LIBS=$LIBS
16654 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16655 cat >conftest.$ac_ext <<_ACEOF
16656 /* confdefs.h.  */
16657 _ACEOF
16658 cat confdefs.h >>conftest.$ac_ext
16659 cat >>conftest.$ac_ext <<_ACEOF
16660 /* end confdefs.h.  */
16661
16662 /* Override any GCC internal prototype to avoid an error.
16663    Use char because int might match the return type of a GCC
16664    builtin and then its argument prototype would still apply.  */
16665 #ifdef __cplusplus
16666 extern "C"
16667 #endif
16668 char glXCreateContext ();
16669 int
16670 main ()
16671 {
16672 return glXCreateContext ();
16673   ;
16674   return 0;
16675 }
16676 _ACEOF
16677 rm -rf conftest.$ac_objext conftest$ac_exeext
16678 if { (ac_try="$ac_link"
16679 case "(($ac_try" in
16680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16681   *) ac_try_echo=$ac_try;;
16682 esac
16683 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16684   (eval "$ac_link") 2>conftest.er1
16685   ac_status=$?
16686   grep -v '^ *+' conftest.er1 >conftest.err
16687   rm -rf conftest.er1
16688   cat conftest.err >&5
16689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16690   (exit $ac_status); } && {
16691          test -z "$ac_c_werror_flag" ||
16692          test ! -s conftest.err
16693        } && test -s conftest$ac_exeext &&
16694        $as_test_x conftest$ac_exeext; then
16695   ac_cv_lib_GL_glXCreateContext=yes
16696 else
16697   echo "$as_me: failed program was:" >&5
16698 sed 's/^/| /' conftest.$ac_ext >&5
16699
16700         ac_cv_lib_GL_glXCreateContext=no
16701 fi
16702
16703 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16704       conftest$ac_exeext conftest.$ac_ext
16705 LIBS=$ac_check_lib_save_LIBS
16706 fi
16707 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16708 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16709 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16710   gl_lib_1="GL"
16711                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16712 fi
16713
16714   CPPFLAGS="$ac_save_CPPFLAGS"
16715   LDFLAGS="$ac_save_LDFLAGS"
16716 #  LIBS="$ac_save_LIBS"
16717
16718     fi
16719
16720     if test "$gl_lib_1" = "" ; then
16721       # we have headers, but no libs -- bail.
16722       have_gl=no
16723       ac_have_mesa_gl=no
16724       gl_halfassed=yes
16725     else
16726       # linking works -- we can build the GL hacks.
16727       cat >>confdefs.h <<\_ACEOF
16728 #define HAVE_GL 1
16729 _ACEOF
16730
16731       if test "$ac_have_mesa_gl" = yes ; then
16732         cat >>confdefs.h <<\_ACEOF
16733 #define HAVE_MESA_GL 1
16734 _ACEOF
16735
16736       fi
16737     fi
16738   fi
16739
16740
16741   # Now that we know we have GL headers and libs, do some more GL testing.
16742   #
16743
16744   if test "$have_gl" = yes ; then
16745     # If it's MesaGL, we'd like to issue a warning if the version number
16746     # is less than or equal to 2.6, because that version had a security bug.
16747     #
16748     if test "$ac_have_mesa_gl" = yes; then
16749
16750       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16751 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16752 if test "${ac_cv_mesagl_version_string+set}" = set; then
16753   echo $ECHO_N "(cached) $ECHO_C" >&6
16754 else
16755   cat > conftest.$ac_ext <<EOF
16756 #line 16760 "configure"
16757 #include "confdefs.h"
16758 #include <GL/gl.h>
16759 #ifndef MESA_MAJOR_VERSION
16760 # include <GL/xmesa.h>
16761 # ifdef XMESA_MAJOR_VERSION
16762    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16763       we have to check the XMesa version number (the number of the X protocol
16764       support, which seems to be the same as the Mesa version number.)
16765     */
16766 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16767 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16768 # else
16769    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16770       so we have no way of telling what version of Mesa this is at all.
16771       So, we'll guess that the osmesa version (the "offscreen protocol")
16772       is less than or equal to the real mesa version number.  Except that
16773       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16774       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16775     */
16776 # include <GL/osmesa.h>
16777 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16778 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16779 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16780 #   undef MESA_MINOR_VERSION
16781 #   define MESA_MINOR_VERSION 4 or newer, probably?
16782 #  endif
16783 # endif
16784 #endif
16785 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16786 EOF
16787
16788          ac_save_CPPFLAGS="$CPPFLAGS"
16789          if test \! -z "$includedir" ; then
16790            CPPFLAGS="$CPPFLAGS -I$includedir"
16791          fi
16792          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16793
16794          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16795
16796          # M4 sucks!!
16797
16798           mglv=`echo "$mglv" | sed -n \
16799              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16800
16801
16802          rm -rf conftest.$ac_ext
16803
16804          CPPFLAGS="$ac_save_CPPFLAGS"
16805
16806          if test "$mglv" = ""; then
16807            ac_mesagl_version=unknown
16808            ac_mesagl_version_string=unknown
16809          else
16810            ac_mesagl_version_string="$mglv"
16811            # M4 sucks!!
16812
16813            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16814            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16815
16816            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16817            if test -z "$ac_mesagl_version"; then
16818              ac_mesagl_version=unknown
16819              ac_mesagl_version_string=unknown
16820            fi
16821          fi
16822          ac_cv_mesagl_version=$ac_mesagl_version
16823          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16824
16825 fi
16826 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16827 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16828       ac_mesagl_version=$ac_cv_mesagl_version
16829       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16830     fi
16831
16832
16833     # Check for OpenGL 1.1 features.
16834     #
16835
16836   ac_save_CPPFLAGS="$CPPFLAGS"
16837   ac_save_LDFLAGS="$LDFLAGS"
16838 #  ac_save_LIBS="$LIBS"
16839
16840   if test \! -z "$includedir" ; then
16841     CPPFLAGS="$CPPFLAGS -I$includedir"
16842   fi
16843   # note: $X_CFLAGS includes $x_includes
16844   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16845
16846   if test \! -z "$libdir" ; then
16847     LDFLAGS="$LDFLAGS -L$libdir"
16848   fi
16849   # note: $X_LIBS includes $x_libraries
16850   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16851
16852   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16853   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16854   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16855 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16856 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16857 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16858   echo $ECHO_N "(cached) $ECHO_C" >&6
16859 else
16860   ac_check_lib_save_LIBS=$LIBS
16861 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16862 cat >conftest.$ac_ext <<_ACEOF
16863 /* confdefs.h.  */
16864 _ACEOF
16865 cat confdefs.h >>conftest.$ac_ext
16866 cat >>conftest.$ac_ext <<_ACEOF
16867 /* end confdefs.h.  */
16868
16869 /* Override any GCC internal prototype to avoid an error.
16870    Use char because int might match the return type of a GCC
16871    builtin and then its argument prototype would still apply.  */
16872 #ifdef __cplusplus
16873 extern "C"
16874 #endif
16875 char glBindTexture ();
16876 int
16877 main ()
16878 {
16879 return glBindTexture ();
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -rf conftest.$ac_objext conftest$ac_exeext
16885 if { (ac_try="$ac_link"
16886 case "(($ac_try" in
16887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16888   *) ac_try_echo=$ac_try;;
16889 esac
16890 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16891   (eval "$ac_link") 2>conftest.er1
16892   ac_status=$?
16893   grep -v '^ *+' conftest.er1 >conftest.err
16894   rm -rf conftest.er1
16895   cat conftest.err >&5
16896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897   (exit $ac_status); } && {
16898          test -z "$ac_c_werror_flag" ||
16899          test ! -s conftest.err
16900        } && test -s conftest$ac_exeext &&
16901        $as_test_x conftest$ac_exeext; then
16902   eval "$as_ac_Lib=yes"
16903 else
16904   echo "$as_me: failed program was:" >&5
16905 sed 's/^/| /' conftest.$ac_ext >&5
16906
16907         eval "$as_ac_Lib=no"
16908 fi
16909
16910 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16911       conftest$ac_exeext conftest.$ac_ext
16912 LIBS=$ac_check_lib_save_LIBS
16913 fi
16914 ac_res=`eval echo '${'$as_ac_Lib'}'`
16915                { echo "$as_me:$LINENO: result: $ac_res" >&5
16916 echo "${ECHO_T}$ac_res" >&6; }
16917 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16918   cat >>confdefs.h <<\_ACEOF
16919 #define HAVE_GLBINDTEXTURE 1
16920 _ACEOF
16921
16922 else
16923   true
16924 fi
16925
16926   CPPFLAGS="$ac_save_CPPFLAGS"
16927   LDFLAGS="$ac_save_LDFLAGS"
16928 #  LIBS="$ac_save_LIBS"
16929
16930   fi
16931
16932 elif test "$with_gl" != no; then
16933   echo "error: must be yes or no: --with-gl=$with_gl"
16934   exit 1
16935 fi
16936
16937
16938 ###############################################################################
16939 #
16940 #       Check for -lgle.
16941 #
16942 ###############################################################################
16943
16944 have_gle=no
16945 with_gle_req=unspecified
16946 gle_halfassed=no
16947
16948 # Check whether --with-gle was given.
16949 if test "${with_gle+set}" = set; then
16950   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16951 else
16952   with_gle=yes
16953 fi
16954
16955
16956
16957    case "$with_gle" in
16958     yes) ;;
16959     no)  ;;
16960
16961     /*)
16962      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16963 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16964      d=$with_gle/include
16965      if test -d $d; then
16966        X_CFLAGS="-I$d $X_CFLAGS"
16967        { echo "$as_me:$LINENO: result: $d" >&5
16968 echo "${ECHO_T}$d" >&6; }
16969      else
16970        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16971 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16972      fi
16973
16974      { echo "$as_me:$LINENO: checking for GLE libs" >&5
16975 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
16976      d=$with_gle/lib
16977      if test -d $d; then
16978        X_LIBS="-L$d $X_LIBS"
16979        { echo "$as_me:$LINENO: result: $d" >&5
16980 echo "${ECHO_T}$d" >&6; }
16981      else
16982        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16983 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16984      fi
16985
16986      # replace the directory string with "yes".
16987      with_gle_req="yes"
16988      with_gle=$with_gle_req
16989      ;;
16990
16991     *)
16992      echo ""
16993      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16994      echo "       If it is a directory, then \`DIR/include' will be added to"
16995      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16996      exit 1
16997      ;;
16998    esac
16999
17000
17001 GLE_LIBS=""
17002
17003 if test "$have_gl" = no ; then
17004  true
17005 elif test "$with_gle" = yes; then
17006
17007
17008   ac_save_CPPFLAGS="$CPPFLAGS"
17009   if test \! -z "$includedir" ; then
17010     CPPFLAGS="$CPPFLAGS -I$includedir"
17011   fi
17012   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17013   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17014   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17015 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17016 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17017   echo $ECHO_N "(cached) $ECHO_C" >&6
17018 else
17019   cat >conftest.$ac_ext <<_ACEOF
17020 /* confdefs.h.  */
17021 _ACEOF
17022 cat confdefs.h >>conftest.$ac_ext
17023 cat >>conftest.$ac_ext <<_ACEOF
17024 /* end confdefs.h.  */
17025 #include <GL/gl.h>
17026
17027 #include <GL/gle.h>
17028 _ACEOF
17029 rm -rf conftest.$ac_objext
17030 if { (ac_try="$ac_compile"
17031 case "(($ac_try" in
17032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17033   *) ac_try_echo=$ac_try;;
17034 esac
17035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17036   (eval "$ac_compile") 2>conftest.er1
17037   ac_status=$?
17038   grep -v '^ *+' conftest.er1 >conftest.err
17039   rm -rf conftest.er1
17040   cat conftest.err >&5
17041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17042   (exit $ac_status); } && {
17043          test -z "$ac_c_werror_flag" ||
17044          test ! -s conftest.err
17045        } && test -s conftest.$ac_objext; then
17046   ac_cv_header_GL_gle_h=yes
17047 else
17048   echo "$as_me: failed program was:" >&5
17049 sed 's/^/| /' conftest.$ac_ext >&5
17050
17051         ac_cv_header_GL_gle_h=no
17052 fi
17053
17054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17055 fi
17056 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17057 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17058 if test $ac_cv_header_GL_gle_h = yes; then
17059   have_gle3=yes
17060 else
17061   have_gle3=no
17062 fi
17063
17064
17065   CPPFLAGS="$ac_save_CPPFLAGS"
17066   if test "$have_gle3" = yes ; then
17067     have_gle=yes;
17068   else
17069
17070   ac_save_CPPFLAGS="$CPPFLAGS"
17071   if test \! -z "$includedir" ; then
17072     CPPFLAGS="$CPPFLAGS -I$includedir"
17073   fi
17074   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17075   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17076   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17077 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17078 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17079   echo $ECHO_N "(cached) $ECHO_C" >&6
17080 else
17081   cat >conftest.$ac_ext <<_ACEOF
17082 /* confdefs.h.  */
17083 _ACEOF
17084 cat confdefs.h >>conftest.$ac_ext
17085 cat >>conftest.$ac_ext <<_ACEOF
17086 /* end confdefs.h.  */
17087 #include <GL/gl.h>
17088
17089 #include <GL/gutil.h>
17090 _ACEOF
17091 rm -rf conftest.$ac_objext
17092 if { (ac_try="$ac_compile"
17093 case "(($ac_try" in
17094   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17095   *) ac_try_echo=$ac_try;;
17096 esac
17097 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17098   (eval "$ac_compile") 2>conftest.er1
17099   ac_status=$?
17100   grep -v '^ *+' conftest.er1 >conftest.err
17101   rm -rf conftest.er1
17102   cat conftest.err >&5
17103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17104   (exit $ac_status); } && {
17105          test -z "$ac_c_werror_flag" ||
17106          test ! -s conftest.err
17107        } && test -s conftest.$ac_objext; then
17108   ac_cv_header_GL_gutil_h=yes
17109 else
17110   echo "$as_me: failed program was:" >&5
17111 sed 's/^/| /' conftest.$ac_ext >&5
17112
17113         ac_cv_header_GL_gutil_h=no
17114 fi
17115
17116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17117 fi
17118 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17119 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17120 if test $ac_cv_header_GL_gutil_h = yes; then
17121   have_gle=yes
17122 else
17123   have_gle=no
17124 fi
17125
17126
17127   CPPFLAGS="$ac_save_CPPFLAGS"
17128     if test "$have_gle" = yes ; then
17129
17130   ac_save_CPPFLAGS="$CPPFLAGS"
17131   if test \! -z "$includedir" ; then
17132     CPPFLAGS="$CPPFLAGS -I$includedir"
17133   fi
17134   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17135   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17136   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17137 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17138 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17139   echo $ECHO_N "(cached) $ECHO_C" >&6
17140 else
17141   cat >conftest.$ac_ext <<_ACEOF
17142 /* confdefs.h.  */
17143 _ACEOF
17144 cat confdefs.h >>conftest.$ac_ext
17145 cat >>conftest.$ac_ext <<_ACEOF
17146 /* end confdefs.h.  */
17147 #include <GL/gl.h>
17148
17149 #include <GL/tube.h>
17150 _ACEOF
17151 rm -rf conftest.$ac_objext
17152 if { (ac_try="$ac_compile"
17153 case "(($ac_try" in
17154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17155   *) ac_try_echo=$ac_try;;
17156 esac
17157 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17158   (eval "$ac_compile") 2>conftest.er1
17159   ac_status=$?
17160   grep -v '^ *+' conftest.er1 >conftest.err
17161   rm -rf conftest.er1
17162   cat conftest.err >&5
17163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17164   (exit $ac_status); } && {
17165          test -z "$ac_c_werror_flag" ||
17166          test ! -s conftest.err
17167        } && test -s conftest.$ac_objext; then
17168   ac_cv_header_GL_tube_h=yes
17169 else
17170   echo "$as_me: failed program was:" >&5
17171 sed 's/^/| /' conftest.$ac_ext >&5
17172
17173         ac_cv_header_GL_tube_h=no
17174 fi
17175
17176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17177 fi
17178 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17179 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17180 if test $ac_cv_header_GL_tube_h = yes; then
17181   have_gle=yes
17182 else
17183   have_gle=no
17184 fi
17185
17186
17187   CPPFLAGS="$ac_save_CPPFLAGS"
17188     fi
17189   fi
17190
17191   if test "$have_gle" = yes ; then
17192     have_gle=no
17193     gle_halfassed=yes
17194
17195   ac_save_CPPFLAGS="$CPPFLAGS"
17196   ac_save_LDFLAGS="$LDFLAGS"
17197 #  ac_save_LIBS="$LIBS"
17198
17199   if test \! -z "$includedir" ; then
17200     CPPFLAGS="$CPPFLAGS -I$includedir"
17201   fi
17202   # note: $X_CFLAGS includes $x_includes
17203   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17204
17205   if test \! -z "$libdir" ; then
17206     LDFLAGS="$LDFLAGS -L$libdir"
17207   fi
17208   # note: $X_LIBS includes $x_libraries
17209   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17210
17211   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17212   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17213   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17214 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17215 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17216   echo $ECHO_N "(cached) $ECHO_C" >&6
17217 else
17218   ac_check_lib_save_LIBS=$LIBS
17219 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17220 cat >conftest.$ac_ext <<_ACEOF
17221 /* confdefs.h.  */
17222 _ACEOF
17223 cat confdefs.h >>conftest.$ac_ext
17224 cat >>conftest.$ac_ext <<_ACEOF
17225 /* end confdefs.h.  */
17226
17227 /* Override any GCC internal prototype to avoid an error.
17228    Use char because int might match the return type of a GCC
17229    builtin and then its argument prototype would still apply.  */
17230 #ifdef __cplusplus
17231 extern "C"
17232 #endif
17233 char gleCreateGC ();
17234 int
17235 main ()
17236 {
17237 return gleCreateGC ();
17238   ;
17239   return 0;
17240 }
17241 _ACEOF
17242 rm -rf conftest.$ac_objext conftest$ac_exeext
17243 if { (ac_try="$ac_link"
17244 case "(($ac_try" in
17245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17246   *) ac_try_echo=$ac_try;;
17247 esac
17248 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17249   (eval "$ac_link") 2>conftest.er1
17250   ac_status=$?
17251   grep -v '^ *+' conftest.er1 >conftest.err
17252   rm -rf conftest.er1
17253   cat conftest.err >&5
17254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255   (exit $ac_status); } && {
17256          test -z "$ac_c_werror_flag" ||
17257          test ! -s conftest.err
17258        } && test -s conftest$ac_exeext &&
17259        $as_test_x conftest$ac_exeext; then
17260   ac_cv_lib_gle_gleCreateGC=yes
17261 else
17262   echo "$as_me: failed program was:" >&5
17263 sed 's/^/| /' conftest.$ac_ext >&5
17264
17265         ac_cv_lib_gle_gleCreateGC=no
17266 fi
17267
17268 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17269       conftest$ac_exeext conftest.$ac_ext
17270 LIBS=$ac_check_lib_save_LIBS
17271 fi
17272 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17273 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17274 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17275   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17276 fi
17277
17278   CPPFLAGS="$ac_save_CPPFLAGS"
17279   LDFLAGS="$ac_save_LDFLAGS"
17280 #  LIBS="$ac_save_LIBS"
17281
17282   fi
17283   if test "$have_gle" = yes ; then
17284     have_gle=no
17285     gle_halfassed=yes
17286
17287     # sometimes the libmatrix stuff is included in libgle.  look there first.
17288 #
17289 # I don't get it.  For some reason, this test passes on SGI, as if
17290 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17291 # Yet the link is succeeding.  Why???
17292 #
17293 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17294 #                   [have_gle=yes; gle_halfassed=no],
17295 #                   [], $GL_LIBS -lX11 -lXext -lm)
17296
17297     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17298     # *sigh*
17299     if test "$have_gle3" = yes ; then
17300
17301   ac_save_CPPFLAGS="$CPPFLAGS"
17302   ac_save_LDFLAGS="$LDFLAGS"
17303 #  ac_save_LIBS="$LIBS"
17304
17305   if test \! -z "$includedir" ; then
17306     CPPFLAGS="$CPPFLAGS -I$includedir"
17307   fi
17308   # note: $X_CFLAGS includes $x_includes
17309   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17310
17311   if test \! -z "$libdir" ; then
17312     LDFLAGS="$LDFLAGS -L$libdir"
17313   fi
17314   # note: $X_LIBS includes $x_libraries
17315   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17316
17317   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17318   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17319   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17320 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17321 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17322   echo $ECHO_N "(cached) $ECHO_C" >&6
17323 else
17324   ac_check_lib_save_LIBS=$LIBS
17325 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17326 cat >conftest.$ac_ext <<_ACEOF
17327 /* confdefs.h.  */
17328 _ACEOF
17329 cat confdefs.h >>conftest.$ac_ext
17330 cat >>conftest.$ac_ext <<_ACEOF
17331 /* end confdefs.h.  */
17332
17333 /* Override any GCC internal prototype to avoid an error.
17334    Use char because int might match the return type of a GCC
17335    builtin and then its argument prototype would still apply.  */
17336 #ifdef __cplusplus
17337 extern "C"
17338 #endif
17339 char uview_direction ();
17340 int
17341 main ()
17342 {
17343 return uview_direction ();
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 rm -rf conftest.$ac_objext conftest$ac_exeext
17349 if { (ac_try="$ac_link"
17350 case "(($ac_try" in
17351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17352   *) ac_try_echo=$ac_try;;
17353 esac
17354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17355   (eval "$ac_link") 2>conftest.er1
17356   ac_status=$?
17357   grep -v '^ *+' conftest.er1 >conftest.err
17358   rm -rf conftest.er1
17359   cat conftest.err >&5
17360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17361   (exit $ac_status); } && {
17362          test -z "$ac_c_werror_flag" ||
17363          test ! -s conftest.err
17364        } && test -s conftest$ac_exeext &&
17365        $as_test_x conftest$ac_exeext; then
17366   ac_cv_lib_gle_uview_direction=yes
17367 else
17368   echo "$as_me: failed program was:" >&5
17369 sed 's/^/| /' conftest.$ac_ext >&5
17370
17371         ac_cv_lib_gle_uview_direction=no
17372 fi
17373
17374 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17375       conftest$ac_exeext conftest.$ac_ext
17376 LIBS=$ac_check_lib_save_LIBS
17377 fi
17378 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17379 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17380 if test $ac_cv_lib_gle_uview_direction = yes; then
17381   have_gle=yes; gle_halfassed=no
17382 fi
17383
17384   CPPFLAGS="$ac_save_CPPFLAGS"
17385   LDFLAGS="$ac_save_LDFLAGS"
17386 #  LIBS="$ac_save_LIBS"
17387
17388     fi
17389     # if it wasn't in libgle, then look in libmatrix.
17390     if test "$have_gle" = no ; then
17391
17392   ac_save_CPPFLAGS="$CPPFLAGS"
17393   ac_save_LDFLAGS="$LDFLAGS"
17394 #  ac_save_LIBS="$LIBS"
17395
17396   if test \! -z "$includedir" ; then
17397     CPPFLAGS="$CPPFLAGS -I$includedir"
17398   fi
17399   # note: $X_CFLAGS includes $x_includes
17400   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17401
17402   if test \! -z "$libdir" ; then
17403     LDFLAGS="$LDFLAGS -L$libdir"
17404   fi
17405   # note: $X_LIBS includes $x_libraries
17406   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17407
17408   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17409   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17410   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17411 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17412 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17413   echo $ECHO_N "(cached) $ECHO_C" >&6
17414 else
17415   ac_check_lib_save_LIBS=$LIBS
17416 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17417 cat >conftest.$ac_ext <<_ACEOF
17418 /* confdefs.h.  */
17419 _ACEOF
17420 cat confdefs.h >>conftest.$ac_ext
17421 cat >>conftest.$ac_ext <<_ACEOF
17422 /* end confdefs.h.  */
17423
17424 /* Override any GCC internal prototype to avoid an error.
17425    Use char because int might match the return type of a GCC
17426    builtin and then its argument prototype would still apply.  */
17427 #ifdef __cplusplus
17428 extern "C"
17429 #endif
17430 char uview_direction_d ();
17431 int
17432 main ()
17433 {
17434 return uview_direction_d ();
17435   ;
17436   return 0;
17437 }
17438 _ACEOF
17439 rm -rf conftest.$ac_objext conftest$ac_exeext
17440 if { (ac_try="$ac_link"
17441 case "(($ac_try" in
17442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17443   *) ac_try_echo=$ac_try;;
17444 esac
17445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17446   (eval "$ac_link") 2>conftest.er1
17447   ac_status=$?
17448   grep -v '^ *+' conftest.er1 >conftest.err
17449   rm -rf conftest.er1
17450   cat conftest.err >&5
17451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17452   (exit $ac_status); } && {
17453          test -z "$ac_c_werror_flag" ||
17454          test ! -s conftest.err
17455        } && test -s conftest$ac_exeext &&
17456        $as_test_x conftest$ac_exeext; then
17457   ac_cv_lib_matrix_uview_direction_d=yes
17458 else
17459   echo "$as_me: failed program was:" >&5
17460 sed 's/^/| /' conftest.$ac_ext >&5
17461
17462         ac_cv_lib_matrix_uview_direction_d=no
17463 fi
17464
17465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17466       conftest$ac_exeext conftest.$ac_ext
17467 LIBS=$ac_check_lib_save_LIBS
17468 fi
17469 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17470 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17471 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17472   have_gle=yes; gle_halfassed=no;
17473                       GLE_LIBS="$GLE_LIBS -lmatrix"
17474 fi
17475
17476   CPPFLAGS="$ac_save_CPPFLAGS"
17477   LDFLAGS="$ac_save_LDFLAGS"
17478 #  LIBS="$ac_save_LIBS"
17479
17480     fi
17481   fi
17482
17483   if test "$have_gle" = yes ; then
17484     cat >>confdefs.h <<\_ACEOF
17485 #define HAVE_GLE 1
17486 _ACEOF
17487
17488     if test "$have_gle3" = yes ; then
17489       cat >>confdefs.h <<\_ACEOF
17490 #define HAVE_GLE3 1
17491 _ACEOF
17492
17493     fi
17494   fi
17495
17496 elif test "$with_gle" != no; then
17497   echo "error: must be yes or no: --with-gle=$with_gle"
17498   exit 1
17499
17500 fi
17501
17502
17503 ###############################################################################
17504 #
17505 #       Check for -lgdk_pixbuf.
17506 #       These tests are for gdk_pixbuf usage of the hacks,
17507 #       not xscreensaver-demo (thus we have to test again to get
17508 #       the libraries right: don't want to pull in all of GTK
17509 #       for the hacks.)
17510 #
17511 ###############################################################################
17512
17513 have_gdk_pixbuf=no
17514 with_gdk_pixbuf_req=unspecified
17515
17516 # Check whether --with-pixbuf was given.
17517 if test "${with_pixbuf+set}" = set; then
17518   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17519 else
17520   with_gdk_pixbuf=yes
17521 fi
17522
17523
17524 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17525 # we can also look for the `gdk-pixbuf-config' program in that directory.
17526 case "$with_gdk_pixbuf" in
17527   /*)
17528     gdk_pixbuf_dir="$with_gdk_pixbuf"
17529     ;;
17530   *)
17531     gdk_pixbuf_dir=""
17532     ;;
17533 esac
17534
17535
17536    case "$with_gdk_pixbuf" in
17537     yes) ;;
17538     no)  ;;
17539
17540     /*)
17541      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17542 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17543      d=$with_gdk_pixbuf/include
17544      if test -d $d; then
17545        X_CFLAGS="-I$d $X_CFLAGS"
17546        { echo "$as_me:$LINENO: result: $d" >&5
17547 echo "${ECHO_T}$d" >&6; }
17548      else
17549        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17550 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17551      fi
17552
17553      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17554 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17555      d=$with_gdk_pixbuf/lib
17556      if test -d $d; then
17557        X_LIBS="-L$d $X_LIBS"
17558        { echo "$as_me:$LINENO: result: $d" >&5
17559 echo "${ECHO_T}$d" >&6; }
17560      else
17561        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17562 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17563      fi
17564
17565      # replace the directory string with "yes".
17566      with_gdk_pixbuf_req="yes"
17567      with_gdk_pixbuf=$with_gdk_pixbuf_req
17568      ;;
17569
17570     *)
17571      echo ""
17572      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17573      echo "       If it is a directory, then \`DIR/include' will be added to"
17574      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17575      exit 1
17576      ;;
17577    esac
17578
17579
17580 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17581   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17582   exit 1
17583 fi
17584
17585 if test "$with_gdk_pixbuf" = yes; then
17586   have_gdk_pixbuf=no
17587
17588   pkgs=''
17589   ok="yes"
17590
17591   pkg_check_version gdk-pixbuf-2.0      2.0.0
17592   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17593   have_gdk_pixbuf="$ok"
17594
17595   if test "$have_gdk_pixbuf" = yes; then
17596     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17597 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17598 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17602 fi
17603 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17604 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17605     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17606 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17607 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17608   echo $ECHO_N "(cached) $ECHO_C" >&6
17609 else
17610   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17611 fi
17612 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17613 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17614   fi
17615
17616   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17617   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17618
17619
17620   if test "$have_gdk_pixbuf" = yes; then
17621     #
17622     # we appear to have pixbuf; check for headers/libs to be sure.
17623     #
17624     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17625     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17626
17627     have_gdk_pixbuf=no
17628
17629     # check for header A...
17630
17631   ac_save_CPPFLAGS="$CPPFLAGS"
17632   if test \! -z "$includedir" ; then
17633     CPPFLAGS="$CPPFLAGS -I$includedir"
17634   fi
17635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17636   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17637   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17638   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17639 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17640 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17641   echo $ECHO_N "(cached) $ECHO_C" >&6
17642 fi
17643 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17644 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17645 else
17646   # Is the header compilable?
17647 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17648 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17649 cat >conftest.$ac_ext <<_ACEOF
17650 /* confdefs.h.  */
17651 _ACEOF
17652 cat confdefs.h >>conftest.$ac_ext
17653 cat >>conftest.$ac_ext <<_ACEOF
17654 /* end confdefs.h.  */
17655 $ac_includes_default
17656 #include <gdk-pixbuf/gdk-pixbuf.h>
17657 _ACEOF
17658 rm -rf conftest.$ac_objext
17659 if { (ac_try="$ac_compile"
17660 case "(($ac_try" in
17661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17662   *) ac_try_echo=$ac_try;;
17663 esac
17664 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17665   (eval "$ac_compile") 2>conftest.er1
17666   ac_status=$?
17667   grep -v '^ *+' conftest.er1 >conftest.err
17668   rm -rf conftest.er1
17669   cat conftest.err >&5
17670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17671   (exit $ac_status); } && {
17672          test -z "$ac_c_werror_flag" ||
17673          test ! -s conftest.err
17674        } && test -s conftest.$ac_objext; then
17675   ac_header_compiler=yes
17676 else
17677   echo "$as_me: failed program was:" >&5
17678 sed 's/^/| /' conftest.$ac_ext >&5
17679
17680         ac_header_compiler=no
17681 fi
17682
17683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17684 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17685 echo "${ECHO_T}$ac_header_compiler" >&6; }
17686
17687 # Is the header present?
17688 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17689 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17690 cat >conftest.$ac_ext <<_ACEOF
17691 /* confdefs.h.  */
17692 _ACEOF
17693 cat confdefs.h >>conftest.$ac_ext
17694 cat >>conftest.$ac_ext <<_ACEOF
17695 /* end confdefs.h.  */
17696 #include <gdk-pixbuf/gdk-pixbuf.h>
17697 _ACEOF
17698 if { (ac_try="$ac_cpp conftest.$ac_ext"
17699 case "(($ac_try" in
17700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17701   *) ac_try_echo=$ac_try;;
17702 esac
17703 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17704   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17705   ac_status=$?
17706   grep -v '^ *+' conftest.er1 >conftest.err
17707   rm -rf conftest.er1
17708   cat conftest.err >&5
17709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17710   (exit $ac_status); } >/dev/null && {
17711          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17712          test ! -s conftest.err
17713        }; then
17714   ac_header_preproc=yes
17715 else
17716   echo "$as_me: failed program was:" >&5
17717 sed 's/^/| /' conftest.$ac_ext >&5
17718
17719   ac_header_preproc=no
17720 fi
17721
17722 rm -rf conftest.err conftest.$ac_ext
17723 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17724 echo "${ECHO_T}$ac_header_preproc" >&6; }
17725
17726 # So?  What about this header?
17727 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17728   yes:no: )
17729     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17730 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17731     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17732 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17733     ac_header_preproc=yes
17734     ;;
17735   no:yes:* )
17736     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17737 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17738     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17739 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17740     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17741 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17742     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17743 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17744     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17745 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17746     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17747 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17748
17749     ;;
17750 esac
17751 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17752 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17753 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17754   echo $ECHO_N "(cached) $ECHO_C" >&6
17755 else
17756   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17757 fi
17758 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17759 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17760
17761 fi
17762 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17763   have_gdk_pixbuf=yes
17764 fi
17765
17766
17767   CPPFLAGS="$ac_save_CPPFLAGS"
17768
17769     # if that worked, check for header B...
17770     if test "$have_gdk_pixbuf" = yes; then
17771       have_gdk_pixbuf=no
17772       gdk_pixbuf_halfassed=yes
17773
17774   ac_save_CPPFLAGS="$CPPFLAGS"
17775   if test \! -z "$includedir" ; then
17776     CPPFLAGS="$CPPFLAGS -I$includedir"
17777   fi
17778   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17779   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17780   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17781   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17782 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17783 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17784   echo $ECHO_N "(cached) $ECHO_C" >&6
17785 fi
17786 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17787 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17788 else
17789   # Is the header compilable?
17790 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17791 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17792 cat >conftest.$ac_ext <<_ACEOF
17793 /* confdefs.h.  */
17794 _ACEOF
17795 cat confdefs.h >>conftest.$ac_ext
17796 cat >>conftest.$ac_ext <<_ACEOF
17797 /* end confdefs.h.  */
17798 $ac_includes_default
17799 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17800 _ACEOF
17801 rm -rf conftest.$ac_objext
17802 if { (ac_try="$ac_compile"
17803 case "(($ac_try" in
17804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17805   *) ac_try_echo=$ac_try;;
17806 esac
17807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17808   (eval "$ac_compile") 2>conftest.er1
17809   ac_status=$?
17810   grep -v '^ *+' conftest.er1 >conftest.err
17811   rm -rf conftest.er1
17812   cat conftest.err >&5
17813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17814   (exit $ac_status); } && {
17815          test -z "$ac_c_werror_flag" ||
17816          test ! -s conftest.err
17817        } && test -s conftest.$ac_objext; then
17818   ac_header_compiler=yes
17819 else
17820   echo "$as_me: failed program was:" >&5
17821 sed 's/^/| /' conftest.$ac_ext >&5
17822
17823         ac_header_compiler=no
17824 fi
17825
17826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17827 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17828 echo "${ECHO_T}$ac_header_compiler" >&6; }
17829
17830 # Is the header present?
17831 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17832 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17833 cat >conftest.$ac_ext <<_ACEOF
17834 /* confdefs.h.  */
17835 _ACEOF
17836 cat confdefs.h >>conftest.$ac_ext
17837 cat >>conftest.$ac_ext <<_ACEOF
17838 /* end confdefs.h.  */
17839 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17840 _ACEOF
17841 if { (ac_try="$ac_cpp conftest.$ac_ext"
17842 case "(($ac_try" in
17843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17844   *) ac_try_echo=$ac_try;;
17845 esac
17846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17847   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17848   ac_status=$?
17849   grep -v '^ *+' conftest.er1 >conftest.err
17850   rm -rf conftest.er1
17851   cat conftest.err >&5
17852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17853   (exit $ac_status); } >/dev/null && {
17854          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17855          test ! -s conftest.err
17856        }; then
17857   ac_header_preproc=yes
17858 else
17859   echo "$as_me: failed program was:" >&5
17860 sed 's/^/| /' conftest.$ac_ext >&5
17861
17862   ac_header_preproc=no
17863 fi
17864
17865 rm -rf conftest.err conftest.$ac_ext
17866 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17867 echo "${ECHO_T}$ac_header_preproc" >&6; }
17868
17869 # So?  What about this header?
17870 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17871   yes:no: )
17872     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17873 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17874     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17875 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17876     ac_header_preproc=yes
17877     ;;
17878   no:yes:* )
17879     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17880 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17881     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17882 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17883     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17884 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17885     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17886 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17887     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17888 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17889     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17890 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17891
17892     ;;
17893 esac
17894 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17895 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17896 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17897   echo $ECHO_N "(cached) $ECHO_C" >&6
17898 else
17899   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17900 fi
17901 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17902 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17903
17904 fi
17905 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17906   have_gdk_pixbuf=yes
17907                          gdk_pixbuf_halfassed=no
17908 fi
17909
17910
17911   CPPFLAGS="$ac_save_CPPFLAGS"
17912
17913       # yay, it has a new name in Gtk 2.x...
17914       if test "$have_gdk_pixbuf" = no; then
17915         have_gdk_pixbuf=no
17916         gdk_pixbuf_halfassed=yes
17917
17918   ac_save_CPPFLAGS="$CPPFLAGS"
17919   if test \! -z "$includedir" ; then
17920     CPPFLAGS="$CPPFLAGS -I$includedir"
17921   fi
17922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17923   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17924   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17925   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17926 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17927 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17928   echo $ECHO_N "(cached) $ECHO_C" >&6
17929 fi
17930 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17931 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17932 else
17933   # Is the header compilable?
17934 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17935 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17936 cat >conftest.$ac_ext <<_ACEOF
17937 /* confdefs.h.  */
17938 _ACEOF
17939 cat confdefs.h >>conftest.$ac_ext
17940 cat >>conftest.$ac_ext <<_ACEOF
17941 /* end confdefs.h.  */
17942 $ac_includes_default
17943 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17944 _ACEOF
17945 rm -rf conftest.$ac_objext
17946 if { (ac_try="$ac_compile"
17947 case "(($ac_try" in
17948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17949   *) ac_try_echo=$ac_try;;
17950 esac
17951 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17952   (eval "$ac_compile") 2>conftest.er1
17953   ac_status=$?
17954   grep -v '^ *+' conftest.er1 >conftest.err
17955   rm -rf conftest.er1
17956   cat conftest.err >&5
17957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958   (exit $ac_status); } && {
17959          test -z "$ac_c_werror_flag" ||
17960          test ! -s conftest.err
17961        } && test -s conftest.$ac_objext; then
17962   ac_header_compiler=yes
17963 else
17964   echo "$as_me: failed program was:" >&5
17965 sed 's/^/| /' conftest.$ac_ext >&5
17966
17967         ac_header_compiler=no
17968 fi
17969
17970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17971 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17972 echo "${ECHO_T}$ac_header_compiler" >&6; }
17973
17974 # Is the header present?
17975 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17976 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17977 cat >conftest.$ac_ext <<_ACEOF
17978 /* confdefs.h.  */
17979 _ACEOF
17980 cat confdefs.h >>conftest.$ac_ext
17981 cat >>conftest.$ac_ext <<_ACEOF
17982 /* end confdefs.h.  */
17983 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17984 _ACEOF
17985 if { (ac_try="$ac_cpp conftest.$ac_ext"
17986 case "(($ac_try" in
17987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17988   *) ac_try_echo=$ac_try;;
17989 esac
17990 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17991   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17992   ac_status=$?
17993   grep -v '^ *+' conftest.er1 >conftest.err
17994   rm -rf conftest.er1
17995   cat conftest.err >&5
17996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17997   (exit $ac_status); } >/dev/null && {
17998          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17999          test ! -s conftest.err
18000        }; then
18001   ac_header_preproc=yes
18002 else
18003   echo "$as_me: failed program was:" >&5
18004 sed 's/^/| /' conftest.$ac_ext >&5
18005
18006   ac_header_preproc=no
18007 fi
18008
18009 rm -rf conftest.err conftest.$ac_ext
18010 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18011 echo "${ECHO_T}$ac_header_preproc" >&6; }
18012
18013 # So?  What about this header?
18014 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18015   yes:no: )
18016     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18017 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18018     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18019 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18020     ac_header_preproc=yes
18021     ;;
18022   no:yes:* )
18023     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18024 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18025     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18026 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18027     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18028 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18029     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18030 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18031     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18032 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18033     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18034 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18035
18036     ;;
18037 esac
18038 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18039 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18040 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18041   echo $ECHO_N "(cached) $ECHO_C" >&6
18042 else
18043   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18044 fi
18045 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18046 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18047
18048 fi
18049 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18050   have_gdk_pixbuf=yes
18051                            gdk_pixbuf_halfassed=no
18052 fi
18053
18054
18055   CPPFLAGS="$ac_save_CPPFLAGS"
18056       fi
18057     fi
18058     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18059   fi
18060
18061   if test "$have_gdk_pixbuf" = yes; then
18062     # we have the headers, now check for the libraries
18063     have_gdk_pixbuf=no
18064     gdk_pixbuf_halfassed=yes
18065
18066     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18067 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18068
18069     # library A...
18070
18071   ac_save_CPPFLAGS="$CPPFLAGS"
18072   ac_save_LDFLAGS="$LDFLAGS"
18073 #  ac_save_LIBS="$LIBS"
18074
18075   if test \! -z "$includedir" ; then
18076     CPPFLAGS="$CPPFLAGS -I$includedir"
18077   fi
18078   # note: $X_CFLAGS includes $x_includes
18079   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18080
18081   if test \! -z "$libdir" ; then
18082     LDFLAGS="$LDFLAGS -L$libdir"
18083   fi
18084   # note: $X_LIBS includes $x_libraries
18085   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18086
18087   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18088   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18089   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18090 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18091 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18092   echo $ECHO_N "(cached) $ECHO_C" >&6
18093 else
18094   ac_check_lib_save_LIBS=$LIBS
18095 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18096 cat >conftest.$ac_ext <<_ACEOF
18097 /* confdefs.h.  */
18098 _ACEOF
18099 cat confdefs.h >>conftest.$ac_ext
18100 cat >>conftest.$ac_ext <<_ACEOF
18101 /* end confdefs.h.  */
18102
18103 /* Override any GCC internal prototype to avoid an error.
18104    Use char because int might match the return type of a GCC
18105    builtin and then its argument prototype would still apply.  */
18106 #ifdef __cplusplus
18107 extern "C"
18108 #endif
18109 char gdk_pixbuf_new_from_file ();
18110 int
18111 main ()
18112 {
18113 return gdk_pixbuf_new_from_file ();
18114   ;
18115   return 0;
18116 }
18117 _ACEOF
18118 rm -rf conftest.$ac_objext conftest$ac_exeext
18119 if { (ac_try="$ac_link"
18120 case "(($ac_try" in
18121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122   *) ac_try_echo=$ac_try;;
18123 esac
18124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18125   (eval "$ac_link") 2>conftest.er1
18126   ac_status=$?
18127   grep -v '^ *+' conftest.er1 >conftest.err
18128   rm -rf conftest.er1
18129   cat conftest.err >&5
18130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131   (exit $ac_status); } && {
18132          test -z "$ac_c_werror_flag" ||
18133          test ! -s conftest.err
18134        } && test -s conftest$ac_exeext &&
18135        $as_test_x conftest$ac_exeext; then
18136   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18137 else
18138   echo "$as_me: failed program was:" >&5
18139 sed 's/^/| /' conftest.$ac_ext >&5
18140
18141         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18142 fi
18143
18144 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18145       conftest$ac_exeext conftest.$ac_ext
18146 LIBS=$ac_check_lib_save_LIBS
18147 fi
18148 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18149 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18150 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18151   have_gdk_pixbuf=yes
18152 fi
18153
18154   CPPFLAGS="$ac_save_CPPFLAGS"
18155   LDFLAGS="$ac_save_LDFLAGS"
18156 #  LIBS="$ac_save_LIBS"
18157
18158     # library B...
18159     if test "$have_gdk_pixbuf" = yes; then
18160       have_gdk_pixbuf=no
18161
18162   ac_save_CPPFLAGS="$CPPFLAGS"
18163   ac_save_LDFLAGS="$LDFLAGS"
18164 #  ac_save_LIBS="$LIBS"
18165
18166   if test \! -z "$includedir" ; then
18167     CPPFLAGS="$CPPFLAGS -I$includedir"
18168   fi
18169   # note: $X_CFLAGS includes $x_includes
18170   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18171
18172   if test \! -z "$libdir" ; then
18173     LDFLAGS="$LDFLAGS -L$libdir"
18174   fi
18175   # note: $X_LIBS includes $x_libraries
18176   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18177
18178   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18179   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18180   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18181 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18182 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18183   echo $ECHO_N "(cached) $ECHO_C" >&6
18184 else
18185   ac_check_lib_save_LIBS=$LIBS
18186 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18187 cat >conftest.$ac_ext <<_ACEOF
18188 /* confdefs.h.  */
18189 _ACEOF
18190 cat confdefs.h >>conftest.$ac_ext
18191 cat >>conftest.$ac_ext <<_ACEOF
18192 /* end confdefs.h.  */
18193
18194 /* Override any GCC internal prototype to avoid an error.
18195    Use char because int might match the return type of a GCC
18196    builtin and then its argument prototype would still apply.  */
18197 #ifdef __cplusplus
18198 extern "C"
18199 #endif
18200 char gdk_pixbuf_xlib_init ();
18201 int
18202 main ()
18203 {
18204 return gdk_pixbuf_xlib_init ();
18205   ;
18206   return 0;
18207 }
18208 _ACEOF
18209 rm -rf conftest.$ac_objext conftest$ac_exeext
18210 if { (ac_try="$ac_link"
18211 case "(($ac_try" in
18212   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18213   *) ac_try_echo=$ac_try;;
18214 esac
18215 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18216   (eval "$ac_link") 2>conftest.er1
18217   ac_status=$?
18218   grep -v '^ *+' conftest.er1 >conftest.err
18219   rm -rf conftest.er1
18220   cat conftest.err >&5
18221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18222   (exit $ac_status); } && {
18223          test -z "$ac_c_werror_flag" ||
18224          test ! -s conftest.err
18225        } && test -s conftest$ac_exeext &&
18226        $as_test_x conftest$ac_exeext; then
18227   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18228 else
18229   echo "$as_me: failed program was:" >&5
18230 sed 's/^/| /' conftest.$ac_ext >&5
18231
18232         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18233 fi
18234
18235 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18236       conftest$ac_exeext conftest.$ac_ext
18237 LIBS=$ac_check_lib_save_LIBS
18238 fi
18239 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18240 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18241 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18242   have_gdk_pixbuf=yes
18243                       gdk_pixbuf_halfassed=no
18244 fi
18245
18246   CPPFLAGS="$ac_save_CPPFLAGS"
18247   LDFLAGS="$ac_save_LDFLAGS"
18248 #  LIBS="$ac_save_LIBS"
18249
18250     fi
18251   fi
18252
18253   if test "$have_gdk_pixbuf" = yes; then
18254     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18255     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18256     cat >>confdefs.h <<\_ACEOF
18257 #define HAVE_GDK_PIXBUF 1
18258 _ACEOF
18259
18260   else
18261     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18262 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18263   fi
18264
18265   if test "$have_gdk_pixbuf" = yes; then
18266
18267   ac_save_CPPFLAGS="$CPPFLAGS"
18268   ac_save_LDFLAGS="$LDFLAGS"
18269 #  ac_save_LIBS="$LIBS"
18270
18271   if test \! -z "$includedir" ; then
18272     CPPFLAGS="$CPPFLAGS -I$includedir"
18273   fi
18274   # note: $X_CFLAGS includes $x_includes
18275   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18276
18277   if test \! -z "$libdir" ; then
18278     LDFLAGS="$LDFLAGS -L$libdir"
18279   fi
18280   # note: $X_LIBS includes $x_libraries
18281   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18282
18283   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18284   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18285   { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18286 echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
18287 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18288   echo $ECHO_N "(cached) $ECHO_C" >&6
18289 else
18290   ac_check_lib_save_LIBS=$LIBS
18291 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18292 cat >conftest.$ac_ext <<_ACEOF
18293 /* confdefs.h.  */
18294 _ACEOF
18295 cat confdefs.h >>conftest.$ac_ext
18296 cat >>conftest.$ac_ext <<_ACEOF
18297 /* end confdefs.h.  */
18298
18299 /* Override any GCC internal prototype to avoid an error.
18300    Use char because int might match the return type of a GCC
18301    builtin and then its argument prototype would still apply.  */
18302 #ifdef __cplusplus
18303 extern "C"
18304 #endif
18305 char gdk_pixbuf_apply_embedded_orientation ();
18306 int
18307 main ()
18308 {
18309 return gdk_pixbuf_apply_embedded_orientation ();
18310   ;
18311   return 0;
18312 }
18313 _ACEOF
18314 rm -rf conftest.$ac_objext conftest$ac_exeext
18315 if { (ac_try="$ac_link"
18316 case "(($ac_try" in
18317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18318   *) ac_try_echo=$ac_try;;
18319 esac
18320 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18321   (eval "$ac_link") 2>conftest.er1
18322   ac_status=$?
18323   grep -v '^ *+' conftest.er1 >conftest.err
18324   rm -rf conftest.er1
18325   cat conftest.err >&5
18326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18327   (exit $ac_status); } && {
18328          test -z "$ac_c_werror_flag" ||
18329          test ! -s conftest.err
18330        } && test -s conftest$ac_exeext &&
18331        $as_test_x conftest$ac_exeext; then
18332   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18333 else
18334   echo "$as_me: failed program was:" >&5
18335 sed 's/^/| /' conftest.$ac_ext >&5
18336
18337         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18338 fi
18339
18340 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18341       conftest$ac_exeext conftest.$ac_ext
18342 LIBS=$ac_check_lib_save_LIBS
18343 fi
18344 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18345 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18346 if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
18347   cat >>confdefs.h <<\_ACEOF
18348 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18349 _ACEOF
18350
18351 fi
18352
18353   CPPFLAGS="$ac_save_CPPFLAGS"
18354   LDFLAGS="$ac_save_LDFLAGS"
18355 #  LIBS="$ac_save_LIBS"
18356
18357   fi
18358 fi
18359
18360
18361 ###############################################################################
18362 #
18363 #       Check for -lXpm.
18364 #
18365 ###############################################################################
18366
18367 have_xpm=no
18368 with_xpm_req=unspecified
18369
18370 # Check whether --with-xpm was given.
18371 if test "${with_xpm+set}" = set; then
18372   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18373 else
18374   with_xpm=yes
18375 fi
18376
18377
18378
18379    case "$with_xpm" in
18380     yes) ;;
18381     no)  ;;
18382
18383     /*)
18384      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18385 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18386      d=$with_xpm/include
18387      if test -d $d; then
18388        X_CFLAGS="-I$d $X_CFLAGS"
18389        { echo "$as_me:$LINENO: result: $d" >&5
18390 echo "${ECHO_T}$d" >&6; }
18391      else
18392        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18393 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18394      fi
18395
18396      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18397 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18398      d=$with_xpm/lib
18399      if test -d $d; then
18400        X_LIBS="-L$d $X_LIBS"
18401        { echo "$as_me:$LINENO: result: $d" >&5
18402 echo "${ECHO_T}$d" >&6; }
18403      else
18404        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18405 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18406      fi
18407
18408      # replace the directory string with "yes".
18409      with_xpm_req="yes"
18410      with_xpm=$with_xpm_req
18411      ;;
18412
18413     *)
18414      echo ""
18415      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18416      echo "       If it is a directory, then \`DIR/include' will be added to"
18417      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18418      exit 1
18419      ;;
18420    esac
18421
18422
18423 if test "$with_xpm" = yes; then
18424
18425   ac_save_CPPFLAGS="$CPPFLAGS"
18426   if test \! -z "$includedir" ; then
18427     CPPFLAGS="$CPPFLAGS -I$includedir"
18428   fi
18429   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18430   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18431   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18432 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18433 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436   cat >conftest.$ac_ext <<_ACEOF
18437 /* confdefs.h.  */
18438 _ACEOF
18439 cat confdefs.h >>conftest.$ac_ext
18440 cat >>conftest.$ac_ext <<_ACEOF
18441 /* end confdefs.h.  */
18442 #include <X11/Xlib.h>
18443
18444 #include <X11/xpm.h>
18445 _ACEOF
18446 rm -rf conftest.$ac_objext
18447 if { (ac_try="$ac_compile"
18448 case "(($ac_try" in
18449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18450   *) ac_try_echo=$ac_try;;
18451 esac
18452 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18453   (eval "$ac_compile") 2>conftest.er1
18454   ac_status=$?
18455   grep -v '^ *+' conftest.er1 >conftest.err
18456   rm -rf conftest.er1
18457   cat conftest.err >&5
18458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18459   (exit $ac_status); } && {
18460          test -z "$ac_c_werror_flag" ||
18461          test ! -s conftest.err
18462        } && test -s conftest.$ac_objext; then
18463   ac_cv_header_X11_xpm_h=yes
18464 else
18465   echo "$as_me: failed program was:" >&5
18466 sed 's/^/| /' conftest.$ac_ext >&5
18467
18468         ac_cv_header_X11_xpm_h=no
18469 fi
18470
18471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18472 fi
18473 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18474 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18475 if test $ac_cv_header_X11_xpm_h = yes; then
18476   have_xpm=yes
18477                     cat >>confdefs.h <<\_ACEOF
18478 #define HAVE_XPM 1
18479 _ACEOF
18480
18481                     XPM_LIBS="-lXpm $XPM_LIBS"
18482 fi
18483
18484
18485   CPPFLAGS="$ac_save_CPPFLAGS"
18486 elif test "$with_xpm" != no; then
18487   echo "error: must be yes or no: --with-xpm=$with_xpm"
18488   exit 1
18489 fi
18490
18491 # See comment near $motif_requires_xpm, above.
18492 # Need to do this here, after both Motif and XPM have been checked for.
18493 #
18494 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18495   if test "$motif_requires_xpm" = yes ; then
18496     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18497   fi
18498 fi
18499
18500 if test "$XPM_LIBS" = "" ; then
18501   XPM_LIBS=$(MINIXPM)
18502 fi
18503
18504
18505 ###############################################################################
18506 #
18507 #       Check for -ljpeg
18508 #
18509 ###############################################################################
18510
18511 have_jpeg=no
18512 with_jpeg_req=unspecified
18513 jpeg_halfassed=no
18514
18515 # Check whether --with-jpeg was given.
18516 if test "${with_jpeg+set}" = set; then
18517   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18518 else
18519   with_jpeg=yes
18520 fi
18521
18522
18523
18524    case "$with_jpeg" in
18525     yes) ;;
18526     no)  ;;
18527
18528     /*)
18529      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18530 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18531      d=$with_jpeg/include
18532      if test -d $d; then
18533        X_CFLAGS="-I$d $X_CFLAGS"
18534        { echo "$as_me:$LINENO: result: $d" >&5
18535 echo "${ECHO_T}$d" >&6; }
18536      else
18537        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18538 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18539      fi
18540
18541      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18542 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18543      d=$with_jpeg/lib
18544      if test -d $d; then
18545        X_LIBS="-L$d $X_LIBS"
18546        { echo "$as_me:$LINENO: result: $d" >&5
18547 echo "${ECHO_T}$d" >&6; }
18548      else
18549        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18550 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18551      fi
18552
18553      # replace the directory string with "yes".
18554      with_jpeg_req="yes"
18555      with_jpeg=$with_jpeg_req
18556      ;;
18557
18558     *)
18559      echo ""
18560      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18561      echo "       If it is a directory, then \`DIR/include' will be added to"
18562      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18563      exit 1
18564      ;;
18565    esac
18566
18567
18568 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18569   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18570   exit 1
18571 fi
18572
18573 if test "$with_jpeg" = yes; then
18574
18575   have_jpeg=no
18576
18577   ac_save_CPPFLAGS="$CPPFLAGS"
18578   if test \! -z "$includedir" ; then
18579     CPPFLAGS="$CPPFLAGS -I$includedir"
18580   fi
18581   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18582   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18583   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18584   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18585 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18586 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18587   echo $ECHO_N "(cached) $ECHO_C" >&6
18588 fi
18589 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18590 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18591 else
18592   # Is the header compilable?
18593 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18594 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18595 cat >conftest.$ac_ext <<_ACEOF
18596 /* confdefs.h.  */
18597 _ACEOF
18598 cat confdefs.h >>conftest.$ac_ext
18599 cat >>conftest.$ac_ext <<_ACEOF
18600 /* end confdefs.h.  */
18601 $ac_includes_default
18602 #include <jpeglib.h>
18603 _ACEOF
18604 rm -rf conftest.$ac_objext
18605 if { (ac_try="$ac_compile"
18606 case "(($ac_try" in
18607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18608   *) ac_try_echo=$ac_try;;
18609 esac
18610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18611   (eval "$ac_compile") 2>conftest.er1
18612   ac_status=$?
18613   grep -v '^ *+' conftest.er1 >conftest.err
18614   rm -rf conftest.er1
18615   cat conftest.err >&5
18616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18617   (exit $ac_status); } && {
18618          test -z "$ac_c_werror_flag" ||
18619          test ! -s conftest.err
18620        } && test -s conftest.$ac_objext; then
18621   ac_header_compiler=yes
18622 else
18623   echo "$as_me: failed program was:" >&5
18624 sed 's/^/| /' conftest.$ac_ext >&5
18625
18626         ac_header_compiler=no
18627 fi
18628
18629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18630 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18631 echo "${ECHO_T}$ac_header_compiler" >&6; }
18632
18633 # Is the header present?
18634 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18635 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18636 cat >conftest.$ac_ext <<_ACEOF
18637 /* confdefs.h.  */
18638 _ACEOF
18639 cat confdefs.h >>conftest.$ac_ext
18640 cat >>conftest.$ac_ext <<_ACEOF
18641 /* end confdefs.h.  */
18642 #include <jpeglib.h>
18643 _ACEOF
18644 if { (ac_try="$ac_cpp conftest.$ac_ext"
18645 case "(($ac_try" in
18646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18647   *) ac_try_echo=$ac_try;;
18648 esac
18649 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18650   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18651   ac_status=$?
18652   grep -v '^ *+' conftest.er1 >conftest.err
18653   rm -rf conftest.er1
18654   cat conftest.err >&5
18655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18656   (exit $ac_status); } >/dev/null && {
18657          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18658          test ! -s conftest.err
18659        }; then
18660   ac_header_preproc=yes
18661 else
18662   echo "$as_me: failed program was:" >&5
18663 sed 's/^/| /' conftest.$ac_ext >&5
18664
18665   ac_header_preproc=no
18666 fi
18667
18668 rm -rf conftest.err conftest.$ac_ext
18669 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18670 echo "${ECHO_T}$ac_header_preproc" >&6; }
18671
18672 # So?  What about this header?
18673 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18674   yes:no: )
18675     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18676 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18677     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18678 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18679     ac_header_preproc=yes
18680     ;;
18681   no:yes:* )
18682     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18683 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18684     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18685 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18686     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18687 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18688     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18689 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18690     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18691 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18692     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18693 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18694
18695     ;;
18696 esac
18697 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18698 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18699 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18700   echo $ECHO_N "(cached) $ECHO_C" >&6
18701 else
18702   ac_cv_header_jpeglib_h=$ac_header_preproc
18703 fi
18704 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18705 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18706
18707 fi
18708 if test $ac_cv_header_jpeglib_h = yes; then
18709   have_jpeg=yes
18710 fi
18711
18712
18713   CPPFLAGS="$ac_save_CPPFLAGS"
18714
18715   if test "$have_jpeg" = yes; then
18716     # we have the header, now check for the library
18717     have_jpeg=no
18718     jpeg_halfassed=yes
18719
18720   ac_save_CPPFLAGS="$CPPFLAGS"
18721   ac_save_LDFLAGS="$LDFLAGS"
18722 #  ac_save_LIBS="$LIBS"
18723
18724   if test \! -z "$includedir" ; then
18725     CPPFLAGS="$CPPFLAGS -I$includedir"
18726   fi
18727   # note: $X_CFLAGS includes $x_includes
18728   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18729
18730   if test \! -z "$libdir" ; then
18731     LDFLAGS="$LDFLAGS -L$libdir"
18732   fi
18733   # note: $X_LIBS includes $x_libraries
18734   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18735
18736   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18737   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18738   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18739 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18740 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18741   echo $ECHO_N "(cached) $ECHO_C" >&6
18742 else
18743   ac_check_lib_save_LIBS=$LIBS
18744 LIBS="-ljpeg  $LIBS"
18745 cat >conftest.$ac_ext <<_ACEOF
18746 /* confdefs.h.  */
18747 _ACEOF
18748 cat confdefs.h >>conftest.$ac_ext
18749 cat >>conftest.$ac_ext <<_ACEOF
18750 /* end confdefs.h.  */
18751
18752 /* Override any GCC internal prototype to avoid an error.
18753    Use char because int might match the return type of a GCC
18754    builtin and then its argument prototype would still apply.  */
18755 #ifdef __cplusplus
18756 extern "C"
18757 #endif
18758 char jpeg_start_compress ();
18759 int
18760 main ()
18761 {
18762 return jpeg_start_compress ();
18763   ;
18764   return 0;
18765 }
18766 _ACEOF
18767 rm -rf conftest.$ac_objext conftest$ac_exeext
18768 if { (ac_try="$ac_link"
18769 case "(($ac_try" in
18770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18771   *) ac_try_echo=$ac_try;;
18772 esac
18773 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18774   (eval "$ac_link") 2>conftest.er1
18775   ac_status=$?
18776   grep -v '^ *+' conftest.er1 >conftest.err
18777   rm -rf conftest.er1
18778   cat conftest.err >&5
18779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18780   (exit $ac_status); } && {
18781          test -z "$ac_c_werror_flag" ||
18782          test ! -s conftest.err
18783        } && test -s conftest$ac_exeext &&
18784        $as_test_x conftest$ac_exeext; then
18785   ac_cv_lib_jpeg_jpeg_start_compress=yes
18786 else
18787   echo "$as_me: failed program was:" >&5
18788 sed 's/^/| /' conftest.$ac_ext >&5
18789
18790         ac_cv_lib_jpeg_jpeg_start_compress=no
18791 fi
18792
18793 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18794       conftest$ac_exeext conftest.$ac_ext
18795 LIBS=$ac_check_lib_save_LIBS
18796 fi
18797 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18798 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18799 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18800   have_jpeg=yes
18801                     jpeg_halfassed=no
18802                     JPEG_LIBS="-ljpeg"
18803                     cat >>confdefs.h <<\_ACEOF
18804 #define HAVE_JPEGLIB 1
18805 _ACEOF
18806
18807 fi
18808
18809   CPPFLAGS="$ac_save_CPPFLAGS"
18810   LDFLAGS="$ac_save_LDFLAGS"
18811 #  LIBS="$ac_save_LIBS"
18812
18813   fi
18814 fi
18815
18816
18817 ###############################################################################
18818 #
18819 #       Check for pty support: this allows 'phosphor' and 'apple2'
18820 #       to run curses-based programs, or be used as terminal windows.
18821 #
18822 ###############################################################################
18823
18824 PTY_LIBS=
18825
18826
18827 for ac_header in pty.h util.h
18828 do
18829 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18830 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18831   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18833 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18834   echo $ECHO_N "(cached) $ECHO_C" >&6
18835 fi
18836 ac_res=`eval echo '${'$as_ac_Header'}'`
18837                { echo "$as_me:$LINENO: result: $ac_res" >&5
18838 echo "${ECHO_T}$ac_res" >&6; }
18839 else
18840   # Is the header compilable?
18841 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18842 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18843 cat >conftest.$ac_ext <<_ACEOF
18844 /* confdefs.h.  */
18845 _ACEOF
18846 cat confdefs.h >>conftest.$ac_ext
18847 cat >>conftest.$ac_ext <<_ACEOF
18848 /* end confdefs.h.  */
18849 $ac_includes_default
18850 #include <$ac_header>
18851 _ACEOF
18852 rm -rf conftest.$ac_objext
18853 if { (ac_try="$ac_compile"
18854 case "(($ac_try" in
18855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18856   *) ac_try_echo=$ac_try;;
18857 esac
18858 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18859   (eval "$ac_compile") 2>conftest.er1
18860   ac_status=$?
18861   grep -v '^ *+' conftest.er1 >conftest.err
18862   rm -rf conftest.er1
18863   cat conftest.err >&5
18864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18865   (exit $ac_status); } && {
18866          test -z "$ac_c_werror_flag" ||
18867          test ! -s conftest.err
18868        } && test -s conftest.$ac_objext; then
18869   ac_header_compiler=yes
18870 else
18871   echo "$as_me: failed program was:" >&5
18872 sed 's/^/| /' conftest.$ac_ext >&5
18873
18874         ac_header_compiler=no
18875 fi
18876
18877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18878 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18879 echo "${ECHO_T}$ac_header_compiler" >&6; }
18880
18881 # Is the header present?
18882 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18883 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18884 cat >conftest.$ac_ext <<_ACEOF
18885 /* confdefs.h.  */
18886 _ACEOF
18887 cat confdefs.h >>conftest.$ac_ext
18888 cat >>conftest.$ac_ext <<_ACEOF
18889 /* end confdefs.h.  */
18890 #include <$ac_header>
18891 _ACEOF
18892 if { (ac_try="$ac_cpp conftest.$ac_ext"
18893 case "(($ac_try" in
18894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18895   *) ac_try_echo=$ac_try;;
18896 esac
18897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18898   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18899   ac_status=$?
18900   grep -v '^ *+' conftest.er1 >conftest.err
18901   rm -rf conftest.er1
18902   cat conftest.err >&5
18903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904   (exit $ac_status); } >/dev/null && {
18905          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18906          test ! -s conftest.err
18907        }; then
18908   ac_header_preproc=yes
18909 else
18910   echo "$as_me: failed program was:" >&5
18911 sed 's/^/| /' conftest.$ac_ext >&5
18912
18913   ac_header_preproc=no
18914 fi
18915
18916 rm -rf conftest.err conftest.$ac_ext
18917 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18918 echo "${ECHO_T}$ac_header_preproc" >&6; }
18919
18920 # So?  What about this header?
18921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18922   yes:no: )
18923     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18924 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18925     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18926 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18927     ac_header_preproc=yes
18928     ;;
18929   no:yes:* )
18930     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18931 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18932     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18933 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18934     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18935 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18936     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18937 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18938     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18939 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18940     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18941 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18942
18943     ;;
18944 esac
18945 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18946 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18947 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18948   echo $ECHO_N "(cached) $ECHO_C" >&6
18949 else
18950   eval "$as_ac_Header=\$ac_header_preproc"
18951 fi
18952 ac_res=`eval echo '${'$as_ac_Header'}'`
18953                { echo "$as_me:$LINENO: result: $ac_res" >&5
18954 echo "${ECHO_T}$ac_res" >&6; }
18955
18956 fi
18957 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18958   cat >>confdefs.h <<_ACEOF
18959 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18960 _ACEOF
18961
18962 fi
18963
18964 done
18965
18966
18967   ac_save_CPPFLAGS="$CPPFLAGS"
18968   ac_save_LDFLAGS="$LDFLAGS"
18969 #  ac_save_LIBS="$LIBS"
18970
18971   if test \! -z "$includedir" ; then
18972     CPPFLAGS="$CPPFLAGS -I$includedir"
18973   fi
18974   # note: $X_CFLAGS includes $x_includes
18975   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18976
18977   if test \! -z "$libdir" ; then
18978     LDFLAGS="$LDFLAGS -L$libdir"
18979   fi
18980   # note: $X_LIBS includes $x_libraries
18981   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18982
18983   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18984   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18985   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18986 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
18987 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18988   echo $ECHO_N "(cached) $ECHO_C" >&6
18989 else
18990   ac_check_lib_save_LIBS=$LIBS
18991 LIBS="-lutil  $LIBS"
18992 cat >conftest.$ac_ext <<_ACEOF
18993 /* confdefs.h.  */
18994 _ACEOF
18995 cat confdefs.h >>conftest.$ac_ext
18996 cat >>conftest.$ac_ext <<_ACEOF
18997 /* end confdefs.h.  */
18998
18999 /* Override any GCC internal prototype to avoid an error.
19000    Use char because int might match the return type of a GCC
19001    builtin and then its argument prototype would still apply.  */
19002 #ifdef __cplusplus
19003 extern "C"
19004 #endif
19005 char forkpty ();
19006 int
19007 main ()
19008 {
19009 return forkpty ();
19010   ;
19011   return 0;
19012 }
19013 _ACEOF
19014 rm -rf conftest.$ac_objext conftest$ac_exeext
19015 if { (ac_try="$ac_link"
19016 case "(($ac_try" in
19017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19018   *) ac_try_echo=$ac_try;;
19019 esac
19020 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19021   (eval "$ac_link") 2>conftest.er1
19022   ac_status=$?
19023   grep -v '^ *+' conftest.er1 >conftest.err
19024   rm -rf conftest.er1
19025   cat conftest.err >&5
19026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19027   (exit $ac_status); } && {
19028          test -z "$ac_c_werror_flag" ||
19029          test ! -s conftest.err
19030        } && test -s conftest$ac_exeext &&
19031        $as_test_x conftest$ac_exeext; then
19032   ac_cv_lib_util_forkpty=yes
19033 else
19034   echo "$as_me: failed program was:" >&5
19035 sed 's/^/| /' conftest.$ac_ext >&5
19036
19037         ac_cv_lib_util_forkpty=no
19038 fi
19039
19040 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19041       conftest$ac_exeext conftest.$ac_ext
19042 LIBS=$ac_check_lib_save_LIBS
19043 fi
19044 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19045 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19046 if test $ac_cv_lib_util_forkpty = yes; then
19047   PTY_LIBS="-lutil"
19048                 ac_have_forkpty=yes
19049                 cat >>confdefs.h <<\_ACEOF
19050 #define HAVE_FORKPTY 1
19051 _ACEOF
19052
19053 fi
19054
19055   CPPFLAGS="$ac_save_CPPFLAGS"
19056   LDFLAGS="$ac_save_LDFLAGS"
19057 #  LIBS="$ac_save_LIBS"
19058
19059
19060 if test "$ac_have_forkpty" != yes ; then
19061   # we don't need (or have) -lutil on MacOS 10.4.2...
19062
19063   ac_save_CPPFLAGS="$CPPFLAGS"
19064   ac_save_LDFLAGS="$LDFLAGS"
19065 #  ac_save_LIBS="$LIBS"
19066
19067   if test \! -z "$includedir" ; then
19068     CPPFLAGS="$CPPFLAGS -I$includedir"
19069   fi
19070   # note: $X_CFLAGS includes $x_includes
19071   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19072
19073   if test \! -z "$libdir" ; then
19074     LDFLAGS="$LDFLAGS -L$libdir"
19075   fi
19076   # note: $X_LIBS includes $x_libraries
19077   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19078
19079   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19080   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19081   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19082 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
19083 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19084   echo $ECHO_N "(cached) $ECHO_C" >&6
19085 else
19086   ac_check_lib_save_LIBS=$LIBS
19087 LIBS="-lc  $LIBS"
19088 cat >conftest.$ac_ext <<_ACEOF
19089 /* confdefs.h.  */
19090 _ACEOF
19091 cat confdefs.h >>conftest.$ac_ext
19092 cat >>conftest.$ac_ext <<_ACEOF
19093 /* end confdefs.h.  */
19094
19095 /* Override any GCC internal prototype to avoid an error.
19096    Use char because int might match the return type of a GCC
19097    builtin and then its argument prototype would still apply.  */
19098 #ifdef __cplusplus
19099 extern "C"
19100 #endif
19101 char forkpty ();
19102 int
19103 main ()
19104 {
19105 return forkpty ();
19106   ;
19107   return 0;
19108 }
19109 _ACEOF
19110 rm -rf conftest.$ac_objext conftest$ac_exeext
19111 if { (ac_try="$ac_link"
19112 case "(($ac_try" in
19113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19114   *) ac_try_echo=$ac_try;;
19115 esac
19116 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19117   (eval "$ac_link") 2>conftest.er1
19118   ac_status=$?
19119   grep -v '^ *+' conftest.er1 >conftest.err
19120   rm -rf conftest.er1
19121   cat conftest.err >&5
19122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19123   (exit $ac_status); } && {
19124          test -z "$ac_c_werror_flag" ||
19125          test ! -s conftest.err
19126        } && test -s conftest$ac_exeext &&
19127        $as_test_x conftest$ac_exeext; then
19128   ac_cv_lib_c_forkpty=yes
19129 else
19130   echo "$as_me: failed program was:" >&5
19131 sed 's/^/| /' conftest.$ac_ext >&5
19132
19133         ac_cv_lib_c_forkpty=no
19134 fi
19135
19136 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19137       conftest$ac_exeext conftest.$ac_ext
19138 LIBS=$ac_check_lib_save_LIBS
19139 fi
19140 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19141 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19142 if test $ac_cv_lib_c_forkpty = yes; then
19143   PTY_LIBS=""
19144                   cat >>confdefs.h <<\_ACEOF
19145 #define HAVE_FORKPTY 1
19146 _ACEOF
19147
19148 fi
19149
19150   CPPFLAGS="$ac_save_CPPFLAGS"
19151   LDFLAGS="$ac_save_LDFLAGS"
19152 #  LIBS="$ac_save_LIBS"
19153
19154 fi
19155
19156 ###############################################################################
19157 #
19158 #       Check for the XSHM server extension.
19159 #
19160 ###############################################################################
19161
19162 have_xshm=no
19163 with_xshm_req=unspecified
19164
19165 # Check whether --with-xshm-ext was given.
19166 if test "${with_xshm_ext+set}" = set; then
19167   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19168 else
19169   with_xshm=yes
19170 fi
19171
19172
19173
19174    case "$with_xshm" in
19175     yes) ;;
19176     no)  ;;
19177
19178     /*)
19179      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19180 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19181      d=$with_xshm/include
19182      if test -d $d; then
19183        X_CFLAGS="-I$d $X_CFLAGS"
19184        { echo "$as_me:$LINENO: result: $d" >&5
19185 echo "${ECHO_T}$d" >&6; }
19186      else
19187        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19188 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19189      fi
19190
19191      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19192 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19193      d=$with_xshm/lib
19194      if test -d $d; then
19195        X_LIBS="-L$d $X_LIBS"
19196        { echo "$as_me:$LINENO: result: $d" >&5
19197 echo "${ECHO_T}$d" >&6; }
19198      else
19199        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19200 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19201      fi
19202
19203      # replace the directory string with "yes".
19204      with_xshm_req="yes"
19205      with_xshm=$with_xshm_req
19206      ;;
19207
19208     *)
19209      echo ""
19210      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19211      echo "       If it is a directory, then \`DIR/include' will be added to"
19212      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19213      exit 1
19214      ;;
19215    esac
19216
19217
19218 if test "$with_xshm" = yes; then
19219
19220   # first check for Xshm.h.
19221
19222   ac_save_CPPFLAGS="$CPPFLAGS"
19223   if test \! -z "$includedir" ; then
19224     CPPFLAGS="$CPPFLAGS -I$includedir"
19225   fi
19226   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19227   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19228   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19229 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19230 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19231   echo $ECHO_N "(cached) $ECHO_C" >&6
19232 else
19233   cat >conftest.$ac_ext <<_ACEOF
19234 /* confdefs.h.  */
19235 _ACEOF
19236 cat confdefs.h >>conftest.$ac_ext
19237 cat >>conftest.$ac_ext <<_ACEOF
19238 /* end confdefs.h.  */
19239 #include <X11/Xlib.h>
19240
19241 #include <X11/extensions/XShm.h>
19242 _ACEOF
19243 rm -rf conftest.$ac_objext
19244 if { (ac_try="$ac_compile"
19245 case "(($ac_try" in
19246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19247   *) ac_try_echo=$ac_try;;
19248 esac
19249 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19250   (eval "$ac_compile") 2>conftest.er1
19251   ac_status=$?
19252   grep -v '^ *+' conftest.er1 >conftest.err
19253   rm -rf conftest.er1
19254   cat conftest.err >&5
19255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19256   (exit $ac_status); } && {
19257          test -z "$ac_c_werror_flag" ||
19258          test ! -s conftest.err
19259        } && test -s conftest.$ac_objext; then
19260   ac_cv_header_X11_extensions_XShm_h=yes
19261 else
19262   echo "$as_me: failed program was:" >&5
19263 sed 's/^/| /' conftest.$ac_ext >&5
19264
19265         ac_cv_header_X11_extensions_XShm_h=no
19266 fi
19267
19268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19269 fi
19270 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19271 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19272 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19273   have_xshm=yes
19274 fi
19275
19276
19277   CPPFLAGS="$ac_save_CPPFLAGS"
19278
19279   # if that succeeded, then check for sys/ipc.h.
19280   if test "$have_xshm" = yes; then
19281     have_xshm=no
19282
19283   ac_save_CPPFLAGS="$CPPFLAGS"
19284   if test \! -z "$includedir" ; then
19285     CPPFLAGS="$CPPFLAGS -I$includedir"
19286   fi
19287   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19288   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19289   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19290   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19291 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19292 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 fi
19295 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19296 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19297 else
19298   # Is the header compilable?
19299 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19300 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19301 cat >conftest.$ac_ext <<_ACEOF
19302 /* confdefs.h.  */
19303 _ACEOF
19304 cat confdefs.h >>conftest.$ac_ext
19305 cat >>conftest.$ac_ext <<_ACEOF
19306 /* end confdefs.h.  */
19307 $ac_includes_default
19308 #include <sys/ipc.h>
19309 _ACEOF
19310 rm -rf conftest.$ac_objext
19311 if { (ac_try="$ac_compile"
19312 case "(($ac_try" in
19313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19314   *) ac_try_echo=$ac_try;;
19315 esac
19316 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19317   (eval "$ac_compile") 2>conftest.er1
19318   ac_status=$?
19319   grep -v '^ *+' conftest.er1 >conftest.err
19320   rm -rf conftest.er1
19321   cat conftest.err >&5
19322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323   (exit $ac_status); } && {
19324          test -z "$ac_c_werror_flag" ||
19325          test ! -s conftest.err
19326        } && test -s conftest.$ac_objext; then
19327   ac_header_compiler=yes
19328 else
19329   echo "$as_me: failed program was:" >&5
19330 sed 's/^/| /' conftest.$ac_ext >&5
19331
19332         ac_header_compiler=no
19333 fi
19334
19335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19336 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19337 echo "${ECHO_T}$ac_header_compiler" >&6; }
19338
19339 # Is the header present?
19340 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19341 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19342 cat >conftest.$ac_ext <<_ACEOF
19343 /* confdefs.h.  */
19344 _ACEOF
19345 cat confdefs.h >>conftest.$ac_ext
19346 cat >>conftest.$ac_ext <<_ACEOF
19347 /* end confdefs.h.  */
19348 #include <sys/ipc.h>
19349 _ACEOF
19350 if { (ac_try="$ac_cpp conftest.$ac_ext"
19351 case "(($ac_try" in
19352   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19353   *) ac_try_echo=$ac_try;;
19354 esac
19355 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19356   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19357   ac_status=$?
19358   grep -v '^ *+' conftest.er1 >conftest.err
19359   rm -rf conftest.er1
19360   cat conftest.err >&5
19361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19362   (exit $ac_status); } >/dev/null && {
19363          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19364          test ! -s conftest.err
19365        }; then
19366   ac_header_preproc=yes
19367 else
19368   echo "$as_me: failed program was:" >&5
19369 sed 's/^/| /' conftest.$ac_ext >&5
19370
19371   ac_header_preproc=no
19372 fi
19373
19374 rm -rf conftest.err conftest.$ac_ext
19375 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19376 echo "${ECHO_T}$ac_header_preproc" >&6; }
19377
19378 # So?  What about this header?
19379 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19380   yes:no: )
19381     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19382 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19383     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19384 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19385     ac_header_preproc=yes
19386     ;;
19387   no:yes:* )
19388     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19389 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19390     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19391 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19392     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19393 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19394     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19395 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19396     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19397 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19398     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19399 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19400
19401     ;;
19402 esac
19403 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19404 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19405 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19406   echo $ECHO_N "(cached) $ECHO_C" >&6
19407 else
19408   ac_cv_header_sys_ipc_h=$ac_header_preproc
19409 fi
19410 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19411 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19412
19413 fi
19414 if test $ac_cv_header_sys_ipc_h = yes; then
19415   have_xshm=yes
19416 fi
19417
19418
19419   CPPFLAGS="$ac_save_CPPFLAGS"
19420   fi
19421
19422   # if that succeeded, then check for sys/shm.h.
19423   if test "$have_xshm" = yes; then
19424     have_xshm=no
19425
19426   ac_save_CPPFLAGS="$CPPFLAGS"
19427   if test \! -z "$includedir" ; then
19428     CPPFLAGS="$CPPFLAGS -I$includedir"
19429   fi
19430   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19431   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19432   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19433   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19434 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19435 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19436   echo $ECHO_N "(cached) $ECHO_C" >&6
19437 fi
19438 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19439 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19440 else
19441   # Is the header compilable?
19442 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19443 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19444 cat >conftest.$ac_ext <<_ACEOF
19445 /* confdefs.h.  */
19446 _ACEOF
19447 cat confdefs.h >>conftest.$ac_ext
19448 cat >>conftest.$ac_ext <<_ACEOF
19449 /* end confdefs.h.  */
19450 $ac_includes_default
19451 #include <sys/shm.h>
19452 _ACEOF
19453 rm -rf conftest.$ac_objext
19454 if { (ac_try="$ac_compile"
19455 case "(($ac_try" in
19456   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19457   *) ac_try_echo=$ac_try;;
19458 esac
19459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19460   (eval "$ac_compile") 2>conftest.er1
19461   ac_status=$?
19462   grep -v '^ *+' conftest.er1 >conftest.err
19463   rm -rf conftest.er1
19464   cat conftest.err >&5
19465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19466   (exit $ac_status); } && {
19467          test -z "$ac_c_werror_flag" ||
19468          test ! -s conftest.err
19469        } && test -s conftest.$ac_objext; then
19470   ac_header_compiler=yes
19471 else
19472   echo "$as_me: failed program was:" >&5
19473 sed 's/^/| /' conftest.$ac_ext >&5
19474
19475         ac_header_compiler=no
19476 fi
19477
19478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19479 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19480 echo "${ECHO_T}$ac_header_compiler" >&6; }
19481
19482 # Is the header present?
19483 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19484 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19485 cat >conftest.$ac_ext <<_ACEOF
19486 /* confdefs.h.  */
19487 _ACEOF
19488 cat confdefs.h >>conftest.$ac_ext
19489 cat >>conftest.$ac_ext <<_ACEOF
19490 /* end confdefs.h.  */
19491 #include <sys/shm.h>
19492 _ACEOF
19493 if { (ac_try="$ac_cpp conftest.$ac_ext"
19494 case "(($ac_try" in
19495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496   *) ac_try_echo=$ac_try;;
19497 esac
19498 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19499   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19500   ac_status=$?
19501   grep -v '^ *+' conftest.er1 >conftest.err
19502   rm -rf conftest.er1
19503   cat conftest.err >&5
19504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19505   (exit $ac_status); } >/dev/null && {
19506          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19507          test ! -s conftest.err
19508        }; then
19509   ac_header_preproc=yes
19510 else
19511   echo "$as_me: failed program was:" >&5
19512 sed 's/^/| /' conftest.$ac_ext >&5
19513
19514   ac_header_preproc=no
19515 fi
19516
19517 rm -rf conftest.err conftest.$ac_ext
19518 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19519 echo "${ECHO_T}$ac_header_preproc" >&6; }
19520
19521 # So?  What about this header?
19522 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19523   yes:no: )
19524     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19525 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19526     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19527 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19528     ac_header_preproc=yes
19529     ;;
19530   no:yes:* )
19531     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19532 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19533     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19534 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19535     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19536 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19537     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19538 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19539     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19540 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19541     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19542 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19543
19544     ;;
19545 esac
19546 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19547 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19548 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19549   echo $ECHO_N "(cached) $ECHO_C" >&6
19550 else
19551   ac_cv_header_sys_shm_h=$ac_header_preproc
19552 fi
19553 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19554 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19555
19556 fi
19557 if test $ac_cv_header_sys_shm_h = yes; then
19558   have_xshm=yes
19559 fi
19560
19561
19562   CPPFLAGS="$ac_save_CPPFLAGS"
19563   fi
19564
19565   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19566   # to exist, but the library code to not exist.  And even better, the library
19567   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19568   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19569   # that's not quite right, but close enough.)
19570   #
19571   case "$host" in
19572     *-aix*)
19573       if  `uname -v` -eq 3 ; then
19574         have_xshm=no
19575
19576   ac_save_CPPFLAGS="$CPPFLAGS"
19577   ac_save_LDFLAGS="$LDFLAGS"
19578 #  ac_save_LIBS="$LIBS"
19579
19580   if test \! -z "$includedir" ; then
19581     CPPFLAGS="$CPPFLAGS -I$includedir"
19582   fi
19583   # note: $X_CFLAGS includes $x_includes
19584   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19585
19586   if test \! -z "$libdir" ; then
19587     LDFLAGS="$LDFLAGS -L$libdir"
19588   fi
19589   # note: $X_LIBS includes $x_libraries
19590   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19591
19592   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19593   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19594   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19595 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19596 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19597   echo $ECHO_N "(cached) $ECHO_C" >&6
19598 else
19599   ac_check_lib_save_LIBS=$LIBS
19600 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19601 cat >conftest.$ac_ext <<_ACEOF
19602 /* confdefs.h.  */
19603 _ACEOF
19604 cat confdefs.h >>conftest.$ac_ext
19605 cat >>conftest.$ac_ext <<_ACEOF
19606 /* end confdefs.h.  */
19607
19608 /* Override any GCC internal prototype to avoid an error.
19609    Use char because int might match the return type of a GCC
19610    builtin and then its argument prototype would still apply.  */
19611 #ifdef __cplusplus
19612 extern "C"
19613 #endif
19614 char XShmQueryExtension ();
19615 int
19616 main ()
19617 {
19618 return XShmQueryExtension ();
19619   ;
19620   return 0;
19621 }
19622 _ACEOF
19623 rm -rf conftest.$ac_objext conftest$ac_exeext
19624 if { (ac_try="$ac_link"
19625 case "(($ac_try" in
19626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19627   *) ac_try_echo=$ac_try;;
19628 esac
19629 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19630   (eval "$ac_link") 2>conftest.er1
19631   ac_status=$?
19632   grep -v '^ *+' conftest.er1 >conftest.err
19633   rm -rf conftest.er1
19634   cat conftest.err >&5
19635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19636   (exit $ac_status); } && {
19637          test -z "$ac_c_werror_flag" ||
19638          test ! -s conftest.err
19639        } && test -s conftest$ac_exeext &&
19640        $as_test_x conftest$ac_exeext; then
19641   ac_cv_lib_XextSam_XShmQueryExtension=yes
19642 else
19643   echo "$as_me: failed program was:" >&5
19644 sed 's/^/| /' conftest.$ac_ext >&5
19645
19646         ac_cv_lib_XextSam_XShmQueryExtension=no
19647 fi
19648
19649 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19650       conftest$ac_exeext conftest.$ac_ext
19651 LIBS=$ac_check_lib_save_LIBS
19652 fi
19653 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19654 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19655 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19656   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19657 else
19658   true
19659 fi
19660
19661   CPPFLAGS="$ac_save_CPPFLAGS"
19662   LDFLAGS="$ac_save_LDFLAGS"
19663 #  LIBS="$ac_save_LIBS"
19664
19665       fi
19666     ;;
19667   esac
19668
19669   # if that succeeded, then we've really got it.
19670   if test "$have_xshm" = yes; then
19671     cat >>confdefs.h <<\_ACEOF
19672 #define HAVE_XSHM_EXTENSION 1
19673 _ACEOF
19674
19675   fi
19676
19677 elif test "$with_xshm" != no; then
19678   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19679   exit 1
19680 fi
19681
19682
19683 ###############################################################################
19684 #
19685 #       Check for the DOUBLE-BUFFER server extension.
19686 #
19687 ###############################################################################
19688
19689 have_xdbe=no
19690 with_xdbe_req=unspecified
19691
19692 # Check whether --with-xdbe-ext was given.
19693 if test "${with_xdbe_ext+set}" = set; then
19694   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19695 else
19696   with_xdbe=yes
19697 fi
19698
19699
19700
19701    case "$with_xdbe" in
19702     yes) ;;
19703     no)  ;;
19704
19705     /*)
19706      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19707 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19708      d=$with_xdbe/include
19709      if test -d $d; then
19710        X_CFLAGS="-I$d $X_CFLAGS"
19711        { echo "$as_me:$LINENO: result: $d" >&5
19712 echo "${ECHO_T}$d" >&6; }
19713      else
19714        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19715 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19716      fi
19717
19718      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19719 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19720      d=$with_xdbe/lib
19721      if test -d $d; then
19722        X_LIBS="-L$d $X_LIBS"
19723        { echo "$as_me:$LINENO: result: $d" >&5
19724 echo "${ECHO_T}$d" >&6; }
19725      else
19726        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19727 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19728      fi
19729
19730      # replace the directory string with "yes".
19731      with_xdbe_req="yes"
19732      with_xdbe=$with_xdbe_req
19733      ;;
19734
19735     *)
19736      echo ""
19737      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19738      echo "       If it is a directory, then \`DIR/include' will be added to"
19739      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19740      exit 1
19741      ;;
19742    esac
19743
19744
19745 if test "$with_xdbe" = yes; then
19746
19747
19748   ac_save_CPPFLAGS="$CPPFLAGS"
19749   if test \! -z "$includedir" ; then
19750     CPPFLAGS="$CPPFLAGS -I$includedir"
19751   fi
19752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19753   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19754   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19755 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19756 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19757   echo $ECHO_N "(cached) $ECHO_C" >&6
19758 else
19759   cat >conftest.$ac_ext <<_ACEOF
19760 /* confdefs.h.  */
19761 _ACEOF
19762 cat confdefs.h >>conftest.$ac_ext
19763 cat >>conftest.$ac_ext <<_ACEOF
19764 /* end confdefs.h.  */
19765 #include <X11/Xlib.h>
19766
19767 #include <X11/extensions/Xdbe.h>
19768 _ACEOF
19769 rm -rf conftest.$ac_objext
19770 if { (ac_try="$ac_compile"
19771 case "(($ac_try" in
19772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773   *) ac_try_echo=$ac_try;;
19774 esac
19775 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19776   (eval "$ac_compile") 2>conftest.er1
19777   ac_status=$?
19778   grep -v '^ *+' conftest.er1 >conftest.err
19779   rm -rf conftest.er1
19780   cat conftest.err >&5
19781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19782   (exit $ac_status); } && {
19783          test -z "$ac_c_werror_flag" ||
19784          test ! -s conftest.err
19785        } && test -s conftest.$ac_objext; then
19786   ac_cv_header_X11_extensions_Xdbe_h=yes
19787 else
19788   echo "$as_me: failed program was:" >&5
19789 sed 's/^/| /' conftest.$ac_ext >&5
19790
19791         ac_cv_header_X11_extensions_Xdbe_h=no
19792 fi
19793
19794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19795 fi
19796 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19797 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19798 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19799   have_xdbe=yes
19800 fi
19801
19802
19803   CPPFLAGS="$ac_save_CPPFLAGS"
19804   if test "$have_xdbe" = yes; then
19805     cat >>confdefs.h <<\_ACEOF
19806 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19807 _ACEOF
19808
19809   fi
19810
19811 elif test "$with_xdbe" != no; then
19812   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19813   exit 1
19814 fi
19815
19816
19817 ###############################################################################
19818 #
19819 #       Check for the SGI XReadDisplay server extension.
19820 #
19821 #       Note: this has to be down here, rather than up with the other server
19822 #       extension tests, so that the output of `configure --help' is in the
19823 #       right order.  Arrgh!
19824 #
19825 ###############################################################################
19826
19827 have_readdisplay=no
19828 with_readdisplay_req=unspecified
19829
19830 # Check whether --with-readdisplay was given.
19831 if test "${with_readdisplay+set}" = set; then
19832   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19833 else
19834   with_readdisplay=yes
19835 fi
19836
19837
19838
19839    case "$with_readdisplay" in
19840     yes) ;;
19841     no)  ;;
19842
19843     /*)
19844      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19845 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19846      d=$with_readdisplay/include
19847      if test -d $d; then
19848        X_CFLAGS="-I$d $X_CFLAGS"
19849        { echo "$as_me:$LINENO: result: $d" >&5
19850 echo "${ECHO_T}$d" >&6; }
19851      else
19852        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19853 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19854      fi
19855
19856      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19857 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19858      d=$with_readdisplay/lib
19859      if test -d $d; then
19860        X_LIBS="-L$d $X_LIBS"
19861        { echo "$as_me:$LINENO: result: $d" >&5
19862 echo "${ECHO_T}$d" >&6; }
19863      else
19864        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19865 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19866      fi
19867
19868      # replace the directory string with "yes".
19869      with_readdisplay_req="yes"
19870      with_readdisplay=$with_readdisplay_req
19871      ;;
19872
19873     *)
19874      echo ""
19875      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19876      echo "       If it is a directory, then \`DIR/include' will be added to"
19877      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19878      exit 1
19879      ;;
19880    esac
19881
19882
19883 if test "$with_readdisplay" = yes; then
19884
19885   ac_save_CPPFLAGS="$CPPFLAGS"
19886   if test \! -z "$includedir" ; then
19887     CPPFLAGS="$CPPFLAGS -I$includedir"
19888   fi
19889   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19890   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19891   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19892 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19893 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19894   echo $ECHO_N "(cached) $ECHO_C" >&6
19895 else
19896   cat >conftest.$ac_ext <<_ACEOF
19897 /* confdefs.h.  */
19898 _ACEOF
19899 cat confdefs.h >>conftest.$ac_ext
19900 cat >>conftest.$ac_ext <<_ACEOF
19901 /* end confdefs.h.  */
19902 #include <X11/Xlib.h>
19903
19904 #include <X11/extensions/readdisplay.h>
19905 _ACEOF
19906 rm -rf conftest.$ac_objext
19907 if { (ac_try="$ac_compile"
19908 case "(($ac_try" in
19909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19910   *) ac_try_echo=$ac_try;;
19911 esac
19912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19913   (eval "$ac_compile") 2>conftest.er1
19914   ac_status=$?
19915   grep -v '^ *+' conftest.er1 >conftest.err
19916   rm -rf conftest.er1
19917   cat conftest.err >&5
19918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19919   (exit $ac_status); } && {
19920          test -z "$ac_c_werror_flag" ||
19921          test ! -s conftest.err
19922        } && test -s conftest.$ac_objext; then
19923   ac_cv_header_X11_extensions_readdisplay_h=yes
19924 else
19925   echo "$as_me: failed program was:" >&5
19926 sed 's/^/| /' conftest.$ac_ext >&5
19927
19928         ac_cv_header_X11_extensions_readdisplay_h=no
19929 fi
19930
19931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19932 fi
19933 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19934 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19935 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19936   cat >>confdefs.h <<\_ACEOF
19937 #define HAVE_READ_DISPLAY_EXTENSION 1
19938 _ACEOF
19939
19940 fi
19941
19942
19943   CPPFLAGS="$ac_save_CPPFLAGS"
19944 elif test "$with_readdisplay" != no; then
19945   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19946   exit 1
19947 fi
19948
19949
19950 ###############################################################################
19951 #
19952 #       Check for a directory full of images to use as the default value
19953 #       of the "imageDirectory" preference.
19954 #
19955 ###############################################################################
19956
19957 have_imagedir=no
19958 with_imagedir_req=unspecified
19959
19960
19961 # Check whether --with-image-directory was given.
19962 if test "${with_image_directory+set}" = set; then
19963   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19964 else
19965   with_imagedir=yes
19966 fi
19967
19968 # no HANDLE_X_PATH_ARG for this one
19969
19970 case "$with_imagedir" in
19971   /*)
19972     # absolute path
19973     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19974 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
19975     if test -d "$with_imagedir" ; then
19976       { echo "$as_me:$LINENO: result: yes" >&5
19977 echo "${ECHO_T}yes" >&6; }
19978     else
19979       { echo "$as_me:$LINENO: result: no" >&5
19980 echo "${ECHO_T}no" >&6; }
19981       with_imagedir=""
19982     fi
19983   ;;
19984   yes)
19985     with_imagedir=""
19986
19987     #### Could use some more defaults here...
19988     for dd in \
19989       "/usr/share/backgrounds/images/"          \
19990       "/usr/share/wallpapers/"                  \
19991       "/Library/Desktop Pictures/"              \
19992     ; do
19993       if test -z "$with_imagedir"; then
19994         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
19995 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
19996         if test -d "$dd" ; then
19997           { echo "$as_me:$LINENO: result: yes" >&5
19998 echo "${ECHO_T}yes" >&6; }
19999           with_imagedir="$dd"
20000         else
20001           { echo "$as_me:$LINENO: result: no" >&5
20002 echo "${ECHO_T}no" >&6; }
20003         fi
20004       fi
20005     done
20006
20007   ;;
20008   no)
20009     with_imagedir=""
20010   ;;
20011
20012   *)
20013     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20014     exit 1
20015   ;;
20016 esac
20017 ac_cv_imagedir="$with_imagedir"
20018
20019 DEFAULT_IMAGES_P='True'
20020 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20021
20022 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20023   DEFAULT_IMAGES_P='False'
20024 fi
20025
20026
20027 ###############################################################################
20028 #
20029 #       Pick a text file to use as the default of the "textFile" preference.
20030 #       Any old file will do, but preferably one that will make interesting
20031 #       shapes when displayed by "starwars" and "fontglide".
20032 #
20033 ###############################################################################
20034
20035 have_textfile=no
20036 with_textfile_req=unspecified
20037
20038
20039 # Check whether --with-text-file was given.
20040 if test "${with_text_file+set}" = set; then
20041   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20042 else
20043   with_textfile=yes
20044 fi
20045
20046 # no HANDLE_X_PATH_ARG for this one
20047
20048 case "$with_textfile" in
20049   /*)
20050     # absolute path
20051     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20052 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
20053     if test -f "$with_textfile" ; then
20054       { echo "$as_me:$LINENO: result: yes" >&5
20055 echo "${ECHO_T}yes" >&6; }
20056     else
20057       { echo "$as_me:$LINENO: result: no" >&5
20058 echo "${ECHO_T}no" >&6; }
20059       with_textfile=""
20060     fi
20061   ;;
20062   yes)
20063     with_textfile=""
20064
20065     #### Could use some more defaults here...
20066     for f in \
20067       "/usr/X11R6/lib/X11/doc/README"              \
20068       "/usr/share/doc/xserver-common/copyright"    \
20069       "/usr/share/doc/xserver-xorg-core/copyright" \
20070       "/usr/X11R6/README"                          \
20071       "/usr/share/doc/debian/debian-manifesto"     \
20072     ; do
20073       if test -z "$with_textfile"; then
20074         { echo "$as_me:$LINENO: checking for text file $f" >&5
20075 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
20076         if test -f "$f" ; then
20077           { echo "$as_me:$LINENO: result: yes" >&5
20078 echo "${ECHO_T}yes" >&6; }
20079           with_textfile="$f"
20080         else
20081           { echo "$as_me:$LINENO: result: no" >&5
20082 echo "${ECHO_T}no" >&6; }
20083         fi
20084       fi
20085     done
20086
20087   ;;
20088   no)
20089     with_textfile=""
20090   ;;
20091
20092   *)
20093     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20094     exit 1
20095   ;;
20096 esac
20097 ac_cv_textfile="$with_textfile"
20098
20099 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20100
20101
20102 ###############################################################################
20103 #
20104 #       Check the browser to see help URL
20105 #
20106 ###############################################################################
20107
20108 have_browser=no
20109 with_browser_req=unspecified
20110
20111
20112 # Check whether --with-browser was given.
20113 if test "${with_browser+set}" = set; then
20114   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20115 else
20116   with_browser=no
20117 fi
20118
20119 # no HANDLE_X_PATH_ARG for this one
20120
20121 case "$with_browser" in
20122   no )
20123   ;;
20124   * )
20125     WITH_BROWSER=$with_browser
20126     gnome_open_program=$with_browser
20127     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20128 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20129     with_browser_fullpath=`which $with_browser 2>/dev/null`
20130     case $with_browser_fullpath in
20131          /* )
20132                 { echo "$as_me:$LINENO: result: yes" >&5
20133 echo "${ECHO_T}yes" >&6; }
20134                  have_browser=yes
20135                  ;;
20136         * )
20137                { echo "$as_me:$LINENO: result: no" >&5
20138 echo "${ECHO_T}no" >&6; }
20139 # Only warning: we don't want to install all packages for the
20140 # dependency of the browser in building stage...
20141                echo "WARNING: browser not found: --with-browser=$with_browser"
20142                ;;
20143     esac
20144   ;;
20145 esac
20146 ac_cv_browser="$with_browser"
20147
20148 ###############################################################################
20149 #
20150 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20151 #       This should be safe, but let's give people the option.
20152 #
20153 ###############################################################################
20154
20155 setuid_hacks_default=no
20156 setuid_hacks="$setuid_hacks_default"
20157
20158 # Check whether --with-setuid-hacks was given.
20159 if test "${with_setuid_hacks+set}" = set; then
20160   withval=$with_setuid_hacks; setuid_hacks="$withval"
20161 else
20162   setuid_hacks="$setuid_hacks_default"
20163 fi
20164
20165
20166
20167    case "$setuid_hacks" in
20168     yes) ;;
20169     no)  ;;
20170
20171     /*)
20172      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20173 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20174      d=$setuid_hacks/include
20175      if test -d $d; then
20176        X_CFLAGS="-I$d $X_CFLAGS"
20177        { echo "$as_me:$LINENO: result: $d" >&5
20178 echo "${ECHO_T}$d" >&6; }
20179      else
20180        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20181 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20182      fi
20183
20184      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20185 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20186      d=$setuid_hacks/lib
20187      if test -d $d; then
20188        X_LIBS="-L$d $X_LIBS"
20189        { echo "$as_me:$LINENO: result: $d" >&5
20190 echo "${ECHO_T}$d" >&6; }
20191      else
20192        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20193 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20194      fi
20195
20196      # replace the directory string with "yes".
20197      setuid_hacks_req="yes"
20198      setuid_hacks=$setuid_hacks_req
20199      ;;
20200
20201     *)
20202      echo ""
20203      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20204      echo "       If it is a directory, then \`DIR/include' will be added to"
20205      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20206      exit 1
20207      ;;
20208    esac
20209
20210
20211 if test "$setuid_hacks" = yes; then
20212   true
20213 elif test "$setuid_hacks" != no; then
20214   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20215   exit 1
20216 fi
20217
20218
20219 ###############################################################################
20220 #
20221 #       Done testing.  Now, set up the various -I and -L variables,
20222 #       and decide which GUI program to build by default.
20223 #
20224 ###############################################################################
20225
20226 DEPEND=makedepend
20227 DEPEND_FLAGS=
20228 DEPEND_DEFINES=
20229
20230
20231 if test \! -z "$includedir" ; then
20232   INCLUDES="$INCLUDES -I$includedir"
20233 fi
20234
20235 if test \! -z "$libdir" ; then
20236   LDFLAGS="$LDFLAGS -L$libdir"
20237 fi
20238
20239
20240 PREFERRED_DEMO_PROGRAM=''
20241 ALL_DEMO_PROGRAMS=
20242 if test "$have_motif" = yes; then
20243   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20244   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20245 fi
20246 if test "$have_gtk" = yes; then
20247   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20248   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20249 fi
20250
20251
20252 if test "$have_kerberos" = yes; then
20253   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20254   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20255 fi
20256 if test "$have_pam" = yes; then
20257   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20258   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20259   INSTALL_PAM="install-pam"
20260 fi
20261 if test "$have_passwd_helper" = yes; then
20262   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20263   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20264 fi
20265   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20266   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20267
20268
20269 if test "$enable_locking" = yes; then
20270   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20271   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20272 else
20273   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20274   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20275 fi
20276
20277 if test "$ac_macosx" = yes; then
20278   EXES_OSX='$(EXES_OSX)'
20279   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20280   MEN_OSX='$(MEN_OSX)'
20281 else
20282   EXES_OSX=
20283   SCRIPTS_OSX=
20284   MEN_OSX=
20285 fi
20286
20287
20288 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20289
20290 if test "$need_setuid" = yes; then
20291   NEED_SETUID=yes
20292 else
20293   NEED_SETUID=no
20294 fi
20295
20296 if test "$setuid_hacks" = yes; then
20297   SETUID_HACKS=yes
20298 else
20299   SETUID_HACKS=no
20300 fi
20301
20302 tab='   '
20303 if test "$have_gl" = yes; then
20304   GL_EXES='$(GL_EXES)'
20305   SUID_EXES='$(SUID_EXES)'
20306   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
20307   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20308   GL_MEN='$(GL_MEN)'
20309   GL_KLUDGE=" "
20310 else
20311   GL_KLUDGE="-"
20312 fi
20313
20314 if test "$have_gle" = yes; then
20315   GLE_EXES='$(GLE_EXES)'
20316   GLE_KLUDGE=" "
20317 else
20318   GLE_KLUDGE="-"
20319 fi
20320
20321 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20322  JPEG_EXES='$(JPEG_EXES)'
20323 fi
20324
20325
20326 # Another substitution in the XScreenSaver.ad.in file:
20327 #
20328 if test "$gnome_open_program" != ''; then
20329   GNOME24=''
20330   GNOME22='!    '
20331   NOGNOME='!    '
20332 elif test "$gnome_url_show_program" != ''; then
20333   GNOME24='!    '
20334   GNOME22=''
20335   NOGNOME='!    '
20336 else
20337   GNOME24='!    '
20338   GNOME22='!    '
20339   NOGNOME=''
20340 fi
20341
20342
20343 # Set PO_DATADIR to something sensible.
20344 #
20345 { echo "$as_me:$LINENO: checking for locale directory" >&5
20346 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20347 if test -n "$GTK_DATADIR" ; then
20348   PO_DATADIR="$GTK_DATADIR"
20349 elif test "$have_gtk" = yes; then
20350   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20351   PO_DATADIR="$PO_DATADIR/share"
20352 fi
20353
20354 if test -z "$PO_DATADIR" ; then
20355   #
20356   # #### Total fucking kludge --
20357   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20358   # but of course we need to expand all the nested variables to do that...
20359   #
20360   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20361   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20362 fi
20363
20364 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20365 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20366
20367
20368 # canonicalize slashes.
20369 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20370
20371 # gcc 3.0 likes to issue this warning for every file:
20372 #
20373 # cc1: warning: changing search order for system directory "/usr/local/include"
20374 # cc1: warning:   as it has already been specified as a non-system directory
20375 #
20376 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20377 # Which *should* be totally redundant, and thus an ok thing to delete?
20378 #
20379 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20380
20381
20382 ###############################################################################
20383 #
20384 #       Perform substitutions and write Makefiles.
20385 #
20386 ###############################################################################
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
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 APPDEFAULTS=$ac_x_app_defaults
20453
20454
20455
20456
20457
20458
20459
20460 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20461
20462 cat >confcache <<\_ACEOF
20463 # This file is a shell script that caches the results of configure
20464 # tests run on this system so they can be shared between configure
20465 # scripts and configure runs, see configure's option --config-cache.
20466 # It is not useful on other systems.  If it contains results you don't
20467 # want to keep, you may remove or edit it.
20468 #
20469 # config.status only pays attention to the cache file if you give it
20470 # the --recheck option to rerun configure.
20471 #
20472 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20473 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20474 # following values.
20475
20476 _ACEOF
20477
20478 # The following way of writing the cache mishandles newlines in values,
20479 # but we know of no workaround that is simple, portable, and efficient.
20480 # So, we kill variables containing newlines.
20481 # Ultrix sh set writes to stderr and can't be redirected directly,
20482 # and sets the high bit in the cache file unless we assign to the vars.
20483 (
20484   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20485     eval ac_val=\$$ac_var
20486     case $ac_val in #(
20487     *${as_nl}*)
20488       case $ac_var in #(
20489       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20490 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20491       esac
20492       case $ac_var in #(
20493       _ | IFS | as_nl) ;; #(
20494       *) $as_unset $ac_var ;;
20495       esac ;;
20496     esac
20497   done
20498
20499   (set) 2>&1 |
20500     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20501     *${as_nl}ac_space=\ *)
20502       # `set' does not quote correctly, so add quotes (double-quote
20503       # substitution turns \\\\ into \\, and sed turns \\ into \).
20504       sed -n \
20505         "s/'/'\\\\''/g;
20506           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20507       ;; #(
20508     *)
20509       # `set' quotes correctly as required by POSIX, so do not add quotes.
20510       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20511       ;;
20512     esac |
20513     sort
20514 ) |
20515   sed '
20516      /^ac_cv_env_/b end
20517      t clear
20518      :clear
20519      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20520      t end
20521      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20522      :end' >>confcache
20523 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20524   if test -w "$cache_file"; then
20525     test "x$cache_file" != "x/dev/null" &&
20526       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20527 echo "$as_me: updating cache $cache_file" >&6;}
20528     cat confcache >$cache_file
20529   else
20530     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20531 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20532   fi
20533 fi
20534 rm -f confcache
20535
20536 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20537 # Let make expand exec_prefix.
20538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20539
20540 DEFS=-DHAVE_CONFIG_H
20541
20542 ac_libobjs=
20543 ac_ltlibobjs=
20544 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20545   # 1. Remove the extension, and $U if already installed.
20546   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20547   ac_i=`echo "$ac_i" | sed "$ac_script"`
20548   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20549   #    will be set to the directory where LIBOBJS objects are built.
20550   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20551   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20552 done
20553 LIBOBJS=$ac_libobjs
20554
20555 LTLIBOBJS=$ac_ltlibobjs
20556
20557
20558
20559
20560         mv -f po/POTFILES po/POTFILES.tmp
20561         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20562         rm -f po/POTFILES.tmp
20563
20564
20565
20566 : ${CONFIG_STATUS=./config.status}
20567 ac_clean_files_save=$ac_clean_files
20568 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20569 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20570 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20571 cat >$CONFIG_STATUS <<_ACEOF
20572 #! $SHELL
20573 # Generated by $as_me.
20574 # Run this file to recreate the current configuration.
20575 # Compiler output produced by configure, useful for debugging
20576 # configure, is in config.log if it exists.
20577
20578 debug=false
20579 ac_cs_recheck=false
20580 ac_cs_silent=false
20581 SHELL=\${CONFIG_SHELL-$SHELL}
20582 _ACEOF
20583
20584 cat >>$CONFIG_STATUS <<\_ACEOF
20585 ## --------------------- ##
20586 ## M4sh Initialization.  ##
20587 ## --------------------- ##
20588
20589 # Be more Bourne compatible
20590 DUALCASE=1; export DUALCASE # for MKS sh
20591 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20592   emulate sh
20593   NULLCMD=:
20594   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20595   # is contrary to our usage.  Disable this feature.
20596   alias -g '${1+"$@"}'='"$@"'
20597   setopt NO_GLOB_SUBST
20598 else
20599   case `(set -o) 2>/dev/null` in
20600   *posix*) set -o posix ;;
20601 esac
20602
20603 fi
20604
20605
20606
20607
20608 # PATH needs CR
20609 # Avoid depending upon Character Ranges.
20610 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20611 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20612 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20613 as_cr_digits='0123456789'
20614 as_cr_alnum=$as_cr_Letters$as_cr_digits
20615
20616 # The user is always right.
20617 if test "${PATH_SEPARATOR+set}" != set; then
20618   echo "#! /bin/sh" >conf$$.sh
20619   echo  "exit 0"   >>conf$$.sh
20620   chmod +x conf$$.sh
20621   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20622     PATH_SEPARATOR=';'
20623   else
20624     PATH_SEPARATOR=:
20625   fi
20626   rm -f conf$$.sh
20627 fi
20628
20629 # Support unset when possible.
20630 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20631   as_unset=unset
20632 else
20633   as_unset=false
20634 fi
20635
20636
20637 # IFS
20638 # We need space, tab and new line, in precisely that order.  Quoting is
20639 # there to prevent editors from complaining about space-tab.
20640 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20641 # splitting by setting IFS to empty value.)
20642 as_nl='
20643 '
20644 IFS=" ""        $as_nl"
20645
20646 # Find who we are.  Look in the path if we contain no directory separator.
20647 case $0 in
20648   *[\\/]* ) as_myself=$0 ;;
20649   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20650 for as_dir in $PATH
20651 do
20652   IFS=$as_save_IFS
20653   test -z "$as_dir" && as_dir=.
20654   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20655 done
20656 IFS=$as_save_IFS
20657
20658      ;;
20659 esac
20660 # We did not find ourselves, most probably we were run as `sh COMMAND'
20661 # in which case we are not to be found in the path.
20662 if test "x$as_myself" = x; then
20663   as_myself=$0
20664 fi
20665 if test ! -f "$as_myself"; then
20666   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20667   { (exit 1); exit 1; }
20668 fi
20669
20670 # Work around bugs in pre-3.0 UWIN ksh.
20671 for as_var in ENV MAIL MAILPATH
20672 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20673 done
20674 PS1='$ '
20675 PS2='> '
20676 PS4='+ '
20677
20678 # NLS nuisances.
20679 for as_var in \
20680   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20681   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20682   LC_TELEPHONE LC_TIME
20683 do
20684   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20685     eval $as_var=C; export $as_var
20686   else
20687     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20688   fi
20689 done
20690
20691 # Required to use basename.
20692 if expr a : '\(a\)' >/dev/null 2>&1 &&
20693    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20694   as_expr=expr
20695 else
20696   as_expr=false
20697 fi
20698
20699 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20700   as_basename=basename
20701 else
20702   as_basename=false
20703 fi
20704
20705
20706 # Name of the executable.
20707 as_me=`$as_basename -- "$0" ||
20708 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20709          X"$0" : 'X\(//\)$' \| \
20710          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20711 echo X/"$0" |
20712     sed '/^.*\/\([^/][^/]*\)\/*$/{
20713             s//\1/
20714             q
20715           }
20716           /^X\/\(\/\/\)$/{
20717             s//\1/
20718             q
20719           }
20720           /^X\/\(\/\).*/{
20721             s//\1/
20722             q
20723           }
20724           s/.*/./; q'`
20725
20726 # CDPATH.
20727 $as_unset CDPATH
20728
20729
20730
20731   as_lineno_1=$LINENO
20732   as_lineno_2=$LINENO
20733   test "x$as_lineno_1" != "x$as_lineno_2" &&
20734   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20735
20736   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20737   # uniformly replaced by the line number.  The first 'sed' inserts a
20738   # line-number line after each line using $LINENO; the second 'sed'
20739   # does the real work.  The second script uses 'N' to pair each
20740   # line-number line with the line containing $LINENO, and appends
20741   # trailing '-' during substitution so that $LINENO is not a special
20742   # case at line end.
20743   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20744   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20745   # E. McMahon (1931-1989) for sed's syntax.  :-)
20746   sed -n '
20747     p
20748     /[$]LINENO/=
20749   ' <$as_myself |
20750     sed '
20751       s/[$]LINENO.*/&-/
20752       t lineno
20753       b
20754       :lineno
20755       N
20756       :loop
20757       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20758       t loop
20759       s/-\n.*//
20760     ' >$as_me.lineno &&
20761   chmod +x "$as_me.lineno" ||
20762     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20763    { (exit 1); exit 1; }; }
20764
20765   # Don't try to exec as it changes $[0], causing all sort of problems
20766   # (the dirname of $[0] is not the place where we might find the
20767   # original and so on.  Autoconf is especially sensitive to this).
20768   . "./$as_me.lineno"
20769   # Exit status is that of the last command.
20770   exit
20771 }
20772
20773
20774 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20775   as_dirname=dirname
20776 else
20777   as_dirname=false
20778 fi
20779
20780 ECHO_C= ECHO_N= ECHO_T=
20781 case `echo -n x` in
20782 -n*)
20783   case `echo 'x\c'` in
20784   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20785   *)   ECHO_C='\c';;
20786   esac;;
20787 *)
20788   ECHO_N='-n';;
20789 esac
20790
20791 if expr a : '\(a\)' >/dev/null 2>&1 &&
20792    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20793   as_expr=expr
20794 else
20795   as_expr=false
20796 fi
20797
20798 rm -f conf$$ conf$$.exe conf$$.file
20799 if test -d conf$$.dir; then
20800   rm -f conf$$.dir/conf$$.file
20801 else
20802   rm -f conf$$.dir
20803   mkdir conf$$.dir
20804 fi
20805 echo >conf$$.file
20806 if ln -s conf$$.file conf$$ 2>/dev/null; then
20807   as_ln_s='ln -s'
20808   # ... but there are two gotchas:
20809   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20810   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20811   # In both cases, we have to default to `cp -p'.
20812   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20813     as_ln_s='cp -p'
20814 elif ln conf$$.file conf$$ 2>/dev/null; then
20815   as_ln_s=ln
20816 else
20817   as_ln_s='cp -p'
20818 fi
20819 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20820 rmdir conf$$.dir 2>/dev/null
20821
20822 if mkdir -p . 2>/dev/null; then
20823   as_mkdir_p=:
20824 else
20825   test -d ./-p && rmdir ./-p
20826   as_mkdir_p=false
20827 fi
20828
20829 if test -x / >/dev/null 2>&1; then
20830   as_test_x='test -x'
20831 else
20832   if ls -dL / >/dev/null 2>&1; then
20833     as_ls_L_option=L
20834   else
20835     as_ls_L_option=
20836   fi
20837   as_test_x='
20838     eval sh -c '\''
20839       if test -d "$1"; then
20840         test -d "$1/.";
20841       else
20842         case $1 in
20843         -*)set "./$1";;
20844         esac;
20845         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20846         ???[sx]*):;;*)false;;esac;fi
20847     '\'' sh
20848   '
20849 fi
20850 as_executable_p=$as_test_x
20851
20852 # Sed expression to map a string onto a valid CPP name.
20853 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20854
20855 # Sed expression to map a string onto a valid variable name.
20856 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20857
20858
20859 exec 6>&1
20860
20861 # Save the log message, to keep $[0] and so on meaningful, and to
20862 # report actual input values of CONFIG_FILES etc. instead of their
20863 # values after options handling.
20864 ac_log="
20865 This file was extended by $as_me, which was
20866 generated by GNU Autoconf 2.61.  Invocation command line was
20867
20868   CONFIG_FILES    = $CONFIG_FILES
20869   CONFIG_HEADERS  = $CONFIG_HEADERS
20870   CONFIG_LINKS    = $CONFIG_LINKS
20871   CONFIG_COMMANDS = $CONFIG_COMMANDS
20872   $ $0 $@
20873
20874 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20875 "
20876
20877 _ACEOF
20878
20879 cat >>$CONFIG_STATUS <<_ACEOF
20880 # Files that config.status was made for.
20881 config_files="$ac_config_files"
20882 config_headers="$ac_config_headers"
20883 config_commands="$ac_config_commands"
20884
20885 _ACEOF
20886
20887 cat >>$CONFIG_STATUS <<\_ACEOF
20888 ac_cs_usage="\
20889 \`$as_me' instantiates files from templates according to the
20890 current configuration.
20891
20892 Usage: $0 [OPTIONS] [FILE]...
20893
20894   -h, --help       print this help, then exit
20895   -V, --version    print version number and configuration settings, then exit
20896   -q, --quiet      do not print progress messages
20897   -d, --debug      don't remove temporary files
20898       --recheck    update $as_me by reconfiguring in the same conditions
20899   --file=FILE[:TEMPLATE]
20900                    instantiate the configuration file FILE
20901   --header=FILE[:TEMPLATE]
20902                    instantiate the configuration header FILE
20903
20904 Configuration files:
20905 $config_files
20906
20907 Configuration headers:
20908 $config_headers
20909
20910 Configuration commands:
20911 $config_commands
20912
20913 Report bugs to <bug-autoconf@gnu.org>."
20914
20915 _ACEOF
20916 cat >>$CONFIG_STATUS <<_ACEOF
20917 ac_cs_version="\\
20918 config.status
20919 configured by $0, generated by GNU Autoconf 2.61,
20920   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20921
20922 Copyright (C) 2006 Free Software Foundation, Inc.
20923 This config.status script is free software; the Free Software Foundation
20924 gives unlimited permission to copy, distribute and modify it."
20925
20926 ac_pwd='$ac_pwd'
20927 srcdir='$srcdir'
20928 INSTALL='$INSTALL'
20929 _ACEOF
20930
20931 cat >>$CONFIG_STATUS <<\_ACEOF
20932 # If no file are specified by the user, then we need to provide default
20933 # value.  By we need to know if files were specified by the user.
20934 ac_need_defaults=:
20935 while test $# != 0
20936 do
20937   case $1 in
20938   --*=*)
20939     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20940     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20941     ac_shift=:
20942     ;;
20943   *)
20944     ac_option=$1
20945     ac_optarg=$2
20946     ac_shift=shift
20947     ;;
20948   esac
20949
20950   case $ac_option in
20951   # Handling of the options.
20952   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20953     ac_cs_recheck=: ;;
20954   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20955     echo "$ac_cs_version"; exit ;;
20956   --debug | --debu | --deb | --de | --d | -d )
20957     debug=: ;;
20958   --file | --fil | --fi | --f )
20959     $ac_shift
20960     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20961     ac_need_defaults=false;;
20962   --header | --heade | --head | --hea )
20963     $ac_shift
20964     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20965     ac_need_defaults=false;;
20966   --he | --h)
20967     # Conflict between --help and --header
20968     { echo "$as_me: error: ambiguous option: $1
20969 Try \`$0 --help' for more information." >&2
20970    { (exit 1); exit 1; }; };;
20971   --help | --hel | -h )
20972     echo "$ac_cs_usage"; exit ;;
20973   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20974   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20975     ac_cs_silent=: ;;
20976
20977   # This is an error.
20978   -*) { echo "$as_me: error: unrecognized option: $1
20979 Try \`$0 --help' for more information." >&2
20980    { (exit 1); exit 1; }; } ;;
20981
20982   *) ac_config_targets="$ac_config_targets $1"
20983      ac_need_defaults=false ;;
20984
20985   esac
20986   shift
20987 done
20988
20989 ac_configure_extra_args=
20990
20991 if $ac_cs_silent; then
20992   exec 6>/dev/null
20993   ac_configure_extra_args="$ac_configure_extra_args --silent"
20994 fi
20995
20996 _ACEOF
20997 cat >>$CONFIG_STATUS <<_ACEOF
20998 if \$ac_cs_recheck; then
20999   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21000   CONFIG_SHELL=$SHELL
21001   export CONFIG_SHELL
21002   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21003 fi
21004
21005 _ACEOF
21006 cat >>$CONFIG_STATUS <<\_ACEOF
21007 exec 5>>config.log
21008 {
21009   echo
21010   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21011 ## Running $as_me. ##
21012 _ASBOX
21013   echo "$ac_log"
21014 } >&5
21015
21016 _ACEOF
21017 cat >>$CONFIG_STATUS <<_ACEOF
21018 #
21019 # INIT-COMMANDS
21020 #
21021 INTLTOOL_PERL=${INTLTOOL_PERL}
21022
21023
21024 _ACEOF
21025
21026 cat >>$CONFIG_STATUS <<\_ACEOF
21027
21028 # Handling of arguments.
21029 for ac_config_target in $ac_config_targets
21030 do
21031   case $ac_config_target in
21032     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21033     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21034     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21035     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21036     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21037     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21038     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21039     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21040     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21041     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21042
21043   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21044 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21045    { (exit 1); exit 1; }; };;
21046   esac
21047 done
21048
21049
21050 # If the user did not use the arguments to specify the items to instantiate,
21051 # then the envvar interface is used.  Set only those that are not.
21052 # We use the long form for the default assignment because of an extremely
21053 # bizarre bug on SunOS 4.1.3.
21054 if $ac_need_defaults; then
21055   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21056   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21057   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21058 fi
21059
21060 # Have a temporary directory for convenience.  Make it in the build tree
21061 # simply because there is no reason against having it here, and in addition,
21062 # creating and moving files from /tmp can sometimes cause problems.
21063 # Hook for its removal unless debugging.
21064 # Note that there is a small window in which the directory will not be cleaned:
21065 # after its creation but before its name has been assigned to `$tmp'.
21066 $debug ||
21067 {
21068   tmp=
21069   trap 'exit_status=$?
21070   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21071 ' 0
21072   trap '{ (exit 1); exit 1; }' 1 2 13 15
21073 }
21074 # Create a (secure) tmp directory for tmp files.
21075
21076 {
21077   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21078   test -n "$tmp" && test -d "$tmp"
21079 }  ||
21080 {
21081   tmp=./conf$$-$RANDOM
21082   (umask 077 && mkdir "$tmp")
21083 } ||
21084 {
21085    echo "$me: cannot create a temporary directory in ." >&2
21086    { (exit 1); exit 1; }
21087 }
21088
21089 #
21090 # Set up the sed scripts for CONFIG_FILES section.
21091 #
21092
21093 # No need to generate the scripts if there are no CONFIG_FILES.
21094 # This happens for instance when ./config.status config.h
21095 if test -n "$CONFIG_FILES"; then
21096
21097 _ACEOF
21098
21099
21100
21101 ac_delim='%!_!# '
21102 for ac_last_try in false false false false false :; do
21103   cat >conf$$subs.sed <<_ACEOF
21104 SHELL!$SHELL$ac_delim
21105 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21106 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21107 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21108 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21109 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21110 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21111 exec_prefix!$exec_prefix$ac_delim
21112 prefix!$prefix$ac_delim
21113 program_transform_name!$program_transform_name$ac_delim
21114 bindir!$bindir$ac_delim
21115 sbindir!$sbindir$ac_delim
21116 libexecdir!$libexecdir$ac_delim
21117 datarootdir!$datarootdir$ac_delim
21118 datadir!$datadir$ac_delim
21119 sysconfdir!$sysconfdir$ac_delim
21120 sharedstatedir!$sharedstatedir$ac_delim
21121 localstatedir!$localstatedir$ac_delim
21122 includedir!$includedir$ac_delim
21123 oldincludedir!$oldincludedir$ac_delim
21124 docdir!$docdir$ac_delim
21125 infodir!$infodir$ac_delim
21126 htmldir!$htmldir$ac_delim
21127 dvidir!$dvidir$ac_delim
21128 pdfdir!$pdfdir$ac_delim
21129 psdir!$psdir$ac_delim
21130 libdir!$libdir$ac_delim
21131 localedir!$localedir$ac_delim
21132 mandir!$mandir$ac_delim
21133 DEFS!$DEFS$ac_delim
21134 ECHO_C!$ECHO_C$ac_delim
21135 ECHO_N!$ECHO_N$ac_delim
21136 ECHO_T!$ECHO_T$ac_delim
21137 LIBS!$LIBS$ac_delim
21138 build_alias!$build_alias$ac_delim
21139 host_alias!$host_alias$ac_delim
21140 target_alias!$target_alias$ac_delim
21141 build!$build$ac_delim
21142 build_cpu!$build_cpu$ac_delim
21143 build_vendor!$build_vendor$ac_delim
21144 build_os!$build_os$ac_delim
21145 host!$host$ac_delim
21146 host_cpu!$host_cpu$ac_delim
21147 host_vendor!$host_vendor$ac_delim
21148 host_os!$host_os$ac_delim
21149 CC!$CC$ac_delim
21150 CFLAGS!$CFLAGS$ac_delim
21151 LDFLAGS!$LDFLAGS$ac_delim
21152 CPPFLAGS!$CPPFLAGS$ac_delim
21153 ac_ct_CC!$ac_ct_CC$ac_delim
21154 EXEEXT!$EXEEXT$ac_delim
21155 OBJEXT!$OBJEXT$ac_delim
21156 CPP!$CPP$ac_delim
21157 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21158 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21159 INSTALL_DATA!$INSTALL_DATA$ac_delim
21160 SET_MAKE!$SET_MAKE$ac_delim
21161 GREP!$GREP$ac_delim
21162 EGREP!$EGREP$ac_delim
21163 PERL!$PERL$ac_delim
21164 XMKMF!$XMKMF$ac_delim
21165 X_CFLAGS!$X_CFLAGS$ac_delim
21166 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21167 X_LIBS!$X_LIBS$ac_delim
21168 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21169 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21170 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21171 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21172 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21173 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21174 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21175 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21176 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21177 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21178 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21179 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21180 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21181 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21182 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21183 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21184 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21185 RANLIB!$RANLIB$ac_delim
21186 ALLOCA!$ALLOCA$ac_delim
21187 USE_NLS!$USE_NLS$ac_delim
21188 MSGFMT!$MSGFMT$ac_delim
21189 GMSGFMT!$GMSGFMT$ac_delim
21190 XGETTEXT!$XGETTEXT$ac_delim
21191 CATALOGS!$CATALOGS$ac_delim
21192 CATOBJEXT!$CATOBJEXT$ac_delim
21193 DATADIRNAME!$DATADIRNAME$ac_delim
21194 GMOFILES!$GMOFILES$ac_delim
21195 INSTOBJEXT!$INSTOBJEXT$ac_delim
21196 INTLDEPS!$INTLDEPS$ac_delim
21197 INTLLIBS!$INTLLIBS$ac_delim
21198 INTLOBJS!$INTLOBJS$ac_delim
21199 POFILES!$POFILES$ac_delim
21200 POSUB!$POSUB$ac_delim
21201 _ACEOF
21202
21203   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21204     break
21205   elif $ac_last_try; then
21206     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21207 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21208    { (exit 1); exit 1; }; }
21209   else
21210     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21211   fi
21212 done
21213
21214 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21215 if test -n "$ac_eof"; then
21216   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21217   ac_eof=`expr $ac_eof + 1`
21218 fi
21219
21220 cat >>$CONFIG_STATUS <<_ACEOF
21221 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21222 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21223 _ACEOF
21224 sed '
21225 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21226 s/^/s,@/; s/!/@,|#_!!_#|/
21227 :n
21228 t n
21229 s/'"$ac_delim"'$/,g/; t
21230 s/$/\\/; p
21231 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21232 ' >>$CONFIG_STATUS <conf$$subs.sed
21233 rm -f conf$$subs.sed
21234 cat >>$CONFIG_STATUS <<_ACEOF
21235 CEOF$ac_eof
21236 _ACEOF
21237
21238
21239 ac_delim='%!_!# '
21240 for ac_last_try in false false false false false :; do
21241   cat >conf$$subs.sed <<_ACEOF
21242 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21243 login_manager_tmp!$login_manager_tmp$ac_delim
21244 pkg_config!$pkg_config$ac_delim
21245 gnome_open_program!$gnome_open_program$ac_delim
21246 gnome_url_show_program!$gnome_url_show_program$ac_delim
21247 INCLUDES!$INCLUDES$ac_delim
21248 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21249 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21250 SAVER_LIBS!$SAVER_LIBS$ac_delim
21251 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21252 GTK_LIBS!$GTK_LIBS$ac_delim
21253 XML_LIBS!$XML_LIBS$ac_delim
21254 JPEG_LIBS!$JPEG_LIBS$ac_delim
21255 HACK_LIBS!$HACK_LIBS$ac_delim
21256 XPM_LIBS!$XPM_LIBS$ac_delim
21257 PTY_LIBS!$PTY_LIBS$ac_delim
21258 GL_LIBS!$GL_LIBS$ac_delim
21259 GLE_LIBS!$GLE_LIBS$ac_delim
21260 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21261 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21262 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21263 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21264 SETUID_HACKS!$SETUID_HACKS$ac_delim
21265 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21266 NEED_SETUID!$NEED_SETUID$ac_delim
21267 INSTALL_PAM!$INSTALL_PAM$ac_delim
21268 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21269 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21270 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21271 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21272 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21273 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21274 WITH_BROWSER!$WITH_BROWSER$ac_delim
21275 OBJCC!$OBJCC$ac_delim
21276 EXES_OSX!$EXES_OSX$ac_delim
21277 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21278 MEN_OSX!$MEN_OSX$ac_delim
21279 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21280 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21281 XMU_SRCS!$XMU_SRCS$ac_delim
21282 XMU_OBJS!$XMU_OBJS$ac_delim
21283 XMU_LIBS!$XMU_LIBS$ac_delim
21284 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21285 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21286 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21287 LOCK_SRCS!$LOCK_SRCS$ac_delim
21288 LOCK_OBJS!$LOCK_OBJS$ac_delim
21289 JPEG_EXES!$JPEG_EXES$ac_delim
21290 GL_EXES!$GL_EXES$ac_delim
21291 RETIRED_GL_EXES!$RETIRED_GL_EXES$ac_delim
21292 SUID_EXES!$SUID_EXES$ac_delim
21293 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21294 GL_MEN!$GL_MEN$ac_delim
21295 GL_KLUDGE!$GL_KLUDGE$ac_delim
21296 GLE_EXES!$GLE_EXES$ac_delim
21297 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21298 GNOME24!$GNOME24$ac_delim
21299 GNOME22!$GNOME22$ac_delim
21300 NOGNOME!$NOGNOME$ac_delim
21301 HACKDIR!$HACKDIR$ac_delim
21302 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21303 GTK_DATADIR!$GTK_DATADIR$ac_delim
21304 PO_DATADIR!$PO_DATADIR$ac_delim
21305 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21306 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21307 APPDEFAULTS!$APPDEFAULTS$ac_delim
21308 DEPEND!$DEPEND$ac_delim
21309 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21310 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21311 LIBOBJS!$LIBOBJS$ac_delim
21312 LTLIBOBJS!$LTLIBOBJS$ac_delim
21313 _ACEOF
21314
21315   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
21316     break
21317   elif $ac_last_try; then
21318     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21319 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21320    { (exit 1); exit 1; }; }
21321   else
21322     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21323   fi
21324 done
21325
21326 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21327 if test -n "$ac_eof"; then
21328   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21329   ac_eof=`expr $ac_eof + 1`
21330 fi
21331
21332 cat >>$CONFIG_STATUS <<_ACEOF
21333 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21334 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21335 _ACEOF
21336 sed '
21337 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21338 s/^/s,@/; s/!/@,|#_!!_#|/
21339 :n
21340 t n
21341 s/'"$ac_delim"'$/,g/; t
21342 s/$/\\/; p
21343 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21344 ' >>$CONFIG_STATUS <conf$$subs.sed
21345 rm -f conf$$subs.sed
21346 cat >>$CONFIG_STATUS <<_ACEOF
21347 :end
21348 s/|#_!!_#|//g
21349 CEOF$ac_eof
21350 _ACEOF
21351
21352
21353 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21354 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21355 # trailing colons and then remove the whole line if VPATH becomes empty
21356 # (actually we leave an empty line to preserve line numbers).
21357 if test "x$srcdir" = x.; then
21358   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21359 s/:*\$(srcdir):*/:/
21360 s/:*\${srcdir}:*/:/
21361 s/:*@srcdir@:*/:/
21362 s/^\([^=]*=[     ]*\):*/\1/
21363 s/:*$//
21364 s/^[^=]*=[       ]*$//
21365 }'
21366 fi
21367
21368 cat >>$CONFIG_STATUS <<\_ACEOF
21369 fi # test -n "$CONFIG_FILES"
21370
21371
21372 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21373 do
21374   case $ac_tag in
21375   :[FHLC]) ac_mode=$ac_tag; continue;;
21376   esac
21377   case $ac_mode$ac_tag in
21378   :[FHL]*:*);;
21379   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21380 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21381    { (exit 1); exit 1; }; };;
21382   :[FH]-) ac_tag=-:-;;
21383   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21384   esac
21385   ac_save_IFS=$IFS
21386   IFS=:
21387   set x $ac_tag
21388   IFS=$ac_save_IFS
21389   shift
21390   ac_file=$1
21391   shift
21392
21393   case $ac_mode in
21394   :L) ac_source=$1;;
21395   :[FH])
21396     ac_file_inputs=
21397     for ac_f
21398     do
21399       case $ac_f in
21400       -) ac_f="$tmp/stdin";;
21401       *) # Look for the file first in the build tree, then in the source tree
21402          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21403          # because $ac_f cannot contain `:'.
21404          test -f "$ac_f" ||
21405            case $ac_f in
21406            [\\/$]*) false;;
21407            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21408            esac ||
21409            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21410 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21411    { (exit 1); exit 1; }; };;
21412       esac
21413       ac_file_inputs="$ac_file_inputs $ac_f"
21414     done
21415
21416     # Let's still pretend it is `configure' which instantiates (i.e., don't
21417     # use $as_me), people would be surprised to read:
21418     #    /* config.h.  Generated by config.status.  */
21419     configure_input="Generated from "`IFS=:
21420           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21421     if test x"$ac_file" != x-; then
21422       configure_input="$ac_file.  $configure_input"
21423       { echo "$as_me:$LINENO: creating $ac_file" >&5
21424 echo "$as_me: creating $ac_file" >&6;}
21425     fi
21426
21427     case $ac_tag in
21428     *:-:* | *:-) cat >"$tmp/stdin";;
21429     esac
21430     ;;
21431   esac
21432
21433   ac_dir=`$as_dirname -- "$ac_file" ||
21434 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21435          X"$ac_file" : 'X\(//\)[^/]' \| \
21436          X"$ac_file" : 'X\(//\)$' \| \
21437          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21438 echo X"$ac_file" |
21439     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21440             s//\1/
21441             q
21442           }
21443           /^X\(\/\/\)[^/].*/{
21444             s//\1/
21445             q
21446           }
21447           /^X\(\/\/\)$/{
21448             s//\1/
21449             q
21450           }
21451           /^X\(\/\).*/{
21452             s//\1/
21453             q
21454           }
21455           s/.*/./; q'`
21456   { as_dir="$ac_dir"
21457   case $as_dir in #(
21458   -*) as_dir=./$as_dir;;
21459   esac
21460   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21461     as_dirs=
21462     while :; do
21463       case $as_dir in #(
21464       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21465       *) as_qdir=$as_dir;;
21466       esac
21467       as_dirs="'$as_qdir' $as_dirs"
21468       as_dir=`$as_dirname -- "$as_dir" ||
21469 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21470          X"$as_dir" : 'X\(//\)[^/]' \| \
21471          X"$as_dir" : 'X\(//\)$' \| \
21472          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21473 echo X"$as_dir" |
21474     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21475             s//\1/
21476             q
21477           }
21478           /^X\(\/\/\)[^/].*/{
21479             s//\1/
21480             q
21481           }
21482           /^X\(\/\/\)$/{
21483             s//\1/
21484             q
21485           }
21486           /^X\(\/\).*/{
21487             s//\1/
21488             q
21489           }
21490           s/.*/./; q'`
21491       test -d "$as_dir" && break
21492     done
21493     test -z "$as_dirs" || eval "mkdir $as_dirs"
21494   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21495 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21496    { (exit 1); exit 1; }; }; }
21497   ac_builddir=.
21498
21499 case "$ac_dir" in
21500 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21501 *)
21502   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21503   # A ".." for each directory in $ac_dir_suffix.
21504   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21505   case $ac_top_builddir_sub in
21506   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21507   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21508   esac ;;
21509 esac
21510 ac_abs_top_builddir=$ac_pwd
21511 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21512 # for backward compatibility:
21513 ac_top_builddir=$ac_top_build_prefix
21514
21515 case $srcdir in
21516   .)  # We are building in place.
21517     ac_srcdir=.
21518     ac_top_srcdir=$ac_top_builddir_sub
21519     ac_abs_top_srcdir=$ac_pwd ;;
21520   [\\/]* | ?:[\\/]* )  # Absolute name.
21521     ac_srcdir=$srcdir$ac_dir_suffix;
21522     ac_top_srcdir=$srcdir
21523     ac_abs_top_srcdir=$srcdir ;;
21524   *) # Relative name.
21525     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21526     ac_top_srcdir=$ac_top_build_prefix$srcdir
21527     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21528 esac
21529 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21530
21531
21532   case $ac_mode in
21533   :F)
21534   #
21535   # CONFIG_FILE
21536   #
21537
21538   case $INSTALL in
21539   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21540   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21541   esac
21542 _ACEOF
21543
21544 cat >>$CONFIG_STATUS <<\_ACEOF
21545 # If the template does not know about datarootdir, expand it.
21546 # FIXME: This hack should be removed a few years after 2.60.
21547 ac_datarootdir_hack=; ac_datarootdir_seen=
21548
21549 case `sed -n '/datarootdir/ {
21550   p
21551   q
21552 }
21553 /@datadir@/p
21554 /@docdir@/p
21555 /@infodir@/p
21556 /@localedir@/p
21557 /@mandir@/p
21558 ' $ac_file_inputs` in
21559 *datarootdir*) ac_datarootdir_seen=yes;;
21560 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21561   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21562 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21563 _ACEOF
21564 cat >>$CONFIG_STATUS <<_ACEOF
21565   ac_datarootdir_hack='
21566   s&@datadir@&$datadir&g
21567   s&@docdir@&$docdir&g
21568   s&@infodir@&$infodir&g
21569   s&@localedir@&$localedir&g
21570   s&@mandir@&$mandir&g
21571     s&\\\${datarootdir}&$datarootdir&g' ;;
21572 esac
21573 _ACEOF
21574
21575 # Neutralize VPATH when `$srcdir' = `.'.
21576 # Shell code in configure.ac might set extrasub.
21577 # FIXME: do we really want to maintain this feature?
21578 cat >>$CONFIG_STATUS <<_ACEOF
21579   sed "$ac_vpsub
21580 $extrasub
21581 _ACEOF
21582 cat >>$CONFIG_STATUS <<\_ACEOF
21583 :t
21584 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21585 s&@configure_input@&$configure_input&;t t
21586 s&@top_builddir@&$ac_top_builddir_sub&;t t
21587 s&@srcdir@&$ac_srcdir&;t t
21588 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21589 s&@top_srcdir@&$ac_top_srcdir&;t t
21590 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21591 s&@builddir@&$ac_builddir&;t t
21592 s&@abs_builddir@&$ac_abs_builddir&;t t
21593 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21594 s&@INSTALL@&$ac_INSTALL&;t t
21595 $ac_datarootdir_hack
21596 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21597
21598 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21599   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21600   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21601   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21602 which seems to be undefined.  Please make sure it is defined." >&5
21603 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21604 which seems to be undefined.  Please make sure it is defined." >&2;}
21605
21606   rm -f "$tmp/stdin"
21607   case $ac_file in
21608   -) cat "$tmp/out"; rm -f "$tmp/out";;
21609   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21610   esac
21611  ;;
21612   :H)
21613   #
21614   # CONFIG_HEADER
21615   #
21616 _ACEOF
21617
21618 # Transform confdefs.h into a sed script `conftest.defines', that
21619 # substitutes the proper values into config.h.in to produce config.h.
21620 rm -rf conftest.defines conftest.tail
21621 # First, append a space to every undef/define line, to ease matching.
21622 echo 's/$/ /' >conftest.defines
21623 # Then, protect against being on the right side of a sed subst, or in
21624 # an unquoted here document, in config.status.  If some macros were
21625 # called several times there might be several #defines for the same
21626 # symbol, which is useless.  But do not sort them, since the last
21627 # AC_DEFINE must be honored.
21628 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21629 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21630 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21631 # PARAMS is the parameter list in the macro definition--in most cases, it's
21632 # just an empty string.
21633 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21634 ac_dB='\\)[      (].*,\\1define\\2'
21635 ac_dC=' '
21636 ac_dD=' ,'
21637
21638 uniq confdefs.h |
21639   sed -n '
21640         t rset
21641         :rset
21642         s/^[     ]*#[    ]*define[       ][      ]*//
21643         t ok
21644         d
21645         :ok
21646         s/[\\&,]/\\&/g
21647         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21648         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21649   ' >>conftest.defines
21650
21651 # Remove the space that was appended to ease matching.
21652 # Then replace #undef with comments.  This is necessary, for
21653 # example, in the case of _POSIX_SOURCE, which is predefined and required
21654 # on some systems where configure will not decide to define it.
21655 # (The regexp can be short, since the line contains either #define or #undef.)
21656 echo 's/ $//
21657 s,^[     #]*u.*,/* & */,' >>conftest.defines
21658
21659 # Break up conftest.defines:
21660 ac_max_sed_lines=50
21661
21662 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21663 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21664 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21665 # et cetera.
21666 ac_in='$ac_file_inputs'
21667 ac_out='"$tmp/out1"'
21668 ac_nxt='"$tmp/out2"'
21669
21670 while :
21671 do
21672   # Write a here document:
21673     cat >>$CONFIG_STATUS <<_ACEOF
21674     # First, check the format of the line:
21675     cat >"\$tmp/defines.sed" <<\\CEOF
21676 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21677 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21678 b
21679 :def
21680 _ACEOF
21681   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21682   echo 'CEOF
21683     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21684   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21685   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21686   grep . conftest.tail >/dev/null || break
21687   rm -rf conftest.defines
21688   mv conftest.tail conftest.defines
21689 done
21690 rm -rf conftest.defines conftest.tail
21691
21692 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21693 cat >>$CONFIG_STATUS <<\_ACEOF
21694   if test x"$ac_file" != x-; then
21695     echo "/* $configure_input  */" >"$tmp/config.h"
21696     cat "$ac_result" >>"$tmp/config.h"
21697     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21698       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21699 echo "$as_me: $ac_file is unchanged" >&6;}
21700     else
21701       rm -f $ac_file
21702       mv "$tmp/config.h" $ac_file
21703     fi
21704   else
21705     echo "/* $configure_input  */"
21706     cat "$ac_result"
21707   fi
21708   rm -f "$tmp/out12"
21709  ;;
21710
21711   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21712 echo "$as_me: executing $ac_file commands" >&6;}
21713  ;;
21714   esac
21715
21716
21717   case $ac_file$ac_mode in
21718     "default-1":C)
21719
21720 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21721 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21722   rm -f intltool-extract.out
21723 else
21724   mv -f intltool-extract.out intltool-extract
21725 fi
21726 chmod ugo+x intltool-extract
21727 chmod u+w intltool-extract
21728
21729 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21730 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21731   rm -f intltool-merge.out
21732 else
21733   mv -f intltool-merge.out intltool-merge
21734 fi
21735 chmod ugo+x intltool-merge
21736 chmod u+w intltool-merge
21737
21738 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21739 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21740   rm -f intltool-update.out
21741 else
21742   mv -f intltool-update.out intltool-update
21743 fi
21744 chmod ugo+x intltool-update
21745 chmod u+w intltool-update
21746
21747  ;;
21748     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21749         rm -f po/stamp-it po/stamp-it.tmp
21750         > po/stamp-it.tmp
21751         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21752         mv po/stamp-it.tmp po/stamp-it
21753       esac ;;
21754
21755   esac
21756 done # for ac_tag
21757
21758
21759 { (exit 0); exit 0; }
21760 _ACEOF
21761 chmod +x $CONFIG_STATUS
21762 ac_clean_files=$ac_clean_files_save
21763
21764
21765 # configure is writing to config.log, and then calls config.status.
21766 # config.status does its own redirection, appending to config.log.
21767 # Unfortunately, on DOS this fails, as config.log is still kept open
21768 # by configure, so config.status won't be able to write to it; its
21769 # output is simply discarded.  So we exec the FD to /dev/null,
21770 # effectively closing config.log, so it can be properly (re)opened and
21771 # appended to by config.status.  When coming back to configure, we
21772 # need to make the FD available again.
21773 if test "$no_create" != yes; then
21774   ac_cs_success=:
21775   ac_config_status_args=
21776   test "$silent" = yes &&
21777     ac_config_status_args="$ac_config_status_args --quiet"
21778   exec 5>/dev/null
21779   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21780   exec 5>>config.log
21781   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21782   # would make configure fail if this is the last instruction.
21783   $ac_cs_success || { (exit 1); exit 1; }
21784 fi
21785
21786
21787 ###############################################################################
21788 #
21789 #       Print some warnings at the end.
21790 #
21791 ###############################################################################
21792
21793 warn_prefix_1="    Warning:"
21794 warn_prefix_2="       Note:"
21795 warn_prefix="$warn_prefix_1"
21796
21797 warning=no
21798 warnsep='    #################################################################'
21799
21800 warnpre() {
21801   if test "$warning" = no ; then
21802     echo '' ; echo "$warnsep" ; echo ''
21803     warning=yes
21804   fi
21805 }
21806
21807 warn() {
21808   warnpre
21809   if test "$warning" = long ; then echo '' ; fi
21810   warning=yes
21811   rest="$@"
21812   echo "$warn_prefix $rest"
21813 }
21814
21815 warnL() {
21816   was=$warning
21817   warnpre
21818   warning=yes
21819   if test "$was" != no ; then echo '' ; fi
21820   rest="$@"
21821   echo "$warn_prefix $rest"
21822 }
21823
21824 warn2() {
21825   rest="$@"
21826   echo "             $rest"
21827   warning=long
21828 }
21829
21830 note() {
21831   warn_prefix="$warn_prefix_2"
21832   warn $@
21833   warn_prefix="$warn_prefix_1"
21834 }
21835
21836 noteL() {
21837   warn_prefix="$warn_prefix_2"
21838   warnL $@
21839   warn_prefix="$warn_prefix_1"
21840 }
21841
21842
21843 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21844   warn 'The SGI saver extension was requested, but was not found.'
21845 fi
21846
21847 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21848   warn 'The XIdle extension was requested, but was not found.'
21849 fi
21850
21851 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21852   warn 'The XSHM extension was requested, but was not found.'
21853 fi
21854
21855 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21856   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21857 fi
21858
21859 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21860   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21861 fi
21862
21863 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21864   warn 'The DPMS extension was requested, but was not found.'
21865 fi
21866
21867 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21868   warn 'The Xinerama extension was requested, but was not found.'
21869 fi
21870
21871 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21872   warn 'The XF86VMODE extension was requested, but was not found.'
21873 fi
21874
21875 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21876   warn 'The RANDR extension was requested, but was not found.'
21877 fi
21878
21879 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21880   warn "Checking of /proc/interrupts was requested, but it's bogus."
21881 fi
21882
21883 if test "$pkg_config" = false ; then
21884   warnL 'The "pkg-config" program was not found.  Without that,'
21885   warn2 "detection of the various GTK libraries won't work."
21886 else
21887   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21888   if test "x$pkgerr" != "x" ; then
21889     warnL 'The "pkg-config" program produces errors.  This often causes'
21890     warn2 "detection of the various GTK libraries to malfunction."
21891     warn2 "The errors are:"
21892     echo ''
21893     echo "$pkgerr" | sed 's/^/             > /g'
21894   fi
21895 fi
21896
21897 if test "$gtk_halfassed" != no ; then
21898   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21899   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21900   warn2 "Perhaps some of the development packages are not installed?"
21901   if test "$have_gtk" = yes ; then
21902     v="$ac_gtk_version_string"
21903     warn2 "GTK $v is also installed, so it will be used instead."
21904     warn2 "Please read the above output and the \`config.log' file"
21905     warn2 "for more details."
21906   fi
21907 fi
21908
21909 motif_warn2() {
21910   warn2 'Though the Motif front-end to xscreensaver is still'
21911   warn2 'maintained, it is no longer being updated with new'
21912   warn2 'features: all new development on the xscreensaver-demo'
21913   warn2 'program is happening in the GTK version, and not in the'
21914   warn2 'Motif version.  It is recommended that you build against'
21915   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21916 }
21917
21918 if test "$have_motif" = no -a "$have_gtk" = no; then
21919
21920   if test "$with_motif" = yes; then
21921     warnL "Neither the GTK nor Motif libraries were found; the"
21922     warn2 "\`xscreensaver-demo' program requires one of these."
21923     echo ''
21924     motif_warn2
21925   else
21926     warnL "The GTK libraries do not seem to be available; the"
21927     warn2 "\`xscreensaver-demo' program requires them."
21928 #   echo ''
21929 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21930 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21931 #   motif_warn2
21932   fi
21933
21934 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21935   warnL "Use of Motif was requested, but it wasn't found;"
21936   warn2 "Gtk will be used instead."
21937
21938 elif test "$jurassic_gtk" = yes ; then
21939
21940   pref_gtk=2.0
21941
21942   v="$ac_gtk_version_string"
21943   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21944     warnL "Use of Gtk was requested, but its version number is unknown;"
21945   elif test "$with_gtk_req" = yes ; then
21946     warnL "Use of Gtk was requested, but it is version $v;"
21947   else
21948     warnL "Gtk was found on this system, but it is version $v;"
21949   fi
21950
21951   warn2 "Gtk $pref_gtk or newer is required."
21952
21953 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21954   warnL "Use of Gtk was requested, but it wasn't found."
21955 fi
21956
21957
21958 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21959   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21960   warn2 "headers were not found.  That can't be good.  Please"
21961   warn2 "install the GDK-Pixbuf development kit and re-configure."
21962 fi
21963
21964 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21965
21966   preferred_lesstif=0.92
21967
21968   if test "$lesstif_version" = unknown; then
21969     warnL "Unable to determine the LessTif version number!"
21970     warn2 "Make sure you are using version $preferred_lesstif or newer."
21971     warn2 "See <http://www.lesstif.org/>."
21972
21973   elif test \! $lesstif_version -gt 82; then
21974     warnL "LessTif version $lesstif_version_string is being used."
21975     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21976     warn2 "use with XScreenSaver; it is strongly recommended"
21977     warn2 "that you upgrade to at least version $preferred_lesstif!"
21978     warn2 "See <http://www.lesstif.org/>."
21979   fi
21980 fi
21981
21982
21983 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21984   warn  'Motif is being used, and GTK is not.'
21985   echo  ''
21986   motif_warn2
21987 fi
21988
21989
21990 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21991   warnL 'Use of XPM was requested, but it was not found.'
21992 fi
21993
21994 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21995   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21996 fi
21997
21998 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21999    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22000
22001   if test "$with_gdk_pixbuf_req" = yes ; then
22002     true
22003   elif test "$with_gdk_pixbuf_req" = no ; then
22004     warnL 'The GDK-Pixbuf library is not being used.'
22005   else
22006     warnL 'The GDK-Pixbuf library was not found.'
22007   fi
22008
22009   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22010     true
22011   elif test "$with_xpm_req" = no ; then
22012     warnL 'The XPM library is not being used.'
22013   else
22014     warnL 'The XPM library was not found.'
22015   fi
22016
22017   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22018     warn2 'The XPM library is being used instead.'
22019   fi
22020
22021   if test "$gdk_pixbuf_halfassed" = yes ; then
22022     echo ''
22023     warn2 'More specifically, we found the headers, but not the'
22024     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22025     warn2 "system, or something else went wrong.  The \`config.log'"
22026     warn2 'file might contain some clues.'
22027   fi
22028
22029   echo ''
22030   warn2 'Some of the demos will not use images as much as they could.'
22031   warn2 'You should consider installing GDK-Pixbuf and re-running'
22032   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22033   warn2 'provides support for more image formats.)'
22034 fi
22035
22036
22037 if test "$have_jpeg" = no ; then
22038   if test "$with_jpeg_req" = yes ; then
22039     warnL 'Use of libjpeg was requested, but it was not found.'
22040   elif test "$with_jpeg_req" = no ; then
22041     noteL 'The JPEG library is not being used.'
22042   else
22043     noteL 'The JPEG library was not found.'
22044   fi
22045
22046   if test "$jpeg_halfassed" = yes ; then
22047     echo ''
22048     warn2 'More specifically, we found the headers, but not the'
22049     warn2 'library; so either JPEG is half-installed on this'
22050     warn2 "system, or something else went wrong.  The \`config.log'"
22051     warn2 'file might contain some clues.'
22052     echo ''
22053   fi
22054
22055   if test "$have_gdk_pixbuf" = no ; then
22056     warn2 "This means that it won't be possible for the image-manipulating"
22057     warn2 "display modes to load files from disk; and it also means that"
22058     warn2 "the \`webcollage' program will be much slower."
22059   else
22060     warn2 "This means the \`webcollage' program will be much slower."
22061   fi
22062 fi
22063
22064
22065 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22066   preferred_mesagl=3.4
22067   mgv="$ac_mesagl_version_string"
22068   pgl="$preferred_mesagl"
22069
22070   if test "$ac_mesagl_version" = unknown; then
22071     true
22072     # warnL "Unable to determine the MesaGL version number!"
22073     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22074
22075   elif test \! "$ac_mesagl_version" -gt 2006; then
22076     warnL "MesaGL version number is $mgv --"
22077     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22078     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22079
22080   elif test \! "$ac_mesagl_version" -gt 3003; then
22081     warnL "MesaGL version number is $mgv --"
22082     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22083     warn2 "that you upgrade to $pgl or newer."
22084   fi
22085 fi
22086
22087 if test "$have_gl" = no ; then
22088   if test "$with_gl_req" = yes ; then
22089     warnL 'Use of GL was requested, but it was not found.'
22090   elif test "$with_gl_req" = no ; then
22091     noteL 'The OpenGL 3D library is not being used.'
22092   else
22093     noteL 'The OpenGL 3D library was not found.'
22094   fi
22095
22096   if test "$gl_halfassed" = yes ; then
22097     echo ''
22098     warn2 'More specifically, we found the headers, but not the'
22099     warn2 'libraries; so either GL is half-installed on this'
22100     warn2 "system, or something else went wrong.  The \`config.log'"
22101     warn2 'file might contain some clues.'
22102   fi
22103
22104   echo ''
22105   warn2 'Those demos which use 3D will not be built or installed.'
22106   warn2 'You might want to consider installing OpenGL and'
22107   warn2 "re-running configure.  If your vendor doesn't ship"
22108   warn2 'their own implementation of OpenGL, you can get a free'
22109   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22110   warn2 'info, see <http://www.opengl.org/>.'
22111
22112 fi
22113
22114
22115 if test "$have_gl" = yes -a "$have_gle" = no ; then
22116
22117  # nobody cares about this; don't print the warning unless it was
22118  # requested and not found, or halfway-found.
22119  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22120
22121   if test "$with_gle_req" = yes ; then
22122     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22123     warn2 'it was not found (though the OpenGL library was found, and'
22124     warn2 'is being used.)'
22125   elif test "$with_gle_req" = no ; then
22126     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22127     warn2 'library is not.'
22128   else
22129     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22130     warn2 'was not.'
22131   fi
22132
22133   if test "$gle_halfassed" = yes ; then
22134     echo ''
22135     warn2 'More specifically, we found the headers, but not the'
22136     warn2 'libraries; so either GLE is half-installed on this'
22137     warn2 "system, or something else went wrong.  The \`config.log'"
22138     warn2 'file might contain some clues.'
22139   fi
22140
22141   echo ''
22142   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22143   warn2 'will not be built or installed.  You might want to consider'
22144   warn2 'installing GLE and re-running configure.  You can find the'
22145   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22146   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22147
22148  fi
22149 fi
22150
22151
22152 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22153   warn 'Use of XReadDisplay was requested, but it was not found.'
22154 fi
22155
22156 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22157   warn 'Use of Kerberos was requested, but it was not found.'
22158 fi
22159
22160 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22161   warn 'Use of PAM was requested, but it was not found.'
22162 fi
22163
22164 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22165   warn 'Use of shadow passwords was requested, but they were not found.'
22166 fi
22167
22168 if test "$ac_macosx" = yes ; then
22169   if test "$enable_locking" = yes ; then
22170     warn  "You have specified --enable-locking on MacOS X."
22171     warn2 "THIS DOES NOT WORK!  Don't do this!"
22172   fi
22173 fi
22174
22175
22176 # You are in a twisty maze of namespaces and syntaxes, all alike.
22177 # Fuck the skull of Unix.
22178 #
22179 bindir=`eval eval eval eval eval eval eval echo $bindir`
22180 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22181 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22182
22183 # canonicalize slashes.
22184 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22185 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22186 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22187
22188
22189 # Sanity check the hackdir
22190 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22191   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22192     echo ""
22193     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22194                    There will be an executable installed with that name, so
22195                    that can't be the name of a directory as well.  Please
22196                    re-configure with a different directory name." >&5
22197 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22198                    There will be an executable installed with that name, so
22199                    that can't be the name of a directory as well.  Please
22200                    re-configure with a different directory name." >&2;}
22201    { (exit 1); exit 1; }; }
22202   fi
22203 done
22204
22205
22206 do_dir_warning=no
22207
22208 # Now let's warn if there's a previous RPM version already installed.
22209 # But don't bother with this test if we are currently *building* an RPM.
22210
22211 if test -z "$RPM_PACKAGE_VERSION" ; then
22212
22213   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22214
22215   # M4 sucks!!
22216
22217   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22218         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22219         head -1`
22220
22221
22222   if test \! -z "$rpmv" ; then
22223     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22224     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22225
22226     warning=no
22227     warnL "There is already an installed RPM of xscreensaver $rpmv"
22228     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22229     warn2 'before running "make install" in this directory.'
22230     echo ""
22231     warn2 "Alternately, you could build this version of xscreensaver"
22232     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22233     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22234     warn2 "See the RPM documentation for more info."
22235     echo ""
22236
22237     if test "$rpmbdir" = "$rpmhdir" ; then
22238       warn2 "The RPM version was installed in $rpmbdir/."
22239       do_dir_warning=yes
22240     else
22241       warn2 "The RPM version was installed in $rpmbdir/,"
22242       warn2 "with demos in $rpmhdir/."
22243     fi
22244   fi
22245 fi
22246
22247 # Also warn if there's a Debian package installed.
22248 #
22249 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22250 debv=''
22251 for dpkg in $debnames ; do
22252   if test -z "$debv"; then
22253     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22254   fi
22255 done
22256
22257 if test \! -z "$debv" ; then
22258   debbdir=`dpkg -L $debnames 2>/dev/null | \
22259             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22260   debhdir=`dpkg -L $debnames 2>/dev/null | \
22261             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22262   if test -z "$debbdir" ; then debbdir='???'; fi
22263   if test -z "$debhdir" ; then debhdir='???'; fi
22264
22265   warning=no
22266   warnL "There is already an installed dpkg of xscreensaver"
22267   warn2 "version \"$debv\" on this system."
22268   echo ""
22269   warn2 "The dpkg was installed in $debbdir,"
22270   warn2 "with demos in $debhdir."
22271 fi
22272
22273
22274 if test "${bindir}" = "${HACKDIR}" ; then
22275   do_dir_warning=yes
22276 fi
22277
22278 if test "$do_dir_warning" = yes; then
22279   echo ""
22280   echo "$warnsep"
22281   echo ""
22282   echo '      When you run "make install", the "xscreensaver",'
22283   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22284   echo "      will be installed in ${bindir}/."
22285   echo ""
22286   echo "      The various graphics demos (190+ different executables) will"
22287   echo "      be installed in ${HACKDIR}/."
22288   echo ""
22289   echo "      If you would prefer the demos to be installed elsewhere,"
22290   echo "      you should re-run configure with the --with-hackdir=DIR"
22291   echo "      option.  For more information, run \`./configure --help'."
22292   warning=yes
22293 fi
22294
22295 if test "$warning" != no; then
22296   echo '' ; echo "$warnsep" ; echo ''
22297 fi
22298
22299 if test "$do_dir_warning" = no; then
22300   if test "$warning" = no; then
22301     echo ''
22302   fi
22303   echo "User programs will be installed in ${bindir}/"
22304   echo "Screen savers will be installed in ${HACKDIR}/"
22305   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22306   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22307   echo ''
22308 fi