http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.06.tar.gz
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME=
574 PACKAGE_TARNAME=
575 PACKAGE_VERSION=
576 PACKAGE_STRING=
577 PACKAGE_BUGREPORT=
578
579 ac_unique_file="driver/subprocs.c"
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 #  include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 #  include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 build
654 build_cpu
655 build_vendor
656 build_os
657 host
658 host_cpu
659 host_vendor
660 host_os
661 CC
662 CFLAGS
663 LDFLAGS
664 CPPFLAGS
665 ac_ct_CC
666 EXEEXT
667 OBJEXT
668 CPP
669 INSTALL_PROGRAM
670 INSTALL_SCRIPT
671 INSTALL_DATA
672 SET_MAKE
673 GREP
674 EGREP
675 PERL
676 XMKMF
677 X_CFLAGS
678 X_PRE_LIBS
679 X_LIBS
680 X_EXTRA_LIBS
681 INTLTOOL_DESKTOP_RULE
682 INTLTOOL_DIRECTORY_RULE
683 INTLTOOL_KEYS_RULE
684 INTLTOOL_OAF_RULE
685 INTLTOOL_PONG_RULE
686 INTLTOOL_SERVER_RULE
687 INTLTOOL_SHEET_RULE
688 INTLTOOL_SOUNDLIST_RULE
689 INTLTOOL_UI_RULE
690 INTLTOOL_XML_RULE
691 INTLTOOL_CAVES_RULE
692 INTLTOOL_EXTRACT
693 INTLTOOL_MERGE
694 INTLTOOL_UPDATE
695 INTLTOOL_PERL
696 GETTEXT_PACKAGE
697 RANLIB
698 ALLOCA
699 USE_NLS
700 MSGFMT
701 GMSGFMT
702 XGETTEXT
703 CATALOGS
704 CATOBJEXT
705 DATADIRNAME
706 GMOFILES
707 INSTOBJEXT
708 INTLDEPS
709 INTLLIBS
710 INTLOBJS
711 POFILES
712 POSUB
713 MKINSTALLDIRS
714 login_manager_tmp
715 pkg_config
716 gnome_open_program
717 gnome_url_show_program
718 INCLUDES
719 PREFERRED_DEMO_PROGRAM
720 ALL_DEMO_PROGRAMS
721 SAVER_LIBS
722 MOTIF_LIBS
723 GTK_LIBS
724 XML_LIBS
725 JPEG_LIBS
726 HACK_LIBS
727 XPM_LIBS
728 PTY_LIBS
729 GL_LIBS
730 GLE_LIBS
731 XDPMS_LIBS
732 XINERAMA_LIBS
733 PASSWD_LIBS
734 INSTALL_SETUID
735 SETUID_HACKS
736 INSTALL_DIRS
737 NEED_SETUID
738 INSTALL_PAM
739 HAVE_PAM_FAIL_DELAY
740 NEW_LOGIN_COMMAND
741 NEW_LOGIN_COMMAND_P
742 DEFAULT_IMAGES_P
743 DEFAULT_IMAGE_DIRECTORY
744 DEFAULT_TEXT_FILE
745 WITH_BROWSER
746 OBJCC
747 EXES_OSX
748 SCRIPTS_OSX
749 MEN_OSX
750 PASSWD_SRCS
751 PASSWD_OBJS
752 XMU_SRCS
753 XMU_OBJS
754 XMU_LIBS
755 SAVER_GL_SRCS
756 SAVER_GL_OBJS
757 SAVER_GL_LIBS
758 LOCK_SRCS
759 LOCK_OBJS
760 JPEG_EXES
761 GL_EXES
762 GL_UTIL_EXES
763 GL_MEN
764 GL_KLUDGE
765 GLE_EXES
766 GLE_KLUDGE
767 GNOME24
768 GNOME22
769 NOGNOME
770 HACKDIR
771 HACKDIR_FULL
772 GTK_DATADIR
773 PO_DATADIR
774 HACK_CONF_DIR
775 GTK_EXTRA_OBJS
776 APPDEFAULTS
777 DEPEND
778 DEPEND_FLAGS
779 DEPEND_DEFINES
780 LIBOBJS
781 LTLIBOBJS'
782 ac_subst_files=''
783       ac_precious_vars='build_alias
784 host_alias
785 target_alias
786 CC
787 CFLAGS
788 LDFLAGS
789 LIBS
790 CPPFLAGS
791 CPP
792 XMKMF'
793
794
795 # Initialize some variables set by options.
796 ac_init_help=
797 ac_init_version=false
798 # The variables have the same names as the options, with
799 # dashes changed to underlines.
800 cache_file=/dev/null
801 exec_prefix=NONE
802 no_create=
803 no_recursion=
804 prefix=NONE
805 program_prefix=NONE
806 program_suffix=NONE
807 program_transform_name=s,x,x,
808 silent=
809 site=
810 srcdir=
811 verbose=
812 x_includes=NONE
813 x_libraries=NONE
814
815 # Installation directory options.
816 # These are left unexpanded so users can "make install exec_prefix=/foo"
817 # and all the variables that are supposed to be based on exec_prefix
818 # by default will actually change.
819 # Use braces instead of parens because sh, perl, etc. also accept them.
820 # (The list follows the same order as the GNU Coding Standards.)
821 bindir='${exec_prefix}/bin'
822 sbindir='${exec_prefix}/sbin'
823 libexecdir='${exec_prefix}/libexec'
824 datarootdir='${prefix}/share'
825 datadir='${datarootdir}'
826 sysconfdir='${prefix}/etc'
827 sharedstatedir='${prefix}/com'
828 localstatedir='${prefix}/var'
829 includedir='${prefix}/include'
830 oldincludedir='/usr/include'
831 docdir='${datarootdir}/doc/${PACKAGE}'
832 infodir='${datarootdir}/info'
833 htmldir='${docdir}'
834 dvidir='${docdir}'
835 pdfdir='${docdir}'
836 psdir='${docdir}'
837 libdir='${exec_prefix}/lib'
838 localedir='${datarootdir}/locale'
839 mandir='${datarootdir}/man'
840
841 ac_prev=
842 ac_dashdash=
843 for ac_option
844 do
845   # If the previous option needs an argument, assign it.
846   if test -n "$ac_prev"; then
847     eval $ac_prev=\$ac_option
848     ac_prev=
849     continue
850   fi
851
852   case $ac_option in
853   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
854   *)    ac_optarg=yes ;;
855   esac
856
857   # Accept the important Cygnus configure options, so we can diagnose typos.
858
859   case $ac_dashdash$ac_option in
860   --)
861     ac_dashdash=yes ;;
862
863   -bindir | --bindir | --bindi | --bind | --bin | --bi)
864     ac_prev=bindir ;;
865   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
866     bindir=$ac_optarg ;;
867
868   -build | --build | --buil | --bui | --bu)
869     ac_prev=build_alias ;;
870   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
871     build_alias=$ac_optarg ;;
872
873   -cache-file | --cache-file | --cache-fil | --cache-fi \
874   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
875     ac_prev=cache_file ;;
876   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
877   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
878     cache_file=$ac_optarg ;;
879
880   --config-cache | -C)
881     cache_file=config.cache ;;
882
883   -datadir | --datadir | --datadi | --datad)
884     ac_prev=datadir ;;
885   -datadir=* | --datadir=* | --datadi=* | --datad=*)
886     datadir=$ac_optarg ;;
887
888   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
889   | --dataroo | --dataro | --datar)
890     ac_prev=datarootdir ;;
891   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
892   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
893     datarootdir=$ac_optarg ;;
894
895   -disable-* | --disable-*)
896     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
897     # Reject names that are not valid shell variable names.
898     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
899       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
900    { (exit 1); exit 1; }; }
901     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
902     eval enable_$ac_feature=no ;;
903
904   -docdir | --docdir | --docdi | --doc | --do)
905     ac_prev=docdir ;;
906   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907     docdir=$ac_optarg ;;
908
909   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910     ac_prev=dvidir ;;
911   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912     dvidir=$ac_optarg ;;
913
914   -enable-* | --enable-*)
915     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
916     # Reject names that are not valid shell variable names.
917     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
918       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
919    { (exit 1); exit 1; }; }
920     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
921     eval enable_$ac_feature=\$ac_optarg ;;
922
923   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
924   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
925   | --exec | --exe | --ex)
926     ac_prev=exec_prefix ;;
927   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
928   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
929   | --exec=* | --exe=* | --ex=*)
930     exec_prefix=$ac_optarg ;;
931
932   -gas | --gas | --ga | --g)
933     # Obsolete; use --with-gas.
934     with_gas=yes ;;
935
936   -help | --help | --hel | --he | -h)
937     ac_init_help=long ;;
938   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
939     ac_init_help=recursive ;;
940   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
941     ac_init_help=short ;;
942
943   -host | --host | --hos | --ho)
944     ac_prev=host_alias ;;
945   -host=* | --host=* | --hos=* | --ho=*)
946     host_alias=$ac_optarg ;;
947
948   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
949     ac_prev=htmldir ;;
950   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
951   | --ht=*)
952     htmldir=$ac_optarg ;;
953
954   -includedir | --includedir | --includedi | --included | --include \
955   | --includ | --inclu | --incl | --inc)
956     ac_prev=includedir ;;
957   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
958   | --includ=* | --inclu=* | --incl=* | --inc=*)
959     includedir=$ac_optarg ;;
960
961   -infodir | --infodir | --infodi | --infod | --info | --inf)
962     ac_prev=infodir ;;
963   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
964     infodir=$ac_optarg ;;
965
966   -libdir | --libdir | --libdi | --libd)
967     ac_prev=libdir ;;
968   -libdir=* | --libdir=* | --libdi=* | --libd=*)
969     libdir=$ac_optarg ;;
970
971   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
972   | --libexe | --libex | --libe)
973     ac_prev=libexecdir ;;
974   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
975   | --libexe=* | --libex=* | --libe=*)
976     libexecdir=$ac_optarg ;;
977
978   -localedir | --localedir | --localedi | --localed | --locale)
979     ac_prev=localedir ;;
980   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
981     localedir=$ac_optarg ;;
982
983   -localstatedir | --localstatedir | --localstatedi | --localstated \
984   | --localstate | --localstat | --localsta | --localst | --locals)
985     ac_prev=localstatedir ;;
986   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
987   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
988     localstatedir=$ac_optarg ;;
989
990   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
991     ac_prev=mandir ;;
992   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
993     mandir=$ac_optarg ;;
994
995   -nfp | --nfp | --nf)
996     # Obsolete; use --without-fp.
997     with_fp=no ;;
998
999   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1000   | --no-cr | --no-c | -n)
1001     no_create=yes ;;
1002
1003   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1004   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1005     no_recursion=yes ;;
1006
1007   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1008   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1009   | --oldin | --oldi | --old | --ol | --o)
1010     ac_prev=oldincludedir ;;
1011   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1012   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1013   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1014     oldincludedir=$ac_optarg ;;
1015
1016   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1017     ac_prev=prefix ;;
1018   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1019     prefix=$ac_optarg ;;
1020
1021   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1022   | --program-pre | --program-pr | --program-p)
1023     ac_prev=program_prefix ;;
1024   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1025   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1026     program_prefix=$ac_optarg ;;
1027
1028   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1029   | --program-suf | --program-su | --program-s)
1030     ac_prev=program_suffix ;;
1031   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1032   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1033     program_suffix=$ac_optarg ;;
1034
1035   -program-transform-name | --program-transform-name \
1036   | --program-transform-nam | --program-transform-na \
1037   | --program-transform-n | --program-transform- \
1038   | --program-transform | --program-transfor \
1039   | --program-transfo | --program-transf \
1040   | --program-trans | --program-tran \
1041   | --progr-tra | --program-tr | --program-t)
1042     ac_prev=program_transform_name ;;
1043   -program-transform-name=* | --program-transform-name=* \
1044   | --program-transform-nam=* | --program-transform-na=* \
1045   | --program-transform-n=* | --program-transform-=* \
1046   | --program-transform=* | --program-transfor=* \
1047   | --program-transfo=* | --program-transf=* \
1048   | --program-trans=* | --program-tran=* \
1049   | --progr-tra=* | --program-tr=* | --program-t=*)
1050     program_transform_name=$ac_optarg ;;
1051
1052   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1053     ac_prev=pdfdir ;;
1054   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1055     pdfdir=$ac_optarg ;;
1056
1057   -psdir | --psdir | --psdi | --psd | --ps)
1058     ac_prev=psdir ;;
1059   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1060     psdir=$ac_optarg ;;
1061
1062   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1063   | -silent | --silent | --silen | --sile | --sil)
1064     silent=yes ;;
1065
1066   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1067     ac_prev=sbindir ;;
1068   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1069   | --sbi=* | --sb=*)
1070     sbindir=$ac_optarg ;;
1071
1072   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1073   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1074   | --sharedst | --shareds | --shared | --share | --shar \
1075   | --sha | --sh)
1076     ac_prev=sharedstatedir ;;
1077   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1078   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1079   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1080   | --sha=* | --sh=*)
1081     sharedstatedir=$ac_optarg ;;
1082
1083   -site | --site | --sit)
1084     ac_prev=site ;;
1085   -site=* | --site=* | --sit=*)
1086     site=$ac_optarg ;;
1087
1088   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1089     ac_prev=srcdir ;;
1090   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1091     srcdir=$ac_optarg ;;
1092
1093   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1094   | --syscon | --sysco | --sysc | --sys | --sy)
1095     ac_prev=sysconfdir ;;
1096   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1097   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1098     sysconfdir=$ac_optarg ;;
1099
1100   -target | --target | --targe | --targ | --tar | --ta | --t)
1101     ac_prev=target_alias ;;
1102   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1103     target_alias=$ac_optarg ;;
1104
1105   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1106     verbose=yes ;;
1107
1108   -version | --version | --versio | --versi | --vers | -V)
1109     ac_init_version=: ;;
1110
1111   -with-* | --with-*)
1112     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1113     # Reject names that are not valid shell variable names.
1114     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1115       { echo "$as_me: error: invalid package name: $ac_package" >&2
1116    { (exit 1); exit 1; }; }
1117     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1118     eval with_$ac_package=\$ac_optarg ;;
1119
1120   -without-* | --without-*)
1121     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1122     # Reject names that are not valid shell variable names.
1123     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1124       { echo "$as_me: error: invalid package name: $ac_package" >&2
1125    { (exit 1); exit 1; }; }
1126     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1127     eval with_$ac_package=no ;;
1128
1129   --x)
1130     # Obsolete; use --with-x.
1131     with_x=yes ;;
1132
1133   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1134   | --x-incl | --x-inc | --x-in | --x-i)
1135     ac_prev=x_includes ;;
1136   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1137   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1138     x_includes=$ac_optarg ;;
1139
1140   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1141   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1142     ac_prev=x_libraries ;;
1143   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1144   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1145     x_libraries=$ac_optarg ;;
1146
1147   -*) { echo "$as_me: error: unrecognized option: $ac_option
1148 Try \`$0 --help' for more information." >&2
1149    { (exit 1); exit 1; }; }
1150     ;;
1151
1152   *=*)
1153     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1154     # Reject names that are not valid shell variable names.
1155     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1156       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1157    { (exit 1); exit 1; }; }
1158     eval $ac_envvar=\$ac_optarg
1159     export $ac_envvar ;;
1160
1161   *)
1162     # FIXME: should be removed in autoconf 3.0.
1163     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1164     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1165       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1166     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1167     ;;
1168
1169   esac
1170 done
1171
1172 if test -n "$ac_prev"; then
1173   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1174   { echo "$as_me: error: missing argument to $ac_option" >&2
1175    { (exit 1); exit 1; }; }
1176 fi
1177
1178 # Be sure to have absolute directory names.
1179 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1180                 datadir sysconfdir sharedstatedir localstatedir includedir \
1181                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1182                 libdir localedir mandir
1183 do
1184   eval ac_val=\$$ac_var
1185   case $ac_val in
1186     [\\/$]* | ?:[\\/]* )  continue;;
1187     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1188   esac
1189   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1190    { (exit 1); exit 1; }; }
1191 done
1192
1193 # There might be people who depend on the old broken behavior: `$host'
1194 # used to hold the argument of --host etc.
1195 # FIXME: To remove some day.
1196 build=$build_alias
1197 host=$host_alias
1198 target=$target_alias
1199
1200 # FIXME: To remove some day.
1201 if test "x$host_alias" != x; then
1202   if test "x$build_alias" = x; then
1203     cross_compiling=maybe
1204     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1205     If a cross compiler is detected then cross compile mode will be used." >&2
1206   elif test "x$build_alias" != "x$host_alias"; then
1207     cross_compiling=yes
1208   fi
1209 fi
1210
1211 ac_tool_prefix=
1212 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1213
1214 test "$silent" = yes && exec 6>/dev/null
1215
1216
1217 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1218 ac_ls_di=`ls -di .` &&
1219 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1220   { echo "$as_me: error: Working directory cannot be determined" >&2
1221    { (exit 1); exit 1; }; }
1222 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1223   { echo "$as_me: error: pwd does not report name of working directory" >&2
1224    { (exit 1); exit 1; }; }
1225
1226
1227 # Find the source files, if location was not specified.
1228 if test -z "$srcdir"; then
1229   ac_srcdir_defaulted=yes
1230   # Try the directory containing this script, then the parent directory.
1231   ac_confdir=`$as_dirname -- "$0" ||
1232 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1233          X"$0" : 'X\(//\)[^/]' \| \
1234          X"$0" : 'X\(//\)$' \| \
1235          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1236 echo X"$0" |
1237     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1238             s//\1/
1239             q
1240           }
1241           /^X\(\/\/\)[^/].*/{
1242             s//\1/
1243             q
1244           }
1245           /^X\(\/\/\)$/{
1246             s//\1/
1247             q
1248           }
1249           /^X\(\/\).*/{
1250             s//\1/
1251             q
1252           }
1253           s/.*/./; q'`
1254   srcdir=$ac_confdir
1255   if test ! -r "$srcdir/$ac_unique_file"; then
1256     srcdir=..
1257   fi
1258 else
1259   ac_srcdir_defaulted=no
1260 fi
1261 if test ! -r "$srcdir/$ac_unique_file"; then
1262   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1263   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1264    { (exit 1); exit 1; }; }
1265 fi
1266 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1267 ac_abs_confdir=`(
1268         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1269    { (exit 1); exit 1; }; }
1270         pwd)`
1271 # When building in place, set srcdir=.
1272 if test "$ac_abs_confdir" = "$ac_pwd"; then
1273   srcdir=.
1274 fi
1275 # Remove unnecessary trailing slashes from srcdir.
1276 # Double slashes in file names in object file debugging info
1277 # mess up M-x gdb in Emacs.
1278 case $srcdir in
1279 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1280 esac
1281 for ac_var in $ac_precious_vars; do
1282   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1283   eval ac_env_${ac_var}_value=\$${ac_var}
1284   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1285   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1286 done
1287
1288 #
1289 # Report the --help message.
1290 #
1291 if test "$ac_init_help" = "long"; then
1292   # Omit some internal or obsolete options to make the list less imposing.
1293   # This message is too long to be a string in the A/UX 3.1 sh.
1294   cat <<_ACEOF
1295 \`configure' configures this package to adapt to many kinds of systems.
1296
1297 Usage: $0 [OPTION]... [VAR=VALUE]...
1298
1299 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1300 VAR=VALUE.  See below for descriptions of some of the useful variables.
1301
1302 Defaults for the options are specified in brackets.
1303
1304
1305 Configuration:
1306
1307   -h, --help              display this help and exit
1308       --help=short        display options specific to this package
1309       --help=recursive    display the short help of all the included packages
1310   -V, --version           display version information and exit
1311   -q, --quiet, --silent   do not print \`checking...' messages
1312       --cache-file=FILE   cache test results in FILE [disabled]
1313   -C, --config-cache      alias for \`--cache-file=config.cache'
1314   -n, --no-create         do not create output files
1315       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1316
1317 Installation directories:
1318   --prefix=PREFIX         install architecture-independent files in PREFIX
1319                           [$ac_default_prefix]
1320   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1321                           [PREFIX]
1322
1323 By default, \`make install' will install all the files in
1324 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1325 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1326 for instance \`--prefix=\$HOME'.
1327
1328 For better control, use the options below.
1329
1330 Fine tuning of the installation directories:
1331   --bindir=DIR           user executables [EPREFIX/bin]
1332   --libexecdir=DIR       program executables [EPREFIX/libexec]
1333   --libdir=DIR           object code libraries [EPREFIX/lib]
1334   --includedir=DIR       C header files [PREFIX/include]
1335   --x-includes=DIR        X include files are in DIR
1336   --x-libraries=DIR       X library files are in DIR
1337   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1338   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1339   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1340   --mandir=DIR           man documentation [DATAROOTDIR/man]
1341   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1342   --htmldir=DIR          html documentation [DOCDIR]
1343   --dvidir=DIR           dvi documentation [DOCDIR]
1344   --pdfdir=DIR           pdf documentation [DOCDIR]
1345   --psdir=DIR            ps documentation [DOCDIR]
1346 _ACEOF
1347
1348   cat <<\_ACEOF
1349
1350 X features:
1351   --x-includes=DIR    X include files are in DIR
1352   --x-libraries=DIR   X library files are in DIR
1353
1354 System types:
1355   --build=BUILD     configure for building on BUILD [guessed]
1356   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1357 _ACEOF
1358 fi
1359
1360 if test -n "$ac_init_help"; then
1361
1362   cat <<\_ACEOF
1363
1364 Optional Features:
1365   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1366   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1367
1368 Screen locking options:
1369   --enable-locking        Compile in support for locking the display.
1370   --disable-locking       Do not allow locking at all.
1371
1372   --enable-root-passwd        Allow root passwd to unlock screen.
1373   --disable-root-passwd       Do not allow that.
1374
1375 Optional Packages:
1376   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1377   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1378
1379
1380 Installation options:
1381   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1382                           Default: `PREFIX/libexec/xscreensaver/'
1383   --with-configdir=DIR    Where to install the data files that describe each
1384                           of the display modes to the GUI.
1385                           Default: `PREFIX/share/xscreensaver/config/'
1386   --with-x-app-defaults=DIR
1387                            Where to install xscreensaver configuration file.
1388
1389 Except where noted, all of the --with options below can also take a
1390 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1391 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1392 to be added to the -L list, assuming those directories exist.
1393
1394 By default, support for each of these options will be built in, if the
1395 relevant library routines exist.  At run time, they will then be used
1396 only if the X server being used supports them.  Each --with option has
1397 a corresponding --without option, to override building support for them
1398 at all.
1399
1400 Screen blanking and idle-detection options:
1401
1402   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1403   --with-xidle-ext        Include support for the XIDLE extension.
1404   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1405   --with-dpms-ext         Include support for the DPMS extension.
1406   --with-xinerama-ext     Include support for the XINERAMA extension.
1407   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1408   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1409   --with-randr-ext        Include support for the X Resize+Rotate extension.
1410   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1411                           file to notice keyboard activity.
1412   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1413   --with-pam-service-name=NAME
1414                           NAME is the name of the PAM service that
1415                           xscreensaver will authenticate as.
1416   --with-kerberos         Include support for Kerberos authentication.
1417   --with-shadow           Include support for shadow password authentication.
1418   --with-passwd-helper    Include support for an external password
1419                           verification helper program.
1420   --with-login-manager    Put a "New Login" button on the unlock dialog that
1421                           runs a login manager such as gdmflexiserver.
1422
1423 User interface options:
1424
1425   --with-gtk              Use the Gtk toolkit for the user interface.
1426   --with-motif            Use the Motif toolkit for the user interface
1427                           (not recommended.)
1428
1429 Graphics options:
1430
1431   --with-gl               Build those demos which depend on OpenGL.
1432   --with-gle              Build those demos which depend on GLE
1433                           (the OpenGL "extrusion" library.)
1434   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1435                           demos, which will make it possible for them to read
1436                           GIF, JPEG, and PNG files as well.
1437   --with-xpm              Include support for XPM files in some demos.
1438                           (Not needed if Pixbuf is used.)
1439   --with-jpeg             Include support for the JPEG library.
1440   --with-xshm-ext         Include support for the Shared Memory extension.
1441   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1442   --with-readdisplay      Include support for the XReadDisplay extension.
1443   --with-image-directory=DIR  By default, some demos may display random images
1444                           from this directory.
1445   --with-text-file=FILE   By default, some demos may display this file.
1446   --with-browser=BROWSER   Specify the browser to show help URL.
1447   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1448                           (which is needed in order to ping other hosts.)
1449
1450
1451 Some influential environment variables:
1452   CC          C compiler command
1453   CFLAGS      C compiler flags
1454   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1455               nonstandard directory <lib dir>
1456   LIBS        libraries to pass to the linker, e.g. -l<library>
1457   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1458               you have headers in a nonstandard directory <include dir>
1459   CPP         C preprocessor
1460   XMKMF       Path to xmkmf, Makefile generator for X Window System
1461
1462 Use these variables to override the choices made by `configure' or to help
1463 it to find libraries and programs with nonstandard names/locations.
1464
1465 _ACEOF
1466 ac_status=$?
1467 fi
1468
1469 if test "$ac_init_help" = "recursive"; then
1470   # If there are subdirs, report their specific --help.
1471   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1472     test -d "$ac_dir" || continue
1473     ac_builddir=.
1474
1475 case "$ac_dir" in
1476 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1477 *)
1478   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1479   # A ".." for each directory in $ac_dir_suffix.
1480   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1481   case $ac_top_builddir_sub in
1482   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1483   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1484   esac ;;
1485 esac
1486 ac_abs_top_builddir=$ac_pwd
1487 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1488 # for backward compatibility:
1489 ac_top_builddir=$ac_top_build_prefix
1490
1491 case $srcdir in
1492   .)  # We are building in place.
1493     ac_srcdir=.
1494     ac_top_srcdir=$ac_top_builddir_sub
1495     ac_abs_top_srcdir=$ac_pwd ;;
1496   [\\/]* | ?:[\\/]* )  # Absolute name.
1497     ac_srcdir=$srcdir$ac_dir_suffix;
1498     ac_top_srcdir=$srcdir
1499     ac_abs_top_srcdir=$srcdir ;;
1500   *) # Relative name.
1501     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1502     ac_top_srcdir=$ac_top_build_prefix$srcdir
1503     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1504 esac
1505 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1506
1507     cd "$ac_dir" || { ac_status=$?; continue; }
1508     # Check for guested configure.
1509     if test -f "$ac_srcdir/configure.gnu"; then
1510       echo &&
1511       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1512     elif test -f "$ac_srcdir/configure"; then
1513       echo &&
1514       $SHELL "$ac_srcdir/configure" --help=recursive
1515     else
1516       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1517     fi || ac_status=$?
1518     cd "$ac_pwd" || { ac_status=$?; break; }
1519   done
1520 fi
1521
1522 test -n "$ac_init_help" && exit $ac_status
1523 if $ac_init_version; then
1524   cat <<\_ACEOF
1525 configure
1526 generated by GNU Autoconf 2.61
1527
1528 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1529 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1530 This configure script is free software; the Free Software Foundation
1531 gives unlimited permission to copy, distribute and modify it.
1532 _ACEOF
1533   exit
1534 fi
1535 cat >config.log <<_ACEOF
1536 This file contains any messages produced by compilers while
1537 running configure, to aid debugging if configure makes a mistake.
1538
1539 It was created by $as_me, which was
1540 generated by GNU Autoconf 2.61.  Invocation command line was
1541
1542   $ $0 $@
1543
1544 _ACEOF
1545 exec 5>>config.log
1546 {
1547 cat <<_ASUNAME
1548 ## --------- ##
1549 ## Platform. ##
1550 ## --------- ##
1551
1552 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1553 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1554 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1555 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1556 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1557
1558 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1559 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1560
1561 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1562 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1563 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1564 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1565 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1566 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1567 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1568
1569 _ASUNAME
1570
1571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1572 for as_dir in $PATH
1573 do
1574   IFS=$as_save_IFS
1575   test -z "$as_dir" && as_dir=.
1576   echo "PATH: $as_dir"
1577 done
1578 IFS=$as_save_IFS
1579
1580 } >&5
1581
1582 cat >&5 <<_ACEOF
1583
1584
1585 ## ----------- ##
1586 ## Core tests. ##
1587 ## ----------- ##
1588
1589 _ACEOF
1590
1591
1592 # Keep a trace of the command line.
1593 # Strip out --no-create and --no-recursion so they do not pile up.
1594 # Strip out --silent because we don't want to record it for future runs.
1595 # Also quote any args containing shell meta-characters.
1596 # Make two passes to allow for proper duplicate-argument suppression.
1597 ac_configure_args=
1598 ac_configure_args0=
1599 ac_configure_args1=
1600 ac_must_keep_next=false
1601 for ac_pass in 1 2
1602 do
1603   for ac_arg
1604   do
1605     case $ac_arg in
1606     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1607     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1608     | -silent | --silent | --silen | --sile | --sil)
1609       continue ;;
1610     *\'*)
1611       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1612     esac
1613     case $ac_pass in
1614     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1615     2)
1616       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1617       if test $ac_must_keep_next = true; then
1618         ac_must_keep_next=false # Got value, back to normal.
1619       else
1620         case $ac_arg in
1621           *=* | --config-cache | -C | -disable-* | --disable-* \
1622           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1623           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1624           | -with-* | --with-* | -without-* | --without-* | --x)
1625             case "$ac_configure_args0 " in
1626               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1627             esac
1628             ;;
1629           -* ) ac_must_keep_next=true ;;
1630         esac
1631       fi
1632       ac_configure_args="$ac_configure_args '$ac_arg'"
1633       ;;
1634     esac
1635   done
1636 done
1637 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1638 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1639
1640 # When interrupted or exit'd, cleanup temporary files, and complete
1641 # config.log.  We remove comments because anyway the quotes in there
1642 # would cause problems or look ugly.
1643 # WARNING: Use '\'' to represent an apostrophe within the trap.
1644 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1645 trap 'exit_status=$?
1646   # Save into config.log some information that might help in debugging.
1647   {
1648     echo
1649
1650     cat <<\_ASBOX
1651 ## ---------------- ##
1652 ## Cache variables. ##
1653 ## ---------------- ##
1654 _ASBOX
1655     echo
1656     # The following way of writing the cache mishandles newlines in values,
1657 (
1658   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1659     eval ac_val=\$$ac_var
1660     case $ac_val in #(
1661     *${as_nl}*)
1662       case $ac_var in #(
1663       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1664 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1665       esac
1666       case $ac_var in #(
1667       _ | IFS | as_nl) ;; #(
1668       *) $as_unset $ac_var ;;
1669       esac ;;
1670     esac
1671   done
1672   (set) 2>&1 |
1673     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1674     *${as_nl}ac_space=\ *)
1675       sed -n \
1676         "s/'\''/'\''\\\\'\'''\''/g;
1677           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1678       ;; #(
1679     *)
1680       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1681       ;;
1682     esac |
1683     sort
1684 )
1685     echo
1686
1687     cat <<\_ASBOX
1688 ## ----------------- ##
1689 ## Output variables. ##
1690 ## ----------------- ##
1691 _ASBOX
1692     echo
1693     for ac_var in $ac_subst_vars
1694     do
1695       eval ac_val=\$$ac_var
1696       case $ac_val in
1697       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1698       esac
1699       echo "$ac_var='\''$ac_val'\''"
1700     done | sort
1701     echo
1702
1703     if test -n "$ac_subst_files"; then
1704       cat <<\_ASBOX
1705 ## ------------------- ##
1706 ## File substitutions. ##
1707 ## ------------------- ##
1708 _ASBOX
1709       echo
1710       for ac_var in $ac_subst_files
1711       do
1712         eval ac_val=\$$ac_var
1713         case $ac_val in
1714         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1715         esac
1716         echo "$ac_var='\''$ac_val'\''"
1717       done | sort
1718       echo
1719     fi
1720
1721     if test -s confdefs.h; then
1722       cat <<\_ASBOX
1723 ## ----------- ##
1724 ## confdefs.h. ##
1725 ## ----------- ##
1726 _ASBOX
1727       echo
1728       cat confdefs.h
1729       echo
1730     fi
1731     test "$ac_signal" != 0 &&
1732       echo "$as_me: caught signal $ac_signal"
1733     echo "$as_me: exit $exit_status"
1734   } >&5
1735   rm -f core *.core core.conftest.* &&
1736     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1737     exit $exit_status
1738 ' 0
1739 for ac_signal in 1 2 13 15; do
1740   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1741 done
1742 ac_signal=0
1743
1744 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1745 rm -f -r conftest* confdefs.h
1746
1747 # Predefined preprocessor variables.
1748
1749 cat >>confdefs.h <<_ACEOF
1750 #define PACKAGE_NAME "$PACKAGE_NAME"
1751 _ACEOF
1752
1753
1754 cat >>confdefs.h <<_ACEOF
1755 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1756 _ACEOF
1757
1758
1759 cat >>confdefs.h <<_ACEOF
1760 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1761 _ACEOF
1762
1763
1764 cat >>confdefs.h <<_ACEOF
1765 #define PACKAGE_STRING "$PACKAGE_STRING"
1766 _ACEOF
1767
1768
1769 cat >>confdefs.h <<_ACEOF
1770 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1771 _ACEOF
1772
1773
1774 # Let the site file select an alternate cache file if it wants to.
1775 # Prefer explicitly selected file to automatically selected ones.
1776 if test -n "$CONFIG_SITE"; then
1777   set x "$CONFIG_SITE"
1778 elif test "x$prefix" != xNONE; then
1779   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1780 else
1781   set x "$ac_default_prefix/share/config.site" \
1782         "$ac_default_prefix/etc/config.site"
1783 fi
1784 shift
1785 for ac_site_file
1786 do
1787   if test -r "$ac_site_file"; then
1788     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1789 echo "$as_me: loading site script $ac_site_file" >&6;}
1790     sed 's/^/| /' "$ac_site_file" >&5
1791     . "$ac_site_file"
1792   fi
1793 done
1794
1795 if test -r "$cache_file"; then
1796   # Some versions of bash will fail to source /dev/null (special
1797   # files actually), so we avoid doing that.
1798   if test -f "$cache_file"; then
1799     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1800 echo "$as_me: loading cache $cache_file" >&6;}
1801     case $cache_file in
1802       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1803       *)                      . "./$cache_file";;
1804     esac
1805   fi
1806 else
1807   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1808 echo "$as_me: creating cache $cache_file" >&6;}
1809   >$cache_file
1810 fi
1811
1812 # Check that the precious variables saved in the cache have kept the same
1813 # value.
1814 ac_cache_corrupted=false
1815 for ac_var in $ac_precious_vars; do
1816   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1817   eval ac_new_set=\$ac_env_${ac_var}_set
1818   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1819   eval ac_new_val=\$ac_env_${ac_var}_value
1820   case $ac_old_set,$ac_new_set in
1821     set,)
1822       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1823 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1824       ac_cache_corrupted=: ;;
1825     ,set)
1826       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1827 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1828       ac_cache_corrupted=: ;;
1829     ,);;
1830     *)
1831       if test "x$ac_old_val" != "x$ac_new_val"; then
1832         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1833 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1834         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1835 echo "$as_me:   former value:  $ac_old_val" >&2;}
1836         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1837 echo "$as_me:   current value: $ac_new_val" >&2;}
1838         ac_cache_corrupted=:
1839       fi;;
1840   esac
1841   # Pass precious variables to config.status.
1842   if test "$ac_new_set" = set; then
1843     case $ac_new_val in
1844     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1845     *) ac_arg=$ac_var=$ac_new_val ;;
1846     esac
1847     case " $ac_configure_args " in
1848       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1849       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1850     esac
1851   fi
1852 done
1853 if $ac_cache_corrupted; then
1854   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1855 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1856   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1857 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1858    { (exit 1); exit 1; }; }
1859 fi
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877 ac_ext=c
1878 ac_cpp='$CPP $CPPFLAGS'
1879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1882
1883
1884 ac_config_headers="$ac_config_headers config.h"
1885
1886
1887 echo "current directory: `pwd`"
1888 echo "command line was: $0 $@"
1889
1890 ###############################################################################
1891 #
1892 #       Autoheader stuff
1893 #
1894 ###############################################################################
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066 # After checking to see that --srcdir is correct (which AC_INIT does)
2067 # check for some random other files that come later in the tar file,
2068 # to make sure everything is here.
2069 #
2070 for d in driver utils hacks hacks/glx ; do
2071   f=$srcdir/$d/Makefile.in
2072   if test \! -r $f ; then
2073     echo ""
2074     echo "ERROR: The package is incomplete: $f does not exist."
2075     echo "       This probably means that your download was truncated."
2076     echo ""
2077     exit 1
2078   fi
2079 done
2080
2081 ###############################################################################
2082 #
2083 #       Function to figure out how to run the compiler.
2084 #
2085 ###############################################################################
2086
2087
2088
2089
2090 ###############################################################################
2091 #
2092 #       Check for availability of various gcc command-line options.
2093 #
2094 ###############################################################################
2095
2096
2097
2098
2099
2100
2101
2102 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2103 # around an Apple-specific gcc bug.
2104 #
2105
2106
2107 ###############################################################################
2108 #
2109 #       Function to figure out how to disable // comments in ANSI C code.
2110 #
2111 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2112 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2113 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2114 #       so much for compatibility!)
2115 #
2116 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2117 #       declarations preceed statements, without resorting to "-pedantic".
2118 #       This means that there is no way to get gcc3 to issue warnings that
2119 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2120 #       also drowning in totally useless warnings.  Thank you master may I
2121 #       have another.
2122 #
2123 #       So, I give up, let's just use -pedantic.
2124 #
2125 ###############################################################################
2126
2127
2128
2129
2130
2131
2132 ###############################################################################
2133 #
2134 #       Function to figure out how to create directory trees.
2135 #
2136 ###############################################################################
2137
2138
2139
2140
2141 ###############################################################################
2142 #
2143 #       Function to check whether gettimeofday() exists, and how to call it.
2144 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2145 #
2146 ###############################################################################
2147
2148
2149
2150
2151 ###############################################################################
2152 #
2153 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2154 #
2155 ###############################################################################
2156
2157 # M4 sucks!!  perl sucks too!!
2158
2159 perl_version_cmd='print $]'
2160
2161
2162
2163
2164
2165 ###############################################################################
2166 #
2167 #       Function to demand "bc".  Losers.
2168 #
2169 ###############################################################################
2170
2171
2172
2173 ###############################################################################
2174 #
2175 #       Functions to check how to do ICMP PING requests.
2176 #
2177 ###############################################################################
2178
2179
2180
2181
2182
2183
2184 ###############################################################################
2185 #
2186 #       Functions to check for various X11 crap.
2187 #
2188 ###############################################################################
2189
2190 # Try and find the app-defaults directory.
2191 # It sucks that autoconf doesn't do this already...
2192 #
2193
2194
2195 ###############################################################################
2196 #
2197 #       Handle the --with-x-app-defaults option HERE
2198 #
2199 ###############################################################################
2200
2201
2202 # Check whether --with-x-app-defaults was given.
2203 if test "${with_x_app_defaults+set}" = set; then
2204   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2205 else
2206   eval ac_x_app_defaults="$withval"
2207 fi
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219 # Random special-cases for X on certain pathological OSes.
2220 # You know who you are.
2221 #
2222
2223
2224
2225
2226 ###############################################################################
2227 #
2228 #       Some utility functions to make checking for X things easier.
2229 #
2230 ###############################################################################
2231
2232 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2233 #
2234
2235
2236 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2237 #
2238
2239
2240 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2241 #
2242
2243
2244
2245 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2246 # Use this sparingly; it probably doesn't work very well on X programs.
2247 #
2248
2249
2250 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2251 # (But not the -L directories!)
2252 #
2253
2254
2255
2256
2257 # Usage: HANDLE_X_PATH_ARG([variable_name],
2258 #                          [--command-line-option],
2259 #                          [descriptive string])
2260 #
2261 # All of the --with options take three forms:
2262 #
2263 #   --with-foo (or --with-foo=yes)
2264 #   --without-foo (or --with-foo=no)
2265 #   --with-foo=/DIR
2266 #
2267 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2268 # a directory (string beginning with a slash) it checks to see whether
2269 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2270 # as appropriate.
2271 #
2272
2273
2274
2275
2276 ###############################################################################
2277 ###############################################################################
2278 #
2279 #       End of function definitions.  Now start actually executing stuff.
2280 #
2281 ###############################################################################
2282 ###############################################################################
2283
2284 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2285 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2286 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2287
2288
2289 # random compiler setup
2290 ac_aux_dir=
2291 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2292   if test -f "$ac_dir/install-sh"; then
2293     ac_aux_dir=$ac_dir
2294     ac_install_sh="$ac_aux_dir/install-sh -c"
2295     break
2296   elif test -f "$ac_dir/install.sh"; then
2297     ac_aux_dir=$ac_dir
2298     ac_install_sh="$ac_aux_dir/install.sh -c"
2299     break
2300   elif test -f "$ac_dir/shtool"; then
2301     ac_aux_dir=$ac_dir
2302     ac_install_sh="$ac_aux_dir/shtool install -c"
2303     break
2304   fi
2305 done
2306 if test -z "$ac_aux_dir"; then
2307   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2308 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2309    { (exit 1); exit 1; }; }
2310 fi
2311
2312 # These three variables are undocumented and unsupported,
2313 # and are intended to be withdrawn in a future Autoconf release.
2314 # They can cause serious problems if a builder's source tree is in a directory
2315 # whose full name contains unusual characters.
2316 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2317 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2318 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2319
2320
2321 # Make sure we can run config.sub.
2322 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2323   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2324 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2325    { (exit 1); exit 1; }; }
2326
2327 { echo "$as_me:$LINENO: checking build system type" >&5
2328 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2329 if test "${ac_cv_build+set}" = set; then
2330   echo $ECHO_N "(cached) $ECHO_C" >&6
2331 else
2332   ac_build_alias=$build_alias
2333 test "x$ac_build_alias" = x &&
2334   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2335 test "x$ac_build_alias" = x &&
2336   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2337 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2338    { (exit 1); exit 1; }; }
2339 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2340   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2341 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2342    { (exit 1); exit 1; }; }
2343
2344 fi
2345 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2346 echo "${ECHO_T}$ac_cv_build" >&6; }
2347 case $ac_cv_build in
2348 *-*-*) ;;
2349 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2350 echo "$as_me: error: invalid value of canonical build" >&2;}
2351    { (exit 1); exit 1; }; };;
2352 esac
2353 build=$ac_cv_build
2354 ac_save_IFS=$IFS; IFS='-'
2355 set x $ac_cv_build
2356 shift
2357 build_cpu=$1
2358 build_vendor=$2
2359 shift; shift
2360 # Remember, the first character of IFS is used to create $*,
2361 # except with old shells:
2362 build_os=$*
2363 IFS=$ac_save_IFS
2364 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2365
2366
2367 { echo "$as_me:$LINENO: checking host system type" >&5
2368 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2369 if test "${ac_cv_host+set}" = set; then
2370   echo $ECHO_N "(cached) $ECHO_C" >&6
2371 else
2372   if test "x$host_alias" = x; then
2373   ac_cv_host=$ac_cv_build
2374 else
2375   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2376     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2377 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2378    { (exit 1); exit 1; }; }
2379 fi
2380
2381 fi
2382 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2383 echo "${ECHO_T}$ac_cv_host" >&6; }
2384 case $ac_cv_host in
2385 *-*-*) ;;
2386 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2387 echo "$as_me: error: invalid value of canonical host" >&2;}
2388    { (exit 1); exit 1; }; };;
2389 esac
2390 host=$ac_cv_host
2391 ac_save_IFS=$IFS; IFS='-'
2392 set x $ac_cv_host
2393 shift
2394 host_cpu=$1
2395 host_vendor=$2
2396 shift; shift
2397 # Remember, the first character of IFS is used to create $*,
2398 # except with old shells:
2399 host_os=$*
2400 IFS=$ac_save_IFS
2401 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2402
2403
2404
2405 ac_ext=c
2406 ac_cpp='$CPP $CPPFLAGS'
2407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2410 if test -n "$ac_tool_prefix"; then
2411   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2412 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2413 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2415 if test "${ac_cv_prog_CC+set}" = set; then
2416   echo $ECHO_N "(cached) $ECHO_C" >&6
2417 else
2418   if test -n "$CC"; then
2419   ac_cv_prog_CC="$CC" # Let the user override the test.
2420 else
2421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2422 for as_dir in $PATH
2423 do
2424   IFS=$as_save_IFS
2425   test -z "$as_dir" && as_dir=.
2426   for ac_exec_ext in '' $ac_executable_extensions; do
2427   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2428     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2429     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2430     break 2
2431   fi
2432 done
2433 done
2434 IFS=$as_save_IFS
2435
2436 fi
2437 fi
2438 CC=$ac_cv_prog_CC
2439 if test -n "$CC"; then
2440   { echo "$as_me:$LINENO: result: $CC" >&5
2441 echo "${ECHO_T}$CC" >&6; }
2442 else
2443   { echo "$as_me:$LINENO: result: no" >&5
2444 echo "${ECHO_T}no" >&6; }
2445 fi
2446
2447
2448 fi
2449 if test -z "$ac_cv_prog_CC"; then
2450   ac_ct_CC=$CC
2451   # Extract the first word of "gcc", so it can be a program name with args.
2452 set dummy gcc; ac_word=$2
2453 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2455 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2456   echo $ECHO_N "(cached) $ECHO_C" >&6
2457 else
2458   if test -n "$ac_ct_CC"; then
2459   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2460 else
2461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2462 for as_dir in $PATH
2463 do
2464   IFS=$as_save_IFS
2465   test -z "$as_dir" && as_dir=.
2466   for ac_exec_ext in '' $ac_executable_extensions; do
2467   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2468     ac_cv_prog_ac_ct_CC="gcc"
2469     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2470     break 2
2471   fi
2472 done
2473 done
2474 IFS=$as_save_IFS
2475
2476 fi
2477 fi
2478 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2479 if test -n "$ac_ct_CC"; then
2480   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2481 echo "${ECHO_T}$ac_ct_CC" >&6; }
2482 else
2483   { echo "$as_me:$LINENO: result: no" >&5
2484 echo "${ECHO_T}no" >&6; }
2485 fi
2486
2487   if test "x$ac_ct_CC" = x; then
2488     CC=""
2489   else
2490     case $cross_compiling:$ac_tool_warned in
2491 yes:)
2492 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2493 whose name does not start with the host triplet.  If you think this
2494 configuration is useful to you, please write to autoconf@gnu.org." >&5
2495 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2496 whose name does not start with the host triplet.  If you think this
2497 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2498 ac_tool_warned=yes ;;
2499 esac
2500     CC=$ac_ct_CC
2501   fi
2502 else
2503   CC="$ac_cv_prog_CC"
2504 fi
2505
2506 if test -z "$CC"; then
2507           if test -n "$ac_tool_prefix"; then
2508     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2509 set dummy ${ac_tool_prefix}cc; ac_word=$2
2510 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2512 if test "${ac_cv_prog_CC+set}" = set; then
2513   echo $ECHO_N "(cached) $ECHO_C" >&6
2514 else
2515   if test -n "$CC"; then
2516   ac_cv_prog_CC="$CC" # Let the user override the test.
2517 else
2518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2519 for as_dir in $PATH
2520 do
2521   IFS=$as_save_IFS
2522   test -z "$as_dir" && as_dir=.
2523   for ac_exec_ext in '' $ac_executable_extensions; do
2524   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2525     ac_cv_prog_CC="${ac_tool_prefix}cc"
2526     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2527     break 2
2528   fi
2529 done
2530 done
2531 IFS=$as_save_IFS
2532
2533 fi
2534 fi
2535 CC=$ac_cv_prog_CC
2536 if test -n "$CC"; then
2537   { echo "$as_me:$LINENO: result: $CC" >&5
2538 echo "${ECHO_T}$CC" >&6; }
2539 else
2540   { echo "$as_me:$LINENO: result: no" >&5
2541 echo "${ECHO_T}no" >&6; }
2542 fi
2543
2544
2545   fi
2546 fi
2547 if test -z "$CC"; then
2548   # Extract the first word of "cc", so it can be a program name with args.
2549 set dummy cc; ac_word=$2
2550 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2552 if test "${ac_cv_prog_CC+set}" = set; then
2553   echo $ECHO_N "(cached) $ECHO_C" >&6
2554 else
2555   if test -n "$CC"; then
2556   ac_cv_prog_CC="$CC" # Let the user override the test.
2557 else
2558   ac_prog_rejected=no
2559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2560 for as_dir in $PATH
2561 do
2562   IFS=$as_save_IFS
2563   test -z "$as_dir" && as_dir=.
2564   for ac_exec_ext in '' $ac_executable_extensions; do
2565   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2566     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2567        ac_prog_rejected=yes
2568        continue
2569      fi
2570     ac_cv_prog_CC="cc"
2571     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2572     break 2
2573   fi
2574 done
2575 done
2576 IFS=$as_save_IFS
2577
2578 if test $ac_prog_rejected = yes; then
2579   # We found a bogon in the path, so make sure we never use it.
2580   set dummy $ac_cv_prog_CC
2581   shift
2582   if test $# != 0; then
2583     # We chose a different compiler from the bogus one.
2584     # However, it has the same basename, so the bogon will be chosen
2585     # first if we set CC to just the basename; use the full file name.
2586     shift
2587     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2588   fi
2589 fi
2590 fi
2591 fi
2592 CC=$ac_cv_prog_CC
2593 if test -n "$CC"; then
2594   { echo "$as_me:$LINENO: result: $CC" >&5
2595 echo "${ECHO_T}$CC" >&6; }
2596 else
2597   { echo "$as_me:$LINENO: result: no" >&5
2598 echo "${ECHO_T}no" >&6; }
2599 fi
2600
2601
2602 fi
2603 if test -z "$CC"; then
2604   if test -n "$ac_tool_prefix"; then
2605   for ac_prog in cl.exe
2606   do
2607     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2608 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2609 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2611 if test "${ac_cv_prog_CC+set}" = set; then
2612   echo $ECHO_N "(cached) $ECHO_C" >&6
2613 else
2614   if test -n "$CC"; then
2615   ac_cv_prog_CC="$CC" # Let the user override the test.
2616 else
2617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2618 for as_dir in $PATH
2619 do
2620   IFS=$as_save_IFS
2621   test -z "$as_dir" && as_dir=.
2622   for ac_exec_ext in '' $ac_executable_extensions; do
2623   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2624     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2625     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2626     break 2
2627   fi
2628 done
2629 done
2630 IFS=$as_save_IFS
2631
2632 fi
2633 fi
2634 CC=$ac_cv_prog_CC
2635 if test -n "$CC"; then
2636   { echo "$as_me:$LINENO: result: $CC" >&5
2637 echo "${ECHO_T}$CC" >&6; }
2638 else
2639   { echo "$as_me:$LINENO: result: no" >&5
2640 echo "${ECHO_T}no" >&6; }
2641 fi
2642
2643
2644     test -n "$CC" && break
2645   done
2646 fi
2647 if test -z "$CC"; then
2648   ac_ct_CC=$CC
2649   for ac_prog in cl.exe
2650 do
2651   # Extract the first word of "$ac_prog", so it can be a program name with args.
2652 set dummy $ac_prog; ac_word=$2
2653 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2655 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2656   echo $ECHO_N "(cached) $ECHO_C" >&6
2657 else
2658   if test -n "$ac_ct_CC"; then
2659   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2660 else
2661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2662 for as_dir in $PATH
2663 do
2664   IFS=$as_save_IFS
2665   test -z "$as_dir" && as_dir=.
2666   for ac_exec_ext in '' $ac_executable_extensions; do
2667   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2668     ac_cv_prog_ac_ct_CC="$ac_prog"
2669     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2670     break 2
2671   fi
2672 done
2673 done
2674 IFS=$as_save_IFS
2675
2676 fi
2677 fi
2678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2679 if test -n "$ac_ct_CC"; then
2680   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2681 echo "${ECHO_T}$ac_ct_CC" >&6; }
2682 else
2683   { echo "$as_me:$LINENO: result: no" >&5
2684 echo "${ECHO_T}no" >&6; }
2685 fi
2686
2687
2688   test -n "$ac_ct_CC" && break
2689 done
2690
2691   if test "x$ac_ct_CC" = x; then
2692     CC=""
2693   else
2694     case $cross_compiling:$ac_tool_warned in
2695 yes:)
2696 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2697 whose name does not start with the host triplet.  If you think this
2698 configuration is useful to you, please write to autoconf@gnu.org." >&5
2699 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2700 whose name does not start with the host triplet.  If you think this
2701 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2702 ac_tool_warned=yes ;;
2703 esac
2704     CC=$ac_ct_CC
2705   fi
2706 fi
2707
2708 fi
2709
2710
2711 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2712 See \`config.log' for more details." >&5
2713 echo "$as_me: error: no acceptable C compiler found in \$PATH
2714 See \`config.log' for more details." >&2;}
2715    { (exit 1); exit 1; }; }
2716
2717 # Provide some information about the compiler.
2718 echo "$as_me:$LINENO: checking for C compiler version" >&5
2719 ac_compiler=`set X $ac_compile; echo $2`
2720 { (ac_try="$ac_compiler --version >&5"
2721 case "(($ac_try" in
2722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2723   *) ac_try_echo=$ac_try;;
2724 esac
2725 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2726   (eval "$ac_compiler --version >&5") 2>&5
2727   ac_status=$?
2728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729   (exit $ac_status); }
2730 { (ac_try="$ac_compiler -v >&5"
2731 case "(($ac_try" in
2732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733   *) ac_try_echo=$ac_try;;
2734 esac
2735 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2736   (eval "$ac_compiler -v >&5") 2>&5
2737   ac_status=$?
2738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739   (exit $ac_status); }
2740 { (ac_try="$ac_compiler -V >&5"
2741 case "(($ac_try" in
2742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2743   *) ac_try_echo=$ac_try;;
2744 esac
2745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2746   (eval "$ac_compiler -V >&5") 2>&5
2747   ac_status=$?
2748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749   (exit $ac_status); }
2750
2751 cat >conftest.$ac_ext <<_ACEOF
2752 /* confdefs.h.  */
2753 _ACEOF
2754 cat confdefs.h >>conftest.$ac_ext
2755 cat >>conftest.$ac_ext <<_ACEOF
2756 /* end confdefs.h.  */
2757
2758 int
2759 main ()
2760 {
2761
2762   ;
2763   return 0;
2764 }
2765 _ACEOF
2766 ac_clean_files_save=$ac_clean_files
2767 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2768 # Try to create an executable without -o first, disregard a.out.
2769 # It will help us diagnose broken compilers, and finding out an intuition
2770 # of exeext.
2771 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2772 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2773 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2774 #
2775 # List of possible output files, starting from the most likely.
2776 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2777 # only as a last resort.  b.out is created by i960 compilers.
2778 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2779 #
2780 # The IRIX 6 linker writes into existing files which may not be
2781 # executable, retaining their permissions.  Remove them first so a
2782 # subsequent execution test works.
2783 ac_rmfiles=
2784 for ac_file in $ac_files
2785 do
2786   case $ac_file in
2787     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2788     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2789   esac
2790 done
2791 rm -f $ac_rmfiles
2792
2793 if { (ac_try="$ac_link_default"
2794 case "(($ac_try" in
2795   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2796   *) ac_try_echo=$ac_try;;
2797 esac
2798 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2799   (eval "$ac_link_default") 2>&5
2800   ac_status=$?
2801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802   (exit $ac_status); }; then
2803   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2804 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2805 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2806 # so that the user can short-circuit this test for compilers unknown to
2807 # Autoconf.
2808 for ac_file in $ac_files ''
2809 do
2810   test -f "$ac_file" || continue
2811   case $ac_file in
2812     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2813         ;;
2814     [ab].out )
2815         # We found the default executable, but exeext='' is most
2816         # certainly right.
2817         break;;
2818     *.* )
2819         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2820         then :; else
2821            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2822         fi
2823         # We set ac_cv_exeext here because the later test for it is not
2824         # safe: cross compilers may not add the suffix if given an `-o'
2825         # argument, so we may need to know it at that point already.
2826         # Even if this section looks crufty: it has the advantage of
2827         # actually working.
2828         break;;
2829     * )
2830         break;;
2831   esac
2832 done
2833 test "$ac_cv_exeext" = no && ac_cv_exeext=
2834
2835 else
2836   ac_file=''
2837 fi
2838
2839 { echo "$as_me:$LINENO: result: $ac_file" >&5
2840 echo "${ECHO_T}$ac_file" >&6; }
2841 if test -z "$ac_file"; then
2842   echo "$as_me: failed program was:" >&5
2843 sed 's/^/| /' conftest.$ac_ext >&5
2844
2845 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2846 See \`config.log' for more details." >&5
2847 echo "$as_me: error: C compiler cannot create executables
2848 See \`config.log' for more details." >&2;}
2849    { (exit 77); exit 77; }; }
2850 fi
2851
2852 ac_exeext=$ac_cv_exeext
2853
2854 # Check that the compiler produces executables we can run.  If not, either
2855 # the compiler is broken, or we cross compile.
2856 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2857 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2858 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2859 # If not cross compiling, check that we can run a simple program.
2860 if test "$cross_compiling" != yes; then
2861   if { ac_try='./$ac_file'
2862   { (case "(($ac_try" in
2863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864   *) ac_try_echo=$ac_try;;
2865 esac
2866 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2867   (eval "$ac_try") 2>&5
2868   ac_status=$?
2869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870   (exit $ac_status); }; }; then
2871     cross_compiling=no
2872   else
2873     if test "$cross_compiling" = maybe; then
2874         cross_compiling=yes
2875     else
2876         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2877 If you meant to cross compile, use \`--host'.
2878 See \`config.log' for more details." >&5
2879 echo "$as_me: error: cannot run C compiled programs.
2880 If you meant to cross compile, use \`--host'.
2881 See \`config.log' for more details." >&2;}
2882    { (exit 1); exit 1; }; }
2883     fi
2884   fi
2885 fi
2886 { echo "$as_me:$LINENO: result: yes" >&5
2887 echo "${ECHO_T}yes" >&6; }
2888
2889 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2890 ac_clean_files=$ac_clean_files_save
2891 # Check that the compiler produces executables we can run.  If not, either
2892 # the compiler is broken, or we cross compile.
2893 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2894 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2895 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2896 echo "${ECHO_T}$cross_compiling" >&6; }
2897
2898 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2899 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2900 if { (ac_try="$ac_link"
2901 case "(($ac_try" in
2902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2903   *) ac_try_echo=$ac_try;;
2904 esac
2905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2906   (eval "$ac_link") 2>&5
2907   ac_status=$?
2908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2909   (exit $ac_status); }; then
2910   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2911 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2912 # work properly (i.e., refer to `conftest.exe'), while it won't with
2913 # `rm'.
2914 for ac_file in conftest.exe conftest conftest.*; do
2915   test -f "$ac_file" || continue
2916   case $ac_file in
2917     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2918     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2919           break;;
2920     * ) break;;
2921   esac
2922 done
2923 else
2924   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2925 See \`config.log' for more details." >&5
2926 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2927 See \`config.log' for more details." >&2;}
2928    { (exit 1); exit 1; }; }
2929 fi
2930
2931 rm -rf conftest$ac_cv_exeext
2932 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2933 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2934
2935 rm -rf conftest.$ac_ext
2936 EXEEXT=$ac_cv_exeext
2937 ac_exeext=$EXEEXT
2938 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2939 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2940 if test "${ac_cv_objext+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   cat >conftest.$ac_ext <<_ACEOF
2944 /* confdefs.h.  */
2945 _ACEOF
2946 cat confdefs.h >>conftest.$ac_ext
2947 cat >>conftest.$ac_ext <<_ACEOF
2948 /* end confdefs.h.  */
2949
2950 int
2951 main ()
2952 {
2953
2954   ;
2955   return 0;
2956 }
2957 _ACEOF
2958 rm -rf conftest.o conftest.obj
2959 if { (ac_try="$ac_compile"
2960 case "(($ac_try" in
2961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962   *) ac_try_echo=$ac_try;;
2963 esac
2964 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2965   (eval "$ac_compile") 2>&5
2966   ac_status=$?
2967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2968   (exit $ac_status); }; then
2969   for ac_file in conftest.o conftest.obj conftest.*; do
2970   test -f "$ac_file" || continue;
2971   case $ac_file in
2972     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2973     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2974        break;;
2975   esac
2976 done
2977 else
2978   echo "$as_me: failed program was:" >&5
2979 sed 's/^/| /' conftest.$ac_ext >&5
2980
2981 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2982 See \`config.log' for more details." >&5
2983 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2984 See \`config.log' for more details." >&2;}
2985    { (exit 1); exit 1; }; }
2986 fi
2987
2988 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
2989 fi
2990 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2991 echo "${ECHO_T}$ac_cv_objext" >&6; }
2992 OBJEXT=$ac_cv_objext
2993 ac_objext=$OBJEXT
2994 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2995 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2996 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2997   echo $ECHO_N "(cached) $ECHO_C" >&6
2998 else
2999   cat >conftest.$ac_ext <<_ACEOF
3000 /* confdefs.h.  */
3001 _ACEOF
3002 cat confdefs.h >>conftest.$ac_ext
3003 cat >>conftest.$ac_ext <<_ACEOF
3004 /* end confdefs.h.  */
3005
3006 int
3007 main ()
3008 {
3009 #ifndef __GNUC__
3010        choke me
3011 #endif
3012
3013   ;
3014   return 0;
3015 }
3016 _ACEOF
3017 rm -rf conftest.$ac_objext
3018 if { (ac_try="$ac_compile"
3019 case "(($ac_try" in
3020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021   *) ac_try_echo=$ac_try;;
3022 esac
3023 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3024   (eval "$ac_compile") 2>conftest.er1
3025   ac_status=$?
3026   grep -v '^ *+' conftest.er1 >conftest.err
3027   rm -rf conftest.er1
3028   cat conftest.err >&5
3029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030   (exit $ac_status); } && {
3031          test -z "$ac_c_werror_flag" ||
3032          test ! -s conftest.err
3033        } && test -s conftest.$ac_objext; then
3034   ac_compiler_gnu=yes
3035 else
3036   echo "$as_me: failed program was:" >&5
3037 sed 's/^/| /' conftest.$ac_ext >&5
3038
3039         ac_compiler_gnu=no
3040 fi
3041
3042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3043 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3044
3045 fi
3046 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3047 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3048 GCC=`test $ac_compiler_gnu = yes && echo yes`
3049 ac_test_CFLAGS=${CFLAGS+set}
3050 ac_save_CFLAGS=$CFLAGS
3051 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3052 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3053 if test "${ac_cv_prog_cc_g+set}" = set; then
3054   echo $ECHO_N "(cached) $ECHO_C" >&6
3055 else
3056   ac_save_c_werror_flag=$ac_c_werror_flag
3057    ac_c_werror_flag=yes
3058    ac_cv_prog_cc_g=no
3059    CFLAGS="-g"
3060    cat >conftest.$ac_ext <<_ACEOF
3061 /* confdefs.h.  */
3062 _ACEOF
3063 cat confdefs.h >>conftest.$ac_ext
3064 cat >>conftest.$ac_ext <<_ACEOF
3065 /* end confdefs.h.  */
3066
3067 int
3068 main ()
3069 {
3070
3071   ;
3072   return 0;
3073 }
3074 _ACEOF
3075 rm -rf conftest.$ac_objext
3076 if { (ac_try="$ac_compile"
3077 case "(($ac_try" in
3078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079   *) ac_try_echo=$ac_try;;
3080 esac
3081 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3082   (eval "$ac_compile") 2>conftest.er1
3083   ac_status=$?
3084   grep -v '^ *+' conftest.er1 >conftest.err
3085   rm -rf conftest.er1
3086   cat conftest.err >&5
3087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3088   (exit $ac_status); } && {
3089          test -z "$ac_c_werror_flag" ||
3090          test ! -s conftest.err
3091        } && test -s conftest.$ac_objext; then
3092   ac_cv_prog_cc_g=yes
3093 else
3094   echo "$as_me: failed program was:" >&5
3095 sed 's/^/| /' conftest.$ac_ext >&5
3096
3097         CFLAGS=""
3098       cat >conftest.$ac_ext <<_ACEOF
3099 /* confdefs.h.  */
3100 _ACEOF
3101 cat confdefs.h >>conftest.$ac_ext
3102 cat >>conftest.$ac_ext <<_ACEOF
3103 /* end confdefs.h.  */
3104
3105 int
3106 main ()
3107 {
3108
3109   ;
3110   return 0;
3111 }
3112 _ACEOF
3113 rm -rf conftest.$ac_objext
3114 if { (ac_try="$ac_compile"
3115 case "(($ac_try" in
3116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117   *) ac_try_echo=$ac_try;;
3118 esac
3119 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3120   (eval "$ac_compile") 2>conftest.er1
3121   ac_status=$?
3122   grep -v '^ *+' conftest.er1 >conftest.err
3123   rm -rf conftest.er1
3124   cat conftest.err >&5
3125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126   (exit $ac_status); } && {
3127          test -z "$ac_c_werror_flag" ||
3128          test ! -s conftest.err
3129        } && test -s conftest.$ac_objext; then
3130   :
3131 else
3132   echo "$as_me: failed program was:" >&5
3133 sed 's/^/| /' conftest.$ac_ext >&5
3134
3135         ac_c_werror_flag=$ac_save_c_werror_flag
3136          CFLAGS="-g"
3137          cat >conftest.$ac_ext <<_ACEOF
3138 /* confdefs.h.  */
3139 _ACEOF
3140 cat confdefs.h >>conftest.$ac_ext
3141 cat >>conftest.$ac_ext <<_ACEOF
3142 /* end confdefs.h.  */
3143
3144 int
3145 main ()
3146 {
3147
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 rm -rf conftest.$ac_objext
3153 if { (ac_try="$ac_compile"
3154 case "(($ac_try" in
3155   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3156   *) ac_try_echo=$ac_try;;
3157 esac
3158 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3159   (eval "$ac_compile") 2>conftest.er1
3160   ac_status=$?
3161   grep -v '^ *+' conftest.er1 >conftest.err
3162   rm -rf conftest.er1
3163   cat conftest.err >&5
3164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3165   (exit $ac_status); } && {
3166          test -z "$ac_c_werror_flag" ||
3167          test ! -s conftest.err
3168        } && test -s conftest.$ac_objext; then
3169   ac_cv_prog_cc_g=yes
3170 else
3171   echo "$as_me: failed program was:" >&5
3172 sed 's/^/| /' conftest.$ac_ext >&5
3173
3174
3175 fi
3176
3177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3178 fi
3179
3180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3181 fi
3182
3183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3184    ac_c_werror_flag=$ac_save_c_werror_flag
3185 fi
3186 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3187 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3188 if test "$ac_test_CFLAGS" = set; then
3189   CFLAGS=$ac_save_CFLAGS
3190 elif test $ac_cv_prog_cc_g = yes; then
3191   if test "$GCC" = yes; then
3192     CFLAGS="-g -O2"
3193   else
3194     CFLAGS="-g"
3195   fi
3196 else
3197   if test "$GCC" = yes; then
3198     CFLAGS="-O2"
3199   else
3200     CFLAGS=
3201   fi
3202 fi
3203 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3204 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3205 if test "${ac_cv_prog_cc_c89+set}" = set; then
3206   echo $ECHO_N "(cached) $ECHO_C" >&6
3207 else
3208   ac_cv_prog_cc_c89=no
3209 ac_save_CC=$CC
3210 cat >conftest.$ac_ext <<_ACEOF
3211 /* confdefs.h.  */
3212 _ACEOF
3213 cat confdefs.h >>conftest.$ac_ext
3214 cat >>conftest.$ac_ext <<_ACEOF
3215 /* end confdefs.h.  */
3216 #include <stdarg.h>
3217 #include <stdio.h>
3218 #include <sys/types.h>
3219 #include <sys/stat.h>
3220 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3221 struct buf { int x; };
3222 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3223 static char *e (p, i)
3224      char **p;
3225      int i;
3226 {
3227   return p[i];
3228 }
3229 static char *f (char * (*g) (char **, int), char **p, ...)
3230 {
3231   char *s;
3232   va_list v;
3233   va_start (v,p);
3234   s = g (p, va_arg (v,int));
3235   va_end (v);
3236   return s;
3237 }
3238
3239 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3240    function prototypes and stuff, but not '\xHH' hex character constants.
3241    These don't provoke an error unfortunately, instead are silently treated
3242    as 'x'.  The following induces an error, until -std is added to get
3243    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3244    array size at least.  It's necessary to write '\x00'==0 to get something
3245    that's true only with -std.  */
3246 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3247
3248 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3249    inside strings and character constants.  */
3250 #define FOO(x) 'x'
3251 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3252
3253 int test (int i, double x);
3254 struct s1 {int (*f) (int a);};
3255 struct s2 {int (*f) (double a);};
3256 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3257 int argc;
3258 char **argv;
3259 int
3260 main ()
3261 {
3262 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3263   ;
3264   return 0;
3265 }
3266 _ACEOF
3267 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3268         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3269 do
3270   CC="$ac_save_CC $ac_arg"
3271   rm -rf conftest.$ac_objext
3272 if { (ac_try="$ac_compile"
3273 case "(($ac_try" in
3274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3275   *) ac_try_echo=$ac_try;;
3276 esac
3277 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3278   (eval "$ac_compile") 2>conftest.er1
3279   ac_status=$?
3280   grep -v '^ *+' conftest.er1 >conftest.err
3281   rm -rf conftest.er1
3282   cat conftest.err >&5
3283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3284   (exit $ac_status); } && {
3285          test -z "$ac_c_werror_flag" ||
3286          test ! -s conftest.err
3287        } && test -s conftest.$ac_objext; then
3288   ac_cv_prog_cc_c89=$ac_arg
3289 else
3290   echo "$as_me: failed program was:" >&5
3291 sed 's/^/| /' conftest.$ac_ext >&5
3292
3293
3294 fi
3295
3296 rm -f core conftest.err conftest.$ac_objext
3297   test "x$ac_cv_prog_cc_c89" != "xno" && break
3298 done
3299 rm -rf conftest.$ac_ext
3300 CC=$ac_save_CC
3301
3302 fi
3303 # AC_CACHE_VAL
3304 case "x$ac_cv_prog_cc_c89" in
3305   x)
3306     { echo "$as_me:$LINENO: result: none needed" >&5
3307 echo "${ECHO_T}none needed" >&6; } ;;
3308   xno)
3309     { echo "$as_me:$LINENO: result: unsupported" >&5
3310 echo "${ECHO_T}unsupported" >&6; } ;;
3311   *)
3312     CC="$CC $ac_cv_prog_cc_c89"
3313     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3314 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3315 esac
3316
3317
3318 ac_ext=c
3319 ac_cpp='$CPP $CPPFLAGS'
3320 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3321 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3322 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3323
3324
3325   if test -z "$GCC"; then
3326     # not using GCC
3327     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3328 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3329     case "$host" in
3330       *-hpux* )
3331         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3332 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3333         CC="$CC -Ae"
3334       ;;
3335       *-aix* )
3336         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3337 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3338         CC="$CC -qlanglvl=ansi -qhalt=e"
3339       ;;
3340       *-dec-* )
3341         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3342 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3343         CC="$CC -std1"
3344       ;;
3345       *)
3346         { echo "$as_me:$LINENO: result: no idea" >&5
3347 echo "${ECHO_T}no idea" >&6; }
3348       ;;
3349     esac
3350   else
3351     # using GCC
3352     case "$host" in
3353       *-solaris*)
3354         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3355 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3356         CC="$CC -D__EXTENSIONS__"
3357       ;;
3358     esac
3359   fi
3360
3361   OBJCC="$CC"
3362
3363   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3364 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3365   if test "$cross_compiling" = yes; then
3366   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3367 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3368    { (exit 1); exit 1; }; }
3369 else
3370   cat >conftest.$ac_ext <<_ACEOF
3371 /* confdefs.h.  */
3372 _ACEOF
3373 cat confdefs.h >>conftest.$ac_ext
3374 cat >>conftest.$ac_ext <<_ACEOF
3375 /* end confdefs.h.  */
3376  main(int ac, char **av) { return 0; }
3377 _ACEOF
3378 rm -rf conftest$ac_exeext
3379 if { (ac_try="$ac_link"
3380 case "(($ac_try" in
3381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3382   *) ac_try_echo=$ac_try;;
3383 esac
3384 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3385   (eval "$ac_link") 2>&5
3386   ac_status=$?
3387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3389   { (case "(($ac_try" in
3390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3391   *) ac_try_echo=$ac_try;;
3392 esac
3393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3394   (eval "$ac_try") 2>&5
3395   ac_status=$?
3396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3397   (exit $ac_status); }; }; then
3398   { echo "$as_me:$LINENO: result: yes" >&5
3399 echo "${ECHO_T}yes" >&6; }
3400 else
3401   echo "$as_me: program exited with status $ac_status" >&5
3402 echo "$as_me: failed program was:" >&5
3403 sed 's/^/| /' conftest.$ac_ext >&5
3404
3405 ( exit $ac_status )
3406 { echo "$as_me:$LINENO: result: no" >&5
3407 echo "${ECHO_T}no" >&6; }
3408      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3409 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3410    { (exit 1); exit 1; }; }
3411 fi
3412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3413 fi
3414
3415
3416
3417   if test -n "$GCC"; then
3418     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3419 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3420     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3421     OBJCC="$OBJCC -Wall"
3422     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3423     # and so perhaps now we can do without -pedantic?
3424   else
3425     case "$host" in
3426       *-irix5* |*-irix6.0-3* )
3427         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3428 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3429         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3430       ;;
3431 #     *-dec-osf* )
3432 #       if test -z "$GCC"; then
3433 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3434 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3435 #       fi
3436 #     ;;
3437     esac
3438   fi
3439
3440 if test -n "$GCC"; then
3441    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3442 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3443 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3444   echo $ECHO_N "(cached) $ECHO_C" >&6
3445 else
3446   rm -rf conftest.$ac_ext
3447      touch conftest.$ac_ext
3448      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3449           grep unrecognized >/dev/null ); then
3450        ac_cv_gcc_accepts_no_overlength=no
3451      else
3452        ac_cv_gcc_accepts_no_overlength=yes
3453        CC="$CC -Wno-overlength-strings"
3454      fi
3455 fi
3456 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3457 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3458    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3459   fi
3460
3461 if test -n "$GCC"; then
3462    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3463 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3464 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3465   echo $ECHO_N "(cached) $ECHO_C" >&6
3466 else
3467   rm -rf conftest.$ac_ext
3468      touch conftest.$ac_ext
3469      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3470           grep unrecognized >/dev/null ); then
3471        ac_cv_gcc_accepts_no_decl_after=no
3472      else
3473        ac_cv_gcc_accepts_no_decl_after=yes
3474        CC="$CC -Wdeclaration-after-statement"
3475      fi
3476 fi
3477 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3478 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3479    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3480   fi
3481
3482 if test -n "$GCC"; then
3483    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3484 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3485 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3486   echo $ECHO_N "(cached) $ECHO_C" >&6
3487 else
3488   rm -rf conftest.$ac_ext
3489      touch conftest.$ac_ext
3490      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3491           grep unrecognized >/dev/null ); then
3492        ac_cv_gcc_accepts_no_cpp_precomp=no
3493      else
3494        ac_cv_gcc_accepts_no_cpp_precomp=yes
3495        CC="$CC -no-cpp-precomp"
3496      fi
3497 fi
3498 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3499 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3500    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3501   fi
3502
3503 if test -n "$GCC"; then
3504    if test -n "$GCC"; then
3505    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3506 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3507 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3508   echo $ECHO_N "(cached) $ECHO_C" >&6
3509 else
3510   rm -rf conftest.$ac_ext
3511      touch conftest.$ac_ext
3512      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3513           grep unrecognized >/dev/null ); then
3514        ac_cv_gcc_accepts_std=no
3515      else
3516        ac_cv_gcc_accepts_std=yes
3517        CC="$CC -std=c89"
3518      fi
3519 fi
3520 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3521 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3522    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3523   fi
3524
3525    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3526 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3527    #
3528    # The reason that // comments are banned from xscreensaver is that gcc is
3529    # basically the only compiler in the world that supports them in C code.
3530    # All other vendors support them only in their C++ compilers, not in their
3531    # ANSI C compilers.  This means that it's a portability problem: every time
3532    # these comments have snuck into the xscreensaver source code, I've gotten
3533    # complaints about it the next day.  So we turn off support for them in gcc
3534    # as well to prevent them from accidentially slipping in.
3535    #
3536    if test "$ac_gcc_accepts_std" = yes ; then
3537      #
3538      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3539      # (That appears to be the only additional preprocessor symbol
3540      # it defines, in addition to the syntax changes it makes.)
3541      #
3542      # -std=gnu89 is no good, because // comments were a GNU extension
3543      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3544      # with -std=gnu89 but not with -std=c89.)
3545      #
3546      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3547      CC="$CC -U__STRICT_ANSI__"
3548    else
3549      # The old way:
3550      CC="$CC -Wp,-lang-c89"
3551    fi
3552   fi
3553
3554 ac_ext=c
3555 ac_cpp='$CPP $CPPFLAGS'
3556 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3559 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3560 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3561 # On Suns, sometimes $CPP names a directory.
3562 if test -n "$CPP" && test -d "$CPP"; then
3563   CPP=
3564 fi
3565 if test -z "$CPP"; then
3566   if test "${ac_cv_prog_CPP+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569       # Double quotes because CPP needs to be expanded
3570     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3571     do
3572       ac_preproc_ok=false
3573 for ac_c_preproc_warn_flag in '' yes
3574 do
3575   # Use a header file that comes with gcc, so configuring glibc
3576   # with a fresh cross-compiler works.
3577   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3578   # <limits.h> exists even on freestanding compilers.
3579   # On the NeXT, cc -E runs the code through the compiler's parser,
3580   # not just through cpp. "Syntax error" is here to catch this case.
3581   cat >conftest.$ac_ext <<_ACEOF
3582 /* confdefs.h.  */
3583 _ACEOF
3584 cat confdefs.h >>conftest.$ac_ext
3585 cat >>conftest.$ac_ext <<_ACEOF
3586 /* end confdefs.h.  */
3587 #ifdef __STDC__
3588 # include <limits.h>
3589 #else
3590 # include <assert.h>
3591 #endif
3592                      Syntax error
3593 _ACEOF
3594 if { (ac_try="$ac_cpp conftest.$ac_ext"
3595 case "(($ac_try" in
3596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597   *) ac_try_echo=$ac_try;;
3598 esac
3599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3600   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3601   ac_status=$?
3602   grep -v '^ *+' conftest.er1 >conftest.err
3603   rm -rf conftest.er1
3604   cat conftest.err >&5
3605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606   (exit $ac_status); } >/dev/null && {
3607          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608          test ! -s conftest.err
3609        }; then
3610   :
3611 else
3612   echo "$as_me: failed program was:" >&5
3613 sed 's/^/| /' conftest.$ac_ext >&5
3614
3615   # Broken: fails on valid input.
3616 continue
3617 fi
3618
3619 rm -rf conftest.err conftest.$ac_ext
3620
3621   # OK, works on sane cases.  Now check whether nonexistent headers
3622   # can be detected and how.
3623   cat >conftest.$ac_ext <<_ACEOF
3624 /* confdefs.h.  */
3625 _ACEOF
3626 cat confdefs.h >>conftest.$ac_ext
3627 cat >>conftest.$ac_ext <<_ACEOF
3628 /* end confdefs.h.  */
3629 #include <ac_nonexistent.h>
3630 _ACEOF
3631 if { (ac_try="$ac_cpp conftest.$ac_ext"
3632 case "(($ac_try" in
3633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3634   *) ac_try_echo=$ac_try;;
3635 esac
3636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3637   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3638   ac_status=$?
3639   grep -v '^ *+' conftest.er1 >conftest.err
3640   rm -rf conftest.er1
3641   cat conftest.err >&5
3642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643   (exit $ac_status); } >/dev/null && {
3644          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3645          test ! -s conftest.err
3646        }; then
3647   # Broken: success on invalid input.
3648 continue
3649 else
3650   echo "$as_me: failed program was:" >&5
3651 sed 's/^/| /' conftest.$ac_ext >&5
3652
3653   # Passes both tests.
3654 ac_preproc_ok=:
3655 break
3656 fi
3657
3658 rm -rf conftest.err conftest.$ac_ext
3659
3660 done
3661 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3662 rm -rf conftest.err conftest.$ac_ext
3663 if $ac_preproc_ok; then
3664   break
3665 fi
3666
3667     done
3668     ac_cv_prog_CPP=$CPP
3669
3670 fi
3671   CPP=$ac_cv_prog_CPP
3672 else
3673   ac_cv_prog_CPP=$CPP
3674 fi
3675 { echo "$as_me:$LINENO: result: $CPP" >&5
3676 echo "${ECHO_T}$CPP" >&6; }
3677 ac_preproc_ok=false
3678 for ac_c_preproc_warn_flag in '' yes
3679 do
3680   # Use a header file that comes with gcc, so configuring glibc
3681   # with a fresh cross-compiler works.
3682   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3683   # <limits.h> exists even on freestanding compilers.
3684   # On the NeXT, cc -E runs the code through the compiler's parser,
3685   # not just through cpp. "Syntax error" is here to catch this case.
3686   cat >conftest.$ac_ext <<_ACEOF
3687 /* confdefs.h.  */
3688 _ACEOF
3689 cat confdefs.h >>conftest.$ac_ext
3690 cat >>conftest.$ac_ext <<_ACEOF
3691 /* end confdefs.h.  */
3692 #ifdef __STDC__
3693 # include <limits.h>
3694 #else
3695 # include <assert.h>
3696 #endif
3697                      Syntax error
3698 _ACEOF
3699 if { (ac_try="$ac_cpp conftest.$ac_ext"
3700 case "(($ac_try" in
3701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3702   *) ac_try_echo=$ac_try;;
3703 esac
3704 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3705   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3706   ac_status=$?
3707   grep -v '^ *+' conftest.er1 >conftest.err
3708   rm -rf conftest.er1
3709   cat conftest.err >&5
3710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711   (exit $ac_status); } >/dev/null && {
3712          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3713          test ! -s conftest.err
3714        }; then
3715   :
3716 else
3717   echo "$as_me: failed program was:" >&5
3718 sed 's/^/| /' conftest.$ac_ext >&5
3719
3720   # Broken: fails on valid input.
3721 continue
3722 fi
3723
3724 rm -rf conftest.err conftest.$ac_ext
3725
3726   # OK, works on sane cases.  Now check whether nonexistent headers
3727   # can be detected and how.
3728   cat >conftest.$ac_ext <<_ACEOF
3729 /* confdefs.h.  */
3730 _ACEOF
3731 cat confdefs.h >>conftest.$ac_ext
3732 cat >>conftest.$ac_ext <<_ACEOF
3733 /* end confdefs.h.  */
3734 #include <ac_nonexistent.h>
3735 _ACEOF
3736 if { (ac_try="$ac_cpp conftest.$ac_ext"
3737 case "(($ac_try" in
3738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3739   *) ac_try_echo=$ac_try;;
3740 esac
3741 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3742   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3743   ac_status=$?
3744   grep -v '^ *+' conftest.er1 >conftest.err
3745   rm -rf conftest.er1
3746   cat conftest.err >&5
3747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3748   (exit $ac_status); } >/dev/null && {
3749          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3750          test ! -s conftest.err
3751        }; then
3752   # Broken: success on invalid input.
3753 continue
3754 else
3755   echo "$as_me: failed program was:" >&5
3756 sed 's/^/| /' conftest.$ac_ext >&5
3757
3758   # Passes both tests.
3759 ac_preproc_ok=:
3760 break
3761 fi
3762
3763 rm -rf conftest.err conftest.$ac_ext
3764
3765 done
3766 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3767 rm -rf conftest.err conftest.$ac_ext
3768 if $ac_preproc_ok; then
3769   :
3770 else
3771   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3772 See \`config.log' for more details." >&5
3773 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3774 See \`config.log' for more details." >&2;}
3775    { (exit 1); exit 1; }; }
3776 fi
3777
3778 ac_ext=c
3779 ac_cpp='$CPP $CPPFLAGS'
3780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3783
3784 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3785 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3786 if test "${ac_cv_c_const+set}" = set; then
3787   echo $ECHO_N "(cached) $ECHO_C" >&6
3788 else
3789   cat >conftest.$ac_ext <<_ACEOF
3790 /* confdefs.h.  */
3791 _ACEOF
3792 cat confdefs.h >>conftest.$ac_ext
3793 cat >>conftest.$ac_ext <<_ACEOF
3794 /* end confdefs.h.  */
3795
3796 int
3797 main ()
3798 {
3799 /* FIXME: Include the comments suggested by Paul. */
3800 #ifndef __cplusplus
3801   /* Ultrix mips cc rejects this.  */
3802   typedef int charset[2];
3803   const charset cs;
3804   /* SunOS 4.1.1 cc rejects this.  */
3805   char const *const *pcpcc;
3806   char **ppc;
3807   /* NEC SVR4.0.2 mips cc rejects this.  */
3808   struct point {int x, y;};
3809   static struct point const zero = {0,0};
3810   /* AIX XL C 1.02.0.0 rejects this.
3811      It does not let you subtract one const X* pointer from another in
3812      an arm of an if-expression whose if-part is not a constant
3813      expression */
3814   const char *g = "string";
3815   pcpcc = &g + (g ? g-g : 0);
3816   /* HPUX 7.0 cc rejects these. */
3817   ++pcpcc;
3818   ppc = (char**) pcpcc;
3819   pcpcc = (char const *const *) ppc;
3820   { /* SCO 3.2v4 cc rejects this.  */
3821     char *t;
3822     char const *s = 0 ? (char *) 0 : (char const *) 0;
3823
3824     *t++ = 0;
3825     if (s) return 0;
3826   }
3827   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3828     int x[] = {25, 17};
3829     const int *foo = &x[0];
3830     ++foo;
3831   }
3832   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3833     typedef const int *iptr;
3834     iptr p = 0;
3835     ++p;
3836   }
3837   { /* AIX XL C 1.02.0.0 rejects this saying
3838        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3839     struct s { int j; const int *ap[3]; };
3840     struct s *b; b->j = 5;
3841   }
3842   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3843     const int foo = 10;
3844     if (!foo) return 0;
3845   }
3846   return !cs[0] && !zero.x;
3847 #endif
3848
3849   ;
3850   return 0;
3851 }
3852 _ACEOF
3853 rm -rf conftest.$ac_objext
3854 if { (ac_try="$ac_compile"
3855 case "(($ac_try" in
3856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857   *) ac_try_echo=$ac_try;;
3858 esac
3859 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3860   (eval "$ac_compile") 2>conftest.er1
3861   ac_status=$?
3862   grep -v '^ *+' conftest.er1 >conftest.err
3863   rm -rf conftest.er1
3864   cat conftest.err >&5
3865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866   (exit $ac_status); } && {
3867          test -z "$ac_c_werror_flag" ||
3868          test ! -s conftest.err
3869        } && test -s conftest.$ac_objext; then
3870   ac_cv_c_const=yes
3871 else
3872   echo "$as_me: failed program was:" >&5
3873 sed 's/^/| /' conftest.$ac_ext >&5
3874
3875         ac_cv_c_const=no
3876 fi
3877
3878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3879 fi
3880 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3881 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3882 if test $ac_cv_c_const = no; then
3883
3884 cat >>confdefs.h <<\_ACEOF
3885 #define const
3886 _ACEOF
3887
3888 fi
3889
3890 { echo "$as_me:$LINENO: checking for inline" >&5
3891 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3892 if test "${ac_cv_c_inline+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   ac_cv_c_inline=no
3896 for ac_kw in inline __inline__ __inline; do
3897   cat >conftest.$ac_ext <<_ACEOF
3898 /* confdefs.h.  */
3899 _ACEOF
3900 cat confdefs.h >>conftest.$ac_ext
3901 cat >>conftest.$ac_ext <<_ACEOF
3902 /* end confdefs.h.  */
3903 #ifndef __cplusplus
3904 typedef int foo_t;
3905 static $ac_kw foo_t static_foo () {return 0; }
3906 $ac_kw foo_t foo () {return 0; }
3907 #endif
3908
3909 _ACEOF
3910 rm -rf conftest.$ac_objext
3911 if { (ac_try="$ac_compile"
3912 case "(($ac_try" in
3913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914   *) ac_try_echo=$ac_try;;
3915 esac
3916 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3917   (eval "$ac_compile") 2>conftest.er1
3918   ac_status=$?
3919   grep -v '^ *+' conftest.er1 >conftest.err
3920   rm -rf conftest.er1
3921   cat conftest.err >&5
3922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3923   (exit $ac_status); } && {
3924          test -z "$ac_c_werror_flag" ||
3925          test ! -s conftest.err
3926        } && test -s conftest.$ac_objext; then
3927   ac_cv_c_inline=$ac_kw
3928 else
3929   echo "$as_me: failed program was:" >&5
3930 sed 's/^/| /' conftest.$ac_ext >&5
3931
3932
3933 fi
3934
3935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3936   test "$ac_cv_c_inline" != no && break
3937 done
3938
3939 fi
3940 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3941 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3942
3943
3944 case $ac_cv_c_inline in
3945   inline | yes) ;;
3946   *)
3947     case $ac_cv_c_inline in
3948       no) ac_val=;;
3949       *) ac_val=$ac_cv_c_inline;;
3950     esac
3951     cat >>confdefs.h <<_ACEOF
3952 #ifndef __cplusplus
3953 #define inline $ac_val
3954 #endif
3955 _ACEOF
3956     ;;
3957 esac
3958
3959
3960 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3961   { echo "$as_me:$LINENO: checking for bc" >&5
3962 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3963   if test "$ac_bc_result" = "15" ; then
3964     { echo "$as_me:$LINENO: result: yes" >&5
3965 echo "${ECHO_T}yes" >&6; }
3966   else
3967     { echo "$as_me:$LINENO: result: no" >&5
3968 echo "${ECHO_T}no" >&6; }
3969     echo ''
3970     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3971                   part of Unix since the 1970s.  Come back when your vendor
3972                   has grown a clue." >&5
3973 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3974                   part of Unix since the 1970s.  Come back when your vendor
3975                   has grown a clue." >&2;}
3976    { (exit 1); exit 1; }; }
3977   fi
3978
3979
3980 # stuff for Makefiles
3981 # Find a good install program.  We prefer a C program (faster),
3982 # so one script is as good as another.  But avoid the broken or
3983 # incompatible versions:
3984 # SysV /etc/install, /usr/sbin/install
3985 # SunOS /usr/etc/install
3986 # IRIX /sbin/install
3987 # AIX /bin/install
3988 # AmigaOS /C/install, which installs bootblocks on floppy discs
3989 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3990 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3991 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3992 # OS/2's system install, which has a completely different semantic
3993 # ./install, which can be erroneously created by make from ./install.sh.
3994 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3995 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3996 if test -z "$INSTALL"; then
3997 if test "${ac_cv_path_install+set}" = set; then
3998   echo $ECHO_N "(cached) $ECHO_C" >&6
3999 else
4000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4001 for as_dir in $PATH
4002 do
4003   IFS=$as_save_IFS
4004   test -z "$as_dir" && as_dir=.
4005   # Account for people who put trailing slashes in PATH elements.
4006 case $as_dir/ in
4007   ./ | .// | /cC/* | \
4008   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4009   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4010   /usr/ucb/* ) ;;
4011   *)
4012     # OSF1 and SCO ODT 3.0 have their own names for install.
4013     # Don't use installbsd from OSF since it installs stuff as root
4014     # by default.
4015     for ac_prog in ginstall scoinst install; do
4016       for ac_exec_ext in '' $ac_executable_extensions; do
4017         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4018           if test $ac_prog = install &&
4019             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4020             # AIX install.  It has an incompatible calling convention.
4021             :
4022           elif test $ac_prog = install &&
4023             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4024             # program-specific install script used by HP pwplus--don't use.
4025             :
4026           else
4027             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4028             break 3
4029           fi
4030         fi
4031       done
4032     done
4033     ;;
4034 esac
4035 done
4036 IFS=$as_save_IFS
4037
4038
4039 fi
4040   if test "${ac_cv_path_install+set}" = set; then
4041     INSTALL=$ac_cv_path_install
4042   else
4043     # As a last resort, use the slow shell script.  Don't cache a
4044     # value for INSTALL within a source directory, because that will
4045     # break other packages using the cache if that directory is
4046     # removed, or if the value is a relative name.
4047     INSTALL=$ac_install_sh
4048   fi
4049 fi
4050 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4051 echo "${ECHO_T}$INSTALL" >&6; }
4052
4053 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4054 # It thinks the first close brace ends the variable substitution.
4055 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4056
4057 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4058
4059 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4060
4061 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4062 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4063 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   ac_cv_install_d_creates_dirs=no
4067      rm -rf conftestdir
4068      if mkdir conftestdir; then
4069        cd conftestdir 2>/dev/null
4070        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4071        if test -d dir1/dir2/. ; then
4072          ac_cv_install_d_creates_dirs=yes
4073        fi
4074        cd .. 2>/dev/null
4075        rm -rf conftestdir
4076      fi
4077
4078 fi
4079 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4080 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4081
4082   if test "$ac_cv_install_d_creates_dirs" = no ; then
4083     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4084 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4085 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   ac_cv_mkdir_p_creates_dirs=no
4089        rm -rf conftestdir
4090        if mkdir conftestdir; then
4091          cd conftestdir 2>/dev/null
4092          mkdir -p dir1/dir2 >/dev/null 2>&1
4093          if test -d dir1/dir2/. ; then
4094            ac_cv_mkdir_p_creates_dirs=yes
4095          fi
4096          cd .. 2>/dev/null
4097          rm -rf conftestdir
4098        fi
4099
4100 fi
4101 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4102 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4103   fi
4104
4105   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4106     INSTALL_DIRS='${INSTALL} -d'
4107   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4108     INSTALL_DIRS='mkdir -p'
4109   else
4110     # any other ideas?
4111     INSTALL_DIRS='${INSTALL} -d'
4112   fi
4113
4114 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4115 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4116 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4117 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4118   echo $ECHO_N "(cached) $ECHO_C" >&6
4119 else
4120   cat >conftest.make <<\_ACEOF
4121 SHELL = /bin/sh
4122 all:
4123         @echo '@@@%%%=$(MAKE)=@@@%%%'
4124 _ACEOF
4125 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4126 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4127   *@@@%%%=?*=@@@%%%*)
4128     eval ac_cv_prog_make_${ac_make}_set=yes;;
4129   *)
4130     eval ac_cv_prog_make_${ac_make}_set=no;;
4131 esac
4132 rm -rf conftest.make
4133 fi
4134 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4135   { echo "$as_me:$LINENO: result: yes" >&5
4136 echo "${ECHO_T}yes" >&6; }
4137   SET_MAKE=
4138 else
4139   { echo "$as_me:$LINENO: result: no" >&5
4140 echo "${ECHO_T}no" >&6; }
4141   SET_MAKE="MAKE=${MAKE-make}"
4142 fi
4143
4144
4145 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4146 # That's wrong: it should be set to '${INSTALL}', so that one can
4147 # implement the "install-strip" target properly (strip executables,
4148 # but do not try to strip scripts.)
4149 #
4150 INSTALL_SCRIPT='${INSTALL}'
4151
4152 # random libc stuff
4153
4154 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4155 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4156 if test "${ac_cv_path_GREP+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   # Extract the first word of "grep ggrep" to use in msg output
4160 if test -z "$GREP"; then
4161 set dummy grep ggrep; ac_prog_name=$2
4162 if test "${ac_cv_path_GREP+set}" = set; then
4163   echo $ECHO_N "(cached) $ECHO_C" >&6
4164 else
4165   ac_path_GREP_found=false
4166 # Loop through the user's path and test for each of PROGNAME-LIST
4167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4169 do
4170   IFS=$as_save_IFS
4171   test -z "$as_dir" && as_dir=.
4172   for ac_prog in grep ggrep; do
4173   for ac_exec_ext in '' $ac_executable_extensions; do
4174     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4175     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4176     # Check for GNU ac_path_GREP and select it if it is found.
4177   # Check for GNU $ac_path_GREP
4178 case `"$ac_path_GREP" --version 2>&1` in
4179 *GNU*)
4180   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4181 *)
4182   ac_count=0
4183   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4184   while :
4185   do
4186     cat "conftest.in" "conftest.in" >"conftest.tmp"
4187     mv "conftest.tmp" "conftest.in"
4188     cp "conftest.in" "conftest.nl"
4189     echo 'GREP' >> "conftest.nl"
4190     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4191     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4192     ac_count=`expr $ac_count + 1`
4193     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4194       # Best one so far, save it but keep looking for a better one
4195       ac_cv_path_GREP="$ac_path_GREP"
4196       ac_path_GREP_max=$ac_count
4197     fi
4198     # 10*(2^10) chars as input seems more than enough
4199     test $ac_count -gt 10 && break
4200   done
4201   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4202 esac
4203
4204
4205     $ac_path_GREP_found && break 3
4206   done
4207 done
4208
4209 done
4210 IFS=$as_save_IFS
4211
4212
4213 fi
4214
4215 GREP="$ac_cv_path_GREP"
4216 if test -z "$GREP"; then
4217   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4218 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4219    { (exit 1); exit 1; }; }
4220 fi
4221
4222 else
4223   ac_cv_path_GREP=$GREP
4224 fi
4225
4226
4227 fi
4228 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4229 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4230  GREP="$ac_cv_path_GREP"
4231
4232
4233 { echo "$as_me:$LINENO: checking for egrep" >&5
4234 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4235 if test "${ac_cv_path_EGREP+set}" = set; then
4236   echo $ECHO_N "(cached) $ECHO_C" >&6
4237 else
4238   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4239    then ac_cv_path_EGREP="$GREP -E"
4240    else
4241      # Extract the first word of "egrep" to use in msg output
4242 if test -z "$EGREP"; then
4243 set dummy egrep; ac_prog_name=$2
4244 if test "${ac_cv_path_EGREP+set}" = set; then
4245   echo $ECHO_N "(cached) $ECHO_C" >&6
4246 else
4247   ac_path_EGREP_found=false
4248 # Loop through the user's path and test for each of PROGNAME-LIST
4249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4250 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4251 do
4252   IFS=$as_save_IFS
4253   test -z "$as_dir" && as_dir=.
4254   for ac_prog in egrep; do
4255   for ac_exec_ext in '' $ac_executable_extensions; do
4256     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4257     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4258     # Check for GNU ac_path_EGREP and select it if it is found.
4259   # Check for GNU $ac_path_EGREP
4260 case `"$ac_path_EGREP" --version 2>&1` in
4261 *GNU*)
4262   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4263 *)
4264   ac_count=0
4265   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4266   while :
4267   do
4268     cat "conftest.in" "conftest.in" >"conftest.tmp"
4269     mv "conftest.tmp" "conftest.in"
4270     cp "conftest.in" "conftest.nl"
4271     echo 'EGREP' >> "conftest.nl"
4272     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4273     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4274     ac_count=`expr $ac_count + 1`
4275     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4276       # Best one so far, save it but keep looking for a better one
4277       ac_cv_path_EGREP="$ac_path_EGREP"
4278       ac_path_EGREP_max=$ac_count
4279     fi
4280     # 10*(2^10) chars as input seems more than enough
4281     test $ac_count -gt 10 && break
4282   done
4283   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4284 esac
4285
4286
4287     $ac_path_EGREP_found && break 3
4288   done
4289 done
4290
4291 done
4292 IFS=$as_save_IFS
4293
4294
4295 fi
4296
4297 EGREP="$ac_cv_path_EGREP"
4298 if test -z "$EGREP"; then
4299   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4300 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4301    { (exit 1); exit 1; }; }
4302 fi
4303
4304 else
4305   ac_cv_path_EGREP=$EGREP
4306 fi
4307
4308
4309    fi
4310 fi
4311 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4312 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4313  EGREP="$ac_cv_path_EGREP"
4314
4315
4316 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4317 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4318 if test "${ac_cv_header_stdc+set}" = set; then
4319   echo $ECHO_N "(cached) $ECHO_C" >&6
4320 else
4321   cat >conftest.$ac_ext <<_ACEOF
4322 /* confdefs.h.  */
4323 _ACEOF
4324 cat confdefs.h >>conftest.$ac_ext
4325 cat >>conftest.$ac_ext <<_ACEOF
4326 /* end confdefs.h.  */
4327 #include <stdlib.h>
4328 #include <stdarg.h>
4329 #include <string.h>
4330 #include <float.h>
4331
4332 int
4333 main ()
4334 {
4335
4336   ;
4337   return 0;
4338 }
4339 _ACEOF
4340 rm -rf conftest.$ac_objext
4341 if { (ac_try="$ac_compile"
4342 case "(($ac_try" in
4343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4344   *) ac_try_echo=$ac_try;;
4345 esac
4346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4347   (eval "$ac_compile") 2>conftest.er1
4348   ac_status=$?
4349   grep -v '^ *+' conftest.er1 >conftest.err
4350   rm -rf conftest.er1
4351   cat conftest.err >&5
4352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353   (exit $ac_status); } && {
4354          test -z "$ac_c_werror_flag" ||
4355          test ! -s conftest.err
4356        } && test -s conftest.$ac_objext; then
4357   ac_cv_header_stdc=yes
4358 else
4359   echo "$as_me: failed program was:" >&5
4360 sed 's/^/| /' conftest.$ac_ext >&5
4361
4362         ac_cv_header_stdc=no
4363 fi
4364
4365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4366
4367 if test $ac_cv_header_stdc = yes; then
4368   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4369   cat >conftest.$ac_ext <<_ACEOF
4370 /* confdefs.h.  */
4371 _ACEOF
4372 cat confdefs.h >>conftest.$ac_ext
4373 cat >>conftest.$ac_ext <<_ACEOF
4374 /* end confdefs.h.  */
4375 #include <string.h>
4376
4377 _ACEOF
4378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4379   $EGREP "memchr" >/dev/null 2>&1; then
4380   :
4381 else
4382   ac_cv_header_stdc=no
4383 fi
4384 rm -rf conftest*
4385
4386 fi
4387
4388 if test $ac_cv_header_stdc = yes; then
4389   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4390   cat >conftest.$ac_ext <<_ACEOF
4391 /* confdefs.h.  */
4392 _ACEOF
4393 cat confdefs.h >>conftest.$ac_ext
4394 cat >>conftest.$ac_ext <<_ACEOF
4395 /* end confdefs.h.  */
4396 #include <stdlib.h>
4397
4398 _ACEOF
4399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4400   $EGREP "free" >/dev/null 2>&1; then
4401   :
4402 else
4403   ac_cv_header_stdc=no
4404 fi
4405 rm -rf conftest*
4406
4407 fi
4408
4409 if test $ac_cv_header_stdc = yes; then
4410   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4411   if test "$cross_compiling" = yes; then
4412   :
4413 else
4414   cat >conftest.$ac_ext <<_ACEOF
4415 /* confdefs.h.  */
4416 _ACEOF
4417 cat confdefs.h >>conftest.$ac_ext
4418 cat >>conftest.$ac_ext <<_ACEOF
4419 /* end confdefs.h.  */
4420 #include <ctype.h>
4421 #include <stdlib.h>
4422 #if ((' ' & 0x0FF) == 0x020)
4423 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4424 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4425 #else
4426 # define ISLOWER(c) \
4427                    (('a' <= (c) && (c) <= 'i') \
4428                      || ('j' <= (c) && (c) <= 'r') \
4429                      || ('s' <= (c) && (c) <= 'z'))
4430 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4431 #endif
4432
4433 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4434 int
4435 main ()
4436 {
4437   int i;
4438   for (i = 0; i < 256; i++)
4439     if (XOR (islower (i), ISLOWER (i))
4440         || toupper (i) != TOUPPER (i))
4441       return 2;
4442   return 0;
4443 }
4444 _ACEOF
4445 rm -rf conftest$ac_exeext
4446 if { (ac_try="$ac_link"
4447 case "(($ac_try" in
4448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4449   *) ac_try_echo=$ac_try;;
4450 esac
4451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4452   (eval "$ac_link") 2>&5
4453   ac_status=$?
4454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4455   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4456   { (case "(($ac_try" in
4457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4458   *) ac_try_echo=$ac_try;;
4459 esac
4460 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4461   (eval "$ac_try") 2>&5
4462   ac_status=$?
4463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464   (exit $ac_status); }; }; then
4465   :
4466 else
4467   echo "$as_me: program exited with status $ac_status" >&5
4468 echo "$as_me: failed program was:" >&5
4469 sed 's/^/| /' conftest.$ac_ext >&5
4470
4471 ( exit $ac_status )
4472 ac_cv_header_stdc=no
4473 fi
4474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4475 fi
4476
4477
4478 fi
4479 fi
4480 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4481 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4482 if test $ac_cv_header_stdc = yes; then
4483
4484 cat >>confdefs.h <<\_ACEOF
4485 #define STDC_HEADERS 1
4486 _ACEOF
4487
4488 fi
4489
4490 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4501                   inttypes.h stdint.h unistd.h
4502 do
4503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4504 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4506 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   cat >conftest.$ac_ext <<_ACEOF
4510 /* confdefs.h.  */
4511 _ACEOF
4512 cat confdefs.h >>conftest.$ac_ext
4513 cat >>conftest.$ac_ext <<_ACEOF
4514 /* end confdefs.h.  */
4515 $ac_includes_default
4516
4517 #include <$ac_header>
4518 _ACEOF
4519 rm -rf conftest.$ac_objext
4520 if { (ac_try="$ac_compile"
4521 case "(($ac_try" in
4522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4523   *) ac_try_echo=$ac_try;;
4524 esac
4525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4526   (eval "$ac_compile") 2>conftest.er1
4527   ac_status=$?
4528   grep -v '^ *+' conftest.er1 >conftest.err
4529   rm -rf conftest.er1
4530   cat conftest.err >&5
4531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532   (exit $ac_status); } && {
4533          test -z "$ac_c_werror_flag" ||
4534          test ! -s conftest.err
4535        } && test -s conftest.$ac_objext; then
4536   eval "$as_ac_Header=yes"
4537 else
4538   echo "$as_me: failed program was:" >&5
4539 sed 's/^/| /' conftest.$ac_ext >&5
4540
4541         eval "$as_ac_Header=no"
4542 fi
4543
4544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4545 fi
4546 ac_res=`eval echo '${'$as_ac_Header'}'`
4547                { echo "$as_me:$LINENO: result: $ac_res" >&5
4548 echo "${ECHO_T}$ac_res" >&6; }
4549 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4550   cat >>confdefs.h <<_ACEOF
4551 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4552 _ACEOF
4553
4554 fi
4555
4556 done
4557
4558
4559
4560 for ac_header in unistd.h
4561 do
4562 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4563 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4564   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4565 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4566 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 fi
4569 ac_res=`eval echo '${'$as_ac_Header'}'`
4570                { echo "$as_me:$LINENO: result: $ac_res" >&5
4571 echo "${ECHO_T}$ac_res" >&6; }
4572 else
4573   # Is the header compilable?
4574 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4575 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4576 cat >conftest.$ac_ext <<_ACEOF
4577 /* confdefs.h.  */
4578 _ACEOF
4579 cat confdefs.h >>conftest.$ac_ext
4580 cat >>conftest.$ac_ext <<_ACEOF
4581 /* end confdefs.h.  */
4582 $ac_includes_default
4583 #include <$ac_header>
4584 _ACEOF
4585 rm -rf conftest.$ac_objext
4586 if { (ac_try="$ac_compile"
4587 case "(($ac_try" in
4588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4589   *) ac_try_echo=$ac_try;;
4590 esac
4591 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4592   (eval "$ac_compile") 2>conftest.er1
4593   ac_status=$?
4594   grep -v '^ *+' conftest.er1 >conftest.err
4595   rm -rf conftest.er1
4596   cat conftest.err >&5
4597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598   (exit $ac_status); } && {
4599          test -z "$ac_c_werror_flag" ||
4600          test ! -s conftest.err
4601        } && test -s conftest.$ac_objext; then
4602   ac_header_compiler=yes
4603 else
4604   echo "$as_me: failed program was:" >&5
4605 sed 's/^/| /' conftest.$ac_ext >&5
4606
4607         ac_header_compiler=no
4608 fi
4609
4610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4611 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4612 echo "${ECHO_T}$ac_header_compiler" >&6; }
4613
4614 # Is the header present?
4615 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4616 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4617 cat >conftest.$ac_ext <<_ACEOF
4618 /* confdefs.h.  */
4619 _ACEOF
4620 cat confdefs.h >>conftest.$ac_ext
4621 cat >>conftest.$ac_ext <<_ACEOF
4622 /* end confdefs.h.  */
4623 #include <$ac_header>
4624 _ACEOF
4625 if { (ac_try="$ac_cpp conftest.$ac_ext"
4626 case "(($ac_try" in
4627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628   *) ac_try_echo=$ac_try;;
4629 esac
4630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4631   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4632   ac_status=$?
4633   grep -v '^ *+' conftest.er1 >conftest.err
4634   rm -rf conftest.er1
4635   cat conftest.err >&5
4636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637   (exit $ac_status); } >/dev/null && {
4638          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4639          test ! -s conftest.err
4640        }; then
4641   ac_header_preproc=yes
4642 else
4643   echo "$as_me: failed program was:" >&5
4644 sed 's/^/| /' conftest.$ac_ext >&5
4645
4646   ac_header_preproc=no
4647 fi
4648
4649 rm -rf conftest.err conftest.$ac_ext
4650 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4651 echo "${ECHO_T}$ac_header_preproc" >&6; }
4652
4653 # So?  What about this header?
4654 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4655   yes:no: )
4656     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4657 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4658     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4659 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4660     ac_header_preproc=yes
4661     ;;
4662   no:yes:* )
4663     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4664 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4665     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4666 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4667     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4668 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4669     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4670 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4671     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4672 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4673     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4674 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4675
4676     ;;
4677 esac
4678 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4679 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4680 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4681   echo $ECHO_N "(cached) $ECHO_C" >&6
4682 else
4683   eval "$as_ac_Header=\$ac_header_preproc"
4684 fi
4685 ac_res=`eval echo '${'$as_ac_Header'}'`
4686                { echo "$as_me:$LINENO: result: $ac_res" >&5
4687 echo "${ECHO_T}$ac_res" >&6; }
4688
4689 fi
4690 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4691   cat >>confdefs.h <<_ACEOF
4692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4693 _ACEOF
4694
4695 fi
4696
4697 done
4698
4699 { echo "$as_me:$LINENO: checking for mode_t" >&5
4700 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4701 if test "${ac_cv_type_mode_t+set}" = set; then
4702   echo $ECHO_N "(cached) $ECHO_C" >&6
4703 else
4704   cat >conftest.$ac_ext <<_ACEOF
4705 /* confdefs.h.  */
4706 _ACEOF
4707 cat confdefs.h >>conftest.$ac_ext
4708 cat >>conftest.$ac_ext <<_ACEOF
4709 /* end confdefs.h.  */
4710 $ac_includes_default
4711 typedef mode_t ac__type_new_;
4712 int
4713 main ()
4714 {
4715 if ((ac__type_new_ *) 0)
4716   return 0;
4717 if (sizeof (ac__type_new_))
4718   return 0;
4719   ;
4720   return 0;
4721 }
4722 _ACEOF
4723 rm -rf conftest.$ac_objext
4724 if { (ac_try="$ac_compile"
4725 case "(($ac_try" in
4726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4727   *) ac_try_echo=$ac_try;;
4728 esac
4729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4730   (eval "$ac_compile") 2>conftest.er1
4731   ac_status=$?
4732   grep -v '^ *+' conftest.er1 >conftest.err
4733   rm -rf conftest.er1
4734   cat conftest.err >&5
4735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736   (exit $ac_status); } && {
4737          test -z "$ac_c_werror_flag" ||
4738          test ! -s conftest.err
4739        } && test -s conftest.$ac_objext; then
4740   ac_cv_type_mode_t=yes
4741 else
4742   echo "$as_me: failed program was:" >&5
4743 sed 's/^/| /' conftest.$ac_ext >&5
4744
4745         ac_cv_type_mode_t=no
4746 fi
4747
4748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4749 fi
4750 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4751 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4752 if test $ac_cv_type_mode_t = yes; then
4753   :
4754 else
4755
4756 cat >>confdefs.h <<_ACEOF
4757 #define mode_t int
4758 _ACEOF
4759
4760 fi
4761
4762 { echo "$as_me:$LINENO: checking for pid_t" >&5
4763 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4764 if test "${ac_cv_type_pid_t+set}" = set; then
4765   echo $ECHO_N "(cached) $ECHO_C" >&6
4766 else
4767   cat >conftest.$ac_ext <<_ACEOF
4768 /* confdefs.h.  */
4769 _ACEOF
4770 cat confdefs.h >>conftest.$ac_ext
4771 cat >>conftest.$ac_ext <<_ACEOF
4772 /* end confdefs.h.  */
4773 $ac_includes_default
4774 typedef pid_t ac__type_new_;
4775 int
4776 main ()
4777 {
4778 if ((ac__type_new_ *) 0)
4779   return 0;
4780 if (sizeof (ac__type_new_))
4781   return 0;
4782   ;
4783   return 0;
4784 }
4785 _ACEOF
4786 rm -rf conftest.$ac_objext
4787 if { (ac_try="$ac_compile"
4788 case "(($ac_try" in
4789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4790   *) ac_try_echo=$ac_try;;
4791 esac
4792 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4793   (eval "$ac_compile") 2>conftest.er1
4794   ac_status=$?
4795   grep -v '^ *+' conftest.er1 >conftest.err
4796   rm -rf conftest.er1
4797   cat conftest.err >&5
4798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799   (exit $ac_status); } && {
4800          test -z "$ac_c_werror_flag" ||
4801          test ! -s conftest.err
4802        } && test -s conftest.$ac_objext; then
4803   ac_cv_type_pid_t=yes
4804 else
4805   echo "$as_me: failed program was:" >&5
4806 sed 's/^/| /' conftest.$ac_ext >&5
4807
4808         ac_cv_type_pid_t=no
4809 fi
4810
4811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4812 fi
4813 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4814 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4815 if test $ac_cv_type_pid_t = yes; then
4816   :
4817 else
4818
4819 cat >>confdefs.h <<_ACEOF
4820 #define pid_t int
4821 _ACEOF
4822
4823 fi
4824
4825 { echo "$as_me:$LINENO: checking for size_t" >&5
4826 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4827 if test "${ac_cv_type_size_t+set}" = set; then
4828   echo $ECHO_N "(cached) $ECHO_C" >&6
4829 else
4830   cat >conftest.$ac_ext <<_ACEOF
4831 /* confdefs.h.  */
4832 _ACEOF
4833 cat confdefs.h >>conftest.$ac_ext
4834 cat >>conftest.$ac_ext <<_ACEOF
4835 /* end confdefs.h.  */
4836 $ac_includes_default
4837 typedef size_t ac__type_new_;
4838 int
4839 main ()
4840 {
4841 if ((ac__type_new_ *) 0)
4842   return 0;
4843 if (sizeof (ac__type_new_))
4844   return 0;
4845   ;
4846   return 0;
4847 }
4848 _ACEOF
4849 rm -rf conftest.$ac_objext
4850 if { (ac_try="$ac_compile"
4851 case "(($ac_try" in
4852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4853   *) ac_try_echo=$ac_try;;
4854 esac
4855 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4856   (eval "$ac_compile") 2>conftest.er1
4857   ac_status=$?
4858   grep -v '^ *+' conftest.er1 >conftest.err
4859   rm -rf conftest.er1
4860   cat conftest.err >&5
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); } && {
4863          test -z "$ac_c_werror_flag" ||
4864          test ! -s conftest.err
4865        } && test -s conftest.$ac_objext; then
4866   ac_cv_type_size_t=yes
4867 else
4868   echo "$as_me: failed program was:" >&5
4869 sed 's/^/| /' conftest.$ac_ext >&5
4870
4871         ac_cv_type_size_t=no
4872 fi
4873
4874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4875 fi
4876 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4877 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4878 if test $ac_cv_type_size_t = yes; then
4879   :
4880 else
4881
4882 cat >>confdefs.h <<_ACEOF
4883 #define size_t unsigned int
4884 _ACEOF
4885
4886 fi
4887
4888 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4889 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4890 if test "${ac_cv_type_signal+set}" = set; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   cat >conftest.$ac_ext <<_ACEOF
4894 /* confdefs.h.  */
4895 _ACEOF
4896 cat confdefs.h >>conftest.$ac_ext
4897 cat >>conftest.$ac_ext <<_ACEOF
4898 /* end confdefs.h.  */
4899 #include <sys/types.h>
4900 #include <signal.h>
4901
4902 int
4903 main ()
4904 {
4905 return *(signal (0, 0)) (0) == 1;
4906   ;
4907   return 0;
4908 }
4909 _ACEOF
4910 rm -rf conftest.$ac_objext
4911 if { (ac_try="$ac_compile"
4912 case "(($ac_try" in
4913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4914   *) ac_try_echo=$ac_try;;
4915 esac
4916 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4917   (eval "$ac_compile") 2>conftest.er1
4918   ac_status=$?
4919   grep -v '^ *+' conftest.er1 >conftest.err
4920   rm -rf conftest.er1
4921   cat conftest.err >&5
4922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923   (exit $ac_status); } && {
4924          test -z "$ac_c_werror_flag" ||
4925          test ! -s conftest.err
4926        } && test -s conftest.$ac_objext; then
4927   ac_cv_type_signal=int
4928 else
4929   echo "$as_me: failed program was:" >&5
4930 sed 's/^/| /' conftest.$ac_ext >&5
4931
4932         ac_cv_type_signal=void
4933 fi
4934
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 fi
4937 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4938 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4939
4940 cat >>confdefs.h <<_ACEOF
4941 #define RETSIGTYPE $ac_cv_type_signal
4942 _ACEOF
4943
4944
4945 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4946 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4947 if test "${ac_cv_header_time+set}" = set; then
4948   echo $ECHO_N "(cached) $ECHO_C" >&6
4949 else
4950   cat >conftest.$ac_ext <<_ACEOF
4951 /* confdefs.h.  */
4952 _ACEOF
4953 cat confdefs.h >>conftest.$ac_ext
4954 cat >>conftest.$ac_ext <<_ACEOF
4955 /* end confdefs.h.  */
4956 #include <sys/types.h>
4957 #include <sys/time.h>
4958 #include <time.h>
4959
4960 int
4961 main ()
4962 {
4963 if ((struct tm *) 0)
4964 return 0;
4965   ;
4966   return 0;
4967 }
4968 _ACEOF
4969 rm -rf conftest.$ac_objext
4970 if { (ac_try="$ac_compile"
4971 case "(($ac_try" in
4972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4973   *) ac_try_echo=$ac_try;;
4974 esac
4975 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4976   (eval "$ac_compile") 2>conftest.er1
4977   ac_status=$?
4978   grep -v '^ *+' conftest.er1 >conftest.err
4979   rm -rf conftest.er1
4980   cat conftest.err >&5
4981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982   (exit $ac_status); } && {
4983          test -z "$ac_c_werror_flag" ||
4984          test ! -s conftest.err
4985        } && test -s conftest.$ac_objext; then
4986   ac_cv_header_time=yes
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 sed 's/^/| /' conftest.$ac_ext >&5
4990
4991         ac_cv_header_time=no
4992 fi
4993
4994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4995 fi
4996 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4997 echo "${ECHO_T}$ac_cv_header_time" >&6; }
4998 if test $ac_cv_header_time = yes; then
4999
5000 cat >>confdefs.h <<\_ACEOF
5001 #define TIME_WITH_SYS_TIME 1
5002 _ACEOF
5003
5004 fi
5005
5006 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5007 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5008 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5009   echo $ECHO_N "(cached) $ECHO_C" >&6
5010 else
5011   cat >conftest.$ac_ext <<_ACEOF
5012 /* confdefs.h.  */
5013 _ACEOF
5014 cat confdefs.h >>conftest.$ac_ext
5015 cat >>conftest.$ac_ext <<_ACEOF
5016 /* end confdefs.h.  */
5017 #include <sys/types.h>
5018 #include <sys/wait.h>
5019 #ifndef WEXITSTATUS
5020 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5021 #endif
5022 #ifndef WIFEXITED
5023 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5024 #endif
5025
5026 int
5027 main ()
5028 {
5029   int s;
5030   wait (&s);
5031   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5032   ;
5033   return 0;
5034 }
5035 _ACEOF
5036 rm -rf conftest.$ac_objext
5037 if { (ac_try="$ac_compile"
5038 case "(($ac_try" in
5039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040   *) ac_try_echo=$ac_try;;
5041 esac
5042 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5043   (eval "$ac_compile") 2>conftest.er1
5044   ac_status=$?
5045   grep -v '^ *+' conftest.er1 >conftest.err
5046   rm -rf conftest.er1
5047   cat conftest.err >&5
5048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049   (exit $ac_status); } && {
5050          test -z "$ac_c_werror_flag" ||
5051          test ! -s conftest.err
5052        } && test -s conftest.$ac_objext; then
5053   ac_cv_header_sys_wait_h=yes
5054 else
5055   echo "$as_me: failed program was:" >&5
5056 sed 's/^/| /' conftest.$ac_ext >&5
5057
5058         ac_cv_header_sys_wait_h=no
5059 fi
5060
5061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5062 fi
5063 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5064 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5065 if test $ac_cv_header_sys_wait_h = yes; then
5066
5067 cat >>confdefs.h <<\_ACEOF
5068 #define HAVE_SYS_WAIT_H 1
5069 _ACEOF
5070
5071 fi
5072
5073
5074
5075
5076
5077
5078 ac_header_dirent=no
5079 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5080   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5081 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5082 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5083 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5084   echo $ECHO_N "(cached) $ECHO_C" >&6
5085 else
5086   cat >conftest.$ac_ext <<_ACEOF
5087 /* confdefs.h.  */
5088 _ACEOF
5089 cat confdefs.h >>conftest.$ac_ext
5090 cat >>conftest.$ac_ext <<_ACEOF
5091 /* end confdefs.h.  */
5092 #include <sys/types.h>
5093 #include <$ac_hdr>
5094
5095 int
5096 main ()
5097 {
5098 if ((DIR *) 0)
5099 return 0;
5100   ;
5101   return 0;
5102 }
5103 _ACEOF
5104 rm -rf conftest.$ac_objext
5105 if { (ac_try="$ac_compile"
5106 case "(($ac_try" in
5107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5108   *) ac_try_echo=$ac_try;;
5109 esac
5110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5111   (eval "$ac_compile") 2>conftest.er1
5112   ac_status=$?
5113   grep -v '^ *+' conftest.er1 >conftest.err
5114   rm -rf conftest.er1
5115   cat conftest.err >&5
5116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117   (exit $ac_status); } && {
5118          test -z "$ac_c_werror_flag" ||
5119          test ! -s conftest.err
5120        } && test -s conftest.$ac_objext; then
5121   eval "$as_ac_Header=yes"
5122 else
5123   echo "$as_me: failed program was:" >&5
5124 sed 's/^/| /' conftest.$ac_ext >&5
5125
5126         eval "$as_ac_Header=no"
5127 fi
5128
5129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5130 fi
5131 ac_res=`eval echo '${'$as_ac_Header'}'`
5132                { echo "$as_me:$LINENO: result: $ac_res" >&5
5133 echo "${ECHO_T}$ac_res" >&6; }
5134 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5135   cat >>confdefs.h <<_ACEOF
5136 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5137 _ACEOF
5138
5139 ac_header_dirent=$ac_hdr; break
5140 fi
5141
5142 done
5143 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5144 if test $ac_header_dirent = dirent.h; then
5145   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5146 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5147 if test "${ac_cv_search_opendir+set}" = set; then
5148   echo $ECHO_N "(cached) $ECHO_C" >&6
5149 else
5150   ac_func_search_save_LIBS=$LIBS
5151 cat >conftest.$ac_ext <<_ACEOF
5152 /* confdefs.h.  */
5153 _ACEOF
5154 cat confdefs.h >>conftest.$ac_ext
5155 cat >>conftest.$ac_ext <<_ACEOF
5156 /* end confdefs.h.  */
5157
5158 /* Override any GCC internal prototype to avoid an error.
5159    Use char because int might match the return type of a GCC
5160    builtin and then its argument prototype would still apply.  */
5161 #ifdef __cplusplus
5162 extern "C"
5163 #endif
5164 char opendir ();
5165 int
5166 main ()
5167 {
5168 return opendir ();
5169   ;
5170   return 0;
5171 }
5172 _ACEOF
5173 for ac_lib in '' dir; do
5174   if test -z "$ac_lib"; then
5175     ac_res="none required"
5176   else
5177     ac_res=-l$ac_lib
5178     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5179   fi
5180   rm -rf conftest.$ac_objext conftest$ac_exeext
5181 if { (ac_try="$ac_link"
5182 case "(($ac_try" in
5183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5184   *) ac_try_echo=$ac_try;;
5185 esac
5186 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5187   (eval "$ac_link") 2>conftest.er1
5188   ac_status=$?
5189   grep -v '^ *+' conftest.er1 >conftest.err
5190   rm -rf conftest.er1
5191   cat conftest.err >&5
5192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5193   (exit $ac_status); } && {
5194          test -z "$ac_c_werror_flag" ||
5195          test ! -s conftest.err
5196        } && test -s conftest$ac_exeext &&
5197        $as_test_x conftest$ac_exeext; then
5198   ac_cv_search_opendir=$ac_res
5199 else
5200   echo "$as_me: failed program was:" >&5
5201 sed 's/^/| /' conftest.$ac_ext >&5
5202
5203
5204 fi
5205
5206 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5207       conftest$ac_exeext
5208   if test "${ac_cv_search_opendir+set}" = set; then
5209   break
5210 fi
5211 done
5212 if test "${ac_cv_search_opendir+set}" = set; then
5213   :
5214 else
5215   ac_cv_search_opendir=no
5216 fi
5217 rm conftest.$ac_ext
5218 LIBS=$ac_func_search_save_LIBS
5219 fi
5220 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5221 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5222 ac_res=$ac_cv_search_opendir
5223 if test "$ac_res" != no; then
5224   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5225
5226 fi
5227
5228 else
5229   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5230 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5231 if test "${ac_cv_search_opendir+set}" = set; then
5232   echo $ECHO_N "(cached) $ECHO_C" >&6
5233 else
5234   ac_func_search_save_LIBS=$LIBS
5235 cat >conftest.$ac_ext <<_ACEOF
5236 /* confdefs.h.  */
5237 _ACEOF
5238 cat confdefs.h >>conftest.$ac_ext
5239 cat >>conftest.$ac_ext <<_ACEOF
5240 /* end confdefs.h.  */
5241
5242 /* Override any GCC internal prototype to avoid an error.
5243    Use char because int might match the return type of a GCC
5244    builtin and then its argument prototype would still apply.  */
5245 #ifdef __cplusplus
5246 extern "C"
5247 #endif
5248 char opendir ();
5249 int
5250 main ()
5251 {
5252 return opendir ();
5253   ;
5254   return 0;
5255 }
5256 _ACEOF
5257 for ac_lib in '' x; do
5258   if test -z "$ac_lib"; then
5259     ac_res="none required"
5260   else
5261     ac_res=-l$ac_lib
5262     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5263   fi
5264   rm -rf conftest.$ac_objext conftest$ac_exeext
5265 if { (ac_try="$ac_link"
5266 case "(($ac_try" in
5267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5268   *) ac_try_echo=$ac_try;;
5269 esac
5270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5271   (eval "$ac_link") 2>conftest.er1
5272   ac_status=$?
5273   grep -v '^ *+' conftest.er1 >conftest.err
5274   rm -rf conftest.er1
5275   cat conftest.err >&5
5276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277   (exit $ac_status); } && {
5278          test -z "$ac_c_werror_flag" ||
5279          test ! -s conftest.err
5280        } && test -s conftest$ac_exeext &&
5281        $as_test_x conftest$ac_exeext; then
5282   ac_cv_search_opendir=$ac_res
5283 else
5284   echo "$as_me: failed program was:" >&5
5285 sed 's/^/| /' conftest.$ac_ext >&5
5286
5287
5288 fi
5289
5290 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5291       conftest$ac_exeext
5292   if test "${ac_cv_search_opendir+set}" = set; then
5293   break
5294 fi
5295 done
5296 if test "${ac_cv_search_opendir+set}" = set; then
5297   :
5298 else
5299   ac_cv_search_opendir=no
5300 fi
5301 rm conftest.$ac_ext
5302 LIBS=$ac_func_search_save_LIBS
5303 fi
5304 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5305 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5306 ac_res=$ac_cv_search_opendir
5307 if test "$ac_res" != no; then
5308   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5309
5310 fi
5311
5312 fi
5313
5314 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5315 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5316   if test "${ac_cv_gettimeofday_args+set}" = set; then
5317   echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319   cat >conftest.$ac_ext <<_ACEOF
5320 /* confdefs.h.  */
5321 _ACEOF
5322 cat confdefs.h >>conftest.$ac_ext
5323 cat >>conftest.$ac_ext <<_ACEOF
5324 /* end confdefs.h.  */
5325 #include <stdlib.h>
5326                     #include <sys/time.h>
5327 int
5328 main ()
5329 {
5330 struct timeval tv; struct timezone tzp;
5331                     gettimeofday(&tv, &tzp);
5332   ;
5333   return 0;
5334 }
5335 _ACEOF
5336 rm -rf conftest.$ac_objext
5337 if { (ac_try="$ac_compile"
5338 case "(($ac_try" in
5339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5340   *) ac_try_echo=$ac_try;;
5341 esac
5342 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5343   (eval "$ac_compile") 2>conftest.er1
5344   ac_status=$?
5345   grep -v '^ *+' conftest.er1 >conftest.err
5346   rm -rf conftest.er1
5347   cat conftest.err >&5
5348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349   (exit $ac_status); } && {
5350          test -z "$ac_c_werror_flag" ||
5351          test ! -s conftest.err
5352        } && test -s conftest.$ac_objext; then
5353   ac_gettimeofday_args=2
5354 else
5355   echo "$as_me: failed program was:" >&5
5356 sed 's/^/| /' conftest.$ac_ext >&5
5357
5358         cat >conftest.$ac_ext <<_ACEOF
5359 /* confdefs.h.  */
5360 _ACEOF
5361 cat confdefs.h >>conftest.$ac_ext
5362 cat >>conftest.$ac_ext <<_ACEOF
5363 /* end confdefs.h.  */
5364 #include <stdlib.h>
5365                                     #include <sys/time.h>
5366 int
5367 main ()
5368 {
5369 struct timeval tv; gettimeofday(&tv);
5370   ;
5371   return 0;
5372 }
5373 _ACEOF
5374 rm -rf conftest.$ac_objext
5375 if { (ac_try="$ac_compile"
5376 case "(($ac_try" in
5377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5378   *) ac_try_echo=$ac_try;;
5379 esac
5380 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5381   (eval "$ac_compile") 2>conftest.er1
5382   ac_status=$?
5383   grep -v '^ *+' conftest.er1 >conftest.err
5384   rm -rf conftest.er1
5385   cat conftest.err >&5
5386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5387   (exit $ac_status); } && {
5388          test -z "$ac_c_werror_flag" ||
5389          test ! -s conftest.err
5390        } && test -s conftest.$ac_objext; then
5391   ac_gettimeofday_args=1
5392 else
5393   echo "$as_me: failed program was:" >&5
5394 sed 's/^/| /' conftest.$ac_ext >&5
5395
5396         ac_gettimeofday_args=0
5397 fi
5398
5399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5400 fi
5401
5402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5403     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5404 fi
5405
5406   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5407   if test "$ac_gettimeofday_args" = 1 ; then
5408     cat >>confdefs.h <<\_ACEOF
5409 #define HAVE_GETTIMEOFDAY 1
5410 _ACEOF
5411
5412     { echo "$as_me:$LINENO: result: one argument" >&5
5413 echo "${ECHO_T}one argument" >&6; }
5414   elif test "$ac_gettimeofday_args" = 2 ; then
5415     cat >>confdefs.h <<\_ACEOF
5416 #define HAVE_GETTIMEOFDAY 1
5417 _ACEOF
5418
5419     cat >>confdefs.h <<\_ACEOF
5420 #define GETTIMEOFDAY_TWO_ARGS 1
5421 _ACEOF
5422
5423     { echo "$as_me:$LINENO: result: two arguments" >&5
5424 echo "${ECHO_T}two arguments" >&6; }
5425   else
5426     { echo "$as_me:$LINENO: result: unknown" >&5
5427 echo "${ECHO_T}unknown" >&6; }
5428   fi
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5440 do
5441 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5442 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5443 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5444 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5445   echo $ECHO_N "(cached) $ECHO_C" >&6
5446 else
5447   cat >conftest.$ac_ext <<_ACEOF
5448 /* confdefs.h.  */
5449 _ACEOF
5450 cat confdefs.h >>conftest.$ac_ext
5451 cat >>conftest.$ac_ext <<_ACEOF
5452 /* end confdefs.h.  */
5453 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5454    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5455 #define $ac_func innocuous_$ac_func
5456
5457 /* System header to define __stub macros and hopefully few prototypes,
5458     which can conflict with char $ac_func (); below.
5459     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5460     <limits.h> exists even on freestanding compilers.  */
5461
5462 #ifdef __STDC__
5463 # include <limits.h>
5464 #else
5465 # include <assert.h>
5466 #endif
5467
5468 #undef $ac_func
5469
5470 /* Override any GCC internal prototype to avoid an error.
5471    Use char because int might match the return type of a GCC
5472    builtin and then its argument prototype would still apply.  */
5473 #ifdef __cplusplus
5474 extern "C"
5475 #endif
5476 char $ac_func ();
5477 /* The GNU C library defines this for functions which it implements
5478     to always fail with ENOSYS.  Some functions are actually named
5479     something starting with __ and the normal name is an alias.  */
5480 #if defined __stub_$ac_func || defined __stub___$ac_func
5481 choke me
5482 #endif
5483
5484 int
5485 main ()
5486 {
5487 return $ac_func ();
5488   ;
5489   return 0;
5490 }
5491 _ACEOF
5492 rm -rf conftest.$ac_objext conftest$ac_exeext
5493 if { (ac_try="$ac_link"
5494 case "(($ac_try" in
5495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5496   *) ac_try_echo=$ac_try;;
5497 esac
5498 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5499   (eval "$ac_link") 2>conftest.er1
5500   ac_status=$?
5501   grep -v '^ *+' conftest.er1 >conftest.err
5502   rm -rf conftest.er1
5503   cat conftest.err >&5
5504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505   (exit $ac_status); } && {
5506          test -z "$ac_c_werror_flag" ||
5507          test ! -s conftest.err
5508        } && test -s conftest$ac_exeext &&
5509        $as_test_x conftest$ac_exeext; then
5510   eval "$as_ac_var=yes"
5511 else
5512   echo "$as_me: failed program was:" >&5
5513 sed 's/^/| /' conftest.$ac_ext >&5
5514
5515         eval "$as_ac_var=no"
5516 fi
5517
5518 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5519       conftest$ac_exeext conftest.$ac_ext
5520 fi
5521 ac_res=`eval echo '${'$as_ac_var'}'`
5522                { echo "$as_me:$LINENO: result: $ac_res" >&5
5523 echo "${ECHO_T}$ac_res" >&6; }
5524 if test `eval echo '${'$as_ac_var'}'` = yes; then
5525   cat >>confdefs.h <<_ACEOF
5526 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5527 _ACEOF
5528
5529 fi
5530 done
5531
5532
5533
5534
5535
5536 for ac_func in sigaction syslog realpath setrlimit
5537 do
5538 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5539 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5540 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5541 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544   cat >conftest.$ac_ext <<_ACEOF
5545 /* confdefs.h.  */
5546 _ACEOF
5547 cat confdefs.h >>conftest.$ac_ext
5548 cat >>conftest.$ac_ext <<_ACEOF
5549 /* end confdefs.h.  */
5550 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5551    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5552 #define $ac_func innocuous_$ac_func
5553
5554 /* System header to define __stub macros and hopefully few prototypes,
5555     which can conflict with char $ac_func (); below.
5556     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5557     <limits.h> exists even on freestanding compilers.  */
5558
5559 #ifdef __STDC__
5560 # include <limits.h>
5561 #else
5562 # include <assert.h>
5563 #endif
5564
5565 #undef $ac_func
5566
5567 /* Override any GCC internal prototype to avoid an error.
5568    Use char because int might match the return type of a GCC
5569    builtin and then its argument prototype would still apply.  */
5570 #ifdef __cplusplus
5571 extern "C"
5572 #endif
5573 char $ac_func ();
5574 /* The GNU C library defines this for functions which it implements
5575     to always fail with ENOSYS.  Some functions are actually named
5576     something starting with __ and the normal name is an alias.  */
5577 #if defined __stub_$ac_func || defined __stub___$ac_func
5578 choke me
5579 #endif
5580
5581 int
5582 main ()
5583 {
5584 return $ac_func ();
5585   ;
5586   return 0;
5587 }
5588 _ACEOF
5589 rm -rf conftest.$ac_objext conftest$ac_exeext
5590 if { (ac_try="$ac_link"
5591 case "(($ac_try" in
5592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5593   *) ac_try_echo=$ac_try;;
5594 esac
5595 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5596   (eval "$ac_link") 2>conftest.er1
5597   ac_status=$?
5598   grep -v '^ *+' conftest.er1 >conftest.err
5599   rm -rf conftest.er1
5600   cat conftest.err >&5
5601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602   (exit $ac_status); } && {
5603          test -z "$ac_c_werror_flag" ||
5604          test ! -s conftest.err
5605        } && test -s conftest$ac_exeext &&
5606        $as_test_x conftest$ac_exeext; then
5607   eval "$as_ac_var=yes"
5608 else
5609   echo "$as_me: failed program was:" >&5
5610 sed 's/^/| /' conftest.$ac_ext >&5
5611
5612         eval "$as_ac_var=no"
5613 fi
5614
5615 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5616       conftest$ac_exeext conftest.$ac_ext
5617 fi
5618 ac_res=`eval echo '${'$as_ac_var'}'`
5619                { echo "$as_me:$LINENO: result: $ac_res" >&5
5620 echo "${ECHO_T}$ac_res" >&6; }
5621 if test `eval echo '${'$as_ac_var'}'` = yes; then
5622   cat >>confdefs.h <<_ACEOF
5623 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5624 _ACEOF
5625
5626 fi
5627 done
5628
5629
5630 for ac_func in setlocale
5631 do
5632 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5633 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5634 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5635 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5636   echo $ECHO_N "(cached) $ECHO_C" >&6
5637 else
5638   cat >conftest.$ac_ext <<_ACEOF
5639 /* confdefs.h.  */
5640 _ACEOF
5641 cat confdefs.h >>conftest.$ac_ext
5642 cat >>conftest.$ac_ext <<_ACEOF
5643 /* end confdefs.h.  */
5644 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5645    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5646 #define $ac_func innocuous_$ac_func
5647
5648 /* System header to define __stub macros and hopefully few prototypes,
5649     which can conflict with char $ac_func (); below.
5650     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5651     <limits.h> exists even on freestanding compilers.  */
5652
5653 #ifdef __STDC__
5654 # include <limits.h>
5655 #else
5656 # include <assert.h>
5657 #endif
5658
5659 #undef $ac_func
5660
5661 /* Override any GCC internal prototype to avoid an error.
5662    Use char because int might match the return type of a GCC
5663    builtin and then its argument prototype would still apply.  */
5664 #ifdef __cplusplus
5665 extern "C"
5666 #endif
5667 char $ac_func ();
5668 /* The GNU C library defines this for functions which it implements
5669     to always fail with ENOSYS.  Some functions are actually named
5670     something starting with __ and the normal name is an alias.  */
5671 #if defined __stub_$ac_func || defined __stub___$ac_func
5672 choke me
5673 #endif
5674
5675 int
5676 main ()
5677 {
5678 return $ac_func ();
5679   ;
5680   return 0;
5681 }
5682 _ACEOF
5683 rm -rf conftest.$ac_objext conftest$ac_exeext
5684 if { (ac_try="$ac_link"
5685 case "(($ac_try" in
5686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687   *) ac_try_echo=$ac_try;;
5688 esac
5689 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5690   (eval "$ac_link") 2>conftest.er1
5691   ac_status=$?
5692   grep -v '^ *+' conftest.er1 >conftest.err
5693   rm -rf conftest.er1
5694   cat conftest.err >&5
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); } && {
5697          test -z "$ac_c_werror_flag" ||
5698          test ! -s conftest.err
5699        } && test -s conftest$ac_exeext &&
5700        $as_test_x conftest$ac_exeext; then
5701   eval "$as_ac_var=yes"
5702 else
5703   echo "$as_me: failed program was:" >&5
5704 sed 's/^/| /' conftest.$ac_ext >&5
5705
5706         eval "$as_ac_var=no"
5707 fi
5708
5709 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5710       conftest$ac_exeext conftest.$ac_ext
5711 fi
5712 ac_res=`eval echo '${'$as_ac_var'}'`
5713                { echo "$as_me:$LINENO: result: $ac_res" >&5
5714 echo "${ECHO_T}$ac_res" >&6; }
5715 if test `eval echo '${'$as_ac_var'}'` = yes; then
5716   cat >>confdefs.h <<_ACEOF
5717 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5718 _ACEOF
5719
5720 fi
5721 done
5722
5723 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5724 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5725 if test "${ac_cv_have_icmp+set}" = set; then
5726   echo $ECHO_N "(cached) $ECHO_C" >&6
5727 else
5728   cat >conftest.$ac_ext <<_ACEOF
5729 /* confdefs.h.  */
5730 _ACEOF
5731 cat confdefs.h >>conftest.$ac_ext
5732 cat >>conftest.$ac_ext <<_ACEOF
5733 /* end confdefs.h.  */
5734 #include <stdlib.h>
5735                    #include <stdio.h>
5736                    #include <math.h>
5737                    #include <unistd.h>
5738                    #include <limits.h>
5739                    #include <signal.h>
5740                    #include <fcntl.h>
5741                    #include <sys/types.h>
5742                    #include <sys/time.h>
5743                    #include <sys/ipc.h>
5744                    #include <sys/shm.h>
5745                    #include <sys/socket.h>
5746                    #include <netinet/in_systm.h>
5747                    #include <netinet/in.h>
5748                    #include <netinet/ip.h>
5749                    #include <netinet/ip_icmp.h>
5750                    #include <netinet/udp.h>
5751                    #include <arpa/inet.h>
5752                    #include <netdb.h>
5753 int
5754 main ()
5755 {
5756 struct icmp i;
5757                    struct sockaddr s;
5758                    struct sockaddr_in si;
5759                    struct ip ip;
5760                    i.icmp_type = ICMP_ECHO;
5761                    i.icmp_code = 0;
5762                    i.icmp_cksum = 0;
5763                    i.icmp_id = 0;
5764                    i.icmp_seq = 0;
5765                    si.sin_family = AF_INET;
5766                    #if defined(__DECC) || defined(_IP_VHL)
5767                    ip.ip_vhl = 0;
5768                    #else
5769                    ip.ip_hl = 0;
5770                    #endif
5771
5772   ;
5773   return 0;
5774 }
5775 _ACEOF
5776 rm -rf conftest.$ac_objext
5777 if { (ac_try="$ac_compile"
5778 case "(($ac_try" in
5779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5780   *) ac_try_echo=$ac_try;;
5781 esac
5782 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5783   (eval "$ac_compile") 2>conftest.er1
5784   ac_status=$?
5785   grep -v '^ *+' conftest.er1 >conftest.err
5786   rm -rf conftest.er1
5787   cat conftest.err >&5
5788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789   (exit $ac_status); } && {
5790          test -z "$ac_c_werror_flag" ||
5791          test ! -s conftest.err
5792        } && test -s conftest.$ac_objext; then
5793   ac_cv_have_icmp=yes
5794 else
5795   echo "$as_me: failed program was:" >&5
5796 sed 's/^/| /' conftest.$ac_ext >&5
5797
5798         ac_cv_have_icmp=no
5799 fi
5800
5801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5802 fi
5803 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5804 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5805  if test "$ac_cv_have_icmp" = yes ; then
5806    cat >>confdefs.h <<\_ACEOF
5807 #define HAVE_ICMP 1
5808 _ACEOF
5809
5810  fi
5811 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5812 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5813 if test "${ac_cv_have_icmphdr+set}" = set; then
5814   echo $ECHO_N "(cached) $ECHO_C" >&6
5815 else
5816   cat >conftest.$ac_ext <<_ACEOF
5817 /* confdefs.h.  */
5818 _ACEOF
5819 cat confdefs.h >>conftest.$ac_ext
5820 cat >>conftest.$ac_ext <<_ACEOF
5821 /* end confdefs.h.  */
5822 #include <stdlib.h>
5823                    #include <stdio.h>
5824                    #include <math.h>
5825                    #include <unistd.h>
5826                    #include <limits.h>
5827                    #include <signal.h>
5828                    #include <fcntl.h>
5829                    #include <sys/types.h>
5830                    #include <sys/time.h>
5831                    #include <sys/ipc.h>
5832                    #include <sys/shm.h>
5833                    #include <sys/socket.h>
5834                    #include <netinet/in_systm.h>
5835                    #include <netinet/in.h>
5836                    #include <netinet/ip.h>
5837                    #include <netinet/ip_icmp.h>
5838                    #include <netinet/udp.h>
5839                    #include <arpa/inet.h>
5840                    #include <netdb.h>
5841 int
5842 main ()
5843 {
5844 struct icmphdr i;
5845                    struct sockaddr s;
5846                    struct sockaddr_in si;
5847                    struct ip ip;
5848                    i.type = ICMP_ECHO;
5849                    i.code = 0;
5850                    i.checksum = 0;
5851                    i.un.echo.id = 0;
5852                    i.un.echo.sequence = 0;
5853                    si.sin_family = AF_INET;
5854                    ip.ip_hl = 0;
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -rf conftest.$ac_objext
5860 if { (ac_try="$ac_compile"
5861 case "(($ac_try" in
5862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5863   *) ac_try_echo=$ac_try;;
5864 esac
5865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5866   (eval "$ac_compile") 2>conftest.er1
5867   ac_status=$?
5868   grep -v '^ *+' conftest.er1 >conftest.err
5869   rm -rf conftest.er1
5870   cat conftest.err >&5
5871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5872   (exit $ac_status); } && {
5873          test -z "$ac_c_werror_flag" ||
5874          test ! -s conftest.err
5875        } && test -s conftest.$ac_objext; then
5876   ac_cv_have_icmphdr=yes
5877 else
5878   echo "$as_me: failed program was:" >&5
5879 sed 's/^/| /' conftest.$ac_ext >&5
5880
5881         ac_cv_have_icmphdr=no
5882 fi
5883
5884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5885 fi
5886 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5887 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5888  if test "$ac_cv_have_icmphdr" = yes ; then
5889    cat >>confdefs.h <<\_ACEOF
5890 #define HAVE_ICMPHDR 1
5891 _ACEOF
5892
5893  fi
5894
5895
5896 for ac_header in crypt.h sys/select.h
5897 do
5898 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5899 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5900   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5902 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5903   echo $ECHO_N "(cached) $ECHO_C" >&6
5904 fi
5905 ac_res=`eval echo '${'$as_ac_Header'}'`
5906                { echo "$as_me:$LINENO: result: $ac_res" >&5
5907 echo "${ECHO_T}$ac_res" >&6; }
5908 else
5909   # Is the header compilable?
5910 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5911 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5912 cat >conftest.$ac_ext <<_ACEOF
5913 /* confdefs.h.  */
5914 _ACEOF
5915 cat confdefs.h >>conftest.$ac_ext
5916 cat >>conftest.$ac_ext <<_ACEOF
5917 /* end confdefs.h.  */
5918 $ac_includes_default
5919 #include <$ac_header>
5920 _ACEOF
5921 rm -rf conftest.$ac_objext
5922 if { (ac_try="$ac_compile"
5923 case "(($ac_try" in
5924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5925   *) ac_try_echo=$ac_try;;
5926 esac
5927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5928   (eval "$ac_compile") 2>conftest.er1
5929   ac_status=$?
5930   grep -v '^ *+' conftest.er1 >conftest.err
5931   rm -rf conftest.er1
5932   cat conftest.err >&5
5933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934   (exit $ac_status); } && {
5935          test -z "$ac_c_werror_flag" ||
5936          test ! -s conftest.err
5937        } && test -s conftest.$ac_objext; then
5938   ac_header_compiler=yes
5939 else
5940   echo "$as_me: failed program was:" >&5
5941 sed 's/^/| /' conftest.$ac_ext >&5
5942
5943         ac_header_compiler=no
5944 fi
5945
5946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5947 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5948 echo "${ECHO_T}$ac_header_compiler" >&6; }
5949
5950 # Is the header present?
5951 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5952 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5953 cat >conftest.$ac_ext <<_ACEOF
5954 /* confdefs.h.  */
5955 _ACEOF
5956 cat confdefs.h >>conftest.$ac_ext
5957 cat >>conftest.$ac_ext <<_ACEOF
5958 /* end confdefs.h.  */
5959 #include <$ac_header>
5960 _ACEOF
5961 if { (ac_try="$ac_cpp conftest.$ac_ext"
5962 case "(($ac_try" in
5963   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5964   *) ac_try_echo=$ac_try;;
5965 esac
5966 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5967   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5968   ac_status=$?
5969   grep -v '^ *+' conftest.er1 >conftest.err
5970   rm -rf conftest.er1
5971   cat conftest.err >&5
5972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973   (exit $ac_status); } >/dev/null && {
5974          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5975          test ! -s conftest.err
5976        }; then
5977   ac_header_preproc=yes
5978 else
5979   echo "$as_me: failed program was:" >&5
5980 sed 's/^/| /' conftest.$ac_ext >&5
5981
5982   ac_header_preproc=no
5983 fi
5984
5985 rm -rf conftest.err conftest.$ac_ext
5986 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5987 echo "${ECHO_T}$ac_header_preproc" >&6; }
5988
5989 # So?  What about this header?
5990 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5991   yes:no: )
5992     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5993 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5995 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5996     ac_header_preproc=yes
5997     ;;
5998   no:yes:* )
5999     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6000 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6001     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6002 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6003     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6004 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6005     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6006 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6007     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6008 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6009     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6010 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6011
6012     ;;
6013 esac
6014 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6016 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6017   echo $ECHO_N "(cached) $ECHO_C" >&6
6018 else
6019   eval "$as_ac_Header=\$ac_header_preproc"
6020 fi
6021 ac_res=`eval echo '${'$as_ac_Header'}'`
6022                { echo "$as_me:$LINENO: result: $ac_res" >&5
6023 echo "${ECHO_T}$ac_res" >&6; }
6024
6025 fi
6026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6027   cat >>confdefs.h <<_ACEOF
6028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6029 _ACEOF
6030
6031 fi
6032
6033 done
6034
6035 for ac_prog in perl5 perl
6036 do
6037   # Extract the first word of "$ac_prog", so it can be a program name with args.
6038 set dummy $ac_prog; ac_word=$2
6039 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6040 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6041 if test "${ac_cv_path_PERL+set}" = set; then
6042   echo $ECHO_N "(cached) $ECHO_C" >&6
6043 else
6044   case $PERL in
6045   [\\/]* | ?:[\\/]*)
6046   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6047   ;;
6048   *)
6049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050 for as_dir in $PATH
6051 do
6052   IFS=$as_save_IFS
6053   test -z "$as_dir" && as_dir=.
6054   for ac_exec_ext in '' $ac_executable_extensions; do
6055   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6056     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6058     break 2
6059   fi
6060 done
6061 done
6062 IFS=$as_save_IFS
6063
6064   ;;
6065 esac
6066 fi
6067 PERL=$ac_cv_path_PERL
6068 if test -n "$PERL"; then
6069   { echo "$as_me:$LINENO: result: $PERL" >&5
6070 echo "${ECHO_T}$PERL" >&6; }
6071 else
6072   { echo "$as_me:$LINENO: result: no" >&5
6073 echo "${ECHO_T}no" >&6; }
6074 fi
6075
6076
6077   test -n "$PERL" && break
6078 done
6079
6080   if test -z "$PERL" ; then
6081     PERL_VERSION=0
6082   else
6083     { echo "$as_me:$LINENO: checking perl version" >&5
6084 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6085 if test "${ac_cv_perl_version+set}" = set; then
6086   echo $ECHO_N "(cached) $ECHO_C" >&6
6087 else
6088   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6089 fi
6090 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6091 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6092     PERL_VERSION=$ac_cv_perl_version
6093   fi
6094
6095
6096 if test -z "$PERL" ; then
6097   # don't let it be blank...
6098   PERL=/usr/bin/perl
6099 fi
6100
6101 { echo "$as_me:$LINENO: checking for X" >&5
6102 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6103
6104
6105 # Check whether --with-x was given.
6106 if test "${with_x+set}" = set; then
6107   withval=$with_x;
6108 fi
6109
6110 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6111 if test "x$with_x" = xno; then
6112   # The user explicitly disabled X.
6113   have_x=disabled
6114 else
6115   case $x_includes,$x_libraries in #(
6116     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6117 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6118    { (exit 1); exit 1; }; };; #(
6119     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6120   echo $ECHO_N "(cached) $ECHO_C" >&6
6121 else
6122   # One or both of the vars are not set, and there is no cached value.
6123 ac_x_includes=no ac_x_libraries=no
6124 rm -f -r conftest.dir
6125 if mkdir conftest.dir; then
6126   cd conftest.dir
6127   cat >Imakefile <<'_ACEOF'
6128 incroot:
6129         @echo incroot='${INCROOT}'
6130 usrlibdir:
6131         @echo usrlibdir='${USRLIBDIR}'
6132 libdir:
6133         @echo libdir='${LIBDIR}'
6134 _ACEOF
6135   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6136     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6137     for ac_var in incroot usrlibdir libdir; do
6138       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6139     done
6140     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6141     for ac_extension in a so sl; do
6142       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6143          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6144         ac_im_usrlibdir=$ac_im_libdir; break
6145       fi
6146     done
6147     # Screen out bogus values from the imake configuration.  They are
6148     # bogus both because they are the default anyway, and because
6149     # using them would break gcc on systems where it needs fixed includes.
6150     case $ac_im_incroot in
6151         /usr/include) ac_x_includes= ;;
6152         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6153     esac
6154     case $ac_im_usrlibdir in
6155         /usr/lib | /lib) ;;
6156         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6157     esac
6158   fi
6159   cd ..
6160   rm -f -r conftest.dir
6161 fi
6162
6163 # Standard set of common directories for X headers.
6164 # Check X11 before X11Rn because it is often a symlink to the current release.
6165 ac_x_header_dirs='
6166 /usr/X11/include
6167 /usr/X11R6/include
6168 /usr/X11R5/include
6169 /usr/X11R4/include
6170
6171 /usr/include/X11
6172 /usr/include/X11R6
6173 /usr/include/X11R5
6174 /usr/include/X11R4
6175
6176 /usr/local/X11/include
6177 /usr/local/X11R6/include
6178 /usr/local/X11R5/include
6179 /usr/local/X11R4/include
6180
6181 /usr/local/include/X11
6182 /usr/local/include/X11R6
6183 /usr/local/include/X11R5
6184 /usr/local/include/X11R4
6185
6186 /usr/X386/include
6187 /usr/x386/include
6188 /usr/XFree86/include/X11
6189
6190 /usr/include
6191 /usr/local/include
6192 /usr/unsupported/include
6193 /usr/athena/include
6194 /usr/local/x11r5/include
6195 /usr/lpp/Xamples/include
6196
6197 /usr/openwin/include
6198 /usr/openwin/share/include'
6199
6200 if test "$ac_x_includes" = no; then
6201   # Guess where to find include files, by looking for Xlib.h.
6202   # First, try using that file with no special directory specified.
6203   cat >conftest.$ac_ext <<_ACEOF
6204 /* confdefs.h.  */
6205 _ACEOF
6206 cat confdefs.h >>conftest.$ac_ext
6207 cat >>conftest.$ac_ext <<_ACEOF
6208 /* end confdefs.h.  */
6209 #include <X11/Xlib.h>
6210 _ACEOF
6211 if { (ac_try="$ac_cpp conftest.$ac_ext"
6212 case "(($ac_try" in
6213   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6214   *) ac_try_echo=$ac_try;;
6215 esac
6216 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6217   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6218   ac_status=$?
6219   grep -v '^ *+' conftest.er1 >conftest.err
6220   rm -rf conftest.er1
6221   cat conftest.err >&5
6222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223   (exit $ac_status); } >/dev/null && {
6224          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6225          test ! -s conftest.err
6226        }; then
6227   # We can compile using X headers with no special include directory.
6228 ac_x_includes=
6229 else
6230   echo "$as_me: failed program was:" >&5
6231 sed 's/^/| /' conftest.$ac_ext >&5
6232
6233   for ac_dir in $ac_x_header_dirs; do
6234   if test -r "$ac_dir/X11/Xlib.h"; then
6235     ac_x_includes=$ac_dir
6236     break
6237   fi
6238 done
6239 fi
6240
6241 rm -rf conftest.err conftest.$ac_ext
6242 fi # $ac_x_includes = no
6243
6244 if test "$ac_x_libraries" = no; then
6245   # Check for the libraries.
6246   # See if we find them without any special options.
6247   # Don't add to $LIBS permanently.
6248   ac_save_LIBS=$LIBS
6249   LIBS="-lX11 $LIBS"
6250   cat >conftest.$ac_ext <<_ACEOF
6251 /* confdefs.h.  */
6252 _ACEOF
6253 cat confdefs.h >>conftest.$ac_ext
6254 cat >>conftest.$ac_ext <<_ACEOF
6255 /* end confdefs.h.  */
6256 #include <X11/Xlib.h>
6257 int
6258 main ()
6259 {
6260 XrmInitialize ()
6261   ;
6262   return 0;
6263 }
6264 _ACEOF
6265 rm -rf conftest.$ac_objext conftest$ac_exeext
6266 if { (ac_try="$ac_link"
6267 case "(($ac_try" in
6268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6269   *) ac_try_echo=$ac_try;;
6270 esac
6271 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6272   (eval "$ac_link") 2>conftest.er1
6273   ac_status=$?
6274   grep -v '^ *+' conftest.er1 >conftest.err
6275   rm -rf conftest.er1
6276   cat conftest.err >&5
6277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6278   (exit $ac_status); } && {
6279          test -z "$ac_c_werror_flag" ||
6280          test ! -s conftest.err
6281        } && test -s conftest$ac_exeext &&
6282        $as_test_x conftest$ac_exeext; then
6283   LIBS=$ac_save_LIBS
6284 # We can link X programs with no special library path.
6285 ac_x_libraries=
6286 else
6287   echo "$as_me: failed program was:" >&5
6288 sed 's/^/| /' conftest.$ac_ext >&5
6289
6290         LIBS=$ac_save_LIBS
6291 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6292 do
6293   # Don't even attempt the hair of trying to link an X program!
6294   for ac_extension in a so sl; do
6295     if test -r "$ac_dir/libX11.$ac_extension"; then
6296       ac_x_libraries=$ac_dir
6297       break 2
6298     fi
6299   done
6300 done
6301 fi
6302
6303 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6304       conftest$ac_exeext conftest.$ac_ext
6305 fi # $ac_x_libraries = no
6306
6307 case $ac_x_includes,$ac_x_libraries in #(
6308   no,* | *,no | *\'*)
6309     # Didn't find X, or a directory has "'" in its name.
6310     ac_cv_have_x="have_x=no";; #(
6311   *)
6312     # Record where we found X for the cache.
6313     ac_cv_have_x="have_x=yes\
6314         ac_x_includes='$ac_x_includes'\
6315         ac_x_libraries='$ac_x_libraries'"
6316 esac
6317 fi
6318 ;; #(
6319     *) have_x=yes;;
6320   esac
6321   eval "$ac_cv_have_x"
6322 fi # $with_x != no
6323
6324 if test "$have_x" != yes; then
6325   { echo "$as_me:$LINENO: result: $have_x" >&5
6326 echo "${ECHO_T}$have_x" >&6; }
6327   no_x=yes
6328 else
6329   # If each of the values was on the command line, it overrides each guess.
6330   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6331   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6332   # Update the cache value to reflect the command line values.
6333   ac_cv_have_x="have_x=yes\
6334         ac_x_includes='$x_includes'\
6335         ac_x_libraries='$x_libraries'"
6336   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6337 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6338 fi
6339
6340 if test "$no_x" = yes; then
6341   # Not all programs may use this symbol, but it does not hurt to define it.
6342
6343 cat >>confdefs.h <<\_ACEOF
6344 #define X_DISPLAY_MISSING 1
6345 _ACEOF
6346
6347   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6348 else
6349   if test -n "$x_includes"; then
6350     X_CFLAGS="$X_CFLAGS -I$x_includes"
6351   fi
6352
6353   # It would also be nice to do this for all -L options, not just this one.
6354   if test -n "$x_libraries"; then
6355     X_LIBS="$X_LIBS -L$x_libraries"
6356     # For Solaris; some versions of Sun CC require a space after -R and
6357     # others require no space.  Words are not sufficient . . . .
6358     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6359 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6360     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6361     ac_xsave_c_werror_flag=$ac_c_werror_flag
6362     ac_c_werror_flag=yes
6363     cat >conftest.$ac_ext <<_ACEOF
6364 /* confdefs.h.  */
6365 _ACEOF
6366 cat confdefs.h >>conftest.$ac_ext
6367 cat >>conftest.$ac_ext <<_ACEOF
6368 /* end confdefs.h.  */
6369
6370 int
6371 main ()
6372 {
6373
6374   ;
6375   return 0;
6376 }
6377 _ACEOF
6378 rm -rf conftest.$ac_objext conftest$ac_exeext
6379 if { (ac_try="$ac_link"
6380 case "(($ac_try" in
6381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6382   *) ac_try_echo=$ac_try;;
6383 esac
6384 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6385   (eval "$ac_link") 2>conftest.er1
6386   ac_status=$?
6387   grep -v '^ *+' conftest.er1 >conftest.err
6388   rm -rf conftest.er1
6389   cat conftest.err >&5
6390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6391   (exit $ac_status); } && {
6392          test -z "$ac_c_werror_flag" ||
6393          test ! -s conftest.err
6394        } && test -s conftest$ac_exeext &&
6395        $as_test_x conftest$ac_exeext; then
6396   { echo "$as_me:$LINENO: result: no" >&5
6397 echo "${ECHO_T}no" >&6; }
6398        X_LIBS="$X_LIBS -R$x_libraries"
6399 else
6400   echo "$as_me: failed program was:" >&5
6401 sed 's/^/| /' conftest.$ac_ext >&5
6402
6403         LIBS="$ac_xsave_LIBS -R $x_libraries"
6404        cat >conftest.$ac_ext <<_ACEOF
6405 /* confdefs.h.  */
6406 _ACEOF
6407 cat confdefs.h >>conftest.$ac_ext
6408 cat >>conftest.$ac_ext <<_ACEOF
6409 /* end confdefs.h.  */
6410
6411 int
6412 main ()
6413 {
6414
6415   ;
6416   return 0;
6417 }
6418 _ACEOF
6419 rm -rf conftest.$ac_objext conftest$ac_exeext
6420 if { (ac_try="$ac_link"
6421 case "(($ac_try" in
6422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6423   *) ac_try_echo=$ac_try;;
6424 esac
6425 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6426   (eval "$ac_link") 2>conftest.er1
6427   ac_status=$?
6428   grep -v '^ *+' conftest.er1 >conftest.err
6429   rm -rf conftest.er1
6430   cat conftest.err >&5
6431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432   (exit $ac_status); } && {
6433          test -z "$ac_c_werror_flag" ||
6434          test ! -s conftest.err
6435        } && test -s conftest$ac_exeext &&
6436        $as_test_x conftest$ac_exeext; then
6437   { echo "$as_me:$LINENO: result: yes" >&5
6438 echo "${ECHO_T}yes" >&6; }
6439           X_LIBS="$X_LIBS -R $x_libraries"
6440 else
6441   echo "$as_me: failed program was:" >&5
6442 sed 's/^/| /' conftest.$ac_ext >&5
6443
6444         { echo "$as_me:$LINENO: result: neither works" >&5
6445 echo "${ECHO_T}neither works" >&6; }
6446 fi
6447
6448 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6449       conftest$ac_exeext conftest.$ac_ext
6450 fi
6451
6452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6453       conftest$ac_exeext conftest.$ac_ext
6454     ac_c_werror_flag=$ac_xsave_c_werror_flag
6455     LIBS=$ac_xsave_LIBS
6456   fi
6457
6458   # Check for system-dependent libraries X programs must link with.
6459   # Do this before checking for the system-independent R6 libraries
6460   # (-lICE), since we may need -lsocket or whatever for X linking.
6461
6462   if test "$ISC" = yes; then
6463     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6464   else
6465     # Martyn Johnson says this is needed for Ultrix, if the X
6466     # libraries were built with DECnet support.  And Karl Berry says
6467     # the Alpha needs dnet_stub (dnet does not exist).
6468     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6469     cat >conftest.$ac_ext <<_ACEOF
6470 /* confdefs.h.  */
6471 _ACEOF
6472 cat confdefs.h >>conftest.$ac_ext
6473 cat >>conftest.$ac_ext <<_ACEOF
6474 /* end confdefs.h.  */
6475
6476 /* Override any GCC internal prototype to avoid an error.
6477    Use char because int might match the return type of a GCC
6478    builtin and then its argument prototype would still apply.  */
6479 #ifdef __cplusplus
6480 extern "C"
6481 #endif
6482 char XOpenDisplay ();
6483 int
6484 main ()
6485 {
6486 return XOpenDisplay ();
6487   ;
6488   return 0;
6489 }
6490 _ACEOF
6491 rm -rf conftest.$ac_objext conftest$ac_exeext
6492 if { (ac_try="$ac_link"
6493 case "(($ac_try" in
6494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6495   *) ac_try_echo=$ac_try;;
6496 esac
6497 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6498   (eval "$ac_link") 2>conftest.er1
6499   ac_status=$?
6500   grep -v '^ *+' conftest.er1 >conftest.err
6501   rm -rf conftest.er1
6502   cat conftest.err >&5
6503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6504   (exit $ac_status); } && {
6505          test -z "$ac_c_werror_flag" ||
6506          test ! -s conftest.err
6507        } && test -s conftest$ac_exeext &&
6508        $as_test_x conftest$ac_exeext; then
6509   :
6510 else
6511   echo "$as_me: failed program was:" >&5
6512 sed 's/^/| /' conftest.$ac_ext >&5
6513
6514         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6515 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6516 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6517   echo $ECHO_N "(cached) $ECHO_C" >&6
6518 else
6519   ac_check_lib_save_LIBS=$LIBS
6520 LIBS="-ldnet  $LIBS"
6521 cat >conftest.$ac_ext <<_ACEOF
6522 /* confdefs.h.  */
6523 _ACEOF
6524 cat confdefs.h >>conftest.$ac_ext
6525 cat >>conftest.$ac_ext <<_ACEOF
6526 /* end confdefs.h.  */
6527
6528 /* Override any GCC internal prototype to avoid an error.
6529    Use char because int might match the return type of a GCC
6530    builtin and then its argument prototype would still apply.  */
6531 #ifdef __cplusplus
6532 extern "C"
6533 #endif
6534 char dnet_ntoa ();
6535 int
6536 main ()
6537 {
6538 return dnet_ntoa ();
6539   ;
6540   return 0;
6541 }
6542 _ACEOF
6543 rm -rf conftest.$ac_objext conftest$ac_exeext
6544 if { (ac_try="$ac_link"
6545 case "(($ac_try" in
6546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6547   *) ac_try_echo=$ac_try;;
6548 esac
6549 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6550   (eval "$ac_link") 2>conftest.er1
6551   ac_status=$?
6552   grep -v '^ *+' conftest.er1 >conftest.err
6553   rm -rf conftest.er1
6554   cat conftest.err >&5
6555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556   (exit $ac_status); } && {
6557          test -z "$ac_c_werror_flag" ||
6558          test ! -s conftest.err
6559        } && test -s conftest$ac_exeext &&
6560        $as_test_x conftest$ac_exeext; then
6561   ac_cv_lib_dnet_dnet_ntoa=yes
6562 else
6563   echo "$as_me: failed program was:" >&5
6564 sed 's/^/| /' conftest.$ac_ext >&5
6565
6566         ac_cv_lib_dnet_dnet_ntoa=no
6567 fi
6568
6569 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6570       conftest$ac_exeext conftest.$ac_ext
6571 LIBS=$ac_check_lib_save_LIBS
6572 fi
6573 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6574 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6575 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6576   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6577 fi
6578
6579     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6580       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6581 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6582 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6583   echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585   ac_check_lib_save_LIBS=$LIBS
6586 LIBS="-ldnet_stub  $LIBS"
6587 cat >conftest.$ac_ext <<_ACEOF
6588 /* confdefs.h.  */
6589 _ACEOF
6590 cat confdefs.h >>conftest.$ac_ext
6591 cat >>conftest.$ac_ext <<_ACEOF
6592 /* end confdefs.h.  */
6593
6594 /* Override any GCC internal prototype to avoid an error.
6595    Use char because int might match the return type of a GCC
6596    builtin and then its argument prototype would still apply.  */
6597 #ifdef __cplusplus
6598 extern "C"
6599 #endif
6600 char dnet_ntoa ();
6601 int
6602 main ()
6603 {
6604 return dnet_ntoa ();
6605   ;
6606   return 0;
6607 }
6608 _ACEOF
6609 rm -rf conftest.$ac_objext conftest$ac_exeext
6610 if { (ac_try="$ac_link"
6611 case "(($ac_try" in
6612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6613   *) ac_try_echo=$ac_try;;
6614 esac
6615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6616   (eval "$ac_link") 2>conftest.er1
6617   ac_status=$?
6618   grep -v '^ *+' conftest.er1 >conftest.err
6619   rm -rf conftest.er1
6620   cat conftest.err >&5
6621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622   (exit $ac_status); } && {
6623          test -z "$ac_c_werror_flag" ||
6624          test ! -s conftest.err
6625        } && test -s conftest$ac_exeext &&
6626        $as_test_x conftest$ac_exeext; then
6627   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6628 else
6629   echo "$as_me: failed program was:" >&5
6630 sed 's/^/| /' conftest.$ac_ext >&5
6631
6632         ac_cv_lib_dnet_stub_dnet_ntoa=no
6633 fi
6634
6635 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6636       conftest$ac_exeext conftest.$ac_ext
6637 LIBS=$ac_check_lib_save_LIBS
6638 fi
6639 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6640 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6641 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6642   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6643 fi
6644
6645     fi
6646 fi
6647
6648 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6649       conftest$ac_exeext conftest.$ac_ext
6650     LIBS="$ac_xsave_LIBS"
6651
6652     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6653     # to get the SysV transport functions.
6654     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6655     # needs -lnsl.
6656     # The nsl library prevents programs from opening the X display
6657     # on Irix 5.2, according to T.E. Dickey.
6658     # The functions gethostbyname, getservbyname, and inet_addr are
6659     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6660     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6661 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6662 if test "${ac_cv_func_gethostbyname+set}" = set; then
6663   echo $ECHO_N "(cached) $ECHO_C" >&6
6664 else
6665   cat >conftest.$ac_ext <<_ACEOF
6666 /* confdefs.h.  */
6667 _ACEOF
6668 cat confdefs.h >>conftest.$ac_ext
6669 cat >>conftest.$ac_ext <<_ACEOF
6670 /* end confdefs.h.  */
6671 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6672    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6673 #define gethostbyname innocuous_gethostbyname
6674
6675 /* System header to define __stub macros and hopefully few prototypes,
6676     which can conflict with char gethostbyname (); below.
6677     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6678     <limits.h> exists even on freestanding compilers.  */
6679
6680 #ifdef __STDC__
6681 # include <limits.h>
6682 #else
6683 # include <assert.h>
6684 #endif
6685
6686 #undef gethostbyname
6687
6688 /* Override any GCC internal prototype to avoid an error.
6689    Use char because int might match the return type of a GCC
6690    builtin and then its argument prototype would still apply.  */
6691 #ifdef __cplusplus
6692 extern "C"
6693 #endif
6694 char gethostbyname ();
6695 /* The GNU C library defines this for functions which it implements
6696     to always fail with ENOSYS.  Some functions are actually named
6697     something starting with __ and the normal name is an alias.  */
6698 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6699 choke me
6700 #endif
6701
6702 int
6703 main ()
6704 {
6705 return gethostbyname ();
6706   ;
6707   return 0;
6708 }
6709 _ACEOF
6710 rm -rf conftest.$ac_objext conftest$ac_exeext
6711 if { (ac_try="$ac_link"
6712 case "(($ac_try" in
6713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6714   *) ac_try_echo=$ac_try;;
6715 esac
6716 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6717   (eval "$ac_link") 2>conftest.er1
6718   ac_status=$?
6719   grep -v '^ *+' conftest.er1 >conftest.err
6720   rm -rf conftest.er1
6721   cat conftest.err >&5
6722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723   (exit $ac_status); } && {
6724          test -z "$ac_c_werror_flag" ||
6725          test ! -s conftest.err
6726        } && test -s conftest$ac_exeext &&
6727        $as_test_x conftest$ac_exeext; then
6728   ac_cv_func_gethostbyname=yes
6729 else
6730   echo "$as_me: failed program was:" >&5
6731 sed 's/^/| /' conftest.$ac_ext >&5
6732
6733         ac_cv_func_gethostbyname=no
6734 fi
6735
6736 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6737       conftest$ac_exeext conftest.$ac_ext
6738 fi
6739 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6740 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6741
6742     if test $ac_cv_func_gethostbyname = no; then
6743       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6744 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6745 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6746   echo $ECHO_N "(cached) $ECHO_C" >&6
6747 else
6748   ac_check_lib_save_LIBS=$LIBS
6749 LIBS="-lnsl  $LIBS"
6750 cat >conftest.$ac_ext <<_ACEOF
6751 /* confdefs.h.  */
6752 _ACEOF
6753 cat confdefs.h >>conftest.$ac_ext
6754 cat >>conftest.$ac_ext <<_ACEOF
6755 /* end confdefs.h.  */
6756
6757 /* Override any GCC internal prototype to avoid an error.
6758    Use char because int might match the return type of a GCC
6759    builtin and then its argument prototype would still apply.  */
6760 #ifdef __cplusplus
6761 extern "C"
6762 #endif
6763 char gethostbyname ();
6764 int
6765 main ()
6766 {
6767 return gethostbyname ();
6768   ;
6769   return 0;
6770 }
6771 _ACEOF
6772 rm -rf conftest.$ac_objext conftest$ac_exeext
6773 if { (ac_try="$ac_link"
6774 case "(($ac_try" in
6775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6776   *) ac_try_echo=$ac_try;;
6777 esac
6778 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6779   (eval "$ac_link") 2>conftest.er1
6780   ac_status=$?
6781   grep -v '^ *+' conftest.er1 >conftest.err
6782   rm -rf conftest.er1
6783   cat conftest.err >&5
6784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6785   (exit $ac_status); } && {
6786          test -z "$ac_c_werror_flag" ||
6787          test ! -s conftest.err
6788        } && test -s conftest$ac_exeext &&
6789        $as_test_x conftest$ac_exeext; then
6790   ac_cv_lib_nsl_gethostbyname=yes
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 sed 's/^/| /' conftest.$ac_ext >&5
6794
6795         ac_cv_lib_nsl_gethostbyname=no
6796 fi
6797
6798 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6799       conftest$ac_exeext conftest.$ac_ext
6800 LIBS=$ac_check_lib_save_LIBS
6801 fi
6802 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6803 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6804 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6805   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6806 fi
6807
6808       if test $ac_cv_lib_nsl_gethostbyname = no; then
6809         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6810 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6811 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6812   echo $ECHO_N "(cached) $ECHO_C" >&6
6813 else
6814   ac_check_lib_save_LIBS=$LIBS
6815 LIBS="-lbsd  $LIBS"
6816 cat >conftest.$ac_ext <<_ACEOF
6817 /* confdefs.h.  */
6818 _ACEOF
6819 cat confdefs.h >>conftest.$ac_ext
6820 cat >>conftest.$ac_ext <<_ACEOF
6821 /* end confdefs.h.  */
6822
6823 /* Override any GCC internal prototype to avoid an error.
6824    Use char because int might match the return type of a GCC
6825    builtin and then its argument prototype would still apply.  */
6826 #ifdef __cplusplus
6827 extern "C"
6828 #endif
6829 char gethostbyname ();
6830 int
6831 main ()
6832 {
6833 return gethostbyname ();
6834   ;
6835   return 0;
6836 }
6837 _ACEOF
6838 rm -rf conftest.$ac_objext conftest$ac_exeext
6839 if { (ac_try="$ac_link"
6840 case "(($ac_try" in
6841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6842   *) ac_try_echo=$ac_try;;
6843 esac
6844 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6845   (eval "$ac_link") 2>conftest.er1
6846   ac_status=$?
6847   grep -v '^ *+' conftest.er1 >conftest.err
6848   rm -rf conftest.er1
6849   cat conftest.err >&5
6850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851   (exit $ac_status); } && {
6852          test -z "$ac_c_werror_flag" ||
6853          test ! -s conftest.err
6854        } && test -s conftest$ac_exeext &&
6855        $as_test_x conftest$ac_exeext; then
6856   ac_cv_lib_bsd_gethostbyname=yes
6857 else
6858   echo "$as_me: failed program was:" >&5
6859 sed 's/^/| /' conftest.$ac_ext >&5
6860
6861         ac_cv_lib_bsd_gethostbyname=no
6862 fi
6863
6864 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6865       conftest$ac_exeext conftest.$ac_ext
6866 LIBS=$ac_check_lib_save_LIBS
6867 fi
6868 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6869 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6870 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6871   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6872 fi
6873
6874       fi
6875     fi
6876
6877     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6878     # socket/setsockopt and other routines are undefined under SCO ODT
6879     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6880     # on later versions), says Simon Leinen: it contains gethostby*
6881     # variants that don't use the name server (or something).  -lsocket
6882     # must be given before -lnsl if both are needed.  We assume that
6883     # if connect needs -lnsl, so does gethostbyname.
6884     { echo "$as_me:$LINENO: checking for connect" >&5
6885 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6886 if test "${ac_cv_func_connect+set}" = set; then
6887   echo $ECHO_N "(cached) $ECHO_C" >&6
6888 else
6889   cat >conftest.$ac_ext <<_ACEOF
6890 /* confdefs.h.  */
6891 _ACEOF
6892 cat confdefs.h >>conftest.$ac_ext
6893 cat >>conftest.$ac_ext <<_ACEOF
6894 /* end confdefs.h.  */
6895 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6896    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6897 #define connect innocuous_connect
6898
6899 /* System header to define __stub macros and hopefully few prototypes,
6900     which can conflict with char connect (); below.
6901     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6902     <limits.h> exists even on freestanding compilers.  */
6903
6904 #ifdef __STDC__
6905 # include <limits.h>
6906 #else
6907 # include <assert.h>
6908 #endif
6909
6910 #undef connect
6911
6912 /* Override any GCC internal prototype to avoid an error.
6913    Use char because int might match the return type of a GCC
6914    builtin and then its argument prototype would still apply.  */
6915 #ifdef __cplusplus
6916 extern "C"
6917 #endif
6918 char connect ();
6919 /* The GNU C library defines this for functions which it implements
6920     to always fail with ENOSYS.  Some functions are actually named
6921     something starting with __ and the normal name is an alias.  */
6922 #if defined __stub_connect || defined __stub___connect
6923 choke me
6924 #endif
6925
6926 int
6927 main ()
6928 {
6929 return connect ();
6930   ;
6931   return 0;
6932 }
6933 _ACEOF
6934 rm -rf conftest.$ac_objext conftest$ac_exeext
6935 if { (ac_try="$ac_link"
6936 case "(($ac_try" in
6937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6938   *) ac_try_echo=$ac_try;;
6939 esac
6940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6941   (eval "$ac_link") 2>conftest.er1
6942   ac_status=$?
6943   grep -v '^ *+' conftest.er1 >conftest.err
6944   rm -rf conftest.er1
6945   cat conftest.err >&5
6946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947   (exit $ac_status); } && {
6948          test -z "$ac_c_werror_flag" ||
6949          test ! -s conftest.err
6950        } && test -s conftest$ac_exeext &&
6951        $as_test_x conftest$ac_exeext; then
6952   ac_cv_func_connect=yes
6953 else
6954   echo "$as_me: failed program was:" >&5
6955 sed 's/^/| /' conftest.$ac_ext >&5
6956
6957         ac_cv_func_connect=no
6958 fi
6959
6960 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6961       conftest$ac_exeext conftest.$ac_ext
6962 fi
6963 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6964 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6965
6966     if test $ac_cv_func_connect = no; then
6967       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6968 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6969 if test "${ac_cv_lib_socket_connect+set}" = set; then
6970   echo $ECHO_N "(cached) $ECHO_C" >&6
6971 else
6972   ac_check_lib_save_LIBS=$LIBS
6973 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6974 cat >conftest.$ac_ext <<_ACEOF
6975 /* confdefs.h.  */
6976 _ACEOF
6977 cat confdefs.h >>conftest.$ac_ext
6978 cat >>conftest.$ac_ext <<_ACEOF
6979 /* end confdefs.h.  */
6980
6981 /* Override any GCC internal prototype to avoid an error.
6982    Use char because int might match the return type of a GCC
6983    builtin and then its argument prototype would still apply.  */
6984 #ifdef __cplusplus
6985 extern "C"
6986 #endif
6987 char connect ();
6988 int
6989 main ()
6990 {
6991 return connect ();
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 rm -rf conftest.$ac_objext conftest$ac_exeext
6997 if { (ac_try="$ac_link"
6998 case "(($ac_try" in
6999   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7000   *) ac_try_echo=$ac_try;;
7001 esac
7002 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7003   (eval "$ac_link") 2>conftest.er1
7004   ac_status=$?
7005   grep -v '^ *+' conftest.er1 >conftest.err
7006   rm -rf conftest.er1
7007   cat conftest.err >&5
7008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7009   (exit $ac_status); } && {
7010          test -z "$ac_c_werror_flag" ||
7011          test ! -s conftest.err
7012        } && test -s conftest$ac_exeext &&
7013        $as_test_x conftest$ac_exeext; then
7014   ac_cv_lib_socket_connect=yes
7015 else
7016   echo "$as_me: failed program was:" >&5
7017 sed 's/^/| /' conftest.$ac_ext >&5
7018
7019         ac_cv_lib_socket_connect=no
7020 fi
7021
7022 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7023       conftest$ac_exeext conftest.$ac_ext
7024 LIBS=$ac_check_lib_save_LIBS
7025 fi
7026 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7027 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7028 if test $ac_cv_lib_socket_connect = yes; then
7029   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7030 fi
7031
7032     fi
7033
7034     # Guillermo Gomez says -lposix is necessary on A/UX.
7035     { echo "$as_me:$LINENO: checking for remove" >&5
7036 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7037 if test "${ac_cv_func_remove+set}" = set; then
7038   echo $ECHO_N "(cached) $ECHO_C" >&6
7039 else
7040   cat >conftest.$ac_ext <<_ACEOF
7041 /* confdefs.h.  */
7042 _ACEOF
7043 cat confdefs.h >>conftest.$ac_ext
7044 cat >>conftest.$ac_ext <<_ACEOF
7045 /* end confdefs.h.  */
7046 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7047    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7048 #define remove innocuous_remove
7049
7050 /* System header to define __stub macros and hopefully few prototypes,
7051     which can conflict with char remove (); below.
7052     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7053     <limits.h> exists even on freestanding compilers.  */
7054
7055 #ifdef __STDC__
7056 # include <limits.h>
7057 #else
7058 # include <assert.h>
7059 #endif
7060
7061 #undef remove
7062
7063 /* Override any GCC internal prototype to avoid an error.
7064    Use char because int might match the return type of a GCC
7065    builtin and then its argument prototype would still apply.  */
7066 #ifdef __cplusplus
7067 extern "C"
7068 #endif
7069 char remove ();
7070 /* The GNU C library defines this for functions which it implements
7071     to always fail with ENOSYS.  Some functions are actually named
7072     something starting with __ and the normal name is an alias.  */
7073 #if defined __stub_remove || defined __stub___remove
7074 choke me
7075 #endif
7076
7077 int
7078 main ()
7079 {
7080 return remove ();
7081   ;
7082   return 0;
7083 }
7084 _ACEOF
7085 rm -rf conftest.$ac_objext conftest$ac_exeext
7086 if { (ac_try="$ac_link"
7087 case "(($ac_try" in
7088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7089   *) ac_try_echo=$ac_try;;
7090 esac
7091 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7092   (eval "$ac_link") 2>conftest.er1
7093   ac_status=$?
7094   grep -v '^ *+' conftest.er1 >conftest.err
7095   rm -rf conftest.er1
7096   cat conftest.err >&5
7097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098   (exit $ac_status); } && {
7099          test -z "$ac_c_werror_flag" ||
7100          test ! -s conftest.err
7101        } && test -s conftest$ac_exeext &&
7102        $as_test_x conftest$ac_exeext; then
7103   ac_cv_func_remove=yes
7104 else
7105   echo "$as_me: failed program was:" >&5
7106 sed 's/^/| /' conftest.$ac_ext >&5
7107
7108         ac_cv_func_remove=no
7109 fi
7110
7111 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7112       conftest$ac_exeext conftest.$ac_ext
7113 fi
7114 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7115 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7116
7117     if test $ac_cv_func_remove = no; then
7118       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7119 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7120 if test "${ac_cv_lib_posix_remove+set}" = set; then
7121   echo $ECHO_N "(cached) $ECHO_C" >&6
7122 else
7123   ac_check_lib_save_LIBS=$LIBS
7124 LIBS="-lposix  $LIBS"
7125 cat >conftest.$ac_ext <<_ACEOF
7126 /* confdefs.h.  */
7127 _ACEOF
7128 cat confdefs.h >>conftest.$ac_ext
7129 cat >>conftest.$ac_ext <<_ACEOF
7130 /* end confdefs.h.  */
7131
7132 /* Override any GCC internal prototype to avoid an error.
7133    Use char because int might match the return type of a GCC
7134    builtin and then its argument prototype would still apply.  */
7135 #ifdef __cplusplus
7136 extern "C"
7137 #endif
7138 char remove ();
7139 int
7140 main ()
7141 {
7142 return remove ();
7143   ;
7144   return 0;
7145 }
7146 _ACEOF
7147 rm -rf conftest.$ac_objext conftest$ac_exeext
7148 if { (ac_try="$ac_link"
7149 case "(($ac_try" in
7150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7151   *) ac_try_echo=$ac_try;;
7152 esac
7153 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7154   (eval "$ac_link") 2>conftest.er1
7155   ac_status=$?
7156   grep -v '^ *+' conftest.er1 >conftest.err
7157   rm -rf conftest.er1
7158   cat conftest.err >&5
7159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160   (exit $ac_status); } && {
7161          test -z "$ac_c_werror_flag" ||
7162          test ! -s conftest.err
7163        } && test -s conftest$ac_exeext &&
7164        $as_test_x conftest$ac_exeext; then
7165   ac_cv_lib_posix_remove=yes
7166 else
7167   echo "$as_me: failed program was:" >&5
7168 sed 's/^/| /' conftest.$ac_ext >&5
7169
7170         ac_cv_lib_posix_remove=no
7171 fi
7172
7173 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7174       conftest$ac_exeext conftest.$ac_ext
7175 LIBS=$ac_check_lib_save_LIBS
7176 fi
7177 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7178 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7179 if test $ac_cv_lib_posix_remove = yes; then
7180   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7181 fi
7182
7183     fi
7184
7185     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7186     { echo "$as_me:$LINENO: checking for shmat" >&5
7187 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7188 if test "${ac_cv_func_shmat+set}" = set; then
7189   echo $ECHO_N "(cached) $ECHO_C" >&6
7190 else
7191   cat >conftest.$ac_ext <<_ACEOF
7192 /* confdefs.h.  */
7193 _ACEOF
7194 cat confdefs.h >>conftest.$ac_ext
7195 cat >>conftest.$ac_ext <<_ACEOF
7196 /* end confdefs.h.  */
7197 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7198    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7199 #define shmat innocuous_shmat
7200
7201 /* System header to define __stub macros and hopefully few prototypes,
7202     which can conflict with char shmat (); below.
7203     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7204     <limits.h> exists even on freestanding compilers.  */
7205
7206 #ifdef __STDC__
7207 # include <limits.h>
7208 #else
7209 # include <assert.h>
7210 #endif
7211
7212 #undef shmat
7213
7214 /* Override any GCC internal prototype to avoid an error.
7215    Use char because int might match the return type of a GCC
7216    builtin and then its argument prototype would still apply.  */
7217 #ifdef __cplusplus
7218 extern "C"
7219 #endif
7220 char shmat ();
7221 /* The GNU C library defines this for functions which it implements
7222     to always fail with ENOSYS.  Some functions are actually named
7223     something starting with __ and the normal name is an alias.  */
7224 #if defined __stub_shmat || defined __stub___shmat
7225 choke me
7226 #endif
7227
7228 int
7229 main ()
7230 {
7231 return shmat ();
7232   ;
7233   return 0;
7234 }
7235 _ACEOF
7236 rm -rf conftest.$ac_objext conftest$ac_exeext
7237 if { (ac_try="$ac_link"
7238 case "(($ac_try" in
7239   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7240   *) ac_try_echo=$ac_try;;
7241 esac
7242 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7243   (eval "$ac_link") 2>conftest.er1
7244   ac_status=$?
7245   grep -v '^ *+' conftest.er1 >conftest.err
7246   rm -rf conftest.er1
7247   cat conftest.err >&5
7248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7249   (exit $ac_status); } && {
7250          test -z "$ac_c_werror_flag" ||
7251          test ! -s conftest.err
7252        } && test -s conftest$ac_exeext &&
7253        $as_test_x conftest$ac_exeext; then
7254   ac_cv_func_shmat=yes
7255 else
7256   echo "$as_me: failed program was:" >&5
7257 sed 's/^/| /' conftest.$ac_ext >&5
7258
7259         ac_cv_func_shmat=no
7260 fi
7261
7262 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7263       conftest$ac_exeext conftest.$ac_ext
7264 fi
7265 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7266 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7267
7268     if test $ac_cv_func_shmat = no; then
7269       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7270 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7271 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7272   echo $ECHO_N "(cached) $ECHO_C" >&6
7273 else
7274   ac_check_lib_save_LIBS=$LIBS
7275 LIBS="-lipc  $LIBS"
7276 cat >conftest.$ac_ext <<_ACEOF
7277 /* confdefs.h.  */
7278 _ACEOF
7279 cat confdefs.h >>conftest.$ac_ext
7280 cat >>conftest.$ac_ext <<_ACEOF
7281 /* end confdefs.h.  */
7282
7283 /* Override any GCC internal prototype to avoid an error.
7284    Use char because int might match the return type of a GCC
7285    builtin and then its argument prototype would still apply.  */
7286 #ifdef __cplusplus
7287 extern "C"
7288 #endif
7289 char shmat ();
7290 int
7291 main ()
7292 {
7293 return shmat ();
7294   ;
7295   return 0;
7296 }
7297 _ACEOF
7298 rm -rf conftest.$ac_objext conftest$ac_exeext
7299 if { (ac_try="$ac_link"
7300 case "(($ac_try" in
7301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7302   *) ac_try_echo=$ac_try;;
7303 esac
7304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7305   (eval "$ac_link") 2>conftest.er1
7306   ac_status=$?
7307   grep -v '^ *+' conftest.er1 >conftest.err
7308   rm -rf conftest.er1
7309   cat conftest.err >&5
7310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7311   (exit $ac_status); } && {
7312          test -z "$ac_c_werror_flag" ||
7313          test ! -s conftest.err
7314        } && test -s conftest$ac_exeext &&
7315        $as_test_x conftest$ac_exeext; then
7316   ac_cv_lib_ipc_shmat=yes
7317 else
7318   echo "$as_me: failed program was:" >&5
7319 sed 's/^/| /' conftest.$ac_ext >&5
7320
7321         ac_cv_lib_ipc_shmat=no
7322 fi
7323
7324 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7325       conftest$ac_exeext conftest.$ac_ext
7326 LIBS=$ac_check_lib_save_LIBS
7327 fi
7328 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7329 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7330 if test $ac_cv_lib_ipc_shmat = yes; then
7331   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7332 fi
7333
7334     fi
7335   fi
7336
7337   # Check for libraries that X11R6 Xt/Xaw programs need.
7338   ac_save_LDFLAGS=$LDFLAGS
7339   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7340   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7341   # check for ICE first), but we must link in the order -lSM -lICE or
7342   # we get undefined symbols.  So assume we have SM if we have ICE.
7343   # These have to be linked with before -lX11, unlike the other
7344   # libraries we check for below, so use a different variable.
7345   # John Interrante, Karl Berry
7346   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7347 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7348 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351   ac_check_lib_save_LIBS=$LIBS
7352 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7353 cat >conftest.$ac_ext <<_ACEOF
7354 /* confdefs.h.  */
7355 _ACEOF
7356 cat confdefs.h >>conftest.$ac_ext
7357 cat >>conftest.$ac_ext <<_ACEOF
7358 /* end confdefs.h.  */
7359
7360 /* Override any GCC internal prototype to avoid an error.
7361    Use char because int might match the return type of a GCC
7362    builtin and then its argument prototype would still apply.  */
7363 #ifdef __cplusplus
7364 extern "C"
7365 #endif
7366 char IceConnectionNumber ();
7367 int
7368 main ()
7369 {
7370 return IceConnectionNumber ();
7371   ;
7372   return 0;
7373 }
7374 _ACEOF
7375 rm -rf conftest.$ac_objext conftest$ac_exeext
7376 if { (ac_try="$ac_link"
7377 case "(($ac_try" in
7378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7379   *) ac_try_echo=$ac_try;;
7380 esac
7381 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7382   (eval "$ac_link") 2>conftest.er1
7383   ac_status=$?
7384   grep -v '^ *+' conftest.er1 >conftest.err
7385   rm -rf conftest.er1
7386   cat conftest.err >&5
7387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388   (exit $ac_status); } && {
7389          test -z "$ac_c_werror_flag" ||
7390          test ! -s conftest.err
7391        } && test -s conftest$ac_exeext &&
7392        $as_test_x conftest$ac_exeext; then
7393   ac_cv_lib_ICE_IceConnectionNumber=yes
7394 else
7395   echo "$as_me: failed program was:" >&5
7396 sed 's/^/| /' conftest.$ac_ext >&5
7397
7398         ac_cv_lib_ICE_IceConnectionNumber=no
7399 fi
7400
7401 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7402       conftest$ac_exeext conftest.$ac_ext
7403 LIBS=$ac_check_lib_save_LIBS
7404 fi
7405 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7406 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7407 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7408   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7409 fi
7410
7411   LDFLAGS=$ac_save_LDFLAGS
7412
7413 fi
7414
7415
7416 if test "$have_x" != yes; then
7417   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7418 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7419    { (exit 1); exit 1; }; }
7420 fi
7421
7422
7423     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7424 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7425 if test "${ac_cv_x_app_defaults+set}" = set; then
7426   echo $ECHO_N "(cached) $ECHO_C" >&6
7427 else
7428
7429   rm -fr conftestdir
7430   if mkdir conftestdir; then
7431     cd conftestdir 2>/dev/null
7432     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7433     cat > Imakefile <<'EOF'
7434 acfindx:
7435         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7436 EOF
7437     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7438       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7439       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7440     fi
7441     cd .. 2>/dev/null
7442     rm -fr conftestdir
7443   fi
7444       if test x"$ac_x_app_defaults" = x; then
7445
7446   # Look for the directory under a standard set of common directories.
7447   # Check X11 before X11Rn because it's often a symlink to the current release.
7448   for ac_dir in                                 \
7449     /usr/X11/lib/app-defaults                   \
7450     /usr/X11R6/lib/app-defaults                 \
7451     /usr/X11R6/lib/X11/app-defaults             \
7452     /usr/X11R5/lib/app-defaults                 \
7453     /usr/X11R5/lib/X11/app-defaults             \
7454     /usr/X11R4/lib/app-defaults                 \
7455     /usr/X11R4/lib/X11/app-defaults             \
7456                                                 \
7457     /usr/lib/X11/app-defaults                   \
7458     /usr/lib/X11R6/app-defaults                 \
7459     /usr/lib/X11R5/app-defaults                 \
7460     /usr/lib/X11R4/app-defaults                 \
7461                                                 \
7462     /usr/local/X11/lib/app-defaults             \
7463     /usr/local/X11R6/lib/app-defaults           \
7464     /usr/local/X11R5/lib/app-defaults           \
7465     /usr/local/X11R4/lib/app-defaults           \
7466                                                 \
7467     /usr/local/lib/X11/app-defaults             \
7468     /usr/local/lib/X11R6/app-defaults           \
7469     /usr/local/lib/X11R6/X11/app-defaults       \
7470     /usr/local/lib/X11R5/app-defaults           \
7471     /usr/local/lib/X11R5/X11/app-defaults       \
7472     /usr/local/lib/X11R4/app-defaults           \
7473     /usr/local/lib/X11R4/X11/app-defaults       \
7474                                                 \
7475     /usr/X386/lib/X11/app-defaults              \
7476     /usr/x386/lib/X11/app-defaults              \
7477     /usr/XFree86/lib/X11/app-defaults           \
7478                                                 \
7479     /usr/lib/X11/app-defaults                   \
7480     /usr/local/lib/X11/app-defaults             \
7481     /usr/unsupported/lib/X11/app-defaults       \
7482     /usr/athena/lib/X11/app-defaults            \
7483     /usr/local/x11r5/lib/X11/app-defaults       \
7484     /usr/lpp/Xamples/lib/X11/app-defaults       \
7485     /lib/usr/lib/X11/app-defaults               \
7486                                                 \
7487     /usr/openwin/lib/app-defaults               \
7488     /usr/openwin/lib/X11/app-defaults           \
7489     /usr/openwin/share/lib/app-defaults         \
7490     /usr/openwin/share/lib/X11/app-defaults     \
7491                                                 \
7492     /X11R6/lib/app-defaults                     \
7493     /X11R5/lib/app-defaults                     \
7494     /X11R4/lib/app-defaults                     \
7495     ; \
7496   do
7497     if test -d "$ac_dir"; then
7498       ac_x_app_defaults=$ac_dir
7499       break
7500     fi
7501   done
7502
7503       fi
7504       if test x"$ac_x_app_defaults" = x; then
7505         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7506       else
7507         # Record where we found app-defaults for the cache.
7508         ac_cv_x_app_defaults="$ac_x_app_defaults"
7509       fi
7510 fi
7511 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7512 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7513     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7514 case "$host" in
7515     *-hpux*)
7516
7517       # The following arcana was gleaned from conversations with
7518       # Eric Schwartz <erics@col.hp.com>:
7519       #
7520       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7521       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7522       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7523       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7524       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7525       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7526       # you don't need any -I or -L arguments.
7527       #
7528       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7529       # are the same division as 10.x.  However, there are no symlinks to
7530       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7531       # arguments are always necessary.
7532       #
7533       # However, X11R6 was available on HPUX 9.x as a patch: if that
7534       # patch was installed, then all of X11R6 went in to
7535       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7536       #
7537       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7538       # whether R5 was available as a patch; R6 undoubtedly was not.)
7539       #
7540       # So.  We try and use the highest numbered pair of
7541       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7542       # that are available.  We do not mix and match different versions
7543       # of X.
7544       #
7545       # Question I still don't know the answer to: (do you?)
7546       #
7547       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7548       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7549       #     that contrib directory?  Did it contain so-called "standard"
7550       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7551       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7552       #     be a situation where one had to reach into the R5 headers and
7553       #     libs to find Xmu?  That is, must both R6 and R5 directories
7554       #     be on the -I and -L lists in that case?
7555       #
7556       for version in X11R6 X11R5 X11R4 ; do
7557         # if either pair of directories exists...
7558         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7559         then
7560            # if contrib exists, use it...
7561            if test -d /usr/contrib/$version/include ; then
7562              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7563              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7564            fi
7565            # if the "standard" one exists, use it.
7566            if test -d /usr/include/$version ; then
7567              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7568              X_LIBS="$X_LIBS -L/usr/lib/$version"
7569            fi
7570            # since at least one of the pair exists, go no farther.
7571            break
7572         fi
7573       done
7574
7575       # Now find Motif.  Thanks for not making xmkmf find this by
7576       # default, you losers.
7577       #
7578       if test -d /usr/include/Motif2.1 ; then
7579         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7580         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7581       elif test -d /usr/include/Motif1.2 ; then
7582         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7583         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7584       elif test -d /usr/include/Motif1.1 ; then
7585         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7586         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7587       fi
7588
7589       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7590       #
7591       if test -d /opt/graphics/OpenGL/include ; then
7592         # HP-UX 10.20 puts it here
7593         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7594         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7595       elif test -d /opt/Mesa/lib ; then
7596         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7597         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7598       fi
7599
7600
7601       if test -d /opt/xpm/lib/X11 ; then
7602         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7603         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7604       fi
7605
7606       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7607       # in /usr/local/, unless there is already an xscreensaver in
7608       # /usr/local/bin/.  This can be overridden with the --prefix arg
7609       # to configure.  I'm not sure this is the right thing to do, but
7610       # Richard Lloyd says so...
7611       #
7612       if test \! -x /usr/local/bin/xscreensaver ; then
7613         ac_default_prefix=/opt/xscreensaver
7614       fi
7615
7616     ;;
7617     *-solaris*)
7618
7619       # Thanks for not making xmkmf find this by default, pinheads.
7620       # And thanks for moving things around again, too.  Is this
7621       # really the standard location now?  What happened to the
7622       # joke that this kind of thing went in /opt?
7623       # cthomp says "answer: CDE (Common Disorganized Environment)"
7624       #
7625       if test -f /usr/dt/include/Xm/Xm.h ; then
7626         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7627         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7628
7629         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7630         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7631 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7632 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7633   echo $ECHO_N "(cached) $ECHO_C" >&6
7634 else
7635   ac_check_lib_save_LIBS=$LIBS
7636 LIBS="-lgen  $LIBS"
7637 cat >conftest.$ac_ext <<_ACEOF
7638 /* confdefs.h.  */
7639 _ACEOF
7640 cat confdefs.h >>conftest.$ac_ext
7641 cat >>conftest.$ac_ext <<_ACEOF
7642 /* end confdefs.h.  */
7643
7644 /* Override any GCC internal prototype to avoid an error.
7645    Use char because int might match the return type of a GCC
7646    builtin and then its argument prototype would still apply.  */
7647 #ifdef __cplusplus
7648 extern "C"
7649 #endif
7650 char regcmp ();
7651 int
7652 main ()
7653 {
7654 return regcmp ();
7655   ;
7656   return 0;
7657 }
7658 _ACEOF
7659 rm -rf conftest.$ac_objext conftest$ac_exeext
7660 if { (ac_try="$ac_link"
7661 case "(($ac_try" in
7662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7663   *) ac_try_echo=$ac_try;;
7664 esac
7665 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7666   (eval "$ac_link") 2>conftest.er1
7667   ac_status=$?
7668   grep -v '^ *+' conftest.er1 >conftest.err
7669   rm -rf conftest.er1
7670   cat conftest.err >&5
7671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7672   (exit $ac_status); } && {
7673          test -z "$ac_c_werror_flag" ||
7674          test ! -s conftest.err
7675        } && test -s conftest$ac_exeext &&
7676        $as_test_x conftest$ac_exeext; then
7677   ac_cv_lib_gen_regcmp=yes
7678 else
7679   echo "$as_me: failed program was:" >&5
7680 sed 's/^/| /' conftest.$ac_ext >&5
7681
7682         ac_cv_lib_gen_regcmp=no
7683 fi
7684
7685 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7686       conftest$ac_exeext conftest.$ac_ext
7687 LIBS=$ac_check_lib_save_LIBS
7688 fi
7689 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7690 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7691 if test $ac_cv_lib_gen_regcmp = yes; then
7692   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7693 fi
7694
7695       fi
7696
7697     ;;
7698     *-darwin*)
7699
7700       # On MacOS X (10.x with "fink"), many things are under /sw/.
7701       #
7702       if test -d /sw/include ; then
7703         X_CFLAGS="-I/sw/include $X_CFLAGS"
7704         X_LIBS="-L/sw/lib $X_LIBS"
7705       fi
7706     ;;
7707   esac
7708 { echo "$as_me:$LINENO: checking for XPointer" >&5
7709 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7710 if test "${ac_cv_xpointer+set}" = set; then
7711   echo $ECHO_N "(cached) $ECHO_C" >&6
7712 else
7713
7714   ac_save_CPPFLAGS="$CPPFLAGS"
7715   if test \! -z "$includedir" ; then
7716     CPPFLAGS="$CPPFLAGS -I$includedir"
7717   fi
7718   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7719   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7720   cat >conftest.$ac_ext <<_ACEOF
7721 /* confdefs.h.  */
7722 _ACEOF
7723 cat confdefs.h >>conftest.$ac_ext
7724 cat >>conftest.$ac_ext <<_ACEOF
7725 /* end confdefs.h.  */
7726 #include <X11/Xlib.h>
7727 int
7728 main ()
7729 {
7730 XPointer foo = (XPointer) 0;
7731   ;
7732   return 0;
7733 }
7734 _ACEOF
7735 rm -rf conftest.$ac_objext
7736 if { (ac_try="$ac_compile"
7737 case "(($ac_try" in
7738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739   *) ac_try_echo=$ac_try;;
7740 esac
7741 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7742   (eval "$ac_compile") 2>conftest.er1
7743   ac_status=$?
7744   grep -v '^ *+' conftest.er1 >conftest.err
7745   rm -rf conftest.er1
7746   cat conftest.err >&5
7747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748   (exit $ac_status); } && {
7749          test -z "$ac_c_werror_flag" ||
7750          test ! -s conftest.err
7751        } && test -s conftest.$ac_objext; then
7752   ac_cv_xpointer=yes
7753 else
7754   echo "$as_me: failed program was:" >&5
7755 sed 's/^/| /' conftest.$ac_ext >&5
7756
7757         ac_cv_xpointer=no
7758 fi
7759
7760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7761   CPPFLAGS="$ac_save_CPPFLAGS"
7762 fi
7763 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7764 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7765   if test "$ac_cv_xpointer" != yes; then
7766    cat >>confdefs.h <<\_ACEOF
7767 #define XPointer char*
7768 _ACEOF
7769
7770   fi
7771
7772 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7773 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7774   ac_macosx=no
7775   case "$host" in
7776     *-apple-darwin* )
7777       ac_macosx=yes
7778     ;;
7779   esac
7780 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7781 echo "${ECHO_T}$ac_macosx" >&6; }
7782
7783
7784 ###############################################################################
7785 #
7786 #       Gettext support
7787 #
7788 ###############################################################################
7789
7790
7791
7792 if test -n ""; then
7793     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7794 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7795
7796     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7797     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7798
7799     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7800
7801
7802     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7803         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7804 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7805     else
7806         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7807 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7808         exit 1
7809     fi
7810 fi
7811
7812   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'
7813 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'
7814      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'
7815       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7816      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'
7817    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'
7818     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'
7819 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'
7820        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'
7821       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'
7822     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'
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836 # Use the tools built into the package, not the ones that are installed.
7837
7838 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7839 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7840 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7841
7842
7843
7844
7845
7846 # Extract the first word of "perl", so it can be a program name with args.
7847 set dummy perl; ac_word=$2
7848 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7850 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7851   echo $ECHO_N "(cached) $ECHO_C" >&6
7852 else
7853   case $INTLTOOL_PERL in
7854   [\\/]* | ?:[\\/]*)
7855   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7856   ;;
7857   *)
7858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859 for as_dir in $PATH
7860 do
7861   IFS=$as_save_IFS
7862   test -z "$as_dir" && as_dir=.
7863   for ac_exec_ext in '' $ac_executable_extensions; do
7864   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7865     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7866     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7867     break 2
7868   fi
7869 done
7870 done
7871 IFS=$as_save_IFS
7872
7873   ;;
7874 esac
7875 fi
7876 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7877 if test -n "$INTLTOOL_PERL"; then
7878   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7879 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7880 else
7881   { echo "$as_me:$LINENO: result: no" >&5
7882 echo "${ECHO_T}no" >&6; }
7883 fi
7884
7885
7886 if test -z "$INTLTOOL_PERL"; then
7887    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7888 echo "$as_me: error: perl not found; required for intltool" >&2;}
7889    { (exit 1); exit 1; }; }
7890 fi
7891 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7892    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7893 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7894    { (exit 1); exit 1; }; }
7895 fi
7896
7897 # Remove file type tags (using []) from po/POTFILES.
7898
7899
7900
7901
7902
7903
7904
7905 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7906
7907 ac_config_commands="$ac_config_commands default-1"
7908
7909
7910
7911 GETTEXT_PACKAGE=xscreensaver
7912
7913 cat >>confdefs.h <<_ACEOF
7914 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7915 _ACEOF
7916
7917
7918 cat >>confdefs.h <<_ACEOF
7919 #define PACKAGE "$GETTEXT_PACKAGE"
7920 _ACEOF
7921
7922
7923
7924 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7925 if test -n "$ac_tool_prefix"; then
7926   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7927 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7928 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7930 if test "${ac_cv_prog_RANLIB+set}" = set; then
7931   echo $ECHO_N "(cached) $ECHO_C" >&6
7932 else
7933   if test -n "$RANLIB"; then
7934   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7935 else
7936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7937 for as_dir in $PATH
7938 do
7939   IFS=$as_save_IFS
7940   test -z "$as_dir" && as_dir=.
7941   for ac_exec_ext in '' $ac_executable_extensions; do
7942   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7943     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7944     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7945     break 2
7946   fi
7947 done
7948 done
7949 IFS=$as_save_IFS
7950
7951 fi
7952 fi
7953 RANLIB=$ac_cv_prog_RANLIB
7954 if test -n "$RANLIB"; then
7955   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7956 echo "${ECHO_T}$RANLIB" >&6; }
7957 else
7958   { echo "$as_me:$LINENO: result: no" >&5
7959 echo "${ECHO_T}no" >&6; }
7960 fi
7961
7962
7963 fi
7964 if test -z "$ac_cv_prog_RANLIB"; then
7965   ac_ct_RANLIB=$RANLIB
7966   # Extract the first word of "ranlib", so it can be a program name with args.
7967 set dummy ranlib; ac_word=$2
7968 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7970 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7971   echo $ECHO_N "(cached) $ECHO_C" >&6
7972 else
7973   if test -n "$ac_ct_RANLIB"; then
7974   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7975 else
7976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977 for as_dir in $PATH
7978 do
7979   IFS=$as_save_IFS
7980   test -z "$as_dir" && as_dir=.
7981   for ac_exec_ext in '' $ac_executable_extensions; do
7982   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7983     ac_cv_prog_ac_ct_RANLIB="ranlib"
7984     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7985     break 2
7986   fi
7987 done
7988 done
7989 IFS=$as_save_IFS
7990
7991 fi
7992 fi
7993 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7994 if test -n "$ac_ct_RANLIB"; then
7995   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7996 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
7997 else
7998   { echo "$as_me:$LINENO: result: no" >&5
7999 echo "${ECHO_T}no" >&6; }
8000 fi
8001
8002   if test "x$ac_ct_RANLIB" = x; then
8003     RANLIB=":"
8004   else
8005     case $cross_compiling:$ac_tool_warned in
8006 yes:)
8007 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8008 whose name does not start with the host triplet.  If you think this
8009 configuration is useful to you, please write to autoconf@gnu.org." >&5
8010 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8011 whose name does not start with the host triplet.  If you think this
8012 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8013 ac_tool_warned=yes ;;
8014 esac
8015     RANLIB=$ac_ct_RANLIB
8016   fi
8017 else
8018   RANLIB="$ac_cv_prog_RANLIB"
8019 fi
8020
8021 { echo "$as_me:$LINENO: checking for off_t" >&5
8022 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8023 if test "${ac_cv_type_off_t+set}" = set; then
8024   echo $ECHO_N "(cached) $ECHO_C" >&6
8025 else
8026   cat >conftest.$ac_ext <<_ACEOF
8027 /* confdefs.h.  */
8028 _ACEOF
8029 cat confdefs.h >>conftest.$ac_ext
8030 cat >>conftest.$ac_ext <<_ACEOF
8031 /* end confdefs.h.  */
8032 $ac_includes_default
8033 typedef off_t ac__type_new_;
8034 int
8035 main ()
8036 {
8037 if ((ac__type_new_ *) 0)
8038   return 0;
8039 if (sizeof (ac__type_new_))
8040   return 0;
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 rm -rf conftest.$ac_objext
8046 if { (ac_try="$ac_compile"
8047 case "(($ac_try" in
8048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8049   *) ac_try_echo=$ac_try;;
8050 esac
8051 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8052   (eval "$ac_compile") 2>conftest.er1
8053   ac_status=$?
8054   grep -v '^ *+' conftest.er1 >conftest.err
8055   rm -rf conftest.er1
8056   cat conftest.err >&5
8057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058   (exit $ac_status); } && {
8059          test -z "$ac_c_werror_flag" ||
8060          test ! -s conftest.err
8061        } && test -s conftest.$ac_objext; then
8062   ac_cv_type_off_t=yes
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 sed 's/^/| /' conftest.$ac_ext >&5
8066
8067         ac_cv_type_off_t=no
8068 fi
8069
8070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8071 fi
8072 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8073 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8074 if test $ac_cv_type_off_t = yes; then
8075   :
8076 else
8077
8078 cat >>confdefs.h <<_ACEOF
8079 #define off_t long int
8080 _ACEOF
8081
8082 fi
8083
8084 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8085 # for constant arguments.  Useless!
8086 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8087 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8088 if test "${ac_cv_working_alloca_h+set}" = set; then
8089   echo $ECHO_N "(cached) $ECHO_C" >&6
8090 else
8091   cat >conftest.$ac_ext <<_ACEOF
8092 /* confdefs.h.  */
8093 _ACEOF
8094 cat confdefs.h >>conftest.$ac_ext
8095 cat >>conftest.$ac_ext <<_ACEOF
8096 /* end confdefs.h.  */
8097 #include <alloca.h>
8098 int
8099 main ()
8100 {
8101 char *p = (char *) alloca (2 * sizeof (int));
8102                           if (p) return 0;
8103   ;
8104   return 0;
8105 }
8106 _ACEOF
8107 rm -rf conftest.$ac_objext conftest$ac_exeext
8108 if { (ac_try="$ac_link"
8109 case "(($ac_try" in
8110   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8111   *) ac_try_echo=$ac_try;;
8112 esac
8113 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8114   (eval "$ac_link") 2>conftest.er1
8115   ac_status=$?
8116   grep -v '^ *+' conftest.er1 >conftest.err
8117   rm -rf conftest.er1
8118   cat conftest.err >&5
8119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120   (exit $ac_status); } && {
8121          test -z "$ac_c_werror_flag" ||
8122          test ! -s conftest.err
8123        } && test -s conftest$ac_exeext &&
8124        $as_test_x conftest$ac_exeext; then
8125   ac_cv_working_alloca_h=yes
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 sed 's/^/| /' conftest.$ac_ext >&5
8129
8130         ac_cv_working_alloca_h=no
8131 fi
8132
8133 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8134       conftest$ac_exeext conftest.$ac_ext
8135 fi
8136 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8137 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8138 if test $ac_cv_working_alloca_h = yes; then
8139
8140 cat >>confdefs.h <<\_ACEOF
8141 #define HAVE_ALLOCA_H 1
8142 _ACEOF
8143
8144 fi
8145
8146 { echo "$as_me:$LINENO: checking for alloca" >&5
8147 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8148 if test "${ac_cv_func_alloca_works+set}" = set; then
8149   echo $ECHO_N "(cached) $ECHO_C" >&6
8150 else
8151   cat >conftest.$ac_ext <<_ACEOF
8152 /* confdefs.h.  */
8153 _ACEOF
8154 cat confdefs.h >>conftest.$ac_ext
8155 cat >>conftest.$ac_ext <<_ACEOF
8156 /* end confdefs.h.  */
8157 #ifdef __GNUC__
8158 # define alloca __builtin_alloca
8159 #else
8160 # ifdef _MSC_VER
8161 #  include <malloc.h>
8162 #  define alloca _alloca
8163 # else
8164 #  ifdef HAVE_ALLOCA_H
8165 #   include <alloca.h>
8166 #  else
8167 #   ifdef _AIX
8168  #pragma alloca
8169 #   else
8170 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8171 char *alloca ();
8172 #    endif
8173 #   endif
8174 #  endif
8175 # endif
8176 #endif
8177
8178 int
8179 main ()
8180 {
8181 char *p = (char *) alloca (1);
8182                                     if (p) return 0;
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 rm -rf conftest.$ac_objext conftest$ac_exeext
8188 if { (ac_try="$ac_link"
8189 case "(($ac_try" in
8190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8191   *) ac_try_echo=$ac_try;;
8192 esac
8193 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8194   (eval "$ac_link") 2>conftest.er1
8195   ac_status=$?
8196   grep -v '^ *+' conftest.er1 >conftest.err
8197   rm -rf conftest.er1
8198   cat conftest.err >&5
8199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8200   (exit $ac_status); } && {
8201          test -z "$ac_c_werror_flag" ||
8202          test ! -s conftest.err
8203        } && test -s conftest$ac_exeext &&
8204        $as_test_x conftest$ac_exeext; then
8205   ac_cv_func_alloca_works=yes
8206 else
8207   echo "$as_me: failed program was:" >&5
8208 sed 's/^/| /' conftest.$ac_ext >&5
8209
8210         ac_cv_func_alloca_works=no
8211 fi
8212
8213 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8214       conftest$ac_exeext conftest.$ac_ext
8215 fi
8216 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8217 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8218
8219 if test $ac_cv_func_alloca_works = yes; then
8220
8221 cat >>confdefs.h <<\_ACEOF
8222 #define HAVE_ALLOCA 1
8223 _ACEOF
8224
8225 else
8226   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8227 # that cause trouble.  Some versions do not even contain alloca or
8228 # contain a buggy version.  If you still want to use their alloca,
8229 # use ar to extract alloca.o from them instead of compiling alloca.c.
8230
8231 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8232
8233 cat >>confdefs.h <<\_ACEOF
8234 #define C_ALLOCA 1
8235 _ACEOF
8236
8237
8238 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8239 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8240 if test "${ac_cv_os_cray+set}" = set; then
8241   echo $ECHO_N "(cached) $ECHO_C" >&6
8242 else
8243   cat >conftest.$ac_ext <<_ACEOF
8244 /* confdefs.h.  */
8245 _ACEOF
8246 cat confdefs.h >>conftest.$ac_ext
8247 cat >>conftest.$ac_ext <<_ACEOF
8248 /* end confdefs.h.  */
8249 #if defined CRAY && ! defined CRAY2
8250 webecray
8251 #else
8252 wenotbecray
8253 #endif
8254
8255 _ACEOF
8256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8257   $EGREP "webecray" >/dev/null 2>&1; then
8258   ac_cv_os_cray=yes
8259 else
8260   ac_cv_os_cray=no
8261 fi
8262 rm -rf conftest*
8263
8264 fi
8265 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8266 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8267 if test $ac_cv_os_cray = yes; then
8268   for ac_func in _getb67 GETB67 getb67; do
8269     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8270 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8271 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8272 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8273   echo $ECHO_N "(cached) $ECHO_C" >&6
8274 else
8275   cat >conftest.$ac_ext <<_ACEOF
8276 /* confdefs.h.  */
8277 _ACEOF
8278 cat confdefs.h >>conftest.$ac_ext
8279 cat >>conftest.$ac_ext <<_ACEOF
8280 /* end confdefs.h.  */
8281 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8282    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8283 #define $ac_func innocuous_$ac_func
8284
8285 /* System header to define __stub macros and hopefully few prototypes,
8286     which can conflict with char $ac_func (); below.
8287     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8288     <limits.h> exists even on freestanding compilers.  */
8289
8290 #ifdef __STDC__
8291 # include <limits.h>
8292 #else
8293 # include <assert.h>
8294 #endif
8295
8296 #undef $ac_func
8297
8298 /* Override any GCC internal prototype to avoid an error.
8299    Use char because int might match the return type of a GCC
8300    builtin and then its argument prototype would still apply.  */
8301 #ifdef __cplusplus
8302 extern "C"
8303 #endif
8304 char $ac_func ();
8305 /* The GNU C library defines this for functions which it implements
8306     to always fail with ENOSYS.  Some functions are actually named
8307     something starting with __ and the normal name is an alias.  */
8308 #if defined __stub_$ac_func || defined __stub___$ac_func
8309 choke me
8310 #endif
8311
8312 int
8313 main ()
8314 {
8315 return $ac_func ();
8316   ;
8317   return 0;
8318 }
8319 _ACEOF
8320 rm -rf conftest.$ac_objext conftest$ac_exeext
8321 if { (ac_try="$ac_link"
8322 case "(($ac_try" in
8323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8324   *) ac_try_echo=$ac_try;;
8325 esac
8326 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8327   (eval "$ac_link") 2>conftest.er1
8328   ac_status=$?
8329   grep -v '^ *+' conftest.er1 >conftest.err
8330   rm -rf conftest.er1
8331   cat conftest.err >&5
8332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333   (exit $ac_status); } && {
8334          test -z "$ac_c_werror_flag" ||
8335          test ! -s conftest.err
8336        } && test -s conftest$ac_exeext &&
8337        $as_test_x conftest$ac_exeext; then
8338   eval "$as_ac_var=yes"
8339 else
8340   echo "$as_me: failed program was:" >&5
8341 sed 's/^/| /' conftest.$ac_ext >&5
8342
8343         eval "$as_ac_var=no"
8344 fi
8345
8346 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8347       conftest$ac_exeext conftest.$ac_ext
8348 fi
8349 ac_res=`eval echo '${'$as_ac_var'}'`
8350                { echo "$as_me:$LINENO: result: $ac_res" >&5
8351 echo "${ECHO_T}$ac_res" >&6; }
8352 if test `eval echo '${'$as_ac_var'}'` = yes; then
8353
8354 cat >>confdefs.h <<_ACEOF
8355 #define CRAY_STACKSEG_END $ac_func
8356 _ACEOF
8357
8358     break
8359 fi
8360
8361   done
8362 fi
8363
8364 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8365 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8366 if test "${ac_cv_c_stack_direction+set}" = set; then
8367   echo $ECHO_N "(cached) $ECHO_C" >&6
8368 else
8369   if test "$cross_compiling" = yes; then
8370   ac_cv_c_stack_direction=0
8371 else
8372   cat >conftest.$ac_ext <<_ACEOF
8373 /* confdefs.h.  */
8374 _ACEOF
8375 cat confdefs.h >>conftest.$ac_ext
8376 cat >>conftest.$ac_ext <<_ACEOF
8377 /* end confdefs.h.  */
8378 $ac_includes_default
8379 int
8380 find_stack_direction ()
8381 {
8382   static char *addr = 0;
8383   auto char dummy;
8384   if (addr == 0)
8385     {
8386       addr = &dummy;
8387       return find_stack_direction ();
8388     }
8389   else
8390     return (&dummy > addr) ? 1 : -1;
8391 }
8392
8393 int
8394 main ()
8395 {
8396   return find_stack_direction () < 0;
8397 }
8398 _ACEOF
8399 rm -rf conftest$ac_exeext
8400 if { (ac_try="$ac_link"
8401 case "(($ac_try" in
8402   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8403   *) ac_try_echo=$ac_try;;
8404 esac
8405 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8406   (eval "$ac_link") 2>&5
8407   ac_status=$?
8408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8410   { (case "(($ac_try" in
8411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8412   *) ac_try_echo=$ac_try;;
8413 esac
8414 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8415   (eval "$ac_try") 2>&5
8416   ac_status=$?
8417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8418   (exit $ac_status); }; }; then
8419   ac_cv_c_stack_direction=1
8420 else
8421   echo "$as_me: program exited with status $ac_status" >&5
8422 echo "$as_me: failed program was:" >&5
8423 sed 's/^/| /' conftest.$ac_ext >&5
8424
8425 ( exit $ac_status )
8426 ac_cv_c_stack_direction=-1
8427 fi
8428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8429 fi
8430
8431
8432 fi
8433 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8434 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8435
8436 cat >>confdefs.h <<_ACEOF
8437 #define STACK_DIRECTION $ac_cv_c_stack_direction
8438 _ACEOF
8439
8440
8441 fi
8442
8443
8444
8445 for ac_header in stdlib.h unistd.h
8446 do
8447 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8448 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8449   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8450 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8451 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8452   echo $ECHO_N "(cached) $ECHO_C" >&6
8453 fi
8454 ac_res=`eval echo '${'$as_ac_Header'}'`
8455                { echo "$as_me:$LINENO: result: $ac_res" >&5
8456 echo "${ECHO_T}$ac_res" >&6; }
8457 else
8458   # Is the header compilable?
8459 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8460 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8461 cat >conftest.$ac_ext <<_ACEOF
8462 /* confdefs.h.  */
8463 _ACEOF
8464 cat confdefs.h >>conftest.$ac_ext
8465 cat >>conftest.$ac_ext <<_ACEOF
8466 /* end confdefs.h.  */
8467 $ac_includes_default
8468 #include <$ac_header>
8469 _ACEOF
8470 rm -rf conftest.$ac_objext
8471 if { (ac_try="$ac_compile"
8472 case "(($ac_try" in
8473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474   *) ac_try_echo=$ac_try;;
8475 esac
8476 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8477   (eval "$ac_compile") 2>conftest.er1
8478   ac_status=$?
8479   grep -v '^ *+' conftest.er1 >conftest.err
8480   rm -rf conftest.er1
8481   cat conftest.err >&5
8482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483   (exit $ac_status); } && {
8484          test -z "$ac_c_werror_flag" ||
8485          test ! -s conftest.err
8486        } && test -s conftest.$ac_objext; then
8487   ac_header_compiler=yes
8488 else
8489   echo "$as_me: failed program was:" >&5
8490 sed 's/^/| /' conftest.$ac_ext >&5
8491
8492         ac_header_compiler=no
8493 fi
8494
8495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8496 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8497 echo "${ECHO_T}$ac_header_compiler" >&6; }
8498
8499 # Is the header present?
8500 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8501 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8502 cat >conftest.$ac_ext <<_ACEOF
8503 /* confdefs.h.  */
8504 _ACEOF
8505 cat confdefs.h >>conftest.$ac_ext
8506 cat >>conftest.$ac_ext <<_ACEOF
8507 /* end confdefs.h.  */
8508 #include <$ac_header>
8509 _ACEOF
8510 if { (ac_try="$ac_cpp conftest.$ac_ext"
8511 case "(($ac_try" in
8512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8513   *) ac_try_echo=$ac_try;;
8514 esac
8515 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8516   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8517   ac_status=$?
8518   grep -v '^ *+' conftest.er1 >conftest.err
8519   rm -rf conftest.er1
8520   cat conftest.err >&5
8521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522   (exit $ac_status); } >/dev/null && {
8523          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8524          test ! -s conftest.err
8525        }; then
8526   ac_header_preproc=yes
8527 else
8528   echo "$as_me: failed program was:" >&5
8529 sed 's/^/| /' conftest.$ac_ext >&5
8530
8531   ac_header_preproc=no
8532 fi
8533
8534 rm -rf conftest.err conftest.$ac_ext
8535 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8536 echo "${ECHO_T}$ac_header_preproc" >&6; }
8537
8538 # So?  What about this header?
8539 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8540   yes:no: )
8541     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8542 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8543     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8544 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8545     ac_header_preproc=yes
8546     ;;
8547   no:yes:* )
8548     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8549 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8550     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8551 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8552     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8553 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8555 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8556     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8557 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8558     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8559 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8560
8561     ;;
8562 esac
8563 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8564 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8565 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8566   echo $ECHO_N "(cached) $ECHO_C" >&6
8567 else
8568   eval "$as_ac_Header=\$ac_header_preproc"
8569 fi
8570 ac_res=`eval echo '${'$as_ac_Header'}'`
8571                { echo "$as_me:$LINENO: result: $ac_res" >&5
8572 echo "${ECHO_T}$ac_res" >&6; }
8573
8574 fi
8575 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8576   cat >>confdefs.h <<_ACEOF
8577 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8578 _ACEOF
8579
8580 fi
8581
8582 done
8583
8584
8585 for ac_func in getpagesize
8586 do
8587 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8588 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8589 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8590 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 else
8593   cat >conftest.$ac_ext <<_ACEOF
8594 /* confdefs.h.  */
8595 _ACEOF
8596 cat confdefs.h >>conftest.$ac_ext
8597 cat >>conftest.$ac_ext <<_ACEOF
8598 /* end confdefs.h.  */
8599 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8600    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8601 #define $ac_func innocuous_$ac_func
8602
8603 /* System header to define __stub macros and hopefully few prototypes,
8604     which can conflict with char $ac_func (); below.
8605     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8606     <limits.h> exists even on freestanding compilers.  */
8607
8608 #ifdef __STDC__
8609 # include <limits.h>
8610 #else
8611 # include <assert.h>
8612 #endif
8613
8614 #undef $ac_func
8615
8616 /* Override any GCC internal prototype to avoid an error.
8617    Use char because int might match the return type of a GCC
8618    builtin and then its argument prototype would still apply.  */
8619 #ifdef __cplusplus
8620 extern "C"
8621 #endif
8622 char $ac_func ();
8623 /* The GNU C library defines this for functions which it implements
8624     to always fail with ENOSYS.  Some functions are actually named
8625     something starting with __ and the normal name is an alias.  */
8626 #if defined __stub_$ac_func || defined __stub___$ac_func
8627 choke me
8628 #endif
8629
8630 int
8631 main ()
8632 {
8633 return $ac_func ();
8634   ;
8635   return 0;
8636 }
8637 _ACEOF
8638 rm -rf conftest.$ac_objext conftest$ac_exeext
8639 if { (ac_try="$ac_link"
8640 case "(($ac_try" in
8641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8642   *) ac_try_echo=$ac_try;;
8643 esac
8644 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8645   (eval "$ac_link") 2>conftest.er1
8646   ac_status=$?
8647   grep -v '^ *+' conftest.er1 >conftest.err
8648   rm -rf conftest.er1
8649   cat conftest.err >&5
8650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651   (exit $ac_status); } && {
8652          test -z "$ac_c_werror_flag" ||
8653          test ! -s conftest.err
8654        } && test -s conftest$ac_exeext &&
8655        $as_test_x conftest$ac_exeext; then
8656   eval "$as_ac_var=yes"
8657 else
8658   echo "$as_me: failed program was:" >&5
8659 sed 's/^/| /' conftest.$ac_ext >&5
8660
8661         eval "$as_ac_var=no"
8662 fi
8663
8664 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8665       conftest$ac_exeext conftest.$ac_ext
8666 fi
8667 ac_res=`eval echo '${'$as_ac_var'}'`
8668                { echo "$as_me:$LINENO: result: $ac_res" >&5
8669 echo "${ECHO_T}$ac_res" >&6; }
8670 if test `eval echo '${'$as_ac_var'}'` = yes; then
8671   cat >>confdefs.h <<_ACEOF
8672 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8673 _ACEOF
8674
8675 fi
8676 done
8677
8678 { echo "$as_me:$LINENO: checking for working mmap" >&5
8679 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8680 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8681   echo $ECHO_N "(cached) $ECHO_C" >&6
8682 else
8683   if test "$cross_compiling" = yes; then
8684   ac_cv_func_mmap_fixed_mapped=no
8685 else
8686   cat >conftest.$ac_ext <<_ACEOF
8687 /* confdefs.h.  */
8688 _ACEOF
8689 cat confdefs.h >>conftest.$ac_ext
8690 cat >>conftest.$ac_ext <<_ACEOF
8691 /* end confdefs.h.  */
8692 $ac_includes_default
8693 /* malloc might have been renamed as rpl_malloc. */
8694 #undef malloc
8695
8696 /* Thanks to Mike Haertel and Jim Avera for this test.
8697    Here is a matrix of mmap possibilities:
8698         mmap private not fixed
8699         mmap private fixed at somewhere currently unmapped
8700         mmap private fixed at somewhere already mapped
8701         mmap shared not fixed
8702         mmap shared fixed at somewhere currently unmapped
8703         mmap shared fixed at somewhere already mapped
8704    For private mappings, we should verify that changes cannot be read()
8705    back from the file, nor mmap's back from the file at a different
8706    address.  (There have been systems where private was not correctly
8707    implemented like the infamous i386 svr4.0, and systems where the
8708    VM page cache was not coherent with the file system buffer cache
8709    like early versions of FreeBSD and possibly contemporary NetBSD.)
8710    For shared mappings, we should conversely verify that changes get
8711    propagated back to all the places they're supposed to be.
8712
8713    Grep wants private fixed already mapped.
8714    The main things grep needs to know about mmap are:
8715    * does it exist and is it safe to write into the mmap'd area
8716    * how to use it (BSD variants)  */
8717
8718 #include <fcntl.h>
8719 #include <sys/mman.h>
8720
8721 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8722 char *malloc ();
8723 #endif
8724
8725 /* This mess was copied from the GNU getpagesize.h.  */
8726 #ifndef HAVE_GETPAGESIZE
8727 /* Assume that all systems that can run configure have sys/param.h.  */
8728 # ifndef HAVE_SYS_PARAM_H
8729 #  define HAVE_SYS_PARAM_H 1
8730 # endif
8731
8732 # ifdef _SC_PAGESIZE
8733 #  define getpagesize() sysconf(_SC_PAGESIZE)
8734 # else /* no _SC_PAGESIZE */
8735 #  ifdef HAVE_SYS_PARAM_H
8736 #   include <sys/param.h>
8737 #   ifdef EXEC_PAGESIZE
8738 #    define getpagesize() EXEC_PAGESIZE
8739 #   else /* no EXEC_PAGESIZE */
8740 #    ifdef NBPG
8741 #     define getpagesize() NBPG * CLSIZE
8742 #     ifndef CLSIZE
8743 #      define CLSIZE 1
8744 #     endif /* no CLSIZE */
8745 #    else /* no NBPG */
8746 #     ifdef NBPC
8747 #      define getpagesize() NBPC
8748 #     else /* no NBPC */
8749 #      ifdef PAGESIZE
8750 #       define getpagesize() PAGESIZE
8751 #      endif /* PAGESIZE */
8752 #     endif /* no NBPC */
8753 #    endif /* no NBPG */
8754 #   endif /* no EXEC_PAGESIZE */
8755 #  else /* no HAVE_SYS_PARAM_H */
8756 #   define getpagesize() 8192   /* punt totally */
8757 #  endif /* no HAVE_SYS_PARAM_H */
8758 # endif /* no _SC_PAGESIZE */
8759
8760 #endif /* no HAVE_GETPAGESIZE */
8761
8762 int
8763 main ()
8764 {
8765   char *data, *data2, *data3;
8766   int i, pagesize;
8767   int fd;
8768
8769   pagesize = getpagesize ();
8770
8771   /* First, make a file with some known garbage in it. */
8772   data = (char *) malloc (pagesize);
8773   if (!data)
8774     return 1;
8775   for (i = 0; i < pagesize; ++i)
8776     *(data + i) = rand ();
8777   umask (0);
8778   fd = creat ("conftest.mmap", 0600);
8779   if (fd < 0)
8780     return 1;
8781   if (write (fd, data, pagesize) != pagesize)
8782     return 1;
8783   close (fd);
8784
8785   /* Next, try to mmap the file at a fixed address which already has
8786      something else allocated at it.  If we can, also make sure that
8787      we see the same garbage.  */
8788   fd = open ("conftest.mmap", O_RDWR);
8789   if (fd < 0)
8790     return 1;
8791   data2 = (char *) malloc (2 * pagesize);
8792   if (!data2)
8793     return 1;
8794   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8795   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8796                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8797     return 1;
8798   for (i = 0; i < pagesize; ++i)
8799     if (*(data + i) != *(data2 + i))
8800       return 1;
8801
8802   /* Finally, make sure that changes to the mapped area do not
8803      percolate back to the file as seen by read().  (This is a bug on
8804      some variants of i386 svr4.0.)  */
8805   for (i = 0; i < pagesize; ++i)
8806     *(data2 + i) = *(data2 + i) + 1;
8807   data3 = (char *) malloc (pagesize);
8808   if (!data3)
8809     return 1;
8810   if (read (fd, data3, pagesize) != pagesize)
8811     return 1;
8812   for (i = 0; i < pagesize; ++i)
8813     if (*(data + i) != *(data3 + i))
8814       return 1;
8815   close (fd);
8816   return 0;
8817 }
8818 _ACEOF
8819 rm -rf conftest$ac_exeext
8820 if { (ac_try="$ac_link"
8821 case "(($ac_try" in
8822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8823   *) ac_try_echo=$ac_try;;
8824 esac
8825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8826   (eval "$ac_link") 2>&5
8827   ac_status=$?
8828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8829   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8830   { (case "(($ac_try" in
8831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8832   *) ac_try_echo=$ac_try;;
8833 esac
8834 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8835   (eval "$ac_try") 2>&5
8836   ac_status=$?
8837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838   (exit $ac_status); }; }; then
8839   ac_cv_func_mmap_fixed_mapped=yes
8840 else
8841   echo "$as_me: program exited with status $ac_status" >&5
8842 echo "$as_me: failed program was:" >&5
8843 sed 's/^/| /' conftest.$ac_ext >&5
8844
8845 ( exit $ac_status )
8846 ac_cv_func_mmap_fixed_mapped=no
8847 fi
8848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8849 fi
8850
8851
8852 fi
8853 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8854 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8855 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8856
8857 cat >>confdefs.h <<\_ACEOF
8858 #define HAVE_MMAP 1
8859 _ACEOF
8860
8861 fi
8862 rm -rf conftest.mmap
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8874 unistd.h sys/param.h
8875 do
8876 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8877 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8878   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8880 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8881   echo $ECHO_N "(cached) $ECHO_C" >&6
8882 fi
8883 ac_res=`eval echo '${'$as_ac_Header'}'`
8884                { echo "$as_me:$LINENO: result: $ac_res" >&5
8885 echo "${ECHO_T}$ac_res" >&6; }
8886 else
8887   # Is the header compilable?
8888 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8889 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8890 cat >conftest.$ac_ext <<_ACEOF
8891 /* confdefs.h.  */
8892 _ACEOF
8893 cat confdefs.h >>conftest.$ac_ext
8894 cat >>conftest.$ac_ext <<_ACEOF
8895 /* end confdefs.h.  */
8896 $ac_includes_default
8897 #include <$ac_header>
8898 _ACEOF
8899 rm -rf conftest.$ac_objext
8900 if { (ac_try="$ac_compile"
8901 case "(($ac_try" in
8902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8903   *) ac_try_echo=$ac_try;;
8904 esac
8905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8906   (eval "$ac_compile") 2>conftest.er1
8907   ac_status=$?
8908   grep -v '^ *+' conftest.er1 >conftest.err
8909   rm -rf conftest.er1
8910   cat conftest.err >&5
8911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912   (exit $ac_status); } && {
8913          test -z "$ac_c_werror_flag" ||
8914          test ! -s conftest.err
8915        } && test -s conftest.$ac_objext; then
8916   ac_header_compiler=yes
8917 else
8918   echo "$as_me: failed program was:" >&5
8919 sed 's/^/| /' conftest.$ac_ext >&5
8920
8921         ac_header_compiler=no
8922 fi
8923
8924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8925 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8926 echo "${ECHO_T}$ac_header_compiler" >&6; }
8927
8928 # Is the header present?
8929 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8930 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8931 cat >conftest.$ac_ext <<_ACEOF
8932 /* confdefs.h.  */
8933 _ACEOF
8934 cat confdefs.h >>conftest.$ac_ext
8935 cat >>conftest.$ac_ext <<_ACEOF
8936 /* end confdefs.h.  */
8937 #include <$ac_header>
8938 _ACEOF
8939 if { (ac_try="$ac_cpp conftest.$ac_ext"
8940 case "(($ac_try" in
8941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8942   *) ac_try_echo=$ac_try;;
8943 esac
8944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8945   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8946   ac_status=$?
8947   grep -v '^ *+' conftest.er1 >conftest.err
8948   rm -rf conftest.er1
8949   cat conftest.err >&5
8950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951   (exit $ac_status); } >/dev/null && {
8952          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8953          test ! -s conftest.err
8954        }; then
8955   ac_header_preproc=yes
8956 else
8957   echo "$as_me: failed program was:" >&5
8958 sed 's/^/| /' conftest.$ac_ext >&5
8959
8960   ac_header_preproc=no
8961 fi
8962
8963 rm -rf conftest.err conftest.$ac_ext
8964 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8965 echo "${ECHO_T}$ac_header_preproc" >&6; }
8966
8967 # So?  What about this header?
8968 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8969   yes:no: )
8970     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8971 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8972     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8973 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8974     ac_header_preproc=yes
8975     ;;
8976   no:yes:* )
8977     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8978 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8979     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8980 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8981     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8982 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8983     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8984 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8985     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8986 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8987     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8988 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8989
8990     ;;
8991 esac
8992 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8993 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8994 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8995   echo $ECHO_N "(cached) $ECHO_C" >&6
8996 else
8997   eval "$as_ac_Header=\$ac_header_preproc"
8998 fi
8999 ac_res=`eval echo '${'$as_ac_Header'}'`
9000                { echo "$as_me:$LINENO: result: $ac_res" >&5
9001 echo "${ECHO_T}$ac_res" >&6; }
9002
9003 fi
9004 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9005   cat >>confdefs.h <<_ACEOF
9006 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9007 _ACEOF
9008
9009 fi
9010
9011 done
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9025 strdup __argz_count __argz_stringify __argz_next
9026 do
9027 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9028 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9029 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9030 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9031   echo $ECHO_N "(cached) $ECHO_C" >&6
9032 else
9033   cat >conftest.$ac_ext <<_ACEOF
9034 /* confdefs.h.  */
9035 _ACEOF
9036 cat confdefs.h >>conftest.$ac_ext
9037 cat >>conftest.$ac_ext <<_ACEOF
9038 /* end confdefs.h.  */
9039 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9040    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9041 #define $ac_func innocuous_$ac_func
9042
9043 /* System header to define __stub macros and hopefully few prototypes,
9044     which can conflict with char $ac_func (); below.
9045     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9046     <limits.h> exists even on freestanding compilers.  */
9047
9048 #ifdef __STDC__
9049 # include <limits.h>
9050 #else
9051 # include <assert.h>
9052 #endif
9053
9054 #undef $ac_func
9055
9056 /* Override any GCC internal prototype to avoid an error.
9057    Use char because int might match the return type of a GCC
9058    builtin and then its argument prototype would still apply.  */
9059 #ifdef __cplusplus
9060 extern "C"
9061 #endif
9062 char $ac_func ();
9063 /* The GNU C library defines this for functions which it implements
9064     to always fail with ENOSYS.  Some functions are actually named
9065     something starting with __ and the normal name is an alias.  */
9066 #if defined __stub_$ac_func || defined __stub___$ac_func
9067 choke me
9068 #endif
9069
9070 int
9071 main ()
9072 {
9073 return $ac_func ();
9074   ;
9075   return 0;
9076 }
9077 _ACEOF
9078 rm -rf conftest.$ac_objext conftest$ac_exeext
9079 if { (ac_try="$ac_link"
9080 case "(($ac_try" in
9081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9082   *) ac_try_echo=$ac_try;;
9083 esac
9084 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9085   (eval "$ac_link") 2>conftest.er1
9086   ac_status=$?
9087   grep -v '^ *+' conftest.er1 >conftest.err
9088   rm -rf conftest.er1
9089   cat conftest.err >&5
9090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091   (exit $ac_status); } && {
9092          test -z "$ac_c_werror_flag" ||
9093          test ! -s conftest.err
9094        } && test -s conftest$ac_exeext &&
9095        $as_test_x conftest$ac_exeext; then
9096   eval "$as_ac_var=yes"
9097 else
9098   echo "$as_me: failed program was:" >&5
9099 sed 's/^/| /' conftest.$ac_ext >&5
9100
9101         eval "$as_ac_var=no"
9102 fi
9103
9104 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9105       conftest$ac_exeext conftest.$ac_ext
9106 fi
9107 ac_res=`eval echo '${'$as_ac_var'}'`
9108                { echo "$as_me:$LINENO: result: $ac_res" >&5
9109 echo "${ECHO_T}$ac_res" >&6; }
9110 if test `eval echo '${'$as_ac_var'}'` = yes; then
9111   cat >>confdefs.h <<_ACEOF
9112 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9113 _ACEOF
9114
9115 fi
9116 done
9117
9118
9119    if test $ac_cv_header_locale_h = yes; then
9120     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9121 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9122 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9123   echo $ECHO_N "(cached) $ECHO_C" >&6
9124 else
9125   cat >conftest.$ac_ext <<_ACEOF
9126 /* confdefs.h.  */
9127 _ACEOF
9128 cat confdefs.h >>conftest.$ac_ext
9129 cat >>conftest.$ac_ext <<_ACEOF
9130 /* end confdefs.h.  */
9131 #include <locale.h>
9132 int
9133 main ()
9134 {
9135 return LC_MESSAGES
9136   ;
9137   return 0;
9138 }
9139 _ACEOF
9140 rm -rf conftest.$ac_objext conftest$ac_exeext
9141 if { (ac_try="$ac_link"
9142 case "(($ac_try" in
9143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9144   *) ac_try_echo=$ac_try;;
9145 esac
9146 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9147   (eval "$ac_link") 2>conftest.er1
9148   ac_status=$?
9149   grep -v '^ *+' conftest.er1 >conftest.err
9150   rm -rf conftest.er1
9151   cat conftest.err >&5
9152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9153   (exit $ac_status); } && {
9154          test -z "$ac_c_werror_flag" ||
9155          test ! -s conftest.err
9156        } && test -s conftest$ac_exeext &&
9157        $as_test_x conftest$ac_exeext; then
9158   am_cv_val_LC_MESSAGES=yes
9159 else
9160   echo "$as_me: failed program was:" >&5
9161 sed 's/^/| /' conftest.$ac_ext >&5
9162
9163         am_cv_val_LC_MESSAGES=no
9164 fi
9165
9166 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9167       conftest$ac_exeext conftest.$ac_ext
9168 fi
9169 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9170 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9171     if test $am_cv_val_LC_MESSAGES = yes; then
9172
9173 cat >>confdefs.h <<\_ACEOF
9174 #define HAVE_LC_MESSAGES 1
9175 _ACEOF
9176
9177     fi
9178   fi
9179      USE_NLS=yes
9180
9181
9182         nls_cv_force_use_gnu_gettext="no"
9183
9184     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9185     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9186                               nls_cv_header_intl=
9187       nls_cv_header_libgt=
9188       CATOBJEXT=NONE
9189
9190       if test "${ac_cv_header_libintl_h+set}" = set; then
9191   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9192 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9193 if test "${ac_cv_header_libintl_h+set}" = set; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 fi
9196 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9197 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9198 else
9199   # Is the header compilable?
9200 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9201 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9202 cat >conftest.$ac_ext <<_ACEOF
9203 /* confdefs.h.  */
9204 _ACEOF
9205 cat confdefs.h >>conftest.$ac_ext
9206 cat >>conftest.$ac_ext <<_ACEOF
9207 /* end confdefs.h.  */
9208 $ac_includes_default
9209 #include <libintl.h>
9210 _ACEOF
9211 rm -rf conftest.$ac_objext
9212 if { (ac_try="$ac_compile"
9213 case "(($ac_try" in
9214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9215   *) ac_try_echo=$ac_try;;
9216 esac
9217 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9218   (eval "$ac_compile") 2>conftest.er1
9219   ac_status=$?
9220   grep -v '^ *+' conftest.er1 >conftest.err
9221   rm -rf conftest.er1
9222   cat conftest.err >&5
9223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9224   (exit $ac_status); } && {
9225          test -z "$ac_c_werror_flag" ||
9226          test ! -s conftest.err
9227        } && test -s conftest.$ac_objext; then
9228   ac_header_compiler=yes
9229 else
9230   echo "$as_me: failed program was:" >&5
9231 sed 's/^/| /' conftest.$ac_ext >&5
9232
9233         ac_header_compiler=no
9234 fi
9235
9236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9237 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9238 echo "${ECHO_T}$ac_header_compiler" >&6; }
9239
9240 # Is the header present?
9241 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9242 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9243 cat >conftest.$ac_ext <<_ACEOF
9244 /* confdefs.h.  */
9245 _ACEOF
9246 cat confdefs.h >>conftest.$ac_ext
9247 cat >>conftest.$ac_ext <<_ACEOF
9248 /* end confdefs.h.  */
9249 #include <libintl.h>
9250 _ACEOF
9251 if { (ac_try="$ac_cpp conftest.$ac_ext"
9252 case "(($ac_try" in
9253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9254   *) ac_try_echo=$ac_try;;
9255 esac
9256 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9257   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9258   ac_status=$?
9259   grep -v '^ *+' conftest.er1 >conftest.err
9260   rm -rf conftest.er1
9261   cat conftest.err >&5
9262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9263   (exit $ac_status); } >/dev/null && {
9264          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9265          test ! -s conftest.err
9266        }; then
9267   ac_header_preproc=yes
9268 else
9269   echo "$as_me: failed program was:" >&5
9270 sed 's/^/| /' conftest.$ac_ext >&5
9271
9272   ac_header_preproc=no
9273 fi
9274
9275 rm -rf conftest.err conftest.$ac_ext
9276 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9277 echo "${ECHO_T}$ac_header_preproc" >&6; }
9278
9279 # So?  What about this header?
9280 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9281   yes:no: )
9282     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9283 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9284     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9285 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9286     ac_header_preproc=yes
9287     ;;
9288   no:yes:* )
9289     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9290 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9291     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9292 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9293     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9294 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9295     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9296 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9297     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9298 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9299     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9300 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9301
9302     ;;
9303 esac
9304 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9305 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9306 if test "${ac_cv_header_libintl_h+set}" = set; then
9307   echo $ECHO_N "(cached) $ECHO_C" >&6
9308 else
9309   ac_cv_header_libintl_h=$ac_header_preproc
9310 fi
9311 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9312 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9313
9314 fi
9315 if test $ac_cv_header_libintl_h = yes; then
9316   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9317 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9318 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9319   echo $ECHO_N "(cached) $ECHO_C" >&6
9320 else
9321   cat >conftest.$ac_ext <<_ACEOF
9322 /* confdefs.h.  */
9323 _ACEOF
9324 cat confdefs.h >>conftest.$ac_ext
9325 cat >>conftest.$ac_ext <<_ACEOF
9326 /* end confdefs.h.  */
9327 #include <libintl.h>
9328 int
9329 main ()
9330 {
9331 return (int) dgettext ("","")
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 rm -rf conftest.$ac_objext conftest$ac_exeext
9337 if { (ac_try="$ac_link"
9338 case "(($ac_try" in
9339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9340   *) ac_try_echo=$ac_try;;
9341 esac
9342 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9343   (eval "$ac_link") 2>conftest.er1
9344   ac_status=$?
9345   grep -v '^ *+' conftest.er1 >conftest.err
9346   rm -rf conftest.er1
9347   cat conftest.err >&5
9348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349   (exit $ac_status); } && {
9350          test -z "$ac_c_werror_flag" ||
9351          test ! -s conftest.err
9352        } && test -s conftest$ac_exeext &&
9353        $as_test_x conftest$ac_exeext; then
9354   gt_cv_func_dgettext_libc=yes
9355 else
9356   echo "$as_me: failed program was:" >&5
9357 sed 's/^/| /' conftest.$ac_ext >&5
9358
9359         gt_cv_func_dgettext_libc=no
9360 fi
9361
9362 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9363       conftest$ac_exeext conftest.$ac_ext
9364 fi
9365 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9366 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9367
9368           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9369             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9370 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9371 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9372   echo $ECHO_N "(cached) $ECHO_C" >&6
9373 else
9374   ac_check_lib_save_LIBS=$LIBS
9375 LIBS="-lintl  $LIBS"
9376 cat >conftest.$ac_ext <<_ACEOF
9377 /* confdefs.h.  */
9378 _ACEOF
9379 cat confdefs.h >>conftest.$ac_ext
9380 cat >>conftest.$ac_ext <<_ACEOF
9381 /* end confdefs.h.  */
9382
9383 /* Override any GCC internal prototype to avoid an error.
9384    Use char because int might match the return type of a GCC
9385    builtin and then its argument prototype would still apply.  */
9386 #ifdef __cplusplus
9387 extern "C"
9388 #endif
9389 char bindtextdomain ();
9390 int
9391 main ()
9392 {
9393 return bindtextdomain ();
9394   ;
9395   return 0;
9396 }
9397 _ACEOF
9398 rm -rf conftest.$ac_objext conftest$ac_exeext
9399 if { (ac_try="$ac_link"
9400 case "(($ac_try" in
9401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9402   *) ac_try_echo=$ac_try;;
9403 esac
9404 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9405   (eval "$ac_link") 2>conftest.er1
9406   ac_status=$?
9407   grep -v '^ *+' conftest.er1 >conftest.err
9408   rm -rf conftest.er1
9409   cat conftest.err >&5
9410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9411   (exit $ac_status); } && {
9412          test -z "$ac_c_werror_flag" ||
9413          test ! -s conftest.err
9414        } && test -s conftest$ac_exeext &&
9415        $as_test_x conftest$ac_exeext; then
9416   ac_cv_lib_intl_bindtextdomain=yes
9417 else
9418   echo "$as_me: failed program was:" >&5
9419 sed 's/^/| /' conftest.$ac_ext >&5
9420
9421         ac_cv_lib_intl_bindtextdomain=no
9422 fi
9423
9424 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9425       conftest$ac_exeext conftest.$ac_ext
9426 LIBS=$ac_check_lib_save_LIBS
9427 fi
9428 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9429 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9430 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9431   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9432 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9433 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9437 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9438 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9439   echo $ECHO_N "(cached) $ECHO_C" >&6
9440 else
9441   ac_check_lib_save_LIBS=$LIBS
9442 LIBS="-lintl  $LIBS"
9443 cat >conftest.$ac_ext <<_ACEOF
9444 /* confdefs.h.  */
9445 _ACEOF
9446 cat confdefs.h >>conftest.$ac_ext
9447 cat >>conftest.$ac_ext <<_ACEOF
9448 /* end confdefs.h.  */
9449
9450 /* Override any GCC internal prototype to avoid an error.
9451    Use char because int might match the return type of a GCC
9452    builtin and then its argument prototype would still apply.  */
9453 #ifdef __cplusplus
9454 extern "C"
9455 #endif
9456 char dgettext ();
9457 int
9458 main ()
9459 {
9460 return dgettext ();
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 rm -rf conftest.$ac_objext conftest$ac_exeext
9466 if { (ac_try="$ac_link"
9467 case "(($ac_try" in
9468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9469   *) ac_try_echo=$ac_try;;
9470 esac
9471 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9472   (eval "$ac_link") 2>conftest.er1
9473   ac_status=$?
9474   grep -v '^ *+' conftest.er1 >conftest.err
9475   rm -rf conftest.er1
9476   cat conftest.err >&5
9477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9478   (exit $ac_status); } && {
9479          test -z "$ac_c_werror_flag" ||
9480          test ! -s conftest.err
9481        } && test -s conftest$ac_exeext &&
9482        $as_test_x conftest$ac_exeext; then
9483   ac_cv_lib_intl_dgettext=yes
9484 else
9485   echo "$as_me: failed program was:" >&5
9486 sed 's/^/| /' conftest.$ac_ext >&5
9487
9488         ac_cv_lib_intl_dgettext=no
9489 fi
9490
9491 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9492       conftest$ac_exeext conftest.$ac_ext
9493 LIBS=$ac_check_lib_save_LIBS
9494 fi
9495 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9496 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9497 if test $ac_cv_lib_intl_dgettext = yes; then
9498   gt_cv_func_dgettext_libintl=yes
9499 else
9500   gt_cv_func_dgettext_libintl=no
9501 fi
9502
9503 fi
9504 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9505 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9506 fi
9507
9508           fi
9509
9510           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9511             LIBS="$LIBS -lintl";
9512           fi
9513
9514           if test "$gt_cv_func_dgettext_libc" = "yes" \
9515             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9516
9517 cat >>confdefs.h <<\_ACEOF
9518 #define HAVE_GETTEXT 1
9519 _ACEOF
9520
9521             # Extract the first word of "msgfmt", so it can be a program name with args.
9522 set dummy msgfmt; ac_word=$2
9523 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9525 if test "${ac_cv_path_MSGFMT+set}" = set; then
9526   echo $ECHO_N "(cached) $ECHO_C" >&6
9527 else
9528   case "$MSGFMT" in
9529   /*)
9530   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9531   ;;
9532   *)
9533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9534   for ac_dir in $PATH; do
9535     test -z "$ac_dir" && ac_dir=.
9536     if test -f $ac_dir/$ac_word; then
9537       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9538         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9539         break
9540       fi
9541     fi
9542   done
9543   IFS="$ac_save_ifs"
9544   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9545   ;;
9546 esac
9547 fi
9548 MSGFMT="$ac_cv_path_MSGFMT"
9549 if test -n "$MSGFMT"; then
9550   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9551 echo "${ECHO_T}$MSGFMT" >&6; }
9552 else
9553   { echo "$as_me:$LINENO: result: no" >&5
9554 echo "${ECHO_T}no" >&6; }
9555 fi
9556             if test "$MSGFMT" != "no"; then
9557
9558 for ac_func in dcgettext
9559 do
9560 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9561 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9562 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9563 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9564   echo $ECHO_N "(cached) $ECHO_C" >&6
9565 else
9566   cat >conftest.$ac_ext <<_ACEOF
9567 /* confdefs.h.  */
9568 _ACEOF
9569 cat confdefs.h >>conftest.$ac_ext
9570 cat >>conftest.$ac_ext <<_ACEOF
9571 /* end confdefs.h.  */
9572 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9573    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9574 #define $ac_func innocuous_$ac_func
9575
9576 /* System header to define __stub macros and hopefully few prototypes,
9577     which can conflict with char $ac_func (); below.
9578     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9579     <limits.h> exists even on freestanding compilers.  */
9580
9581 #ifdef __STDC__
9582 # include <limits.h>
9583 #else
9584 # include <assert.h>
9585 #endif
9586
9587 #undef $ac_func
9588
9589 /* Override any GCC internal prototype to avoid an error.
9590    Use char because int might match the return type of a GCC
9591    builtin and then its argument prototype would still apply.  */
9592 #ifdef __cplusplus
9593 extern "C"
9594 #endif
9595 char $ac_func ();
9596 /* The GNU C library defines this for functions which it implements
9597     to always fail with ENOSYS.  Some functions are actually named
9598     something starting with __ and the normal name is an alias.  */
9599 #if defined __stub_$ac_func || defined __stub___$ac_func
9600 choke me
9601 #endif
9602
9603 int
9604 main ()
9605 {
9606 return $ac_func ();
9607   ;
9608   return 0;
9609 }
9610 _ACEOF
9611 rm -rf conftest.$ac_objext conftest$ac_exeext
9612 if { (ac_try="$ac_link"
9613 case "(($ac_try" in
9614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9615   *) ac_try_echo=$ac_try;;
9616 esac
9617 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9618   (eval "$ac_link") 2>conftest.er1
9619   ac_status=$?
9620   grep -v '^ *+' conftest.er1 >conftest.err
9621   rm -rf conftest.er1
9622   cat conftest.err >&5
9623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9624   (exit $ac_status); } && {
9625          test -z "$ac_c_werror_flag" ||
9626          test ! -s conftest.err
9627        } && test -s conftest$ac_exeext &&
9628        $as_test_x conftest$ac_exeext; then
9629   eval "$as_ac_var=yes"
9630 else
9631   echo "$as_me: failed program was:" >&5
9632 sed 's/^/| /' conftest.$ac_ext >&5
9633
9634         eval "$as_ac_var=no"
9635 fi
9636
9637 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9638       conftest$ac_exeext conftest.$ac_ext
9639 fi
9640 ac_res=`eval echo '${'$as_ac_var'}'`
9641                { echo "$as_me:$LINENO: result: $ac_res" >&5
9642 echo "${ECHO_T}$ac_res" >&6; }
9643 if test `eval echo '${'$as_ac_var'}'` = yes; then
9644   cat >>confdefs.h <<_ACEOF
9645 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9646 _ACEOF
9647
9648 fi
9649 done
9650
9651               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9652 set dummy gmsgfmt; ac_word=$2
9653 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9655 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9656   echo $ECHO_N "(cached) $ECHO_C" >&6
9657 else
9658   case $GMSGFMT in
9659   [\\/]* | ?:[\\/]*)
9660   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9661   ;;
9662   *)
9663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9664 for as_dir in $PATH
9665 do
9666   IFS=$as_save_IFS
9667   test -z "$as_dir" && as_dir=.
9668   for ac_exec_ext in '' $ac_executable_extensions; do
9669   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9670     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9671     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9672     break 2
9673   fi
9674 done
9675 done
9676 IFS=$as_save_IFS
9677
9678   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9679   ;;
9680 esac
9681 fi
9682 GMSGFMT=$ac_cv_path_GMSGFMT
9683 if test -n "$GMSGFMT"; then
9684   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9685 echo "${ECHO_T}$GMSGFMT" >&6; }
9686 else
9687   { echo "$as_me:$LINENO: result: no" >&5
9688 echo "${ECHO_T}no" >&6; }
9689 fi
9690
9691
9692               # Extract the first word of "xgettext", so it can be a program name with args.
9693 set dummy xgettext; ac_word=$2
9694 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9696 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699   case "$XGETTEXT" in
9700   /*)
9701   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9702   ;;
9703   *)
9704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9705   for ac_dir in $PATH; do
9706     test -z "$ac_dir" && ac_dir=.
9707     if test -f $ac_dir/$ac_word; then
9708       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9709         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9710         break
9711       fi
9712     fi
9713   done
9714   IFS="$ac_save_ifs"
9715   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9716   ;;
9717 esac
9718 fi
9719 XGETTEXT="$ac_cv_path_XGETTEXT"
9720 if test -n "$XGETTEXT"; then
9721   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9722 echo "${ECHO_T}$XGETTEXT" >&6; }
9723 else
9724   { echo "$as_me:$LINENO: result: no" >&5
9725 echo "${ECHO_T}no" >&6; }
9726 fi
9727
9728               cat >conftest.$ac_ext <<_ACEOF
9729 /* confdefs.h.  */
9730 _ACEOF
9731 cat confdefs.h >>conftest.$ac_ext
9732 cat >>conftest.$ac_ext <<_ACEOF
9733 /* end confdefs.h.  */
9734
9735 int
9736 main ()
9737 {
9738 extern int _nl_msg_cat_cntr;
9739                              return _nl_msg_cat_cntr
9740   ;
9741   return 0;
9742 }
9743 _ACEOF
9744 rm -rf conftest.$ac_objext conftest$ac_exeext
9745 if { (ac_try="$ac_link"
9746 case "(($ac_try" in
9747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9748   *) ac_try_echo=$ac_try;;
9749 esac
9750 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9751   (eval "$ac_link") 2>conftest.er1
9752   ac_status=$?
9753   grep -v '^ *+' conftest.er1 >conftest.err
9754   rm -rf conftest.er1
9755   cat conftest.err >&5
9756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757   (exit $ac_status); } && {
9758          test -z "$ac_c_werror_flag" ||
9759          test ! -s conftest.err
9760        } && test -s conftest$ac_exeext &&
9761        $as_test_x conftest$ac_exeext; then
9762   CATOBJEXT=.gmo
9763                  DATADIRNAME=share
9764 else
9765   echo "$as_me: failed program was:" >&5
9766 sed 's/^/| /' conftest.$ac_ext >&5
9767
9768         CATOBJEXT=.mo
9769                  DATADIRNAME=lib
9770 fi
9771
9772 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9773       conftest$ac_exeext conftest.$ac_ext
9774               INSTOBJEXT=.mo
9775             fi
9776           fi
9777
9778           # Added by Martin Baulig 12/15/98 for libc5 systems
9779           if test "$gt_cv_func_dgettext_libc" != "yes" \
9780             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9781             INTLLIBS=-lintl
9782             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9783           fi
9784
9785 fi
9786
9787
9788
9789       if test "$CATOBJEXT" = "NONE"; then
9790                         nls_cv_use_gnu_gettext=yes
9791       fi
9792     fi
9793
9794     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9795
9796 cat >>confdefs.h <<\_ACEOF
9797 #define ENABLE_NLS 1
9798 _ACEOF
9799
9800     else
9801             CATOBJEXT=
9802     fi
9803
9804         if test "$XGETTEXT" != ":"; then
9805                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9806         : ;
9807       else
9808         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9809 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9810         XGETTEXT=":"
9811       fi
9812     fi
9813
9814     # We need to process the po/ directory.
9815     POSUB=po
9816
9817     ac_config_commands="$ac_config_commands default-2"
9818
9819
9820                 for lang in $ALL_LINGUAS; do
9821       GMOFILES="$GMOFILES $lang.gmo"
9822       POFILES="$POFILES $lang.po"
9823     done
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837    if test "x$CATOBJEXT" != "x"; then
9838      if test "x$ALL_LINGUAS" = "x"; then
9839        LINGUAS=
9840      else
9841        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9842 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9843        NEW_LINGUAS=
9844        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9845          case "$ALL_LINGUAS" in
9846           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9847          esac
9848        done
9849        LINGUAS=$NEW_LINGUAS
9850        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9851 echo "${ECHO_T}$LINGUAS" >&6; }
9852      fi
9853
9854           if test -n "$LINGUAS"; then
9855        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9856      fi
9857    fi
9858
9859             test -d po || mkdir po
9860    if test "$CATOBJEXT" = ".cat"; then
9861      if test "${ac_cv_header_linux_version_h+set}" = set; then
9862   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9863 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9864 if test "${ac_cv_header_linux_version_h+set}" = set; then
9865   echo $ECHO_N "(cached) $ECHO_C" >&6
9866 fi
9867 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9868 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9869 else
9870   # Is the header compilable?
9871 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9872 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9873 cat >conftest.$ac_ext <<_ACEOF
9874 /* confdefs.h.  */
9875 _ACEOF
9876 cat confdefs.h >>conftest.$ac_ext
9877 cat >>conftest.$ac_ext <<_ACEOF
9878 /* end confdefs.h.  */
9879 $ac_includes_default
9880 #include <linux/version.h>
9881 _ACEOF
9882 rm -rf conftest.$ac_objext
9883 if { (ac_try="$ac_compile"
9884 case "(($ac_try" in
9885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9886   *) ac_try_echo=$ac_try;;
9887 esac
9888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9889   (eval "$ac_compile") 2>conftest.er1
9890   ac_status=$?
9891   grep -v '^ *+' conftest.er1 >conftest.err
9892   rm -rf conftest.er1
9893   cat conftest.err >&5
9894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895   (exit $ac_status); } && {
9896          test -z "$ac_c_werror_flag" ||
9897          test ! -s conftest.err
9898        } && test -s conftest.$ac_objext; then
9899   ac_header_compiler=yes
9900 else
9901   echo "$as_me: failed program was:" >&5
9902 sed 's/^/| /' conftest.$ac_ext >&5
9903
9904         ac_header_compiler=no
9905 fi
9906
9907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9908 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9909 echo "${ECHO_T}$ac_header_compiler" >&6; }
9910
9911 # Is the header present?
9912 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9913 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9914 cat >conftest.$ac_ext <<_ACEOF
9915 /* confdefs.h.  */
9916 _ACEOF
9917 cat confdefs.h >>conftest.$ac_ext
9918 cat >>conftest.$ac_ext <<_ACEOF
9919 /* end confdefs.h.  */
9920 #include <linux/version.h>
9921 _ACEOF
9922 if { (ac_try="$ac_cpp conftest.$ac_ext"
9923 case "(($ac_try" in
9924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9925   *) ac_try_echo=$ac_try;;
9926 esac
9927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9928   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9929   ac_status=$?
9930   grep -v '^ *+' conftest.er1 >conftest.err
9931   rm -rf conftest.er1
9932   cat conftest.err >&5
9933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934   (exit $ac_status); } >/dev/null && {
9935          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9936          test ! -s conftest.err
9937        }; then
9938   ac_header_preproc=yes
9939 else
9940   echo "$as_me: failed program was:" >&5
9941 sed 's/^/| /' conftest.$ac_ext >&5
9942
9943   ac_header_preproc=no
9944 fi
9945
9946 rm -rf conftest.err conftest.$ac_ext
9947 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9948 echo "${ECHO_T}$ac_header_preproc" >&6; }
9949
9950 # So?  What about this header?
9951 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9952   yes:no: )
9953     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9954 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9955     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9956 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9957     ac_header_preproc=yes
9958     ;;
9959   no:yes:* )
9960     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9961 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9962     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9963 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9964     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9965 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9966     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9967 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9968     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9969 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9971 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9972
9973     ;;
9974 esac
9975 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9976 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9977 if test "${ac_cv_header_linux_version_h+set}" = set; then
9978   echo $ECHO_N "(cached) $ECHO_C" >&6
9979 else
9980   ac_cv_header_linux_version_h=$ac_header_preproc
9981 fi
9982 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9983 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9984
9985 fi
9986 if test $ac_cv_header_linux_version_h = yes; then
9987   msgformat=linux
9988 else
9989   msgformat=xopen
9990 fi
9991
9992
9993
9994                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9995    fi
9996
9997             MKINSTALLDIRS=
9998 #
9999 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10000 #
10001 #   if test -n "$ac_aux_dir"; then
10002 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10003 #   fi
10004    if test -z "$MKINSTALLDIRS"; then
10005      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10006    fi
10007
10008    # jwz: you know what, screw it.  Let's just use the version that I
10009    # already computed in configure.in, instead of this version that came
10010    # with the i18n crud, ok?
10011    MKINSTALLDIRS="$INSTALL_DIRS"
10012
10013
10014
10015
10016          test -d po || mkdir po
10017    if test "x$srcdir" != "x."; then
10018      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10019        posrcprefix="$srcdir/"
10020      else
10021        posrcprefix="../$srcdir/"
10022      fi
10023    else
10024      posrcprefix="../"
10025    fi
10026    rm -f po/POTFILES
10027    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10028         < $srcdir/po/POTFILES.in > po/POTFILES
10029
10030 MKINSTALLDIRS="$INSTALL_DIRS"
10031
10032
10033 ###############################################################################
10034 #
10035 #       Check for -lXmu (some fucked up vendors don't ship it...)
10036 #
10037 ###############################################################################
10038
10039 have_xmu=no
10040
10041   ac_save_CPPFLAGS="$CPPFLAGS"
10042   if test \! -z "$includedir" ; then
10043     CPPFLAGS="$CPPFLAGS -I$includedir"
10044   fi
10045   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10046   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10047   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10048 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10049 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   cat >conftest.$ac_ext <<_ACEOF
10053 /* confdefs.h.  */
10054 _ACEOF
10055 cat confdefs.h >>conftest.$ac_ext
10056 cat >>conftest.$ac_ext <<_ACEOF
10057 /* end confdefs.h.  */
10058 #include <stdlib.h>
10059                    #include <stdio.h>
10060                    #include <X11/Intrinsic.h>
10061
10062 #include <X11/Xmu/Error.h>
10063 _ACEOF
10064 rm -rf conftest.$ac_objext
10065 if { (ac_try="$ac_compile"
10066 case "(($ac_try" in
10067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10068   *) ac_try_echo=$ac_try;;
10069 esac
10070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10071   (eval "$ac_compile") 2>conftest.er1
10072   ac_status=$?
10073   grep -v '^ *+' conftest.er1 >conftest.err
10074   rm -rf conftest.er1
10075   cat conftest.err >&5
10076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10077   (exit $ac_status); } && {
10078          test -z "$ac_c_werror_flag" ||
10079          test ! -s conftest.err
10080        } && test -s conftest.$ac_objext; then
10081   ac_cv_header_X11_Xmu_Error_h=yes
10082 else
10083   echo "$as_me: failed program was:" >&5
10084 sed 's/^/| /' conftest.$ac_ext >&5
10085
10086         ac_cv_header_X11_Xmu_Error_h=no
10087 fi
10088
10089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10090 fi
10091 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10092 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10093 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10094   have_xmu=yes
10095 fi
10096
10097
10098   CPPFLAGS="$ac_save_CPPFLAGS"
10099 if test "$have_xmu" = no ; then
10100   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10101   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10102   XMU_LIBS=''
10103 else
10104   XMU_SRCS=''
10105   XMU_OBJS=''
10106   XMU_LIBS='-lXmu'
10107   cat >>confdefs.h <<\_ACEOF
10108 #define HAVE_XMU 1
10109 _ACEOF
10110
10111 fi
10112
10113
10114 ###############################################################################
10115 #
10116 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10117 #       See comp.windows.x FAQ question 124.  The right fix is to
10118 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10119 #
10120 ###############################################################################
10121
10122 if test "$have_xmu" = yes ; then
10123   case "$host" in
10124     *-sunos4*)
10125     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10126 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10127 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10128   echo $ECHO_N "(cached) $ECHO_C" >&6
10129 else
10130   ac_save_LDFLAGS="$LDFLAGS"
10131                     if test \! -z "$x_libraries" ; then
10132                       LDFLAGS="$LDFLAGS -L$x_libraries"
10133                     fi
10134                     # Note: this trick never works!  (Generally.)
10135                     # We're only getting away with using AC_TRY_LINK
10136                     # with X libraries because we know it's SunOS.
10137                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10138                     cat >conftest.$ac_ext <<_ACEOF
10139 /* confdefs.h.  */
10140 _ACEOF
10141 cat confdefs.h >>conftest.$ac_ext
10142 cat >>conftest.$ac_ext <<_ACEOF
10143 /* end confdefs.h.  */
10144
10145 int
10146 main ()
10147 {
10148
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 rm -rf conftest.$ac_objext conftest$ac_exeext
10154 if { (ac_try="$ac_link"
10155 case "(($ac_try" in
10156   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10157   *) ac_try_echo=$ac_try;;
10158 esac
10159 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10160   (eval "$ac_link") 2>conftest.er1
10161   ac_status=$?
10162   grep -v '^ *+' conftest.er1 >conftest.err
10163   rm -rf conftest.er1
10164   cat conftest.err >&5
10165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166   (exit $ac_status); } && {
10167          test -z "$ac_c_werror_flag" ||
10168          test ! -s conftest.err
10169        } && test -s conftest$ac_exeext &&
10170        $as_test_x conftest$ac_exeext; then
10171   ac_cv_sunos_xmu_bug=no
10172 else
10173   echo "$as_me: failed program was:" >&5
10174 sed 's/^/| /' conftest.$ac_ext >&5
10175
10176         ac_cv_sunos_xmu_bug=yes
10177 fi
10178
10179 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10180       conftest$ac_exeext conftest.$ac_ext
10181                     LDFLAGS="$ac_save_LDFLAGS"
10182 fi
10183 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10184 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10185     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10186       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10187 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10188 if test "${ac_cv_ld_static+set}" = set; then
10189   echo $ECHO_N "(cached) $ECHO_C" >&6
10190 else
10191   ac_save_LDFLAGS="$LDFLAGS"
10192                       LDFLAGS="$LDFLAGS -static"
10193                       cat >conftest.$ac_ext <<_ACEOF
10194 /* confdefs.h.  */
10195 _ACEOF
10196 cat confdefs.h >>conftest.$ac_ext
10197 cat >>conftest.$ac_ext <<_ACEOF
10198 /* end confdefs.h.  */
10199
10200 int
10201 main ()
10202 {
10203
10204   ;
10205   return 0;
10206 }
10207 _ACEOF
10208 rm -rf conftest.$ac_objext conftest$ac_exeext
10209 if { (ac_try="$ac_link"
10210 case "(($ac_try" in
10211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10212   *) ac_try_echo=$ac_try;;
10213 esac
10214 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10215   (eval "$ac_link") 2>conftest.er1
10216   ac_status=$?
10217   grep -v '^ *+' conftest.er1 >conftest.err
10218   rm -rf conftest.er1
10219   cat conftest.err >&5
10220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221   (exit $ac_status); } && {
10222          test -z "$ac_c_werror_flag" ||
10223          test ! -s conftest.err
10224        } && test -s conftest$ac_exeext &&
10225        $as_test_x conftest$ac_exeext; then
10226   ac_cv_ld_static=yes
10227 else
10228   echo "$as_me: failed program was:" >&5
10229 sed 's/^/| /' conftest.$ac_ext >&5
10230
10231         ac_cv_ld_static=no
10232 fi
10233
10234 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10235       conftest$ac_exeext conftest.$ac_ext
10236                     LDFLAGS="$ac_save_LDFLAGS"
10237 fi
10238 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10239 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10240       if test "$ac_cv_ld_static" = yes ; then
10241         LDFLAGS="$LDFLAGS -static"
10242       else
10243         LDFLAGS="$LDFLAGS -Bstatic"
10244       fi
10245     fi
10246     ;;
10247   esac
10248 fi
10249
10250
10251 ###############################################################################
10252 #
10253 #       Handle the --with-hackdir option
10254 #
10255 ###############################################################################
10256
10257 have_hackdir=yes
10258 with_hackdir_req=unspecified
10259
10260 # Check whether --with-hackdir was given.
10261 if test "${with_hackdir+set}" = set; then
10262   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10263 else
10264   with_hackdir=yes
10265 fi
10266
10267
10268 if test x"$with_hackdir" = xyes; then
10269   HACKDIR='${libexecdir}/xscreensaver'
10270 elif test x"$with_hackdir" = xno; then
10271   HACKDIR='${bindir}'
10272 else
10273   HACKDIR=$with_hackdir
10274 fi
10275
10276 # canonicalize slashes.
10277 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10278
10279 # Expand HACKDIR as HACKDIR_FULL
10280 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10281
10282 # This option used to be called --enable-subdir; make sure that is no longer
10283 # used, since configure brain-damagedly ignores unknown --enable options.
10284
10285 obsolete_enable=
10286 # Check whether --enable-subdir was given.
10287 if test "${enable_subdir+set}" = set; then
10288   enableval=$enable_subdir; obsolete_enable=yes
10289 fi
10290
10291 if test -n "$obsolete_enable"; then
10292   echo "error: the --enable-subdir option has been replaced with"
10293   echo "       the new --with-hackdir option; see \`configure --help'"
10294   echo "       for more information."
10295   exit 1
10296 fi
10297
10298
10299 ###############################################################################
10300 #
10301 #       Handle the --with-configdir option
10302 #       Help for --with-x-app-defaults option added..
10303 #
10304 ###############################################################################
10305
10306 have_configdir=yes
10307 with_configdir_req=unspecified
10308
10309 # Check whether --with-configdir was given.
10310 if test "${with_configdir+set}" = set; then
10311   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10312 else
10313   with_configdir=yes
10314 fi
10315
10316
10317 if test x"$with_configdir" = xyes; then
10318   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10319 elif test x"$with_configdir" = xno; then
10320   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10321   exit 1
10322 else
10323   # there must be a better way than this...
10324   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10325     # absolute path
10326     HACK_CONF_DIR=$with_configdir
10327   else
10328     # relative path
10329     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10330   fi
10331 fi
10332
10333
10334
10335
10336 ###############################################################################
10337 #
10338 #       Check for the SGI SCREEN_SAVER server extension.
10339 #
10340 ###############################################################################
10341
10342 have_sgi=no
10343 with_sgi_req=unspecified
10344
10345 # Check whether --with-sgi-ext was given.
10346 if test "${with_sgi_ext+set}" = set; then
10347   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10348 else
10349   with_sgi=yes
10350 fi
10351
10352
10353
10354    case "$with_sgi" in
10355     yes) ;;
10356     no)  ;;
10357
10358     /*)
10359      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10360 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10361      d=$with_sgi/include
10362      if test -d $d; then
10363        X_CFLAGS="-I$d $X_CFLAGS"
10364        { echo "$as_me:$LINENO: result: $d" >&5
10365 echo "${ECHO_T}$d" >&6; }
10366      else
10367        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10368 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10369      fi
10370
10371      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10372 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10373      d=$with_sgi/lib
10374      if test -d $d; then
10375        X_LIBS="-L$d $X_LIBS"
10376        { echo "$as_me:$LINENO: result: $d" >&5
10377 echo "${ECHO_T}$d" >&6; }
10378      else
10379        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10380 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10381      fi
10382
10383      # replace the directory string with "yes".
10384      with_sgi_req="yes"
10385      with_sgi=$with_sgi_req
10386      ;;
10387
10388     *)
10389      echo ""
10390      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10391      echo "       If it is a directory, then \`DIR/include' will be added to"
10392      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10393      exit 1
10394      ;;
10395    esac
10396
10397
10398 if test "$with_sgi" = yes; then
10399
10400   ac_save_CPPFLAGS="$CPPFLAGS"
10401   if test \! -z "$includedir" ; then
10402     CPPFLAGS="$CPPFLAGS -I$includedir"
10403   fi
10404   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10405   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10406   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10407 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10408 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10409   echo $ECHO_N "(cached) $ECHO_C" >&6
10410 else
10411   cat >conftest.$ac_ext <<_ACEOF
10412 /* confdefs.h.  */
10413 _ACEOF
10414 cat confdefs.h >>conftest.$ac_ext
10415 cat >>conftest.$ac_ext <<_ACEOF
10416 /* end confdefs.h.  */
10417 #include <X11/Xlib.h>
10418
10419 #include <X11/extensions/XScreenSaver.h>
10420 _ACEOF
10421 rm -rf conftest.$ac_objext
10422 if { (ac_try="$ac_compile"
10423 case "(($ac_try" in
10424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10425   *) ac_try_echo=$ac_try;;
10426 esac
10427 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10428   (eval "$ac_compile") 2>conftest.er1
10429   ac_status=$?
10430   grep -v '^ *+' conftest.er1 >conftest.err
10431   rm -rf conftest.er1
10432   cat conftest.err >&5
10433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10434   (exit $ac_status); } && {
10435          test -z "$ac_c_werror_flag" ||
10436          test ! -s conftest.err
10437        } && test -s conftest.$ac_objext; then
10438   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10439 else
10440   echo "$as_me: failed program was:" >&5
10441 sed 's/^/| /' conftest.$ac_ext >&5
10442
10443         ac_cv_header_X11_extensions_XScreenSaver_h=no
10444 fi
10445
10446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10447 fi
10448 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10449 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10450 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10451   have_sgi=yes
10452                      cat >>confdefs.h <<\_ACEOF
10453 #define HAVE_SGI_SAVER_EXTENSION 1
10454 _ACEOF
10455
10456 fi
10457
10458
10459   CPPFLAGS="$ac_save_CPPFLAGS"
10460
10461 elif test "$with_sgi" != no; then
10462   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10463   exit 1
10464 fi
10465
10466
10467 ###############################################################################
10468 #
10469 #       Check for the XIDLE server extension.
10470 #
10471 ###############################################################################
10472
10473 have_xidle=no
10474 with_xidle_req=unspecified
10475
10476 # Check whether --with-xidle-ext was given.
10477 if test "${with_xidle_ext+set}" = set; then
10478   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10479 else
10480   with_xidle=yes
10481 fi
10482
10483
10484
10485    case "$with_xidle" in
10486     yes) ;;
10487     no)  ;;
10488
10489     /*)
10490      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10491 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10492      d=$with_xidle/include
10493      if test -d $d; then
10494        X_CFLAGS="-I$d $X_CFLAGS"
10495        { echo "$as_me:$LINENO: result: $d" >&5
10496 echo "${ECHO_T}$d" >&6; }
10497      else
10498        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10499 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10500      fi
10501
10502      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10503 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10504      d=$with_xidle/lib
10505      if test -d $d; then
10506        X_LIBS="-L$d $X_LIBS"
10507        { echo "$as_me:$LINENO: result: $d" >&5
10508 echo "${ECHO_T}$d" >&6; }
10509      else
10510        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10511 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10512      fi
10513
10514      # replace the directory string with "yes".
10515      with_xidle_req="yes"
10516      with_xidle=$with_xidle_req
10517      ;;
10518
10519     *)
10520      echo ""
10521      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10522      echo "       If it is a directory, then \`DIR/include' will be added to"
10523      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10524      exit 1
10525      ;;
10526    esac
10527
10528
10529 if test "$with_xidle" = yes; then
10530
10531   ac_save_CPPFLAGS="$CPPFLAGS"
10532   if test \! -z "$includedir" ; then
10533     CPPFLAGS="$CPPFLAGS -I$includedir"
10534   fi
10535   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10536   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10537   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10538 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10539 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10540   echo $ECHO_N "(cached) $ECHO_C" >&6
10541 else
10542   cat >conftest.$ac_ext <<_ACEOF
10543 /* confdefs.h.  */
10544 _ACEOF
10545 cat confdefs.h >>conftest.$ac_ext
10546 cat >>conftest.$ac_ext <<_ACEOF
10547 /* end confdefs.h.  */
10548 #include <X11/Xlib.h>
10549
10550 #include <X11/extensions/xidle.h>
10551 _ACEOF
10552 rm -rf conftest.$ac_objext
10553 if { (ac_try="$ac_compile"
10554 case "(($ac_try" in
10555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10556   *) ac_try_echo=$ac_try;;
10557 esac
10558 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10559   (eval "$ac_compile") 2>conftest.er1
10560   ac_status=$?
10561   grep -v '^ *+' conftest.er1 >conftest.err
10562   rm -rf conftest.er1
10563   cat conftest.err >&5
10564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565   (exit $ac_status); } && {
10566          test -z "$ac_c_werror_flag" ||
10567          test ! -s conftest.err
10568        } && test -s conftest.$ac_objext; then
10569   ac_cv_header_X11_extensions_xidle_h=yes
10570 else
10571   echo "$as_me: failed program was:" >&5
10572 sed 's/^/| /' conftest.$ac_ext >&5
10573
10574         ac_cv_header_X11_extensions_xidle_h=no
10575 fi
10576
10577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10578 fi
10579 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10580 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10581 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10582   have_xidle=yes
10583                      cat >>confdefs.h <<\_ACEOF
10584 #define HAVE_XIDLE_EXTENSION 1
10585 _ACEOF
10586
10587 fi
10588
10589
10590   CPPFLAGS="$ac_save_CPPFLAGS"
10591 elif test "$with_xidle" != no; then
10592   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10593   exit 1
10594 fi
10595
10596
10597 ###############################################################################
10598 #
10599 #       Check for the SGI-VIDEO-CONTROL server extension.
10600 #
10601 ###############################################################################
10602
10603 have_sgivc=no
10604 with_sgivc_req=unspecified
10605
10606 # Check whether --with-sgivc-ext was given.
10607 if test "${with_sgivc_ext+set}" = set; then
10608   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10609 else
10610   with_sgivc=yes
10611 fi
10612
10613
10614
10615    case "$with_sgivc" in
10616     yes) ;;
10617     no)  ;;
10618
10619     /*)
10620      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10621 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10622      d=$with_sgivc/include
10623      if test -d $d; then
10624        X_CFLAGS="-I$d $X_CFLAGS"
10625        { echo "$as_me:$LINENO: result: $d" >&5
10626 echo "${ECHO_T}$d" >&6; }
10627      else
10628        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10629 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10630      fi
10631
10632      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10633 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10634      d=$with_sgivc/lib
10635      if test -d $d; then
10636        X_LIBS="-L$d $X_LIBS"
10637        { echo "$as_me:$LINENO: result: $d" >&5
10638 echo "${ECHO_T}$d" >&6; }
10639      else
10640        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10641 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10642      fi
10643
10644      # replace the directory string with "yes".
10645      with_sgivc_req="yes"
10646      with_sgivc=$with_sgivc_req
10647      ;;
10648
10649     *)
10650      echo ""
10651      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10652      echo "       If it is a directory, then \`DIR/include' will be added to"
10653      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10654      exit 1
10655      ;;
10656    esac
10657
10658
10659 if test "$with_sgivc" = yes; then
10660
10661   # first check for XSGIvc.h
10662
10663   ac_save_CPPFLAGS="$CPPFLAGS"
10664   if test \! -z "$includedir" ; then
10665     CPPFLAGS="$CPPFLAGS -I$includedir"
10666   fi
10667   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10668   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10669   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10670 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10671 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10672   echo $ECHO_N "(cached) $ECHO_C" >&6
10673 else
10674   cat >conftest.$ac_ext <<_ACEOF
10675 /* confdefs.h.  */
10676 _ACEOF
10677 cat confdefs.h >>conftest.$ac_ext
10678 cat >>conftest.$ac_ext <<_ACEOF
10679 /* end confdefs.h.  */
10680 #include <X11/Xlib.h>
10681
10682 #include <X11/extensions/XSGIvc.h>
10683 _ACEOF
10684 rm -rf conftest.$ac_objext
10685 if { (ac_try="$ac_compile"
10686 case "(($ac_try" in
10687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688   *) ac_try_echo=$ac_try;;
10689 esac
10690 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691   (eval "$ac_compile") 2>conftest.er1
10692   ac_status=$?
10693   grep -v '^ *+' conftest.er1 >conftest.err
10694   rm -rf conftest.er1
10695   cat conftest.err >&5
10696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697   (exit $ac_status); } && {
10698          test -z "$ac_c_werror_flag" ||
10699          test ! -s conftest.err
10700        } && test -s conftest.$ac_objext; then
10701   ac_cv_header_X11_extensions_XSGIvc_h=yes
10702 else
10703   echo "$as_me: failed program was:" >&5
10704 sed 's/^/| /' conftest.$ac_ext >&5
10705
10706         ac_cv_header_X11_extensions_XSGIvc_h=no
10707 fi
10708
10709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10710 fi
10711 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10712 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10713 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10714   have_sgivc=yes
10715 fi
10716
10717
10718   CPPFLAGS="$ac_save_CPPFLAGS"
10719
10720   # if that succeeded, then check for the -lXsgivc
10721   if test "$have_sgivc" = yes; then
10722     have_sgivc=no
10723
10724   ac_save_CPPFLAGS="$CPPFLAGS"
10725   ac_save_LDFLAGS="$LDFLAGS"
10726 #  ac_save_LIBS="$LIBS"
10727
10728   if test \! -z "$includedir" ; then
10729     CPPFLAGS="$CPPFLAGS -I$includedir"
10730   fi
10731   # note: $X_CFLAGS includes $x_includes
10732   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10733
10734   if test \! -z "$libdir" ; then
10735     LDFLAGS="$LDFLAGS -L$libdir"
10736   fi
10737   # note: $X_LIBS includes $x_libraries
10738   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10739
10740   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10741   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10742   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10743 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10744 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10745   echo $ECHO_N "(cached) $ECHO_C" >&6
10746 else
10747   ac_check_lib_save_LIBS=$LIBS
10748 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10749 cat >conftest.$ac_ext <<_ACEOF
10750 /* confdefs.h.  */
10751 _ACEOF
10752 cat confdefs.h >>conftest.$ac_ext
10753 cat >>conftest.$ac_ext <<_ACEOF
10754 /* end confdefs.h.  */
10755
10756 /* Override any GCC internal prototype to avoid an error.
10757    Use char because int might match the return type of a GCC
10758    builtin and then its argument prototype would still apply.  */
10759 #ifdef __cplusplus
10760 extern "C"
10761 #endif
10762 char XSGIvcQueryGammaMap ();
10763 int
10764 main ()
10765 {
10766 return XSGIvcQueryGammaMap ();
10767   ;
10768   return 0;
10769 }
10770 _ACEOF
10771 rm -rf conftest.$ac_objext conftest$ac_exeext
10772 if { (ac_try="$ac_link"
10773 case "(($ac_try" in
10774   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10775   *) ac_try_echo=$ac_try;;
10776 esac
10777 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10778   (eval "$ac_link") 2>conftest.er1
10779   ac_status=$?
10780   grep -v '^ *+' conftest.er1 >conftest.err
10781   rm -rf conftest.er1
10782   cat conftest.err >&5
10783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784   (exit $ac_status); } && {
10785          test -z "$ac_c_werror_flag" ||
10786          test ! -s conftest.err
10787        } && test -s conftest$ac_exeext &&
10788        $as_test_x conftest$ac_exeext; then
10789   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10790 else
10791   echo "$as_me: failed program was:" >&5
10792 sed 's/^/| /' conftest.$ac_ext >&5
10793
10794         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10795 fi
10796
10797 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10798       conftest$ac_exeext conftest.$ac_ext
10799 LIBS=$ac_check_lib_save_LIBS
10800 fi
10801 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10802 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10803 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10804   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10805 else
10806   true
10807 fi
10808
10809   CPPFLAGS="$ac_save_CPPFLAGS"
10810   LDFLAGS="$ac_save_LDFLAGS"
10811 #  LIBS="$ac_save_LIBS"
10812
10813   fi
10814
10815   # if that succeeded, then we've really got it.
10816   if test "$have_sgivc" = yes; then
10817     cat >>confdefs.h <<\_ACEOF
10818 #define HAVE_SGI_VC_EXTENSION 1
10819 _ACEOF
10820
10821   fi
10822
10823 elif test "$with_sgivc" != no; then
10824   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10825   exit 1
10826 fi
10827
10828
10829 ###############################################################################
10830 #
10831 #       Check for the DPMS server extension.
10832 #
10833 ###############################################################################
10834
10835 have_dpms=no
10836 with_dpms_req=unspecified
10837
10838 # Check whether --with-dpms-ext was given.
10839 if test "${with_dpms_ext+set}" = set; then
10840   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10841 else
10842   with_dpms=yes
10843 fi
10844
10845
10846
10847    case "$with_dpms" in
10848     yes) ;;
10849     no)  ;;
10850
10851     /*)
10852      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10853 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10854      d=$with_dpms/include
10855      if test -d $d; then
10856        X_CFLAGS="-I$d $X_CFLAGS"
10857        { echo "$as_me:$LINENO: result: $d" >&5
10858 echo "${ECHO_T}$d" >&6; }
10859      else
10860        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10861 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10862      fi
10863
10864      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10865 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10866      d=$with_dpms/lib
10867      if test -d $d; then
10868        X_LIBS="-L$d $X_LIBS"
10869        { echo "$as_me:$LINENO: result: $d" >&5
10870 echo "${ECHO_T}$d" >&6; }
10871      else
10872        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10873 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10874      fi
10875
10876      # replace the directory string with "yes".
10877      with_dpms_req="yes"
10878      with_dpms=$with_dpms_req
10879      ;;
10880
10881     *)
10882      echo ""
10883      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10884      echo "       If it is a directory, then \`DIR/include' will be added to"
10885      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10886      exit 1
10887      ;;
10888    esac
10889
10890
10891 if test "$with_dpms" = yes; then
10892
10893   # first check for dpms.h
10894
10895   ac_save_CPPFLAGS="$CPPFLAGS"
10896   if test \! -z "$includedir" ; then
10897     CPPFLAGS="$CPPFLAGS -I$includedir"
10898   fi
10899   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10900   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10901   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10902 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10903 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10904   echo $ECHO_N "(cached) $ECHO_C" >&6
10905 else
10906   cat >conftest.$ac_ext <<_ACEOF
10907 /* confdefs.h.  */
10908 _ACEOF
10909 cat confdefs.h >>conftest.$ac_ext
10910 cat >>conftest.$ac_ext <<_ACEOF
10911 /* end confdefs.h.  */
10912 #include <X11/Xlib.h>
10913                      #include <X11/Xmd.h>
10914
10915 #include <X11/extensions/dpms.h>
10916 _ACEOF
10917 rm -rf conftest.$ac_objext
10918 if { (ac_try="$ac_compile"
10919 case "(($ac_try" in
10920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10921   *) ac_try_echo=$ac_try;;
10922 esac
10923 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10924   (eval "$ac_compile") 2>conftest.er1
10925   ac_status=$?
10926   grep -v '^ *+' conftest.er1 >conftest.err
10927   rm -rf conftest.er1
10928   cat conftest.err >&5
10929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10930   (exit $ac_status); } && {
10931          test -z "$ac_c_werror_flag" ||
10932          test ! -s conftest.err
10933        } && test -s conftest.$ac_objext; then
10934   ac_cv_header_X11_extensions_dpms_h=yes
10935 else
10936   echo "$as_me: failed program was:" >&5
10937 sed 's/^/| /' conftest.$ac_ext >&5
10938
10939         ac_cv_header_X11_extensions_dpms_h=no
10940 fi
10941
10942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943 fi
10944 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10945 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10946 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10947   have_dpms=yes
10948 fi
10949
10950
10951   CPPFLAGS="$ac_save_CPPFLAGS"
10952
10953   # if that succeeded, then check for the DPMS code in the libraries
10954   if test "$have_dpms" = yes; then
10955
10956     # first look in -lXext (this is where it is with XFree86 4.0)
10957     have_dpms=no
10958
10959   ac_save_CPPFLAGS="$CPPFLAGS"
10960   ac_save_LDFLAGS="$LDFLAGS"
10961 #  ac_save_LIBS="$LIBS"
10962
10963   if test \! -z "$includedir" ; then
10964     CPPFLAGS="$CPPFLAGS -I$includedir"
10965   fi
10966   # note: $X_CFLAGS includes $x_includes
10967   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10968
10969   if test \! -z "$libdir" ; then
10970     LDFLAGS="$LDFLAGS -L$libdir"
10971   fi
10972   # note: $X_LIBS includes $x_libraries
10973   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10974
10975   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10976   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10977   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10978 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10979 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10980   echo $ECHO_N "(cached) $ECHO_C" >&6
10981 else
10982   ac_check_lib_save_LIBS=$LIBS
10983 LIBS="-lXext -lXext -lX11 $LIBS"
10984 cat >conftest.$ac_ext <<_ACEOF
10985 /* confdefs.h.  */
10986 _ACEOF
10987 cat confdefs.h >>conftest.$ac_ext
10988 cat >>conftest.$ac_ext <<_ACEOF
10989 /* end confdefs.h.  */
10990
10991 /* Override any GCC internal prototype to avoid an error.
10992    Use char because int might match the return type of a GCC
10993    builtin and then its argument prototype would still apply.  */
10994 #ifdef __cplusplus
10995 extern "C"
10996 #endif
10997 char DPMSInfo ();
10998 int
10999 main ()
11000 {
11001 return DPMSInfo ();
11002   ;
11003   return 0;
11004 }
11005 _ACEOF
11006 rm -rf conftest.$ac_objext conftest$ac_exeext
11007 if { (ac_try="$ac_link"
11008 case "(($ac_try" in
11009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11010   *) ac_try_echo=$ac_try;;
11011 esac
11012 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11013   (eval "$ac_link") 2>conftest.er1
11014   ac_status=$?
11015   grep -v '^ *+' conftest.er1 >conftest.err
11016   rm -rf conftest.er1
11017   cat conftest.err >&5
11018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019   (exit $ac_status); } && {
11020          test -z "$ac_c_werror_flag" ||
11021          test ! -s conftest.err
11022        } && test -s conftest$ac_exeext &&
11023        $as_test_x conftest$ac_exeext; then
11024   ac_cv_lib_Xext_DPMSInfo=yes
11025 else
11026   echo "$as_me: failed program was:" >&5
11027 sed 's/^/| /' conftest.$ac_ext >&5
11028
11029         ac_cv_lib_Xext_DPMSInfo=no
11030 fi
11031
11032 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11033       conftest$ac_exeext conftest.$ac_ext
11034 LIBS=$ac_check_lib_save_LIBS
11035 fi
11036 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11037 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11038 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11039   have_dpms=yes
11040 else
11041   true
11042 fi
11043
11044   CPPFLAGS="$ac_save_CPPFLAGS"
11045   LDFLAGS="$ac_save_LDFLAGS"
11046 #  LIBS="$ac_save_LIBS"
11047
11048
11049     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11050     if test "$have_dpms" = no; then
11051
11052   ac_save_CPPFLAGS="$CPPFLAGS"
11053   ac_save_LDFLAGS="$LDFLAGS"
11054 #  ac_save_LIBS="$LIBS"
11055
11056   if test \! -z "$includedir" ; then
11057     CPPFLAGS="$CPPFLAGS -I$includedir"
11058   fi
11059   # note: $X_CFLAGS includes $x_includes
11060   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11061
11062   if test \! -z "$libdir" ; then
11063     LDFLAGS="$LDFLAGS -L$libdir"
11064   fi
11065   # note: $X_LIBS includes $x_libraries
11066   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11067
11068   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11069   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11070   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11071 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11072 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11073   echo $ECHO_N "(cached) $ECHO_C" >&6
11074 else
11075   ac_check_lib_save_LIBS=$LIBS
11076 LIBS="-lXdpms -lXext -lX11 $LIBS"
11077 cat >conftest.$ac_ext <<_ACEOF
11078 /* confdefs.h.  */
11079 _ACEOF
11080 cat confdefs.h >>conftest.$ac_ext
11081 cat >>conftest.$ac_ext <<_ACEOF
11082 /* end confdefs.h.  */
11083
11084 /* Override any GCC internal prototype to avoid an error.
11085    Use char because int might match the return type of a GCC
11086    builtin and then its argument prototype would still apply.  */
11087 #ifdef __cplusplus
11088 extern "C"
11089 #endif
11090 char DPMSInfo ();
11091 int
11092 main ()
11093 {
11094 return DPMSInfo ();
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 rm -rf conftest.$ac_objext conftest$ac_exeext
11100 if { (ac_try="$ac_link"
11101 case "(($ac_try" in
11102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11103   *) ac_try_echo=$ac_try;;
11104 esac
11105 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11106   (eval "$ac_link") 2>conftest.er1
11107   ac_status=$?
11108   grep -v '^ *+' conftest.er1 >conftest.err
11109   rm -rf conftest.er1
11110   cat conftest.err >&5
11111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11112   (exit $ac_status); } && {
11113          test -z "$ac_c_werror_flag" ||
11114          test ! -s conftest.err
11115        } && test -s conftest$ac_exeext &&
11116        $as_test_x conftest$ac_exeext; then
11117   ac_cv_lib_Xdpms_DPMSInfo=yes
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 sed 's/^/| /' conftest.$ac_ext >&5
11121
11122         ac_cv_lib_Xdpms_DPMSInfo=no
11123 fi
11124
11125 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11126       conftest$ac_exeext conftest.$ac_ext
11127 LIBS=$ac_check_lib_save_LIBS
11128 fi
11129 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11130 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11131 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11132   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11133 else
11134   true
11135 fi
11136
11137   CPPFLAGS="$ac_save_CPPFLAGS"
11138   LDFLAGS="$ac_save_LDFLAGS"
11139 #  LIBS="$ac_save_LIBS"
11140
11141     fi
11142   fi
11143
11144
11145   # if that succeeded, then we've really got it.
11146   if test "$have_dpms" = yes; then
11147     cat >>confdefs.h <<\_ACEOF
11148 #define HAVE_DPMS_EXTENSION 1
11149 _ACEOF
11150
11151   fi
11152
11153 elif test "$with_dpms" != no; then
11154   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11155   exit 1
11156 fi
11157
11158
11159 ###############################################################################
11160 #
11161 #       Check for the XINERAMA server extension.
11162 #
11163 ###############################################################################
11164
11165 have_xinerama=no
11166 with_xinerama_req=unspecified
11167
11168 # Check whether --with-xinerama-ext was given.
11169 if test "${with_xinerama_ext+set}" = set; then
11170   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11171 else
11172   with_xinerama=yes
11173 fi
11174
11175
11176
11177    case "$with_xinerama" in
11178     yes) ;;
11179     no)  ;;
11180
11181     /*)
11182      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11183 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11184      d=$with_xinerama/include
11185      if test -d $d; then
11186        X_CFLAGS="-I$d $X_CFLAGS"
11187        { echo "$as_me:$LINENO: result: $d" >&5
11188 echo "${ECHO_T}$d" >&6; }
11189      else
11190        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11191 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11192      fi
11193
11194      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11195 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11196      d=$with_xinerama/lib
11197      if test -d $d; then
11198        X_LIBS="-L$d $X_LIBS"
11199        { echo "$as_me:$LINENO: result: $d" >&5
11200 echo "${ECHO_T}$d" >&6; }
11201      else
11202        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11203 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11204      fi
11205
11206      # replace the directory string with "yes".
11207      with_xinerama_req="yes"
11208      with_xinerama=$with_xinerama_req
11209      ;;
11210
11211     *)
11212      echo ""
11213      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11214      echo "       If it is a directory, then \`DIR/include' will be added to"
11215      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11216      exit 1
11217      ;;
11218    esac
11219
11220
11221 if test "$with_xinerama" = yes; then
11222
11223   # first check for Xinerama.h
11224
11225   ac_save_CPPFLAGS="$CPPFLAGS"
11226   if test \! -z "$includedir" ; then
11227     CPPFLAGS="$CPPFLAGS -I$includedir"
11228   fi
11229   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11230   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11231   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11232 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11233 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11234   echo $ECHO_N "(cached) $ECHO_C" >&6
11235 else
11236   cat >conftest.$ac_ext <<_ACEOF
11237 /* confdefs.h.  */
11238 _ACEOF
11239 cat confdefs.h >>conftest.$ac_ext
11240 cat >>conftest.$ac_ext <<_ACEOF
11241 /* end confdefs.h.  */
11242 #include <X11/Xlib.h>
11243
11244 #include <X11/extensions/Xinerama.h>
11245 _ACEOF
11246 rm -rf conftest.$ac_objext
11247 if { (ac_try="$ac_compile"
11248 case "(($ac_try" in
11249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250   *) ac_try_echo=$ac_try;;
11251 esac
11252 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253   (eval "$ac_compile") 2>conftest.er1
11254   ac_status=$?
11255   grep -v '^ *+' conftest.er1 >conftest.err
11256   rm -rf conftest.er1
11257   cat conftest.err >&5
11258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259   (exit $ac_status); } && {
11260          test -z "$ac_c_werror_flag" ||
11261          test ! -s conftest.err
11262        } && test -s conftest.$ac_objext; then
11263   ac_cv_header_X11_extensions_Xinerama_h=yes
11264 else
11265   echo "$as_me: failed program was:" >&5
11266 sed 's/^/| /' conftest.$ac_ext >&5
11267
11268         ac_cv_header_X11_extensions_Xinerama_h=no
11269 fi
11270
11271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272 fi
11273 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11274 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11275 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11276   have_xinerama=yes
11277 fi
11278
11279
11280   CPPFLAGS="$ac_save_CPPFLAGS"
11281
11282   # if that succeeded, then check for the XINERAMA code in the libraries
11283   if test "$have_xinerama" = yes; then
11284
11285     # first look in -lXext
11286     have_xinerama=no
11287
11288   ac_save_CPPFLAGS="$CPPFLAGS"
11289   ac_save_LDFLAGS="$LDFLAGS"
11290 #  ac_save_LIBS="$LIBS"
11291
11292   if test \! -z "$includedir" ; then
11293     CPPFLAGS="$CPPFLAGS -I$includedir"
11294   fi
11295   # note: $X_CFLAGS includes $x_includes
11296   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11297
11298   if test \! -z "$libdir" ; then
11299     LDFLAGS="$LDFLAGS -L$libdir"
11300   fi
11301   # note: $X_LIBS includes $x_libraries
11302   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11303
11304   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11305   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11306   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11307 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11308 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11309   echo $ECHO_N "(cached) $ECHO_C" >&6
11310 else
11311   ac_check_lib_save_LIBS=$LIBS
11312 LIBS="-lXext -lXext -lX11 $LIBS"
11313 cat >conftest.$ac_ext <<_ACEOF
11314 /* confdefs.h.  */
11315 _ACEOF
11316 cat confdefs.h >>conftest.$ac_ext
11317 cat >>conftest.$ac_ext <<_ACEOF
11318 /* end confdefs.h.  */
11319
11320 /* Override any GCC internal prototype to avoid an error.
11321    Use char because int might match the return type of a GCC
11322    builtin and then its argument prototype would still apply.  */
11323 #ifdef __cplusplus
11324 extern "C"
11325 #endif
11326 char XineramaQueryScreens ();
11327 int
11328 main ()
11329 {
11330 return XineramaQueryScreens ();
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 rm -rf conftest.$ac_objext conftest$ac_exeext
11336 if { (ac_try="$ac_link"
11337 case "(($ac_try" in
11338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11339   *) ac_try_echo=$ac_try;;
11340 esac
11341 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11342   (eval "$ac_link") 2>conftest.er1
11343   ac_status=$?
11344   grep -v '^ *+' conftest.er1 >conftest.err
11345   rm -rf conftest.er1
11346   cat conftest.err >&5
11347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348   (exit $ac_status); } && {
11349          test -z "$ac_c_werror_flag" ||
11350          test ! -s conftest.err
11351        } && test -s conftest$ac_exeext &&
11352        $as_test_x conftest$ac_exeext; then
11353   ac_cv_lib_Xext_XineramaQueryScreens=yes
11354 else
11355   echo "$as_me: failed program was:" >&5
11356 sed 's/^/| /' conftest.$ac_ext >&5
11357
11358         ac_cv_lib_Xext_XineramaQueryScreens=no
11359 fi
11360
11361 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11362       conftest$ac_exeext conftest.$ac_ext
11363 LIBS=$ac_check_lib_save_LIBS
11364 fi
11365 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11366 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11367 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11368   have_xinerama=yes
11369 else
11370   true
11371 fi
11372
11373   CPPFLAGS="$ac_save_CPPFLAGS"
11374   LDFLAGS="$ac_save_LDFLAGS"
11375 #  LIBS="$ac_save_LIBS"
11376
11377
11378     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11379     if test "$have_xinerama" = no; then
11380
11381   ac_save_CPPFLAGS="$CPPFLAGS"
11382   ac_save_LDFLAGS="$LDFLAGS"
11383 #  ac_save_LIBS="$LIBS"
11384
11385   if test \! -z "$includedir" ; then
11386     CPPFLAGS="$CPPFLAGS -I$includedir"
11387   fi
11388   # note: $X_CFLAGS includes $x_includes
11389   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11390
11391   if test \! -z "$libdir" ; then
11392     LDFLAGS="$LDFLAGS -L$libdir"
11393   fi
11394   # note: $X_LIBS includes $x_libraries
11395   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11396
11397   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11398   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11399   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11400 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11401 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11402   echo $ECHO_N "(cached) $ECHO_C" >&6
11403 else
11404   ac_check_lib_save_LIBS=$LIBS
11405 LIBS="-lXinerama -lXext -lX11 $LIBS"
11406 cat >conftest.$ac_ext <<_ACEOF
11407 /* confdefs.h.  */
11408 _ACEOF
11409 cat confdefs.h >>conftest.$ac_ext
11410 cat >>conftest.$ac_ext <<_ACEOF
11411 /* end confdefs.h.  */
11412
11413 /* Override any GCC internal prototype to avoid an error.
11414    Use char because int might match the return type of a GCC
11415    builtin and then its argument prototype would still apply.  */
11416 #ifdef __cplusplus
11417 extern "C"
11418 #endif
11419 char XineramaQueryScreens ();
11420 int
11421 main ()
11422 {
11423 return XineramaQueryScreens ();
11424   ;
11425   return 0;
11426 }
11427 _ACEOF
11428 rm -rf conftest.$ac_objext conftest$ac_exeext
11429 if { (ac_try="$ac_link"
11430 case "(($ac_try" in
11431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11432   *) ac_try_echo=$ac_try;;
11433 esac
11434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11435   (eval "$ac_link") 2>conftest.er1
11436   ac_status=$?
11437   grep -v '^ *+' conftest.er1 >conftest.err
11438   rm -rf conftest.er1
11439   cat conftest.err >&5
11440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441   (exit $ac_status); } && {
11442          test -z "$ac_c_werror_flag" ||
11443          test ! -s conftest.err
11444        } && test -s conftest$ac_exeext &&
11445        $as_test_x conftest$ac_exeext; then
11446   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11447 else
11448   echo "$as_me: failed program was:" >&5
11449 sed 's/^/| /' conftest.$ac_ext >&5
11450
11451         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11452 fi
11453
11454 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11455       conftest$ac_exeext conftest.$ac_ext
11456 LIBS=$ac_check_lib_save_LIBS
11457 fi
11458 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11459 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11460 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11461   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11462 else
11463   true
11464 fi
11465
11466   CPPFLAGS="$ac_save_CPPFLAGS"
11467   LDFLAGS="$ac_save_LDFLAGS"
11468 #  LIBS="$ac_save_LIBS"
11469
11470     fi
11471   fi
11472
11473   # if that succeeded, then we've really got it.
11474   if test "$have_xinerama" = yes; then
11475     cat >>confdefs.h <<\_ACEOF
11476 #define HAVE_XINERAMA 1
11477 _ACEOF
11478
11479   fi
11480
11481 elif test "$with_xinerama" != no; then
11482   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11483   exit 1
11484 fi
11485
11486
11487 ###############################################################################
11488 #
11489 #       Check for the XF86VMODE server extension (for virtual screens.)
11490 #
11491 ###############################################################################
11492
11493 have_xf86vmode=no
11494 with_xf86vmode_req=unspecified
11495
11496 # Check whether --with-xf86vmode-ext was given.
11497 if test "${with_xf86vmode_ext+set}" = set; then
11498   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11499 else
11500   with_xf86vmode=yes
11501 fi
11502
11503
11504
11505    case "$with_xf86vmode" in
11506     yes) ;;
11507     no)  ;;
11508
11509     /*)
11510      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11511 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11512      d=$with_xf86vmode/include
11513      if test -d $d; then
11514        X_CFLAGS="-I$d $X_CFLAGS"
11515        { echo "$as_me:$LINENO: result: $d" >&5
11516 echo "${ECHO_T}$d" >&6; }
11517      else
11518        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11519 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11520      fi
11521
11522      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11523 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11524      d=$with_xf86vmode/lib
11525      if test -d $d; then
11526        X_LIBS="-L$d $X_LIBS"
11527        { echo "$as_me:$LINENO: result: $d" >&5
11528 echo "${ECHO_T}$d" >&6; }
11529      else
11530        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11531 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11532      fi
11533
11534      # replace the directory string with "yes".
11535      with_xf86vmode_req="yes"
11536      with_xf86vmode=$with_xf86vmode_req
11537      ;;
11538
11539     *)
11540      echo ""
11541      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11542      echo "       If it is a directory, then \`DIR/include' will be added to"
11543      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11544      exit 1
11545      ;;
11546    esac
11547
11548
11549 VIDMODE_LIBS=""
11550
11551 if test "$with_xf86vmode" = yes; then
11552
11553   # first check for xf86vmode.h
11554
11555   ac_save_CPPFLAGS="$CPPFLAGS"
11556   if test \! -z "$includedir" ; then
11557     CPPFLAGS="$CPPFLAGS -I$includedir"
11558   fi
11559   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11560   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11561   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11562 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11563 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11564   echo $ECHO_N "(cached) $ECHO_C" >&6
11565 else
11566   cat >conftest.$ac_ext <<_ACEOF
11567 /* confdefs.h.  */
11568 _ACEOF
11569 cat confdefs.h >>conftest.$ac_ext
11570 cat >>conftest.$ac_ext <<_ACEOF
11571 /* end confdefs.h.  */
11572 #include <X11/Xlib.h>
11573
11574 #include <X11/extensions/xf86vmode.h>
11575 _ACEOF
11576 rm -rf conftest.$ac_objext
11577 if { (ac_try="$ac_compile"
11578 case "(($ac_try" in
11579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580   *) ac_try_echo=$ac_try;;
11581 esac
11582 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11583   (eval "$ac_compile") 2>conftest.er1
11584   ac_status=$?
11585   grep -v '^ *+' conftest.er1 >conftest.err
11586   rm -rf conftest.er1
11587   cat conftest.err >&5
11588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589   (exit $ac_status); } && {
11590          test -z "$ac_c_werror_flag" ||
11591          test ! -s conftest.err
11592        } && test -s conftest.$ac_objext; then
11593   ac_cv_header_X11_extensions_xf86vmode_h=yes
11594 else
11595   echo "$as_me: failed program was:" >&5
11596 sed 's/^/| /' conftest.$ac_ext >&5
11597
11598         ac_cv_header_X11_extensions_xf86vmode_h=no
11599 fi
11600
11601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11602 fi
11603 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11604 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11605 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11606   have_xf86vmode=yes
11607 fi
11608
11609
11610   CPPFLAGS="$ac_save_CPPFLAGS"
11611
11612   # if that succeeded, then check for the -lXxf86vm
11613   if test "$have_xf86vmode" = yes; then
11614     have_xf86vmode=no
11615
11616   ac_save_CPPFLAGS="$CPPFLAGS"
11617   ac_save_LDFLAGS="$LDFLAGS"
11618 #  ac_save_LIBS="$LIBS"
11619
11620   if test \! -z "$includedir" ; then
11621     CPPFLAGS="$CPPFLAGS -I$includedir"
11622   fi
11623   # note: $X_CFLAGS includes $x_includes
11624   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11625
11626   if test \! -z "$libdir" ; then
11627     LDFLAGS="$LDFLAGS -L$libdir"
11628   fi
11629   # note: $X_LIBS includes $x_libraries
11630   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11631
11632   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11633   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11634   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11635 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11636 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11637   echo $ECHO_N "(cached) $ECHO_C" >&6
11638 else
11639   ac_check_lib_save_LIBS=$LIBS
11640 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11641 cat >conftest.$ac_ext <<_ACEOF
11642 /* confdefs.h.  */
11643 _ACEOF
11644 cat confdefs.h >>conftest.$ac_ext
11645 cat >>conftest.$ac_ext <<_ACEOF
11646 /* end confdefs.h.  */
11647
11648 /* Override any GCC internal prototype to avoid an error.
11649    Use char because int might match the return type of a GCC
11650    builtin and then its argument prototype would still apply.  */
11651 #ifdef __cplusplus
11652 extern "C"
11653 #endif
11654 char XF86VidModeGetViewPort ();
11655 int
11656 main ()
11657 {
11658 return XF86VidModeGetViewPort ();
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -rf conftest.$ac_objext conftest$ac_exeext
11664 if { (ac_try="$ac_link"
11665 case "(($ac_try" in
11666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11667   *) ac_try_echo=$ac_try;;
11668 esac
11669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11670   (eval "$ac_link") 2>conftest.er1
11671   ac_status=$?
11672   grep -v '^ *+' conftest.er1 >conftest.err
11673   rm -rf conftest.er1
11674   cat conftest.err >&5
11675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676   (exit $ac_status); } && {
11677          test -z "$ac_c_werror_flag" ||
11678          test ! -s conftest.err
11679        } && test -s conftest$ac_exeext &&
11680        $as_test_x conftest$ac_exeext; then
11681   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11682 else
11683   echo "$as_me: failed program was:" >&5
11684 sed 's/^/| /' conftest.$ac_ext >&5
11685
11686         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11687 fi
11688
11689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11690       conftest$ac_exeext conftest.$ac_ext
11691 LIBS=$ac_check_lib_save_LIBS
11692 fi
11693 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11694 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11695 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11696   have_xf86vmode=yes;
11697                    VIDMODE_LIBS="-lXxf86vm";
11698                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11699 else
11700   true
11701 fi
11702
11703   CPPFLAGS="$ac_save_CPPFLAGS"
11704   LDFLAGS="$ac_save_LDFLAGS"
11705 #  LIBS="$ac_save_LIBS"
11706
11707   fi
11708
11709   # if that succeeded, then we've really got it.
11710   if test "$have_xf86vmode" = yes; then
11711     cat >>confdefs.h <<\_ACEOF
11712 #define HAVE_XF86VMODE 1
11713 _ACEOF
11714
11715   fi
11716
11717 elif test "$with_xf86vmode" != no; then
11718   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11719   exit 1
11720 fi
11721
11722
11723 ###############################################################################
11724 #
11725 #       Check for the XF86VMODE server extension (for gamma fading.)
11726 #
11727 ###############################################################################
11728
11729 have_xf86gamma=no
11730 have_xf86gamma_ramp=no
11731 with_xf86gamma_req=unspecified
11732
11733 # Check whether --with-xf86gamma-ext was given.
11734 if test "${with_xf86gamma_ext+set}" = set; then
11735   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11736 else
11737   with_xf86gamma=yes
11738 fi
11739
11740
11741
11742    case "$with_xf86gamma" in
11743     yes) ;;
11744     no)  ;;
11745
11746     /*)
11747      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11748 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11749      d=$with_xf86gamma/include
11750      if test -d $d; then
11751        X_CFLAGS="-I$d $X_CFLAGS"
11752        { echo "$as_me:$LINENO: result: $d" >&5
11753 echo "${ECHO_T}$d" >&6; }
11754      else
11755        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11756 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11757      fi
11758
11759      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11760 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11761      d=$with_xf86gamma/lib
11762      if test -d $d; then
11763        X_LIBS="-L$d $X_LIBS"
11764        { echo "$as_me:$LINENO: result: $d" >&5
11765 echo "${ECHO_T}$d" >&6; }
11766      else
11767        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11768 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11769      fi
11770
11771      # replace the directory string with "yes".
11772      with_xf86gamma_req="yes"
11773      with_xf86gamma=$with_xf86gamma_req
11774      ;;
11775
11776     *)
11777      echo ""
11778      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11779      echo "       If it is a directory, then \`DIR/include' will be added to"
11780      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11781      exit 1
11782      ;;
11783    esac
11784
11785
11786 if test "$with_xf86gamma" = yes; then
11787
11788   # first check for xf86vmode.h, if we haven't already
11789   if test "$have_xf86vmode" = yes; then
11790     have_xf86gamma=yes
11791   else
11792
11793   ac_save_CPPFLAGS="$CPPFLAGS"
11794   if test \! -z "$includedir" ; then
11795     CPPFLAGS="$CPPFLAGS -I$includedir"
11796   fi
11797   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11798   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11799   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11800 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11801 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11802   echo $ECHO_N "(cached) $ECHO_C" >&6
11803 else
11804   cat >conftest.$ac_ext <<_ACEOF
11805 /* confdefs.h.  */
11806 _ACEOF
11807 cat confdefs.h >>conftest.$ac_ext
11808 cat >>conftest.$ac_ext <<_ACEOF
11809 /* end confdefs.h.  */
11810 #include <X11/Xlib.h>
11811
11812 #include <X11/extensions/xf86vmode.h>
11813 _ACEOF
11814 rm -rf conftest.$ac_objext
11815 if { (ac_try="$ac_compile"
11816 case "(($ac_try" in
11817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11818   *) ac_try_echo=$ac_try;;
11819 esac
11820 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11821   (eval "$ac_compile") 2>conftest.er1
11822   ac_status=$?
11823   grep -v '^ *+' conftest.er1 >conftest.err
11824   rm -rf conftest.er1
11825   cat conftest.err >&5
11826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827   (exit $ac_status); } && {
11828          test -z "$ac_c_werror_flag" ||
11829          test ! -s conftest.err
11830        } && test -s conftest.$ac_objext; then
11831   ac_cv_header_X11_extensions_xf86vmode_h=yes
11832 else
11833   echo "$as_me: failed program was:" >&5
11834 sed 's/^/| /' conftest.$ac_ext >&5
11835
11836         ac_cv_header_X11_extensions_xf86vmode_h=no
11837 fi
11838
11839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11840 fi
11841 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11842 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11843 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11844   have_xf86gamma=yes
11845 fi
11846
11847
11848   CPPFLAGS="$ac_save_CPPFLAGS"
11849   fi
11850
11851   # if that succeeded, then check for the -lXxf86vm
11852   if test "$have_xf86gamma" = yes; then
11853     have_xf86gamma=no
11854
11855   ac_save_CPPFLAGS="$CPPFLAGS"
11856   ac_save_LDFLAGS="$LDFLAGS"
11857 #  ac_save_LIBS="$LIBS"
11858
11859   if test \! -z "$includedir" ; then
11860     CPPFLAGS="$CPPFLAGS -I$includedir"
11861   fi
11862   # note: $X_CFLAGS includes $x_includes
11863   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11864
11865   if test \! -z "$libdir" ; then
11866     LDFLAGS="$LDFLAGS -L$libdir"
11867   fi
11868   # note: $X_LIBS includes $x_libraries
11869   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11870
11871   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11872   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11873   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11874 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11875 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11876   echo $ECHO_N "(cached) $ECHO_C" >&6
11877 else
11878   ac_check_lib_save_LIBS=$LIBS
11879 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11880 cat >conftest.$ac_ext <<_ACEOF
11881 /* confdefs.h.  */
11882 _ACEOF
11883 cat confdefs.h >>conftest.$ac_ext
11884 cat >>conftest.$ac_ext <<_ACEOF
11885 /* end confdefs.h.  */
11886
11887 /* Override any GCC internal prototype to avoid an error.
11888    Use char because int might match the return type of a GCC
11889    builtin and then its argument prototype would still apply.  */
11890 #ifdef __cplusplus
11891 extern "C"
11892 #endif
11893 char XF86VidModeSetGamma ();
11894 int
11895 main ()
11896 {
11897 return XF86VidModeSetGamma ();
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -rf conftest.$ac_objext conftest$ac_exeext
11903 if { (ac_try="$ac_link"
11904 case "(($ac_try" in
11905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11906   *) ac_try_echo=$ac_try;;
11907 esac
11908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11909   (eval "$ac_link") 2>conftest.er1
11910   ac_status=$?
11911   grep -v '^ *+' conftest.er1 >conftest.err
11912   rm -rf conftest.er1
11913   cat conftest.err >&5
11914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915   (exit $ac_status); } && {
11916          test -z "$ac_c_werror_flag" ||
11917          test ! -s conftest.err
11918        } && test -s conftest$ac_exeext &&
11919        $as_test_x conftest$ac_exeext; then
11920   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11921 else
11922   echo "$as_me: failed program was:" >&5
11923 sed 's/^/| /' conftest.$ac_ext >&5
11924
11925         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11926 fi
11927
11928 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11929       conftest$ac_exeext conftest.$ac_ext
11930 LIBS=$ac_check_lib_save_LIBS
11931 fi
11932 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11933 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11934 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11935   have_xf86gamma=yes
11936 else
11937   true
11938 fi
11939
11940   CPPFLAGS="$ac_save_CPPFLAGS"
11941   LDFLAGS="$ac_save_LDFLAGS"
11942 #  LIBS="$ac_save_LIBS"
11943
11944   fi
11945
11946   # check for the Ramp versions of the functions too.
11947   if test "$have_xf86gamma" = yes; then
11948     have_xf86gamma_ramp=no
11949
11950   ac_save_CPPFLAGS="$CPPFLAGS"
11951   ac_save_LDFLAGS="$LDFLAGS"
11952 #  ac_save_LIBS="$LIBS"
11953
11954   if test \! -z "$includedir" ; then
11955     CPPFLAGS="$CPPFLAGS -I$includedir"
11956   fi
11957   # note: $X_CFLAGS includes $x_includes
11958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11959
11960   if test \! -z "$libdir" ; then
11961     LDFLAGS="$LDFLAGS -L$libdir"
11962   fi
11963   # note: $X_LIBS includes $x_libraries
11964   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11965
11966   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11967   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11968   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11969 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11970 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11971   echo $ECHO_N "(cached) $ECHO_C" >&6
11972 else
11973   ac_check_lib_save_LIBS=$LIBS
11974 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11975 cat >conftest.$ac_ext <<_ACEOF
11976 /* confdefs.h.  */
11977 _ACEOF
11978 cat confdefs.h >>conftest.$ac_ext
11979 cat >>conftest.$ac_ext <<_ACEOF
11980 /* end confdefs.h.  */
11981
11982 /* Override any GCC internal prototype to avoid an error.
11983    Use char because int might match the return type of a GCC
11984    builtin and then its argument prototype would still apply.  */
11985 #ifdef __cplusplus
11986 extern "C"
11987 #endif
11988 char XF86VidModeSetGammaRamp ();
11989 int
11990 main ()
11991 {
11992 return XF86VidModeSetGammaRamp ();
11993   ;
11994   return 0;
11995 }
11996 _ACEOF
11997 rm -rf conftest.$ac_objext conftest$ac_exeext
11998 if { (ac_try="$ac_link"
11999 case "(($ac_try" in
12000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12001   *) ac_try_echo=$ac_try;;
12002 esac
12003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12004   (eval "$ac_link") 2>conftest.er1
12005   ac_status=$?
12006   grep -v '^ *+' conftest.er1 >conftest.err
12007   rm -rf conftest.er1
12008   cat conftest.err >&5
12009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010   (exit $ac_status); } && {
12011          test -z "$ac_c_werror_flag" ||
12012          test ! -s conftest.err
12013        } && test -s conftest$ac_exeext &&
12014        $as_test_x conftest$ac_exeext; then
12015   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12016 else
12017   echo "$as_me: failed program was:" >&5
12018 sed 's/^/| /' conftest.$ac_ext >&5
12019
12020         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12021 fi
12022
12023 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12024       conftest$ac_exeext conftest.$ac_ext
12025 LIBS=$ac_check_lib_save_LIBS
12026 fi
12027 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12028 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12029 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12030   have_xf86gamma_ramp=yes
12031 else
12032   true
12033 fi
12034
12035   CPPFLAGS="$ac_save_CPPFLAGS"
12036   LDFLAGS="$ac_save_LDFLAGS"
12037 #  LIBS="$ac_save_LIBS"
12038
12039   fi
12040
12041   # if those tests succeeded, then we've really got the functions.
12042   if test "$have_xf86gamma" = yes; then
12043     cat >>confdefs.h <<\_ACEOF
12044 #define HAVE_XF86VMODE_GAMMA 1
12045 _ACEOF
12046
12047   fi
12048
12049   if test "$have_xf86gamma_ramp" = yes; then
12050     cat >>confdefs.h <<\_ACEOF
12051 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12052 _ACEOF
12053
12054   fi
12055
12056   # pull in the lib, if we haven't already
12057   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12058     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12059   fi
12060
12061 elif test "$with_xf86gamma" != no; then
12062   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12063   exit 1
12064 fi
12065
12066
12067 ###############################################################################
12068 #
12069 #       Check for the RANDR (Resize and Rotate) server extension.
12070 #
12071 #       We need this to detect when the resolution of the desktop
12072 #       has changed out from under us (this is a newer, different
12073 #       mechanism than the XF86VMODE virtual viewports.)
12074 #
12075 ###############################################################################
12076
12077 have_randr=no
12078 with_randr_req=unspecified
12079
12080 # Check whether --with-randr-ext was given.
12081 if test "${with_randr_ext+set}" = set; then
12082   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12083 else
12084   with_randr=yes
12085 fi
12086
12087
12088
12089    case "$with_randr" in
12090     yes) ;;
12091     no)  ;;
12092
12093     /*)
12094      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12095 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12096      d=$with_randr/include
12097      if test -d $d; then
12098        X_CFLAGS="-I$d $X_CFLAGS"
12099        { echo "$as_me:$LINENO: result: $d" >&5
12100 echo "${ECHO_T}$d" >&6; }
12101      else
12102        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12103 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12104      fi
12105
12106      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12107 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12108      d=$with_randr/lib
12109      if test -d $d; then
12110        X_LIBS="-L$d $X_LIBS"
12111        { echo "$as_me:$LINENO: result: $d" >&5
12112 echo "${ECHO_T}$d" >&6; }
12113      else
12114        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12115 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12116      fi
12117
12118      # replace the directory string with "yes".
12119      with_randr_req="yes"
12120      with_randr=$with_randr_req
12121      ;;
12122
12123     *)
12124      echo ""
12125      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12126      echo "       If it is a directory, then \`DIR/include' will be added to"
12127      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12128      exit 1
12129      ;;
12130    esac
12131
12132
12133 if test "$with_randr" = yes; then
12134
12135   # first check for Xrandr.h
12136
12137   ac_save_CPPFLAGS="$CPPFLAGS"
12138   if test \! -z "$includedir" ; then
12139     CPPFLAGS="$CPPFLAGS -I$includedir"
12140   fi
12141   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12142   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12143   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12144 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12145 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12146   echo $ECHO_N "(cached) $ECHO_C" >&6
12147 else
12148   cat >conftest.$ac_ext <<_ACEOF
12149 /* confdefs.h.  */
12150 _ACEOF
12151 cat confdefs.h >>conftest.$ac_ext
12152 cat >>conftest.$ac_ext <<_ACEOF
12153 /* end confdefs.h.  */
12154 #include <X11/Xlib.h>
12155
12156 #include <X11/extensions/Xrandr.h>
12157 _ACEOF
12158 rm -rf conftest.$ac_objext
12159 if { (ac_try="$ac_compile"
12160 case "(($ac_try" in
12161   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162   *) ac_try_echo=$ac_try;;
12163 esac
12164 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12165   (eval "$ac_compile") 2>conftest.er1
12166   ac_status=$?
12167   grep -v '^ *+' conftest.er1 >conftest.err
12168   rm -rf conftest.er1
12169   cat conftest.err >&5
12170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171   (exit $ac_status); } && {
12172          test -z "$ac_c_werror_flag" ||
12173          test ! -s conftest.err
12174        } && test -s conftest.$ac_objext; then
12175   ac_cv_header_X11_extensions_Xrandr_h=yes
12176 else
12177   echo "$as_me: failed program was:" >&5
12178 sed 's/^/| /' conftest.$ac_ext >&5
12179
12180         ac_cv_header_X11_extensions_Xrandr_h=no
12181 fi
12182
12183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12184 fi
12185 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12186 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12187 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12188   have_randr=yes
12189 fi
12190
12191
12192   CPPFLAGS="$ac_save_CPPFLAGS"
12193
12194   # if that succeeded, then check for the XRR code in the libraries
12195   if test "$have_randr" = yes; then
12196
12197     # RANDR probably needs -lXrender
12198     xrender_libs=
12199
12200   ac_save_CPPFLAGS="$CPPFLAGS"
12201   ac_save_LDFLAGS="$LDFLAGS"
12202 #  ac_save_LIBS="$LIBS"
12203
12204   if test \! -z "$includedir" ; then
12205     CPPFLAGS="$CPPFLAGS -I$includedir"
12206   fi
12207   # note: $X_CFLAGS includes $x_includes
12208   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12209
12210   if test \! -z "$libdir" ; then
12211     LDFLAGS="$LDFLAGS -L$libdir"
12212   fi
12213   # note: $X_LIBS includes $x_libraries
12214   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12215
12216   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12217   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12218   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12219 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12220 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12221   echo $ECHO_N "(cached) $ECHO_C" >&6
12222 else
12223   ac_check_lib_save_LIBS=$LIBS
12224 LIBS="-lXrender -lXext -lX11 $LIBS"
12225 cat >conftest.$ac_ext <<_ACEOF
12226 /* confdefs.h.  */
12227 _ACEOF
12228 cat confdefs.h >>conftest.$ac_ext
12229 cat >>conftest.$ac_ext <<_ACEOF
12230 /* end confdefs.h.  */
12231
12232 /* Override any GCC internal prototype to avoid an error.
12233    Use char because int might match the return type of a GCC
12234    builtin and then its argument prototype would still apply.  */
12235 #ifdef __cplusplus
12236 extern "C"
12237 #endif
12238 char XRenderSetSubpixelOrder ();
12239 int
12240 main ()
12241 {
12242 return XRenderSetSubpixelOrder ();
12243   ;
12244   return 0;
12245 }
12246 _ACEOF
12247 rm -rf conftest.$ac_objext conftest$ac_exeext
12248 if { (ac_try="$ac_link"
12249 case "(($ac_try" in
12250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12251   *) ac_try_echo=$ac_try;;
12252 esac
12253 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12254   (eval "$ac_link") 2>conftest.er1
12255   ac_status=$?
12256   grep -v '^ *+' conftest.er1 >conftest.err
12257   rm -rf conftest.er1
12258   cat conftest.err >&5
12259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12260   (exit $ac_status); } && {
12261          test -z "$ac_c_werror_flag" ||
12262          test ! -s conftest.err
12263        } && test -s conftest$ac_exeext &&
12264        $as_test_x conftest$ac_exeext; then
12265   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12266 else
12267   echo "$as_me: failed program was:" >&5
12268 sed 's/^/| /' conftest.$ac_ext >&5
12269
12270         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12271 fi
12272
12273 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12274       conftest$ac_exeext conftest.$ac_ext
12275 LIBS=$ac_check_lib_save_LIBS
12276 fi
12277 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12278 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12279 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12280   xrender_libs="-lXrender"
12281 else
12282   true
12283 fi
12284
12285   CPPFLAGS="$ac_save_CPPFLAGS"
12286   LDFLAGS="$ac_save_LDFLAGS"
12287 #  LIBS="$ac_save_LIBS"
12288
12289
12290     # first look for RANDR in -lXext
12291     have_randr=no
12292
12293   ac_save_CPPFLAGS="$CPPFLAGS"
12294   ac_save_LDFLAGS="$LDFLAGS"
12295 #  ac_save_LIBS="$LIBS"
12296
12297   if test \! -z "$includedir" ; then
12298     CPPFLAGS="$CPPFLAGS -I$includedir"
12299   fi
12300   # note: $X_CFLAGS includes $x_includes
12301   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12302
12303   if test \! -z "$libdir" ; then
12304     LDFLAGS="$LDFLAGS -L$libdir"
12305   fi
12306   # note: $X_LIBS includes $x_libraries
12307   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12308
12309   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12310   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12311   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12312 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12313 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12314   echo $ECHO_N "(cached) $ECHO_C" >&6
12315 else
12316   ac_check_lib_save_LIBS=$LIBS
12317 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12318 cat >conftest.$ac_ext <<_ACEOF
12319 /* confdefs.h.  */
12320 _ACEOF
12321 cat confdefs.h >>conftest.$ac_ext
12322 cat >>conftest.$ac_ext <<_ACEOF
12323 /* end confdefs.h.  */
12324
12325 /* Override any GCC internal prototype to avoid an error.
12326    Use char because int might match the return type of a GCC
12327    builtin and then its argument prototype would still apply.  */
12328 #ifdef __cplusplus
12329 extern "C"
12330 #endif
12331 char XRRGetScreenInfo ();
12332 int
12333 main ()
12334 {
12335 return XRRGetScreenInfo ();
12336   ;
12337   return 0;
12338 }
12339 _ACEOF
12340 rm -rf conftest.$ac_objext conftest$ac_exeext
12341 if { (ac_try="$ac_link"
12342 case "(($ac_try" in
12343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12344   *) ac_try_echo=$ac_try;;
12345 esac
12346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12347   (eval "$ac_link") 2>conftest.er1
12348   ac_status=$?
12349   grep -v '^ *+' conftest.er1 >conftest.err
12350   rm -rf conftest.er1
12351   cat conftest.err >&5
12352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353   (exit $ac_status); } && {
12354          test -z "$ac_c_werror_flag" ||
12355          test ! -s conftest.err
12356        } && test -s conftest$ac_exeext &&
12357        $as_test_x conftest$ac_exeext; then
12358   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12359 else
12360   echo "$as_me: failed program was:" >&5
12361 sed 's/^/| /' conftest.$ac_ext >&5
12362
12363         ac_cv_lib_Xext_XRRGetScreenInfo=no
12364 fi
12365
12366 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12367       conftest$ac_exeext conftest.$ac_ext
12368 LIBS=$ac_check_lib_save_LIBS
12369 fi
12370 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12371 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12372 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12373   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12374 else
12375   true
12376 fi
12377
12378   CPPFLAGS="$ac_save_CPPFLAGS"
12379   LDFLAGS="$ac_save_LDFLAGS"
12380 #  LIBS="$ac_save_LIBS"
12381
12382
12383     # if that failed, look in -lXrandr
12384     if test "$have_randr" = no; then
12385
12386   ac_save_CPPFLAGS="$CPPFLAGS"
12387   ac_save_LDFLAGS="$LDFLAGS"
12388 #  ac_save_LIBS="$LIBS"
12389
12390   if test \! -z "$includedir" ; then
12391     CPPFLAGS="$CPPFLAGS -I$includedir"
12392   fi
12393   # note: $X_CFLAGS includes $x_includes
12394   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12395
12396   if test \! -z "$libdir" ; then
12397     LDFLAGS="$LDFLAGS -L$libdir"
12398   fi
12399   # note: $X_LIBS includes $x_libraries
12400   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12401
12402   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12403   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12404   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12405 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12406 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12407   echo $ECHO_N "(cached) $ECHO_C" >&6
12408 else
12409   ac_check_lib_save_LIBS=$LIBS
12410 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12411 cat >conftest.$ac_ext <<_ACEOF
12412 /* confdefs.h.  */
12413 _ACEOF
12414 cat confdefs.h >>conftest.$ac_ext
12415 cat >>conftest.$ac_ext <<_ACEOF
12416 /* end confdefs.h.  */
12417
12418 /* Override any GCC internal prototype to avoid an error.
12419    Use char because int might match the return type of a GCC
12420    builtin and then its argument prototype would still apply.  */
12421 #ifdef __cplusplus
12422 extern "C"
12423 #endif
12424 char XRRGetScreenInfo ();
12425 int
12426 main ()
12427 {
12428 return XRRGetScreenInfo ();
12429   ;
12430   return 0;
12431 }
12432 _ACEOF
12433 rm -rf conftest.$ac_objext conftest$ac_exeext
12434 if { (ac_try="$ac_link"
12435 case "(($ac_try" in
12436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12437   *) ac_try_echo=$ac_try;;
12438 esac
12439 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12440   (eval "$ac_link") 2>conftest.er1
12441   ac_status=$?
12442   grep -v '^ *+' conftest.er1 >conftest.err
12443   rm -rf conftest.er1
12444   cat conftest.err >&5
12445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12446   (exit $ac_status); } && {
12447          test -z "$ac_c_werror_flag" ||
12448          test ! -s conftest.err
12449        } && test -s conftest$ac_exeext &&
12450        $as_test_x conftest$ac_exeext; then
12451   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12452 else
12453   echo "$as_me: failed program was:" >&5
12454 sed 's/^/| /' conftest.$ac_ext >&5
12455
12456         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12457 fi
12458
12459 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12460       conftest$ac_exeext conftest.$ac_ext
12461 LIBS=$ac_check_lib_save_LIBS
12462 fi
12463 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12464 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12465 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12466   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12467 else
12468   true
12469 fi
12470
12471   CPPFLAGS="$ac_save_CPPFLAGS"
12472   LDFLAGS="$ac_save_LDFLAGS"
12473 #  LIBS="$ac_save_LIBS"
12474
12475     fi
12476   fi
12477
12478   # if that succeeded, then we've really got it.
12479   if test "$have_randr" = yes; then
12480     cat >>confdefs.h <<\_ACEOF
12481 #define HAVE_RANDR 1
12482 _ACEOF
12483
12484
12485     # Now check for version 1.2 in the same libs.
12486
12487   ac_save_CPPFLAGS="$CPPFLAGS"
12488   ac_save_LDFLAGS="$LDFLAGS"
12489 #  ac_save_LIBS="$LIBS"
12490
12491   if test \! -z "$includedir" ; then
12492     CPPFLAGS="$CPPFLAGS -I$includedir"
12493   fi
12494   # note: $X_CFLAGS includes $x_includes
12495   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12496
12497   if test \! -z "$libdir" ; then
12498     LDFLAGS="$LDFLAGS -L$libdir"
12499   fi
12500   # note: $X_LIBS includes $x_libraries
12501   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12502
12503   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12504   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12505   { echo "$as_me:$LINENO: checking for XRRGetOutputInfo in -lc" >&5
12506 echo $ECHO_N "checking for XRRGetOutputInfo in -lc... $ECHO_C" >&6; }
12507 if test "${ac_cv_lib_c_XRRGetOutputInfo+set}" = set; then
12508   echo $ECHO_N "(cached) $ECHO_C" >&6
12509 else
12510   ac_check_lib_save_LIBS=$LIBS
12511 LIBS="-lc $SAVER_LIBS $LIBS"
12512 cat >conftest.$ac_ext <<_ACEOF
12513 /* confdefs.h.  */
12514 _ACEOF
12515 cat confdefs.h >>conftest.$ac_ext
12516 cat >>conftest.$ac_ext <<_ACEOF
12517 /* end confdefs.h.  */
12518
12519 /* Override any GCC internal prototype to avoid an error.
12520    Use char because int might match the return type of a GCC
12521    builtin and then its argument prototype would still apply.  */
12522 #ifdef __cplusplus
12523 extern "C"
12524 #endif
12525 char XRRGetOutputInfo ();
12526 int
12527 main ()
12528 {
12529 return XRRGetOutputInfo ();
12530   ;
12531   return 0;
12532 }
12533 _ACEOF
12534 rm -rf conftest.$ac_objext conftest$ac_exeext
12535 if { (ac_try="$ac_link"
12536 case "(($ac_try" in
12537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12538   *) ac_try_echo=$ac_try;;
12539 esac
12540 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12541   (eval "$ac_link") 2>conftest.er1
12542   ac_status=$?
12543   grep -v '^ *+' conftest.er1 >conftest.err
12544   rm -rf conftest.er1
12545   cat conftest.err >&5
12546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547   (exit $ac_status); } && {
12548          test -z "$ac_c_werror_flag" ||
12549          test ! -s conftest.err
12550        } && test -s conftest$ac_exeext &&
12551        $as_test_x conftest$ac_exeext; then
12552   ac_cv_lib_c_XRRGetOutputInfo=yes
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 sed 's/^/| /' conftest.$ac_ext >&5
12556
12557         ac_cv_lib_c_XRRGetOutputInfo=no
12558 fi
12559
12560 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12561       conftest$ac_exeext conftest.$ac_ext
12562 LIBS=$ac_check_lib_save_LIBS
12563 fi
12564 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_XRRGetOutputInfo" >&5
12565 echo "${ECHO_T}$ac_cv_lib_c_XRRGetOutputInfo" >&6; }
12566 if test $ac_cv_lib_c_XRRGetOutputInfo = yes; then
12567   cat >>confdefs.h <<\_ACEOF
12568 #define HAVE_RANDR_12 1
12569 _ACEOF
12570
12571 else
12572   true
12573 fi
12574
12575   CPPFLAGS="$ac_save_CPPFLAGS"
12576   LDFLAGS="$ac_save_LDFLAGS"
12577 #  LIBS="$ac_save_LIBS"
12578
12579   fi
12580
12581
12582 elif test "$with_randr" != no; then
12583   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12584   exit 1
12585 fi
12586
12587
12588 ###############################################################################
12589 #
12590 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12591 #       using other XF86 stuff.)
12592 #
12593 ###############################################################################
12594
12595 have_xf86miscsetgrabkeysstate=no
12596 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12597
12598   ac_save_CPPFLAGS="$CPPFLAGS"
12599   ac_save_LDFLAGS="$LDFLAGS"
12600 #  ac_save_LIBS="$LIBS"
12601
12602   if test \! -z "$includedir" ; then
12603     CPPFLAGS="$CPPFLAGS -I$includedir"
12604   fi
12605   # note: $X_CFLAGS includes $x_includes
12606   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12607
12608   if test \! -z "$libdir" ; then
12609     LDFLAGS="$LDFLAGS -L$libdir"
12610   fi
12611   # note: $X_LIBS includes $x_libraries
12612   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12613
12614   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12615   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12616   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12617 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12618 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12619   echo $ECHO_N "(cached) $ECHO_C" >&6
12620 else
12621   ac_check_lib_save_LIBS=$LIBS
12622 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12623 cat >conftest.$ac_ext <<_ACEOF
12624 /* confdefs.h.  */
12625 _ACEOF
12626 cat confdefs.h >>conftest.$ac_ext
12627 cat >>conftest.$ac_ext <<_ACEOF
12628 /* end confdefs.h.  */
12629
12630 /* Override any GCC internal prototype to avoid an error.
12631    Use char because int might match the return type of a GCC
12632    builtin and then its argument prototype would still apply.  */
12633 #ifdef __cplusplus
12634 extern "C"
12635 #endif
12636 char XF86MiscSetGrabKeysState ();
12637 int
12638 main ()
12639 {
12640 return XF86MiscSetGrabKeysState ();
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -rf conftest.$ac_objext conftest$ac_exeext
12646 if { (ac_try="$ac_link"
12647 case "(($ac_try" in
12648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12649   *) ac_try_echo=$ac_try;;
12650 esac
12651 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12652   (eval "$ac_link") 2>conftest.er1
12653   ac_status=$?
12654   grep -v '^ *+' conftest.er1 >conftest.err
12655   rm -rf conftest.er1
12656   cat conftest.err >&5
12657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658   (exit $ac_status); } && {
12659          test -z "$ac_c_werror_flag" ||
12660          test ! -s conftest.err
12661        } && test -s conftest$ac_exeext &&
12662        $as_test_x conftest$ac_exeext; then
12663   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12664 else
12665   echo "$as_me: failed program was:" >&5
12666 sed 's/^/| /' conftest.$ac_ext >&5
12667
12668         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12669 fi
12670
12671 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12672       conftest$ac_exeext conftest.$ac_ext
12673 LIBS=$ac_check_lib_save_LIBS
12674 fi
12675 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12676 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12677 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12678   have_xf86miscsetgrabkeysstate=yes
12679 else
12680   true
12681 fi
12682
12683   CPPFLAGS="$ac_save_CPPFLAGS"
12684   LDFLAGS="$ac_save_LDFLAGS"
12685 #  LIBS="$ac_save_LIBS"
12686
12687   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12688     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12689     cat >>confdefs.h <<\_ACEOF
12690 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12691 _ACEOF
12692
12693   fi
12694 fi
12695
12696
12697 ###############################################################################
12698 #
12699 #       Check for HP XHPDisableReset and XHPEnableReset.
12700 #
12701 ###############################################################################
12702
12703 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12704 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12705
12706   ac_save_CPPFLAGS="$CPPFLAGS"
12707   if test \! -z "$includedir" ; then
12708     CPPFLAGS="$CPPFLAGS -I$includedir"
12709   fi
12710   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12711   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12712   cat >conftest.$ac_ext <<_ACEOF
12713 /* confdefs.h.  */
12714 _ACEOF
12715 cat confdefs.h >>conftest.$ac_ext
12716 cat >>conftest.$ac_ext <<_ACEOF
12717 /* end confdefs.h.  */
12718 #include <X11/XHPlib.h>
12719
12720 _ACEOF
12721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12722   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12723   cat >>confdefs.h <<\_ACEOF
12724 #define HAVE_XHPDISABLERESET 1
12725 _ACEOF
12726
12727                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12728                    { echo "$as_me:$LINENO: result: yes" >&5
12729 echo "${ECHO_T}yes" >&6; }
12730 else
12731   { echo "$as_me:$LINENO: result: no" >&5
12732 echo "${ECHO_T}no" >&6; }
12733 fi
12734 rm -rf conftest*
12735
12736   CPPFLAGS="$ac_save_CPPFLAGS"
12737
12738
12739 ###############################################################################
12740 #
12741 #       Check for /proc/interrupts.
12742 #
12743 ###############################################################################
12744
12745 have_proc_interrupts=no
12746 with_proc_interrupts_req=unspecified
12747
12748 # Check whether --with-proc-interrupts was given.
12749 if test "${with_proc_interrupts+set}" = set; then
12750   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12751 else
12752   with_proc_interrupts=yes
12753 fi
12754
12755
12756 if test "$with_proc_interrupts" = yes; then
12757
12758   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12759   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12760   # check that it has the bits we need, but otherwise we'll just go on faith.
12761   #
12762   have_proc_interrupts=yes
12763
12764   if test -f /proc/interrupts; then
12765    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12766 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12767 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12768   echo $ECHO_N "(cached) $ECHO_C" >&6
12769 else
12770   ac_cv_have_proc_interrupts=no
12771      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12772        ac_cv_have_proc_interrupts=yes
12773      fi
12774
12775 fi
12776 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12777 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12778    have_proc_interrupts=$ac_cv_have_proc_interrupts
12779   fi
12780
12781   if test "$have_proc_interrupts" = yes; then
12782     cat >>confdefs.h <<\_ACEOF
12783 #define HAVE_PROC_INTERRUPTS 1
12784 _ACEOF
12785
12786   fi
12787
12788 elif test "$with_proc_interrupts" != no; then
12789   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12790   exit 1
12791 fi
12792
12793
12794 ###############################################################################
12795 #
12796 #       The --enable-locking option
12797 #
12798 ###############################################################################
12799
12800 # Check whether --enable-locking was given.
12801 if test "${enable_locking+set}" = set; then
12802   enableval=$enable_locking; enable_locking="$enableval"
12803 else
12804   if test "$ac_macosx" = yes; then
12805     # We can't lock on MacOS X, so default to not compiling in support for it.
12806     # But allow --enable-locking to override that, so I can debug Linux locking
12807     # under MacOS X11.
12808     enable_locking=no
12809    else
12810     enable_locking=yes
12811    fi
12812 fi
12813
12814 if test "$enable_locking" = yes; then
12815   true
12816 elif test "$enable_locking" = no; then
12817   cat >>confdefs.h <<\_ACEOF
12818 #define NO_LOCKING 1
12819 _ACEOF
12820
12821 else
12822   echo "error: must be yes or no: --enable-locking=$enable_locking"
12823   exit 1
12824 fi
12825
12826
12827 ###############################################################################
12828 #
12829 #       Whether to allow root password to unblank.
12830 #
12831 ###############################################################################
12832 # Check whether --enable-root-passwd was given.
12833 if test "${enable_root_passwd+set}" = set; then
12834   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12835 else
12836   enable_root_passwd=yes
12837 fi
12838
12839 if test "$enable_root_passwd" = yes; then
12840   cat >>confdefs.h <<\_ACEOF
12841 #define ALLOW_ROOT_PASSWD 1
12842 _ACEOF
12843
12844   true
12845 elif test "$enable_root_passwd" != no; then
12846   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12847   exit 1
12848 fi
12849
12850 ###############################################################################
12851 #
12852 #       Check for PAM.
12853 #
12854 ###############################################################################
12855
12856 case "$host" in
12857   *-solaris*)
12858    # Solaris systems tend to come with PAM misconfigured.
12859    #  Don't build it by default, even if the headers exist.
12860    with_pam_default=no
12861    ;;
12862   *)
12863    # Default to building PAM support on all other systems, if it exists.
12864    with_pam_default=yes
12865   ;;
12866 esac
12867
12868 have_pam=no
12869 with_pam_req=unspecified
12870
12871
12872 # Check whether --with-pam was given.
12873 if test "${with_pam+set}" = set; then
12874   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12875 else
12876   with_pam=$with_pam_default
12877 fi
12878
12879
12880
12881 # Check whether --with-pam_service_name was given.
12882 if test "${with_pam_service_name+set}" = set; then
12883   withval=$with_pam_service_name; pam_service_name="$withval"
12884 else
12885   pam_service_name="xscreensaver"
12886 fi
12887
12888
12889
12890    case "$with_pam" in
12891     yes) ;;
12892     no)  ;;
12893
12894     /*)
12895      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12896 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12897      d=$with_pam/include
12898      if test -d $d; then
12899        X_CFLAGS="-I$d $X_CFLAGS"
12900        { echo "$as_me:$LINENO: result: $d" >&5
12901 echo "${ECHO_T}$d" >&6; }
12902      else
12903        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12904 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12905      fi
12906
12907      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12908 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12909      d=$with_pam/lib
12910      if test -d $d; then
12911        X_LIBS="-L$d $X_LIBS"
12912        { echo "$as_me:$LINENO: result: $d" >&5
12913 echo "${ECHO_T}$d" >&6; }
12914      else
12915        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12916 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12917      fi
12918
12919      # replace the directory string with "yes".
12920      with_pam_req="yes"
12921      with_pam=$with_pam_req
12922      ;;
12923
12924     *)
12925      echo ""
12926      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12927      echo "       If it is a directory, then \`DIR/include' will be added to"
12928      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12929      exit 1
12930      ;;
12931    esac
12932
12933
12934 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12935   { echo "$as_me:$LINENO: checking for PAM" >&5
12936 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12937 if test "${ac_cv_pam+set}" = set; then
12938   echo $ECHO_N "(cached) $ECHO_C" >&6
12939 else
12940
12941   ac_save_CPPFLAGS="$CPPFLAGS"
12942   if test \! -z "$includedir" ; then
12943     CPPFLAGS="$CPPFLAGS -I$includedir"
12944   fi
12945   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12946   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12947   cat >conftest.$ac_ext <<_ACEOF
12948 /* confdefs.h.  */
12949 _ACEOF
12950 cat confdefs.h >>conftest.$ac_ext
12951 cat >>conftest.$ac_ext <<_ACEOF
12952 /* end confdefs.h.  */
12953 #include <security/pam_appl.h>
12954 int
12955 main ()
12956 {
12957
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -rf conftest.$ac_objext
12963 if { (ac_try="$ac_compile"
12964 case "(($ac_try" in
12965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12966   *) ac_try_echo=$ac_try;;
12967 esac
12968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12969   (eval "$ac_compile") 2>conftest.er1
12970   ac_status=$?
12971   grep -v '^ *+' conftest.er1 >conftest.err
12972   rm -rf conftest.er1
12973   cat conftest.err >&5
12974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975   (exit $ac_status); } && {
12976          test -z "$ac_c_werror_flag" ||
12977          test ! -s conftest.err
12978        } && test -s conftest.$ac_objext; then
12979   ac_cv_pam=yes
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 sed 's/^/| /' conftest.$ac_ext >&5
12983
12984         ac_cv_pam=no
12985 fi
12986
12987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12988   CPPFLAGS="$ac_save_CPPFLAGS"
12989 fi
12990 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12991 echo "${ECHO_T}$ac_cv_pam" >&6; }
12992   if test "$ac_cv_pam" = yes ; then
12993     have_pam=yes
12994     cat >>confdefs.h <<\_ACEOF
12995 #define HAVE_PAM 1
12996 _ACEOF
12997
12998     cat >>confdefs.h <<_ACEOF
12999 #define PAM_SERVICE_NAME "$pam_service_name"
13000 _ACEOF
13001
13002
13003     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13004
13005     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13006     # those are in libc.  On Linux and Solaris, they're in libdl.
13007     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13008 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13009 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13010   echo $ECHO_N "(cached) $ECHO_C" >&6
13011 else
13012   ac_check_lib_save_LIBS=$LIBS
13013 LIBS="-ldl  $LIBS"
13014 cat >conftest.$ac_ext <<_ACEOF
13015 /* confdefs.h.  */
13016 _ACEOF
13017 cat confdefs.h >>conftest.$ac_ext
13018 cat >>conftest.$ac_ext <<_ACEOF
13019 /* end confdefs.h.  */
13020
13021 /* Override any GCC internal prototype to avoid an error.
13022    Use char because int might match the return type of a GCC
13023    builtin and then its argument prototype would still apply.  */
13024 #ifdef __cplusplus
13025 extern "C"
13026 #endif
13027 char dlopen ();
13028 int
13029 main ()
13030 {
13031 return dlopen ();
13032   ;
13033   return 0;
13034 }
13035 _ACEOF
13036 rm -rf conftest.$ac_objext conftest$ac_exeext
13037 if { (ac_try="$ac_link"
13038 case "(($ac_try" in
13039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13040   *) ac_try_echo=$ac_try;;
13041 esac
13042 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13043   (eval "$ac_link") 2>conftest.er1
13044   ac_status=$?
13045   grep -v '^ *+' conftest.er1 >conftest.err
13046   rm -rf conftest.er1
13047   cat conftest.err >&5
13048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049   (exit $ac_status); } && {
13050          test -z "$ac_c_werror_flag" ||
13051          test ! -s conftest.err
13052        } && test -s conftest$ac_exeext &&
13053        $as_test_x conftest$ac_exeext; then
13054   ac_cv_lib_dl_dlopen=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057 sed 's/^/| /' conftest.$ac_ext >&5
13058
13059         ac_cv_lib_dl_dlopen=no
13060 fi
13061
13062 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13063       conftest$ac_exeext conftest.$ac_ext
13064 LIBS=$ac_check_lib_save_LIBS
13065 fi
13066 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13067 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13068 if test $ac_cv_lib_dl_dlopen = yes; then
13069   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13070 fi
13071
13072
13073     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13074     have_timedwait=no
13075     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13076 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13077 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13078   echo $ECHO_N "(cached) $ECHO_C" >&6
13079 else
13080   ac_check_lib_save_LIBS=$LIBS
13081 LIBS="-lc  $LIBS"
13082 cat >conftest.$ac_ext <<_ACEOF
13083 /* confdefs.h.  */
13084 _ACEOF
13085 cat confdefs.h >>conftest.$ac_ext
13086 cat >>conftest.$ac_ext <<_ACEOF
13087 /* end confdefs.h.  */
13088
13089 /* Override any GCC internal prototype to avoid an error.
13090    Use char because int might match the return type of a GCC
13091    builtin and then its argument prototype would still apply.  */
13092 #ifdef __cplusplus
13093 extern "C"
13094 #endif
13095 char sigtimedwait ();
13096 int
13097 main ()
13098 {
13099 return sigtimedwait ();
13100   ;
13101   return 0;
13102 }
13103 _ACEOF
13104 rm -rf conftest.$ac_objext conftest$ac_exeext
13105 if { (ac_try="$ac_link"
13106 case "(($ac_try" in
13107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13108   *) ac_try_echo=$ac_try;;
13109 esac
13110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13111   (eval "$ac_link") 2>conftest.er1
13112   ac_status=$?
13113   grep -v '^ *+' conftest.er1 >conftest.err
13114   rm -rf conftest.er1
13115   cat conftest.err >&5
13116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117   (exit $ac_status); } && {
13118          test -z "$ac_c_werror_flag" ||
13119          test ! -s conftest.err
13120        } && test -s conftest$ac_exeext &&
13121        $as_test_x conftest$ac_exeext; then
13122   ac_cv_lib_c_sigtimedwait=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 sed 's/^/| /' conftest.$ac_ext >&5
13126
13127         ac_cv_lib_c_sigtimedwait=no
13128 fi
13129
13130 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13131       conftest$ac_exeext conftest.$ac_ext
13132 LIBS=$ac_check_lib_save_LIBS
13133 fi
13134 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13135 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13136 if test $ac_cv_lib_c_sigtimedwait = yes; then
13137   have_timedwait=yes
13138                   cat >>confdefs.h <<\_ACEOF
13139 #define HAVE_SIGTIMEDWAIT 1
13140 _ACEOF
13141
13142 fi
13143
13144     if test "$have_timedwait" = no ; then
13145       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13146 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13147 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13148   echo $ECHO_N "(cached) $ECHO_C" >&6
13149 else
13150   ac_check_lib_save_LIBS=$LIBS
13151 LIBS="-lrt  $LIBS"
13152 cat >conftest.$ac_ext <<_ACEOF
13153 /* confdefs.h.  */
13154 _ACEOF
13155 cat confdefs.h >>conftest.$ac_ext
13156 cat >>conftest.$ac_ext <<_ACEOF
13157 /* end confdefs.h.  */
13158
13159 /* Override any GCC internal prototype to avoid an error.
13160    Use char because int might match the return type of a GCC
13161    builtin and then its argument prototype would still apply.  */
13162 #ifdef __cplusplus
13163 extern "C"
13164 #endif
13165 char sigtimedwait ();
13166 int
13167 main ()
13168 {
13169 return sigtimedwait ();
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 rm -rf conftest.$ac_objext conftest$ac_exeext
13175 if { (ac_try="$ac_link"
13176 case "(($ac_try" in
13177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13178   *) ac_try_echo=$ac_try;;
13179 esac
13180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13181   (eval "$ac_link") 2>conftest.er1
13182   ac_status=$?
13183   grep -v '^ *+' conftest.er1 >conftest.err
13184   rm -rf conftest.er1
13185   cat conftest.err >&5
13186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187   (exit $ac_status); } && {
13188          test -z "$ac_c_werror_flag" ||
13189          test ! -s conftest.err
13190        } && test -s conftest$ac_exeext &&
13191        $as_test_x conftest$ac_exeext; then
13192   ac_cv_lib_rt_sigtimedwait=yes
13193 else
13194   echo "$as_me: failed program was:" >&5
13195 sed 's/^/| /' conftest.$ac_ext >&5
13196
13197         ac_cv_lib_rt_sigtimedwait=no
13198 fi
13199
13200 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13201       conftest$ac_exeext conftest.$ac_ext
13202 LIBS=$ac_check_lib_save_LIBS
13203 fi
13204 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13205 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13206 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13207   have_timedwait=yes
13208                                       cat >>confdefs.h <<\_ACEOF
13209 #define HAVE_SIGTIMEDWAIT 1
13210 _ACEOF
13211
13212                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13213 fi
13214
13215     fi
13216
13217     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13218 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13219     if test "${ac_cv_pam_strerror_args+set}" = set; then
13220   echo $ECHO_N "(cached) $ECHO_C" >&6
13221 else
13222
13223   ac_save_CPPFLAGS="$CPPFLAGS"
13224   if test \! -z "$includedir" ; then
13225     CPPFLAGS="$CPPFLAGS -I$includedir"
13226   fi
13227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13228   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13229   cat >conftest.$ac_ext <<_ACEOF
13230 /* confdefs.h.  */
13231 _ACEOF
13232 cat confdefs.h >>conftest.$ac_ext
13233 cat >>conftest.$ac_ext <<_ACEOF
13234 /* end confdefs.h.  */
13235 #include <stdio.h>
13236                         #include <stdlib.h>
13237                         #include <security/pam_appl.h>
13238 int
13239 main ()
13240 {
13241 pam_handle_t *pamh = 0;
13242                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13243   ;
13244   return 0;
13245 }
13246 _ACEOF
13247 rm -rf conftest.$ac_objext
13248 if { (ac_try="$ac_compile"
13249 case "(($ac_try" in
13250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13251   *) ac_try_echo=$ac_try;;
13252 esac
13253 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13254   (eval "$ac_compile") 2>conftest.er1
13255   ac_status=$?
13256   grep -v '^ *+' conftest.er1 >conftest.err
13257   rm -rf conftest.er1
13258   cat conftest.err >&5
13259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260   (exit $ac_status); } && {
13261          test -z "$ac_c_werror_flag" ||
13262          test ! -s conftest.err
13263        } && test -s conftest.$ac_objext; then
13264   ac_pam_strerror_args=2
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 sed 's/^/| /' conftest.$ac_ext >&5
13268
13269
13270   ac_save_CPPFLAGS="$CPPFLAGS"
13271   if test \! -z "$includedir" ; then
13272     CPPFLAGS="$CPPFLAGS -I$includedir"
13273   fi
13274   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13275   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13276   cat >conftest.$ac_ext <<_ACEOF
13277 /* confdefs.h.  */
13278 _ACEOF
13279 cat confdefs.h >>conftest.$ac_ext
13280 cat >>conftest.$ac_ext <<_ACEOF
13281 /* end confdefs.h.  */
13282 #include <stdio.h>
13283                                           #include <stdlib.h>
13284                                           #include <security/pam_appl.h>
13285 int
13286 main ()
13287 {
13288 char *s =
13289                                            pam_strerror(PAM_SUCCESS);
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 rm -rf conftest.$ac_objext
13295 if { (ac_try="$ac_compile"
13296 case "(($ac_try" in
13297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13298   *) ac_try_echo=$ac_try;;
13299 esac
13300 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13301   (eval "$ac_compile") 2>conftest.er1
13302   ac_status=$?
13303   grep -v '^ *+' conftest.er1 >conftest.err
13304   rm -rf conftest.er1
13305   cat conftest.err >&5
13306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307   (exit $ac_status); } && {
13308          test -z "$ac_c_werror_flag" ||
13309          test ! -s conftest.err
13310        } && test -s conftest.$ac_objext; then
13311   ac_pam_strerror_args=1
13312 else
13313   echo "$as_me: failed program was:" >&5
13314 sed 's/^/| /' conftest.$ac_ext >&5
13315
13316         ac_pam_strerror_args=0
13317 fi
13318
13319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320   CPPFLAGS="$ac_save_CPPFLAGS"
13321 fi
13322
13323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13324   CPPFLAGS="$ac_save_CPPFLAGS"
13325       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13326 fi
13327
13328     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13329     if test "$ac_pam_strerror_args" = 1 ; then
13330       { echo "$as_me:$LINENO: result: one argument" >&5
13331 echo "${ECHO_T}one argument" >&6; }
13332     elif test "$ac_pam_strerror_args" = 2 ; then
13333       cat >>confdefs.h <<\_ACEOF
13334 #define PAM_STRERROR_TWO_ARGS 1
13335 _ACEOF
13336
13337       { echo "$as_me:$LINENO: result: two arguments" >&5
13338 echo "${ECHO_T}two arguments" >&6; }
13339     else
13340       { echo "$as_me:$LINENO: result: unknown" >&5
13341 echo "${ECHO_T}unknown" >&6; }
13342     fi
13343
13344 # Check pam_fail_delay
13345     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13346 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13347     if test "${ac_cv_pam_fail_delay+set}" = set; then
13348   echo $ECHO_N "(cached) $ECHO_C" >&6
13349 else
13350   ac_save_LDFLAGS="$LDFLAGS"
13351       LDFLAGS="-lpam"
13352       cat >conftest.$ac_ext <<_ACEOF
13353 /* confdefs.h.  */
13354 _ACEOF
13355 cat confdefs.h >>conftest.$ac_ext
13356 cat >>conftest.$ac_ext <<_ACEOF
13357 /* end confdefs.h.  */
13358 #include <security/pam_appl.h>
13359 int
13360 main ()
13361 {
13362 pam_handle_t *pamh = 0;
13363                    unsigned int usec = 1;
13364                    int status = pam_fail_delay (pamh, usec);
13365   ;
13366   return 0;
13367 }
13368 _ACEOF
13369 rm -rf conftest.$ac_objext conftest$ac_exeext
13370 if { (ac_try="$ac_link"
13371 case "(($ac_try" in
13372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13373   *) ac_try_echo=$ac_try;;
13374 esac
13375 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13376   (eval "$ac_link") 2>conftest.er1
13377   ac_status=$?
13378   grep -v '^ *+' conftest.er1 >conftest.err
13379   rm -rf conftest.er1
13380   cat conftest.err >&5
13381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13382   (exit $ac_status); } && {
13383          test -z "$ac_c_werror_flag" ||
13384          test ! -s conftest.err
13385        } && test -s conftest$ac_exeext &&
13386        $as_test_x conftest$ac_exeext; then
13387   ac_pam_fail_delay=yes
13388 else
13389   echo "$as_me: failed program was:" >&5
13390 sed 's/^/| /' conftest.$ac_ext >&5
13391
13392         ac_pam_fail_delay=no
13393 fi
13394
13395 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13396       conftest$ac_exeext conftest.$ac_ext
13397       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13398       LDFLAGS=$ac_save_LDFLAGS
13399 fi
13400
13401
13402       if test "$ac_pam_fail_delay" = yes ; then
13403         { echo "$as_me:$LINENO: result: yes" >&5
13404 echo "${ECHO_T}yes" >&6; }
13405         cat >>confdefs.h <<\_ACEOF
13406 #define HAVE_PAM_FAIL_DELAY 1
13407 _ACEOF
13408
13409       else
13410         { echo "$as_me:$LINENO: result: no" >&5
13411 echo "${ECHO_T}no" >&6; }
13412       fi
13413
13414   fi
13415 fi
13416
13417
13418 ###############################################################################
13419 #
13420 #       Check for Kerberos.
13421 #
13422 ###############################################################################
13423
13424 have_kerberos=no
13425 have_kerberos5=no
13426 with_kerberos_req=unspecified
13427
13428
13429 # Check whether --with-kerberos was given.
13430 if test "${with_kerberos+set}" = set; then
13431   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13432 else
13433   with_kerberos=yes
13434 fi
13435
13436
13437
13438    case "$with_kerberos" in
13439     yes) ;;
13440     no)  ;;
13441
13442     /*)
13443      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13444 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13445      d=$with_kerberos/include
13446      if test -d $d; then
13447        X_CFLAGS="-I$d $X_CFLAGS"
13448        { echo "$as_me:$LINENO: result: $d" >&5
13449 echo "${ECHO_T}$d" >&6; }
13450      else
13451        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13452 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13453      fi
13454
13455      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13456 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13457      d=$with_kerberos/lib
13458      if test -d $d; then
13459        X_LIBS="-L$d $X_LIBS"
13460        { echo "$as_me:$LINENO: result: $d" >&5
13461 echo "${ECHO_T}$d" >&6; }
13462      else
13463        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13464 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13465      fi
13466
13467      # replace the directory string with "yes".
13468      with_kerberos_req="yes"
13469      with_kerberos=$with_kerberos_req
13470      ;;
13471
13472     *)
13473      echo ""
13474      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13475      echo "       If it is a directory, then \`DIR/include' will be added to"
13476      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13477      exit 1
13478      ;;
13479    esac
13480
13481
13482 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13483   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13484 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13485 if test "${ac_cv_kerberos+set}" = set; then
13486   echo $ECHO_N "(cached) $ECHO_C" >&6
13487 else
13488
13489   ac_save_CPPFLAGS="$CPPFLAGS"
13490   if test \! -z "$includedir" ; then
13491     CPPFLAGS="$CPPFLAGS -I$includedir"
13492   fi
13493   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13494   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13495   cat >conftest.$ac_ext <<_ACEOF
13496 /* confdefs.h.  */
13497 _ACEOF
13498 cat confdefs.h >>conftest.$ac_ext
13499 cat >>conftest.$ac_ext <<_ACEOF
13500 /* end confdefs.h.  */
13501 #include <krb.h>
13502 int
13503 main ()
13504 {
13505
13506   ;
13507   return 0;
13508 }
13509 _ACEOF
13510 rm -rf conftest.$ac_objext
13511 if { (ac_try="$ac_compile"
13512 case "(($ac_try" in
13513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13514   *) ac_try_echo=$ac_try;;
13515 esac
13516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13517   (eval "$ac_compile") 2>conftest.er1
13518   ac_status=$?
13519   grep -v '^ *+' conftest.er1 >conftest.err
13520   rm -rf conftest.er1
13521   cat conftest.err >&5
13522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523   (exit $ac_status); } && {
13524          test -z "$ac_c_werror_flag" ||
13525          test ! -s conftest.err
13526        } && test -s conftest.$ac_objext; then
13527   ac_cv_kerberos=yes
13528 else
13529   echo "$as_me: failed program was:" >&5
13530 sed 's/^/| /' conftest.$ac_ext >&5
13531
13532         ac_cv_kerberos=no
13533 fi
13534
13535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13536   CPPFLAGS="$ac_save_CPPFLAGS"
13537 fi
13538 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13539 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13540   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13541 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13542 if test "${ac_cv_kerberos5+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545
13546   ac_save_CPPFLAGS="$CPPFLAGS"
13547   if test \! -z "$includedir" ; then
13548     CPPFLAGS="$CPPFLAGS -I$includedir"
13549   fi
13550   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13551   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13552   cat >conftest.$ac_ext <<_ACEOF
13553 /* confdefs.h.  */
13554 _ACEOF
13555 cat confdefs.h >>conftest.$ac_ext
13556 cat >>conftest.$ac_ext <<_ACEOF
13557 /* end confdefs.h.  */
13558 #include <kerberosIV/krb.h>
13559 int
13560 main ()
13561 {
13562
13563   ;
13564   return 0;
13565 }
13566 _ACEOF
13567 rm -rf conftest.$ac_objext
13568 if { (ac_try="$ac_compile"
13569 case "(($ac_try" in
13570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13571   *) ac_try_echo=$ac_try;;
13572 esac
13573 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13574   (eval "$ac_compile") 2>conftest.er1
13575   ac_status=$?
13576   grep -v '^ *+' conftest.er1 >conftest.err
13577   rm -rf conftest.er1
13578   cat conftest.err >&5
13579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580   (exit $ac_status); } && {
13581          test -z "$ac_c_werror_flag" ||
13582          test ! -s conftest.err
13583        } && test -s conftest.$ac_objext; then
13584   ac_cv_kerberos5=yes
13585 else
13586   echo "$as_me: failed program was:" >&5
13587 sed 's/^/| /' conftest.$ac_ext >&5
13588
13589         ac_cv_kerberos5=no
13590 fi
13591
13592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13593   CPPFLAGS="$ac_save_CPPFLAGS"
13594 fi
13595 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13596 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13597
13598   if test "$ac_cv_kerberos" = yes ; then
13599     have_kerberos=yes
13600     cat >>confdefs.h <<\_ACEOF
13601 #define HAVE_KERBEROS 1
13602 _ACEOF
13603
13604   fi
13605
13606   if test "$ac_cv_kerberos5" = yes ; then
13607
13608     # Andrew Snare <ajs@pigpond.com> wrote:
13609     #
13610     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13611     # (krb4) was also available.  This turns out not to be the case with
13612     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13613     # is optional.
13614     #
13615     # So, disable kerberosV support if libkrb4 can't be found.
13616     # This is not the best solution, but it makes the compile not fail.
13617     #
13618
13619   ac_save_CPPFLAGS="$CPPFLAGS"
13620   ac_save_LDFLAGS="$LDFLAGS"
13621 #  ac_save_LIBS="$LIBS"
13622
13623   if test \! -z "$includedir" ; then
13624     CPPFLAGS="$CPPFLAGS -I$includedir"
13625   fi
13626   # note: $X_CFLAGS includes $x_includes
13627   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13628
13629   if test \! -z "$libdir" ; then
13630     LDFLAGS="$LDFLAGS -L$libdir"
13631   fi
13632   # note: $X_LIBS includes $x_libraries
13633   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13634
13635   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13636   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13637   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13638 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13639 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   ac_check_lib_save_LIBS=$LIBS
13643 LIBS="-lkrb4  $LIBS"
13644 cat >conftest.$ac_ext <<_ACEOF
13645 /* confdefs.h.  */
13646 _ACEOF
13647 cat confdefs.h >>conftest.$ac_ext
13648 cat >>conftest.$ac_ext <<_ACEOF
13649 /* end confdefs.h.  */
13650
13651 /* Override any GCC internal prototype to avoid an error.
13652    Use char because int might match the return type of a GCC
13653    builtin and then its argument prototype would still apply.  */
13654 #ifdef __cplusplus
13655 extern "C"
13656 #endif
13657 char krb_get_tf_realm ();
13658 int
13659 main ()
13660 {
13661 return krb_get_tf_realm ();
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 rm -rf conftest.$ac_objext conftest$ac_exeext
13667 if { (ac_try="$ac_link"
13668 case "(($ac_try" in
13669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13670   *) ac_try_echo=$ac_try;;
13671 esac
13672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13673   (eval "$ac_link") 2>conftest.er1
13674   ac_status=$?
13675   grep -v '^ *+' conftest.er1 >conftest.err
13676   rm -rf conftest.er1
13677   cat conftest.err >&5
13678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679   (exit $ac_status); } && {
13680          test -z "$ac_c_werror_flag" ||
13681          test ! -s conftest.err
13682        } && test -s conftest$ac_exeext &&
13683        $as_test_x conftest$ac_exeext; then
13684   ac_cv_lib_krb4_krb_get_tf_realm=yes
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 sed 's/^/| /' conftest.$ac_ext >&5
13688
13689         ac_cv_lib_krb4_krb_get_tf_realm=no
13690 fi
13691
13692 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13693       conftest$ac_exeext conftest.$ac_ext
13694 LIBS=$ac_check_lib_save_LIBS
13695 fi
13696 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13697 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13698 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13699   have_kerberos=yes
13700 else
13701   have_kerberos=no
13702 fi
13703
13704   CPPFLAGS="$ac_save_CPPFLAGS"
13705   LDFLAGS="$ac_save_LDFLAGS"
13706 #  LIBS="$ac_save_LIBS"
13707
13708     if test "$have_kerberos" = yes ; then
13709       have_kerberos5=yes
13710       cat >>confdefs.h <<\_ACEOF
13711 #define HAVE_KERBEROS 1
13712 _ACEOF
13713
13714       cat >>confdefs.h <<\_ACEOF
13715 #define HAVE_KERBEROS5 1
13716 _ACEOF
13717
13718     else
13719       have_kerberos5=no
13720       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13721 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13722     fi
13723
13724   fi
13725
13726   if test "$have_kerberos5" = yes ; then
13727     # from Matt Knopp <mhat@infocalypse.netlag.com>
13728     # (who got it from amu@mit.edu)
13729
13730     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13731
13732     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13733
13734   ac_save_CPPFLAGS="$CPPFLAGS"
13735   ac_save_LDFLAGS="$LDFLAGS"
13736 #  ac_save_LIBS="$LIBS"
13737
13738   if test \! -z "$includedir" ; then
13739     CPPFLAGS="$CPPFLAGS -I$includedir"
13740   fi
13741   # note: $X_CFLAGS includes $x_includes
13742   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13743
13744   if test \! -z "$libdir" ; then
13745     LDFLAGS="$LDFLAGS -L$libdir"
13746   fi
13747   # note: $X_LIBS includes $x_libraries
13748   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13749
13750   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13751   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13752   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13753 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13754 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13755   echo $ECHO_N "(cached) $ECHO_C" >&6
13756 else
13757   ac_check_lib_save_LIBS=$LIBS
13758 LIBS="-lcrypt  $LIBS"
13759 cat >conftest.$ac_ext <<_ACEOF
13760 /* confdefs.h.  */
13761 _ACEOF
13762 cat confdefs.h >>conftest.$ac_ext
13763 cat >>conftest.$ac_ext <<_ACEOF
13764 /* end confdefs.h.  */
13765
13766 /* Override any GCC internal prototype to avoid an error.
13767    Use char because int might match the return type of a GCC
13768    builtin and then its argument prototype would still apply.  */
13769 #ifdef __cplusplus
13770 extern "C"
13771 #endif
13772 char crypt ();
13773 int
13774 main ()
13775 {
13776 return crypt ();
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -rf conftest.$ac_objext conftest$ac_exeext
13782 if { (ac_try="$ac_link"
13783 case "(($ac_try" in
13784   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13785   *) ac_try_echo=$ac_try;;
13786 esac
13787 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13788   (eval "$ac_link") 2>conftest.er1
13789   ac_status=$?
13790   grep -v '^ *+' conftest.er1 >conftest.err
13791   rm -rf conftest.er1
13792   cat conftest.err >&5
13793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794   (exit $ac_status); } && {
13795          test -z "$ac_c_werror_flag" ||
13796          test ! -s conftest.err
13797        } && test -s conftest$ac_exeext &&
13798        $as_test_x conftest$ac_exeext; then
13799   ac_cv_lib_crypt_crypt=yes
13800 else
13801   echo "$as_me: failed program was:" >&5
13802 sed 's/^/| /' conftest.$ac_ext >&5
13803
13804         ac_cv_lib_crypt_crypt=no
13805 fi
13806
13807 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13808       conftest$ac_exeext conftest.$ac_ext
13809 LIBS=$ac_check_lib_save_LIBS
13810 fi
13811 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13812 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13813 if test $ac_cv_lib_crypt_crypt = yes; then
13814   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13815 fi
13816
13817   CPPFLAGS="$ac_save_CPPFLAGS"
13818   LDFLAGS="$ac_save_LDFLAGS"
13819 #  LIBS="$ac_save_LIBS"
13820
13821
13822   elif test "$have_kerberos" = yes ; then
13823     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13824     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13825   fi
13826
13827   if test "$have_kerberos" = yes ; then
13828     { echo "$as_me:$LINENO: checking for res_search" >&5
13829 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13830 if test "${ac_cv_func_res_search+set}" = set; then
13831   echo $ECHO_N "(cached) $ECHO_C" >&6
13832 else
13833   cat >conftest.$ac_ext <<_ACEOF
13834 /* confdefs.h.  */
13835 _ACEOF
13836 cat confdefs.h >>conftest.$ac_ext
13837 cat >>conftest.$ac_ext <<_ACEOF
13838 /* end confdefs.h.  */
13839 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13840    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13841 #define res_search innocuous_res_search
13842
13843 /* System header to define __stub macros and hopefully few prototypes,
13844     which can conflict with char res_search (); below.
13845     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13846     <limits.h> exists even on freestanding compilers.  */
13847
13848 #ifdef __STDC__
13849 # include <limits.h>
13850 #else
13851 # include <assert.h>
13852 #endif
13853
13854 #undef res_search
13855
13856 /* Override any GCC internal prototype to avoid an error.
13857    Use char because int might match the return type of a GCC
13858    builtin and then its argument prototype would still apply.  */
13859 #ifdef __cplusplus
13860 extern "C"
13861 #endif
13862 char res_search ();
13863 /* The GNU C library defines this for functions which it implements
13864     to always fail with ENOSYS.  Some functions are actually named
13865     something starting with __ and the normal name is an alias.  */
13866 #if defined __stub_res_search || defined __stub___res_search
13867 choke me
13868 #endif
13869
13870 int
13871 main ()
13872 {
13873 return res_search ();
13874   ;
13875   return 0;
13876 }
13877 _ACEOF
13878 rm -rf conftest.$ac_objext conftest$ac_exeext
13879 if { (ac_try="$ac_link"
13880 case "(($ac_try" in
13881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13882   *) ac_try_echo=$ac_try;;
13883 esac
13884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13885   (eval "$ac_link") 2>conftest.er1
13886   ac_status=$?
13887   grep -v '^ *+' conftest.er1 >conftest.err
13888   rm -rf conftest.er1
13889   cat conftest.err >&5
13890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13891   (exit $ac_status); } && {
13892          test -z "$ac_c_werror_flag" ||
13893          test ! -s conftest.err
13894        } && test -s conftest$ac_exeext &&
13895        $as_test_x conftest$ac_exeext; then
13896   ac_cv_func_res_search=yes
13897 else
13898   echo "$as_me: failed program was:" >&5
13899 sed 's/^/| /' conftest.$ac_ext >&5
13900
13901         ac_cv_func_res_search=no
13902 fi
13903
13904 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13905       conftest$ac_exeext conftest.$ac_ext
13906 fi
13907 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13908 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13909 if test $ac_cv_func_res_search = yes; then
13910   :
13911 else
13912   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13913 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13914 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13915   echo $ECHO_N "(cached) $ECHO_C" >&6
13916 else
13917   ac_check_lib_save_LIBS=$LIBS
13918 LIBS="-lresolv  $LIBS"
13919 cat >conftest.$ac_ext <<_ACEOF
13920 /* confdefs.h.  */
13921 _ACEOF
13922 cat confdefs.h >>conftest.$ac_ext
13923 cat >>conftest.$ac_ext <<_ACEOF
13924 /* end confdefs.h.  */
13925
13926 /* Override any GCC internal prototype to avoid an error.
13927    Use char because int might match the return type of a GCC
13928    builtin and then its argument prototype would still apply.  */
13929 #ifdef __cplusplus
13930 extern "C"
13931 #endif
13932 char res_search ();
13933 int
13934 main ()
13935 {
13936 return res_search ();
13937   ;
13938   return 0;
13939 }
13940 _ACEOF
13941 rm -rf conftest.$ac_objext conftest$ac_exeext
13942 if { (ac_try="$ac_link"
13943 case "(($ac_try" in
13944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13945   *) ac_try_echo=$ac_try;;
13946 esac
13947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13948   (eval "$ac_link") 2>conftest.er1
13949   ac_status=$?
13950   grep -v '^ *+' conftest.er1 >conftest.err
13951   rm -rf conftest.er1
13952   cat conftest.err >&5
13953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954   (exit $ac_status); } && {
13955          test -z "$ac_c_werror_flag" ||
13956          test ! -s conftest.err
13957        } && test -s conftest$ac_exeext &&
13958        $as_test_x conftest$ac_exeext; then
13959   ac_cv_lib_resolv_res_search=yes
13960 else
13961   echo "$as_me: failed program was:" >&5
13962 sed 's/^/| /' conftest.$ac_ext >&5
13963
13964         ac_cv_lib_resolv_res_search=no
13965 fi
13966
13967 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13968       conftest$ac_exeext conftest.$ac_ext
13969 LIBS=$ac_check_lib_save_LIBS
13970 fi
13971 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13972 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13973 if test $ac_cv_lib_resolv_res_search = yes; then
13974   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13975 else
13976   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13977 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13978
13979 fi
13980
13981 fi
13982
13983   fi
13984 fi
13985
13986
13987 ###############################################################################
13988 #
13989 #       Check for the nine billion variants of shadow passwords...
13990 #
13991 ###############################################################################
13992
13993 need_setuid=no
13994
13995 have_shadow=no
13996 with_shadow_req=unspecified
13997
13998
13999 # Check whether --with-shadow was given.
14000 if test "${with_shadow+set}" = set; then
14001   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14002 else
14003   with_shadow=yes
14004 fi
14005
14006
14007
14008    case "$with_shadow" in
14009     yes) ;;
14010     no)  ;;
14011
14012     /*)
14013      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14014 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14015      d=$with_shadow/include
14016      if test -d $d; then
14017        X_CFLAGS="-I$d $X_CFLAGS"
14018        { echo "$as_me:$LINENO: result: $d" >&5
14019 echo "${ECHO_T}$d" >&6; }
14020      else
14021        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14022 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14023      fi
14024
14025      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14026 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14027      d=$with_shadow/lib
14028      if test -d $d; then
14029        X_LIBS="-L$d $X_LIBS"
14030        { echo "$as_me:$LINENO: result: $d" >&5
14031 echo "${ECHO_T}$d" >&6; }
14032      else
14033        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14034 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14035      fi
14036
14037      # replace the directory string with "yes".
14038      with_shadow_req="yes"
14039      with_shadow=$with_shadow_req
14040      ;;
14041
14042     *)
14043      echo ""
14044      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14045      echo "       If it is a directory, then \`DIR/include' will be added to"
14046      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14047      exit 1
14048      ;;
14049    esac
14050
14051
14052 if test "$enable_locking" = no ; then
14053   with_shadow_req=no
14054   with_shadow=no
14055 fi
14056
14057
14058 ###############################################################################
14059 #
14060 #       Check for Sun "adjunct" passwords.
14061 #
14062 ###############################################################################
14063
14064 if test "$with_shadow" = yes ; then
14065   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14066 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14067 if test "${ac_cv_sun_adjunct+set}" = set; then
14068   echo $ECHO_N "(cached) $ECHO_C" >&6
14069 else
14070
14071   ac_save_CPPFLAGS="$CPPFLAGS"
14072   if test \! -z "$includedir" ; then
14073     CPPFLAGS="$CPPFLAGS -I$includedir"
14074   fi
14075   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14076   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14077   cat >conftest.$ac_ext <<_ACEOF
14078 /* confdefs.h.  */
14079 _ACEOF
14080 cat confdefs.h >>conftest.$ac_ext
14081 cat >>conftest.$ac_ext <<_ACEOF
14082 /* end confdefs.h.  */
14083 #include <stdlib.h>
14084                                     #include <unistd.h>
14085                                     #include <sys/types.h>
14086                                     #include <sys/label.h>
14087                                     #include <sys/audit.h>
14088                                     #include <pwdadj.h>
14089 int
14090 main ()
14091 {
14092 struct passwd_adjunct *p = getpwanam("nobody");
14093                        const char *pw = p->pwa_passwd;
14094   ;
14095   return 0;
14096 }
14097 _ACEOF
14098 rm -rf conftest.$ac_objext
14099 if { (ac_try="$ac_compile"
14100 case "(($ac_try" in
14101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14102   *) ac_try_echo=$ac_try;;
14103 esac
14104 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14105   (eval "$ac_compile") 2>conftest.er1
14106   ac_status=$?
14107   grep -v '^ *+' conftest.er1 >conftest.err
14108   rm -rf conftest.er1
14109   cat conftest.err >&5
14110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14111   (exit $ac_status); } && {
14112          test -z "$ac_c_werror_flag" ||
14113          test ! -s conftest.err
14114        } && test -s conftest.$ac_objext; then
14115   ac_cv_sun_adjunct=yes
14116 else
14117   echo "$as_me: failed program was:" >&5
14118 sed 's/^/| /' conftest.$ac_ext >&5
14119
14120         ac_cv_sun_adjunct=no
14121 fi
14122
14123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14124   CPPFLAGS="$ac_save_CPPFLAGS"
14125 fi
14126 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14127 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14128   if test "$ac_cv_sun_adjunct" = yes; then
14129     have_shadow_adjunct=yes
14130     have_shadow=yes
14131     need_setuid=yes
14132   fi
14133 fi
14134
14135
14136 ###############################################################################
14137 #
14138 #       Check for DEC and SCO so-called "enhanced" security.
14139 #
14140 ###############################################################################
14141
14142 if test "$with_shadow" = yes ; then
14143   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14144 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14145 if test "${ac_cv_enhanced_passwd+set}" = set; then
14146   echo $ECHO_N "(cached) $ECHO_C" >&6
14147 else
14148
14149   ac_save_CPPFLAGS="$CPPFLAGS"
14150   if test \! -z "$includedir" ; then
14151     CPPFLAGS="$CPPFLAGS -I$includedir"
14152   fi
14153   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14154   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14155   cat >conftest.$ac_ext <<_ACEOF
14156 /* confdefs.h.  */
14157 _ACEOF
14158 cat confdefs.h >>conftest.$ac_ext
14159 cat >>conftest.$ac_ext <<_ACEOF
14160 /* end confdefs.h.  */
14161 #include <stdlib.h>
14162                                     #include <unistd.h>
14163                                     #include <sys/types.h>
14164                                     #include <pwd.h>
14165                                     #include <sys/security.h>
14166                                     #include <prot.h>
14167 int
14168 main ()
14169 {
14170 struct pr_passwd *p;
14171                        const char *pw;
14172                        set_auth_parameters(0, 0);
14173                        check_auth_parameters();
14174                        p = getprpwnam("nobody");
14175                        pw = p->ufld.fd_encrypt;
14176   ;
14177   return 0;
14178 }
14179 _ACEOF
14180 rm -rf conftest.$ac_objext
14181 if { (ac_try="$ac_compile"
14182 case "(($ac_try" in
14183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14184   *) ac_try_echo=$ac_try;;
14185 esac
14186 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14187   (eval "$ac_compile") 2>conftest.er1
14188   ac_status=$?
14189   grep -v '^ *+' conftest.er1 >conftest.err
14190   rm -rf conftest.er1
14191   cat conftest.err >&5
14192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193   (exit $ac_status); } && {
14194          test -z "$ac_c_werror_flag" ||
14195          test ! -s conftest.err
14196        } && test -s conftest.$ac_objext; then
14197   ac_cv_enhanced_passwd=yes
14198 else
14199   echo "$as_me: failed program was:" >&5
14200 sed 's/^/| /' conftest.$ac_ext >&5
14201
14202         ac_cv_enhanced_passwd=no
14203 fi
14204
14205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14206   CPPFLAGS="$ac_save_CPPFLAGS"
14207 fi
14208 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14209 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14210   if test $ac_cv_enhanced_passwd = yes; then
14211     have_shadow_enhanced=yes
14212     have_shadow=yes
14213     need_setuid=yes
14214
14215     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14216     # (I'm told it needs -lcurses too, but I don't understand why.)
14217     # But on DEC, it's in -lsecurity.
14218     #
14219     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14220 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14221 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224   ac_check_lib_save_LIBS=$LIBS
14225 LIBS="-lprot -lx $LIBS"
14226 cat >conftest.$ac_ext <<_ACEOF
14227 /* confdefs.h.  */
14228 _ACEOF
14229 cat confdefs.h >>conftest.$ac_ext
14230 cat >>conftest.$ac_ext <<_ACEOF
14231 /* end confdefs.h.  */
14232
14233 /* Override any GCC internal prototype to avoid an error.
14234    Use char because int might match the return type of a GCC
14235    builtin and then its argument prototype would still apply.  */
14236 #ifdef __cplusplus
14237 extern "C"
14238 #endif
14239 char getprpwnam ();
14240 int
14241 main ()
14242 {
14243 return getprpwnam ();
14244   ;
14245   return 0;
14246 }
14247 _ACEOF
14248 rm -rf conftest.$ac_objext conftest$ac_exeext
14249 if { (ac_try="$ac_link"
14250 case "(($ac_try" in
14251   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14252   *) ac_try_echo=$ac_try;;
14253 esac
14254 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14255   (eval "$ac_link") 2>conftest.er1
14256   ac_status=$?
14257   grep -v '^ *+' conftest.er1 >conftest.err
14258   rm -rf conftest.er1
14259   cat conftest.err >&5
14260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261   (exit $ac_status); } && {
14262          test -z "$ac_c_werror_flag" ||
14263          test ! -s conftest.err
14264        } && test -s conftest$ac_exeext &&
14265        $as_test_x conftest$ac_exeext; then
14266   ac_cv_lib_prot_getprpwnam=yes
14267 else
14268   echo "$as_me: failed program was:" >&5
14269 sed 's/^/| /' conftest.$ac_ext >&5
14270
14271         ac_cv_lib_prot_getprpwnam=no
14272 fi
14273
14274 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14275       conftest$ac_exeext conftest.$ac_ext
14276 LIBS=$ac_check_lib_save_LIBS
14277 fi
14278 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14279 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14280 if test $ac_cv_lib_prot_getprpwnam = yes; then
14281   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14282 else
14283   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14284 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14285 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14286   echo $ECHO_N "(cached) $ECHO_C" >&6
14287 else
14288   ac_check_lib_save_LIBS=$LIBS
14289 LIBS="-lsecurity  $LIBS"
14290 cat >conftest.$ac_ext <<_ACEOF
14291 /* confdefs.h.  */
14292 _ACEOF
14293 cat confdefs.h >>conftest.$ac_ext
14294 cat >>conftest.$ac_ext <<_ACEOF
14295 /* end confdefs.h.  */
14296
14297 /* Override any GCC internal prototype to avoid an error.
14298    Use char because int might match the return type of a GCC
14299    builtin and then its argument prototype would still apply.  */
14300 #ifdef __cplusplus
14301 extern "C"
14302 #endif
14303 char getprpwnam ();
14304 int
14305 main ()
14306 {
14307 return getprpwnam ();
14308   ;
14309   return 0;
14310 }
14311 _ACEOF
14312 rm -rf conftest.$ac_objext conftest$ac_exeext
14313 if { (ac_try="$ac_link"
14314 case "(($ac_try" in
14315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14316   *) ac_try_echo=$ac_try;;
14317 esac
14318 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14319   (eval "$ac_link") 2>conftest.er1
14320   ac_status=$?
14321   grep -v '^ *+' conftest.er1 >conftest.err
14322   rm -rf conftest.er1
14323   cat conftest.err >&5
14324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325   (exit $ac_status); } && {
14326          test -z "$ac_c_werror_flag" ||
14327          test ! -s conftest.err
14328        } && test -s conftest$ac_exeext &&
14329        $as_test_x conftest$ac_exeext; then
14330   ac_cv_lib_security_getprpwnam=yes
14331 else
14332   echo "$as_me: failed program was:" >&5
14333 sed 's/^/| /' conftest.$ac_ext >&5
14334
14335         ac_cv_lib_security_getprpwnam=no
14336 fi
14337
14338 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14339       conftest$ac_exeext conftest.$ac_ext
14340 LIBS=$ac_check_lib_save_LIBS
14341 fi
14342 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14343 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14344 if test $ac_cv_lib_security_getprpwnam = yes; then
14345   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14346 fi
14347
14348 fi
14349
14350   fi
14351 fi
14352
14353 ###############################################################################
14354 #
14355 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14356 #
14357 ###############################################################################
14358
14359 if test "$with_shadow" = yes ; then
14360   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14361 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14362 if test "${ac_cv_hpux_passwd+set}" = set; then
14363   echo $ECHO_N "(cached) $ECHO_C" >&6
14364 else
14365
14366   ac_save_CPPFLAGS="$CPPFLAGS"
14367   if test \! -z "$includedir" ; then
14368     CPPFLAGS="$CPPFLAGS -I$includedir"
14369   fi
14370   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14371   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14372   cat >conftest.$ac_ext <<_ACEOF
14373 /* confdefs.h.  */
14374 _ACEOF
14375 cat confdefs.h >>conftest.$ac_ext
14376 cat >>conftest.$ac_ext <<_ACEOF
14377 /* end confdefs.h.  */
14378 #include <stdlib.h>
14379                                     #include <unistd.h>
14380                                     #include <sys/types.h>
14381                                     #include <pwd.h>
14382                                     #include <hpsecurity.h>
14383                                     #include <prot.h>
14384 int
14385 main ()
14386 {
14387 struct s_passwd *p = getspwnam("nobody");
14388                        const char *pw = p->pw_passwd;
14389   ;
14390   return 0;
14391 }
14392 _ACEOF
14393 rm -rf conftest.$ac_objext
14394 if { (ac_try="$ac_compile"
14395 case "(($ac_try" in
14396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14397   *) ac_try_echo=$ac_try;;
14398 esac
14399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14400   (eval "$ac_compile") 2>conftest.er1
14401   ac_status=$?
14402   grep -v '^ *+' conftest.er1 >conftest.err
14403   rm -rf conftest.er1
14404   cat conftest.err >&5
14405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406   (exit $ac_status); } && {
14407          test -z "$ac_c_werror_flag" ||
14408          test ! -s conftest.err
14409        } && test -s conftest.$ac_objext; then
14410   ac_cv_hpux_passwd=yes
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 sed 's/^/| /' conftest.$ac_ext >&5
14414
14415         ac_cv_hpux_passwd=no
14416 fi
14417
14418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14419   CPPFLAGS="$ac_save_CPPFLAGS"
14420 fi
14421 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14422 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14423   if test "$ac_cv_hpux_passwd" = yes; then
14424     have_shadow_hpux=yes
14425     have_shadow=yes
14426     need_setuid=yes
14427
14428     # on HPUX, bigcrypt is in -lsec
14429     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14430 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14431 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14432   echo $ECHO_N "(cached) $ECHO_C" >&6
14433 else
14434   ac_check_lib_save_LIBS=$LIBS
14435 LIBS="-lsec  $LIBS"
14436 cat >conftest.$ac_ext <<_ACEOF
14437 /* confdefs.h.  */
14438 _ACEOF
14439 cat confdefs.h >>conftest.$ac_ext
14440 cat >>conftest.$ac_ext <<_ACEOF
14441 /* end confdefs.h.  */
14442
14443 /* Override any GCC internal prototype to avoid an error.
14444    Use char because int might match the return type of a GCC
14445    builtin and then its argument prototype would still apply.  */
14446 #ifdef __cplusplus
14447 extern "C"
14448 #endif
14449 char bigcrypt ();
14450 int
14451 main ()
14452 {
14453 return bigcrypt ();
14454   ;
14455   return 0;
14456 }
14457 _ACEOF
14458 rm -rf conftest.$ac_objext conftest$ac_exeext
14459 if { (ac_try="$ac_link"
14460 case "(($ac_try" in
14461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14462   *) ac_try_echo=$ac_try;;
14463 esac
14464 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14465   (eval "$ac_link") 2>conftest.er1
14466   ac_status=$?
14467   grep -v '^ *+' conftest.er1 >conftest.err
14468   rm -rf conftest.er1
14469   cat conftest.err >&5
14470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471   (exit $ac_status); } && {
14472          test -z "$ac_c_werror_flag" ||
14473          test ! -s conftest.err
14474        } && test -s conftest$ac_exeext &&
14475        $as_test_x conftest$ac_exeext; then
14476   ac_cv_lib_sec_bigcrypt=yes
14477 else
14478   echo "$as_me: failed program was:" >&5
14479 sed 's/^/| /' conftest.$ac_ext >&5
14480
14481         ac_cv_lib_sec_bigcrypt=no
14482 fi
14483
14484 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14485       conftest$ac_exeext conftest.$ac_ext
14486 LIBS=$ac_check_lib_save_LIBS
14487 fi
14488 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14489 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14490 if test $ac_cv_lib_sec_bigcrypt = yes; then
14491   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14492 fi
14493
14494   fi
14495 fi
14496
14497
14498 ###############################################################################
14499 #
14500 #       Check for FreeBSD-style shadow passwords.
14501 #
14502 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14503 #       password systems -- except you only get stuff in the pw_passwd field
14504 #       if the running program is setuid.  So, guess that we've got this
14505 #       lossage to contend with if /etc/master.passwd exists, and default to
14506 #       a setuid installation.
14507 #
14508 ###############################################################################
14509
14510 if test "$with_shadow" = yes ; then
14511   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14512 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14513 if test "${ac_cv_master_passwd+set}" = set; then
14514   echo $ECHO_N "(cached) $ECHO_C" >&6
14515 else
14516   if test -f /etc/master.passwd ; then
14517                     ac_cv_master_passwd=yes
14518                   else
14519                     ac_cv_master_passwd=no
14520                   fi
14521 fi
14522 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14523 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14524   if test "$ac_cv_master_passwd" = yes; then
14525     need_setuid=yes
14526   fi
14527 fi
14528
14529
14530 ###############################################################################
14531 #
14532 #       Check for traditional (ha!) shadow passwords.
14533 #
14534 ###############################################################################
14535
14536 if test "$with_shadow" = yes ; then
14537   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14538 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14539 if test "${ac_cv_shadow+set}" = set; then
14540   echo $ECHO_N "(cached) $ECHO_C" >&6
14541 else
14542
14543   ac_save_CPPFLAGS="$CPPFLAGS"
14544   if test \! -z "$includedir" ; then
14545     CPPFLAGS="$CPPFLAGS -I$includedir"
14546   fi
14547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14548   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14549   cat >conftest.$ac_ext <<_ACEOF
14550 /* confdefs.h.  */
14551 _ACEOF
14552 cat confdefs.h >>conftest.$ac_ext
14553 cat >>conftest.$ac_ext <<_ACEOF
14554 /* end confdefs.h.  */
14555 #include <stdlib.h>
14556                                     #include <unistd.h>
14557                                     #include <sys/types.h>
14558                                     #include <pwd.h>
14559                                     #include <shadow.h>
14560 int
14561 main ()
14562 {
14563 struct spwd *p = getspnam("nobody");
14564                        const char *pw = p->sp_pwdp;
14565   ;
14566   return 0;
14567 }
14568 _ACEOF
14569 rm -rf conftest.$ac_objext
14570 if { (ac_try="$ac_compile"
14571 case "(($ac_try" in
14572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14573   *) ac_try_echo=$ac_try;;
14574 esac
14575 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14576   (eval "$ac_compile") 2>conftest.er1
14577   ac_status=$?
14578   grep -v '^ *+' conftest.er1 >conftest.err
14579   rm -rf conftest.er1
14580   cat conftest.err >&5
14581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582   (exit $ac_status); } && {
14583          test -z "$ac_c_werror_flag" ||
14584          test ! -s conftest.err
14585        } && test -s conftest.$ac_objext; then
14586   ac_cv_shadow=yes
14587 else
14588   echo "$as_me: failed program was:" >&5
14589 sed 's/^/| /' conftest.$ac_ext >&5
14590
14591         ac_cv_shadow=no
14592 fi
14593
14594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14595   CPPFLAGS="$ac_save_CPPFLAGS"
14596 fi
14597 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14598 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14599   if test "$ac_cv_shadow" = yes; then
14600     have_shadow=yes
14601     need_setuid=yes
14602
14603     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14604     have_getspnam=no
14605     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14606 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14607 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14608   echo $ECHO_N "(cached) $ECHO_C" >&6
14609 else
14610   ac_check_lib_save_LIBS=$LIBS
14611 LIBS="-lc  $LIBS"
14612 cat >conftest.$ac_ext <<_ACEOF
14613 /* confdefs.h.  */
14614 _ACEOF
14615 cat confdefs.h >>conftest.$ac_ext
14616 cat >>conftest.$ac_ext <<_ACEOF
14617 /* end confdefs.h.  */
14618
14619 /* Override any GCC internal prototype to avoid an error.
14620    Use char because int might match the return type of a GCC
14621    builtin and then its argument prototype would still apply.  */
14622 #ifdef __cplusplus
14623 extern "C"
14624 #endif
14625 char getspnam ();
14626 int
14627 main ()
14628 {
14629 return getspnam ();
14630   ;
14631   return 0;
14632 }
14633 _ACEOF
14634 rm -rf conftest.$ac_objext conftest$ac_exeext
14635 if { (ac_try="$ac_link"
14636 case "(($ac_try" in
14637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14638   *) ac_try_echo=$ac_try;;
14639 esac
14640 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14641   (eval "$ac_link") 2>conftest.er1
14642   ac_status=$?
14643   grep -v '^ *+' conftest.er1 >conftest.err
14644   rm -rf conftest.er1
14645   cat conftest.err >&5
14646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647   (exit $ac_status); } && {
14648          test -z "$ac_c_werror_flag" ||
14649          test ! -s conftest.err
14650        } && test -s conftest$ac_exeext &&
14651        $as_test_x conftest$ac_exeext; then
14652   ac_cv_lib_c_getspnam=yes
14653 else
14654   echo "$as_me: failed program was:" >&5
14655 sed 's/^/| /' conftest.$ac_ext >&5
14656
14657         ac_cv_lib_c_getspnam=no
14658 fi
14659
14660 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14661       conftest$ac_exeext conftest.$ac_ext
14662 LIBS=$ac_check_lib_save_LIBS
14663 fi
14664 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14665 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14666 if test $ac_cv_lib_c_getspnam = yes; then
14667   have_getspnam=yes
14668 fi
14669
14670     if test "$have_getspnam" = no ; then
14671       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14672 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14673 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14674   echo $ECHO_N "(cached) $ECHO_C" >&6
14675 else
14676   ac_check_lib_save_LIBS=$LIBS
14677 LIBS="-lgen  $LIBS"
14678 cat >conftest.$ac_ext <<_ACEOF
14679 /* confdefs.h.  */
14680 _ACEOF
14681 cat confdefs.h >>conftest.$ac_ext
14682 cat >>conftest.$ac_ext <<_ACEOF
14683 /* end confdefs.h.  */
14684
14685 /* Override any GCC internal prototype to avoid an error.
14686    Use char because int might match the return type of a GCC
14687    builtin and then its argument prototype would still apply.  */
14688 #ifdef __cplusplus
14689 extern "C"
14690 #endif
14691 char getspnam ();
14692 int
14693 main ()
14694 {
14695 return getspnam ();
14696   ;
14697   return 0;
14698 }
14699 _ACEOF
14700 rm -rf conftest.$ac_objext conftest$ac_exeext
14701 if { (ac_try="$ac_link"
14702 case "(($ac_try" in
14703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14704   *) ac_try_echo=$ac_try;;
14705 esac
14706 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14707   (eval "$ac_link") 2>conftest.er1
14708   ac_status=$?
14709   grep -v '^ *+' conftest.er1 >conftest.err
14710   rm -rf conftest.er1
14711   cat conftest.err >&5
14712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713   (exit $ac_status); } && {
14714          test -z "$ac_c_werror_flag" ||
14715          test ! -s conftest.err
14716        } && test -s conftest$ac_exeext &&
14717        $as_test_x conftest$ac_exeext; then
14718   ac_cv_lib_gen_getspnam=yes
14719 else
14720   echo "$as_me: failed program was:" >&5
14721 sed 's/^/| /' conftest.$ac_ext >&5
14722
14723         ac_cv_lib_gen_getspnam=no
14724 fi
14725
14726 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14727       conftest$ac_exeext conftest.$ac_ext
14728 LIBS=$ac_check_lib_save_LIBS
14729 fi
14730 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14731 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14732 if test $ac_cv_lib_gen_getspnam = yes; then
14733   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14734 fi
14735
14736     fi
14737   fi
14738 fi
14739
14740
14741 ###############################################################################
14742 #
14743 #       Check for other libraries needed for non-shadow passwords.
14744 #
14745 ###############################################################################
14746
14747 if test "$enable_locking" = yes ; then
14748
14749   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14750   have_crypt=no
14751   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14752 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14753 if test "${ac_cv_lib_c_crypt+set}" = set; then
14754   echo $ECHO_N "(cached) $ECHO_C" >&6
14755 else
14756   ac_check_lib_save_LIBS=$LIBS
14757 LIBS="-lc  $LIBS"
14758 cat >conftest.$ac_ext <<_ACEOF
14759 /* confdefs.h.  */
14760 _ACEOF
14761 cat confdefs.h >>conftest.$ac_ext
14762 cat >>conftest.$ac_ext <<_ACEOF
14763 /* end confdefs.h.  */
14764
14765 /* Override any GCC internal prototype to avoid an error.
14766    Use char because int might match the return type of a GCC
14767    builtin and then its argument prototype would still apply.  */
14768 #ifdef __cplusplus
14769 extern "C"
14770 #endif
14771 char crypt ();
14772 int
14773 main ()
14774 {
14775 return crypt ();
14776   ;
14777   return 0;
14778 }
14779 _ACEOF
14780 rm -rf conftest.$ac_objext conftest$ac_exeext
14781 if { (ac_try="$ac_link"
14782 case "(($ac_try" in
14783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14784   *) ac_try_echo=$ac_try;;
14785 esac
14786 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14787   (eval "$ac_link") 2>conftest.er1
14788   ac_status=$?
14789   grep -v '^ *+' conftest.er1 >conftest.err
14790   rm -rf conftest.er1
14791   cat conftest.err >&5
14792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14793   (exit $ac_status); } && {
14794          test -z "$ac_c_werror_flag" ||
14795          test ! -s conftest.err
14796        } && test -s conftest$ac_exeext &&
14797        $as_test_x conftest$ac_exeext; then
14798   ac_cv_lib_c_crypt=yes
14799 else
14800   echo "$as_me: failed program was:" >&5
14801 sed 's/^/| /' conftest.$ac_ext >&5
14802
14803         ac_cv_lib_c_crypt=no
14804 fi
14805
14806 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14807       conftest$ac_exeext conftest.$ac_ext
14808 LIBS=$ac_check_lib_save_LIBS
14809 fi
14810 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14811 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14812 if test $ac_cv_lib_c_crypt = yes; then
14813   have_crypt=yes
14814 fi
14815
14816   if test "$have_crypt" = no ; then
14817     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14818 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14819 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14820   echo $ECHO_N "(cached) $ECHO_C" >&6
14821 else
14822   ac_check_lib_save_LIBS=$LIBS
14823 LIBS="-lcrypt  $LIBS"
14824 cat >conftest.$ac_ext <<_ACEOF
14825 /* confdefs.h.  */
14826 _ACEOF
14827 cat confdefs.h >>conftest.$ac_ext
14828 cat >>conftest.$ac_ext <<_ACEOF
14829 /* end confdefs.h.  */
14830
14831 /* Override any GCC internal prototype to avoid an error.
14832    Use char because int might match the return type of a GCC
14833    builtin and then its argument prototype would still apply.  */
14834 #ifdef __cplusplus
14835 extern "C"
14836 #endif
14837 char crypt ();
14838 int
14839 main ()
14840 {
14841 return crypt ();
14842   ;
14843   return 0;
14844 }
14845 _ACEOF
14846 rm -rf conftest.$ac_objext conftest$ac_exeext
14847 if { (ac_try="$ac_link"
14848 case "(($ac_try" in
14849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14850   *) ac_try_echo=$ac_try;;
14851 esac
14852 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14853   (eval "$ac_link") 2>conftest.er1
14854   ac_status=$?
14855   grep -v '^ *+' conftest.er1 >conftest.err
14856   rm -rf conftest.er1
14857   cat conftest.err >&5
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); } && {
14860          test -z "$ac_c_werror_flag" ||
14861          test ! -s conftest.err
14862        } && test -s conftest$ac_exeext &&
14863        $as_test_x conftest$ac_exeext; then
14864   ac_cv_lib_crypt_crypt=yes
14865 else
14866   echo "$as_me: failed program was:" >&5
14867 sed 's/^/| /' conftest.$ac_ext >&5
14868
14869         ac_cv_lib_crypt_crypt=no
14870 fi
14871
14872 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14873       conftest$ac_exeext conftest.$ac_ext
14874 LIBS=$ac_check_lib_save_LIBS
14875 fi
14876 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14877 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14878 if test $ac_cv_lib_crypt_crypt = yes; then
14879   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14880 fi
14881
14882   fi
14883 fi
14884
14885
14886 # Most of the above shadow mechanisms will have set need_setuid to yes,
14887 # if they were found.  But, on some systems, we need setuid even when
14888 # using plain old vanilla passwords.
14889 #
14890 if test "$enable_locking" = yes ; then
14891   case "$host" in
14892     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14893       need_setuid=yes
14894     ;;
14895   esac
14896 fi
14897
14898
14899 if test "$have_shadow_adjunct" = yes ; then
14900   cat >>confdefs.h <<\_ACEOF
14901 #define HAVE_ADJUNCT_PASSWD 1
14902 _ACEOF
14903
14904 elif test "$have_shadow_enhanced" = yes ; then
14905   cat >>confdefs.h <<\_ACEOF
14906 #define HAVE_ENHANCED_PASSWD 1
14907 _ACEOF
14908
14909 elif test "$have_shadow_hpux" = yes ; then
14910   cat >>confdefs.h <<\_ACEOF
14911 #define HAVE_HPUX_PASSWD 1
14912 _ACEOF
14913
14914 elif test "$have_shadow" = yes ; then
14915   cat >>confdefs.h <<\_ACEOF
14916 #define HAVE_SHADOW_PASSWD 1
14917 _ACEOF
14918
14919 fi
14920
14921
14922 ###############################################################################
14923 #
14924 #       Check for external password helper
14925 #       On SuSE, instead of having xscreensaver be a setuid program, they
14926 #       fork an external program that takes the password on stdin, and
14927 #       returns true if that password is a valid one.  Then only that
14928 #       smaller program needs to be setuid.
14929 #
14930 #       (Note that this external program is not a GUI: the GUI is still
14931 #       all in xscreensaver itself; the external program just does auth.)
14932 #
14933 ###############################################################################
14934
14935 have_passwd_helper=no
14936 with_passwd_helper_req=unspecified
14937
14938
14939 # Check whether --with-passwd-helper was given.
14940 if test "${with_passwd_helper+set}" = set; then
14941   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14942 else
14943   with_passwd_helper=no
14944 fi
14945
14946 # no HANDLE_X_PATH_ARG for this one
14947
14948 if test "$enable_locking" = no ; then
14949   with_passwd_helper_req=no
14950   with_passwd_helper=no
14951 fi
14952
14953 case "$with_passwd_helper" in
14954   ""|no) : ;;
14955   /*)
14956     cat >>confdefs.h <<_ACEOF
14957 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14958 _ACEOF
14959
14960     have_passwd_helper=yes;;
14961   *)
14962     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14963     exit 1
14964 esac
14965
14966
14967 ###############################################################################
14968 #
14969 #       Check for a login manager for a "New Login" button on the lock dialog.
14970 #       Usually this will be "/usr/bin/gdmflexiserver".
14971 #
14972 ###############################################################################
14973
14974 have_login_manager=no
14975 with_login_manager_req=unspecified
14976 default_login_manager='gdmflexiserver -ls'
14977
14978
14979 # Check whether --with-login-manager was given.
14980 if test "${with_login_manager+set}" = set; then
14981   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14982 else
14983   with_login_manager=no
14984 fi
14985
14986 # no HANDLE_X_PATH_ARG for this one
14987
14988 if test "$enable_locking" = no ; then
14989   with_login_manager_req=no
14990   with_login_manager=no
14991 fi
14992
14993 if test -n "$with_login_manager_req" ; then
14994   ac_cv_login_manager_program=""
14995
14996  if test "$with_login_manager_req" = "yes" ; then
14997    with_login_manager_req=$default_login_manager
14998  fi
14999
15000   case "$with_login_manager_req" in
15001     no)
15002       with_login_manager=""
15003     ;;
15004     /*)
15005       # absolute path
15006       set dummy $with_login_manager_req ; login_manager_tmp=$2
15007       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15008 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15009       if test -x "$login_manager_tmp" ; then
15010         { echo "$as_me:$LINENO: result: yes" >&5
15011 echo "${ECHO_T}yes" >&6; }
15012       else
15013         { echo "$as_me:$LINENO: result: no" >&5
15014 echo "${ECHO_T}no" >&6; }
15015         with_login_manager=""
15016       fi
15017     ;;
15018     *)
15019       # relative path
15020       set dummy $with_login_manager_req ; login_manager_tmp=$2
15021       # don't cache
15022       unset ac_cv_path_login_manager_tmp
15023       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15024 set dummy $login_manager_tmp; ac_word=$2
15025 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15027 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15028   echo $ECHO_N "(cached) $ECHO_C" >&6
15029 else
15030   case $login_manager_tmp in
15031   [\\/]* | ?:[\\/]*)
15032   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15033   ;;
15034   *)
15035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036 for as_dir in $PATH
15037 do
15038   IFS=$as_save_IFS
15039   test -z "$as_dir" && as_dir=.
15040   for ac_exec_ext in '' $ac_executable_extensions; do
15041   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15042     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15043     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15044     break 2
15045   fi
15046 done
15047 done
15048 IFS=$as_save_IFS
15049
15050   ;;
15051 esac
15052 fi
15053 login_manager_tmp=$ac_cv_path_login_manager_tmp
15054 if test -n "$login_manager_tmp"; then
15055   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15056 echo "${ECHO_T}$login_manager_tmp" >&6; }
15057 else
15058   { echo "$as_me:$LINENO: result: no" >&5
15059 echo "${ECHO_T}no" >&6; }
15060 fi
15061
15062
15063       if test -z "$login_manager_tmp" ; then
15064         with_login_manager=""
15065       else
15066         with_login_manager="$login_manager_tmp"
15067       fi
15068     ;;
15069   esac
15070   ac_cv_login_manager_program="$with_login_manager"
15071
15072 elif test -n "$ac_cv_login_manager_program"; then
15073   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15074 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15075 fi
15076
15077 NEW_LOGIN_COMMAND_P=''
15078 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15079
15080 if test -z "$NEW_LOGIN_COMMAND" ; then
15081   NEW_LOGIN_COMMAND="$default_login_manager"
15082   NEW_LOGIN_COMMAND_P='! '
15083 fi
15084
15085
15086
15087 ###############################################################################
15088 #
15089 #       Check for -lgtk (and Gnome stuff)
15090 #
15091 ###############################################################################
15092
15093 have_gtk=no
15094 with_gtk_req=unspecified
15095
15096 # Check whether --with-gtk was given.
15097 if test "${with_gtk+set}" = set; then
15098   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15099 else
15100   with_gtk=yes
15101 fi
15102
15103
15104 # if --with-gtk=/directory/ was specified, remember that directory so that
15105 # we can also look for the `gtk-config' program in that directory.
15106 case "$with_gtk" in
15107   /*)
15108     gtk_dir="$with_gtk"
15109     ;;
15110   *)
15111     gtk_dir=""
15112     ;;
15113 esac
15114
15115
15116    case "$with_gtk" in
15117     yes) ;;
15118     no)  ;;
15119
15120     /*)
15121      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15122 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15123      d=$with_gtk/include
15124      if test -d $d; then
15125        X_CFLAGS="-I$d $X_CFLAGS"
15126        { echo "$as_me:$LINENO: result: $d" >&5
15127 echo "${ECHO_T}$d" >&6; }
15128      else
15129        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15130 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15131      fi
15132
15133      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15134 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15135      d=$with_gtk/lib
15136      if test -d $d; then
15137        X_LIBS="-L$d $X_LIBS"
15138        { echo "$as_me:$LINENO: result: $d" >&5
15139 echo "${ECHO_T}$d" >&6; }
15140      else
15141        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15142 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15143      fi
15144
15145      # replace the directory string with "yes".
15146      with_gtk_req="yes"
15147      with_gtk=$with_gtk_req
15148      ;;
15149
15150     *)
15151      echo ""
15152      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15153      echo "       If it is a directory, then \`DIR/include' will be added to"
15154      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15155      exit 1
15156      ;;
15157    esac
15158
15159
15160 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15161   echo "error: must be yes or no: --with-gtk=$with_gtk"
15162   exit 1
15163 fi
15164
15165
15166 parse_gtk_version_string() {
15167   # M4 sucks!!
15168
15169   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15170   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15171
15172   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15173   if test -z "$ac_gtk_version"; then
15174     ac_gtk_version=unknown
15175     ac_gtk_version_string=unknown
15176   fi
15177 }
15178
15179 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15180 # if the user specified --with-gtk=/foo/ then look there.
15181 #
15182 gtk_path="$PATH"
15183 if test ! -z "$gtk_dir"; then
15184   # canonicalize slashes.
15185   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15186   gtk_path="$foo:$gtk_path"
15187 fi
15188
15189 for ac_prog in pkg-config
15190 do
15191   # Extract the first word of "$ac_prog", so it can be a program name with args.
15192 set dummy $ac_prog; ac_word=$2
15193 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15195 if test "${ac_cv_path_pkg_config+set}" = set; then
15196   echo $ECHO_N "(cached) $ECHO_C" >&6
15197 else
15198   case $pkg_config in
15199   [\\/]* | ?:[\\/]*)
15200   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15201   ;;
15202   *)
15203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15204 for as_dir in $gtk_path
15205 do
15206   IFS=$as_save_IFS
15207   test -z "$as_dir" && as_dir=.
15208   for ac_exec_ext in '' $ac_executable_extensions; do
15209   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15210     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15211     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15212     break 2
15213   fi
15214 done
15215 done
15216 IFS=$as_save_IFS
15217
15218   ;;
15219 esac
15220 fi
15221 pkg_config=$ac_cv_path_pkg_config
15222 if test -n "$pkg_config"; then
15223   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15224 echo "${ECHO_T}$pkg_config" >&6; }
15225 else
15226   { echo "$as_me:$LINENO: result: no" >&5
15227 echo "${ECHO_T}no" >&6; }
15228 fi
15229
15230
15231   test -n "$pkg_config" && break
15232 done
15233
15234
15235 if test -z "$pkg_config" ; then
15236   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15237 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15238   pkg_config="false"
15239 fi
15240
15241
15242 # Utility function for running pkg-config-based tests...
15243 #
15244 pkgs=''
15245 pkg_check_version() {
15246   if test "$ok" = yes ; then
15247     req="$1"
15248     min="$2"
15249     { echo "$as_me:$LINENO: checking for $req" >&5
15250 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15251     if $pkg_config --exists "$req" ; then
15252       vers=`$pkg_config --modversion "$req"`
15253       if $pkg_config --exists "$req >= $min" ; then
15254         { echo "$as_me:$LINENO: result: $vers" >&5
15255 echo "${ECHO_T}$vers" >&6; }
15256         pkgs="$pkgs $req"
15257         return 1
15258       else
15259         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15260 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15261         ok=no
15262         return 0
15263       fi
15264     else
15265       { echo "$as_me:$LINENO: result: no" >&5
15266 echo "${ECHO_T}no" >&6; }
15267       ok=no
15268       return 0
15269     fi
15270   fi
15271 }
15272
15273
15274 jurassic_gtk=no
15275 gtk_halfassed=no
15276
15277 if test "$with_gtk" = yes; then
15278   have_gtk=no
15279
15280   ok="yes"
15281   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15282   pkg_check_version         gmodule-2.0  2.0.0
15283   pkg_check_version          libxml-2.0  2.4.6
15284   pkg_check_version        libglade-2.0  1.99.0
15285   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15286   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15287   have_gtk="$ok"
15288
15289   if test "$have_gtk" = no; then
15290     if test -n "$ac_gtk_version_string" ; then
15291       gtk_halfassed="$ac_gtk_version_string"
15292       gtk_halfassed_lib="$req"
15293     fi
15294   fi
15295
15296   if test "$have_gtk" = yes; then
15297     parse_gtk_version_string
15298     jurassic_gtk=no
15299   fi
15300
15301   if test "$have_gtk" = yes; then
15302     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15303 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15304 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15305   echo $ECHO_N "(cached) $ECHO_C" >&6
15306 else
15307   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15308 fi
15309 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15310 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15311     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15312 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15313 if test "${ac_cv_gtk_config_libs+set}" = set; then
15314   echo $ECHO_N "(cached) $ECHO_C" >&6
15315 else
15316   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15317 fi
15318 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15319 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15320   fi
15321
15322   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15323   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15324
15325   GTK_EXTRA_OBJS=""
15326   GTK_DATADIR=""
15327   if test "$have_gtk" = yes; then
15328     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15329     GTK_DATADIR="$GTK_DATADIR/share"
15330   fi
15331
15332   if test "$have_gtk" = yes; then
15333     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15334     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15335     cat >>confdefs.h <<\_ACEOF
15336 #define HAVE_GTK 1
15337 _ACEOF
15338
15339     cat >>confdefs.h <<\_ACEOF
15340 #define HAVE_GTK2 1
15341 _ACEOF
15342
15343     cat >>confdefs.h <<\_ACEOF
15344 #define HAVE_XML 1
15345 _ACEOF
15346
15347   fi
15348
15349 fi
15350
15351
15352 # Check for the various Gnome help and URL loading programs.
15353 #
15354 WITH_BROWSER=gnome-open
15355 if test "$have_gtk" = yes; then
15356   for ac_prog in gnome-open
15357 do
15358   # Extract the first word of "$ac_prog", so it can be a program name with args.
15359 set dummy $ac_prog; ac_word=$2
15360 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15361 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15362 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15363   echo $ECHO_N "(cached) $ECHO_C" >&6
15364 else
15365   if test -n "$gnome_open_program"; then
15366   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15367 else
15368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15369 for as_dir in $PATH
15370 do
15371   IFS=$as_save_IFS
15372   test -z "$as_dir" && as_dir=.
15373   for ac_exec_ext in '' $ac_executable_extensions; do
15374   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15375     ac_cv_prog_gnome_open_program="$ac_prog"
15376     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15377     break 2
15378   fi
15379 done
15380 done
15381 IFS=$as_save_IFS
15382
15383 fi
15384 fi
15385 gnome_open_program=$ac_cv_prog_gnome_open_program
15386 if test -n "$gnome_open_program"; then
15387   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15388 echo "${ECHO_T}$gnome_open_program" >&6; }
15389 else
15390   { echo "$as_me:$LINENO: result: no" >&5
15391 echo "${ECHO_T}no" >&6; }
15392 fi
15393
15394
15395   test -n "$gnome_open_program" && break
15396 done
15397
15398   for ac_prog in gnome-url-show
15399 do
15400   # Extract the first word of "$ac_prog", so it can be a program name with args.
15401 set dummy $ac_prog; ac_word=$2
15402 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15404 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15405   echo $ECHO_N "(cached) $ECHO_C" >&6
15406 else
15407   if test -n "$gnome_url_show_program"; then
15408   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15409 else
15410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15411 for as_dir in $PATH
15412 do
15413   IFS=$as_save_IFS
15414   test -z "$as_dir" && as_dir=.
15415   for ac_exec_ext in '' $ac_executable_extensions; do
15416   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15417     ac_cv_prog_gnome_url_show_program="$ac_prog"
15418     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15419     break 2
15420   fi
15421 done
15422 done
15423 IFS=$as_save_IFS
15424
15425 fi
15426 fi
15427 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15428 if test -n "$gnome_url_show_program"; then
15429   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15430 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15431 else
15432   { echo "$as_me:$LINENO: result: no" >&5
15433 echo "${ECHO_T}no" >&6; }
15434 fi
15435
15436
15437   test -n "$gnome_url_show_program" && break
15438 done
15439
15440 fi
15441
15442
15443 ###############################################################################
15444 #
15445 #       Check for -lXm.
15446 #
15447 ###############################################################################
15448
15449 have_motif=no
15450 with_motif_req=unspecified
15451
15452 # Check whether --with-motif was given.
15453 if test "${with_motif+set}" = set; then
15454   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15455 else
15456   with_motif=no
15457 fi
15458
15459
15460
15461    case "$with_motif" in
15462     yes) ;;
15463     no)  ;;
15464
15465     /*)
15466      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15467 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15468      d=$with_motif/include
15469      if test -d $d; then
15470        X_CFLAGS="-I$d $X_CFLAGS"
15471        { echo "$as_me:$LINENO: result: $d" >&5
15472 echo "${ECHO_T}$d" >&6; }
15473      else
15474        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15475 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15476      fi
15477
15478      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15479 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15480      d=$with_motif/lib
15481      if test -d $d; then
15482        X_LIBS="-L$d $X_LIBS"
15483        { echo "$as_me:$LINENO: result: $d" >&5
15484 echo "${ECHO_T}$d" >&6; }
15485      else
15486        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15487 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15488      fi
15489
15490      # replace the directory string with "yes".
15491      with_motif_req="yes"
15492      with_motif=$with_motif_req
15493      ;;
15494
15495     *)
15496      echo ""
15497      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15498      echo "       If it is a directory, then \`DIR/include' will be added to"
15499      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15500      exit 1
15501      ;;
15502    esac
15503
15504
15505 if test "$with_motif" != yes -a "$with_motif" != no ; then
15506   echo "error: must be yes or no: --with-motif=$with_motif"
15507   exit 1
15508 fi
15509
15510 if test "$with_motif" = yes; then
15511   have_motif=no
15512
15513   ac_save_CPPFLAGS="$CPPFLAGS"
15514   if test \! -z "$includedir" ; then
15515     CPPFLAGS="$CPPFLAGS -I$includedir"
15516   fi
15517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15518   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15519   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15520 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15521 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15522   echo $ECHO_N "(cached) $ECHO_C" >&6
15523 else
15524   cat >conftest.$ac_ext <<_ACEOF
15525 /* confdefs.h.  */
15526 _ACEOF
15527 cat confdefs.h >>conftest.$ac_ext
15528 cat >>conftest.$ac_ext <<_ACEOF
15529 /* end confdefs.h.  */
15530 #include <stdlib.h>
15531                      #include <stdio.h>
15532                      #include <X11/Intrinsic.h>
15533
15534 #include <Xm/Xm.h>
15535 _ACEOF
15536 rm -rf conftest.$ac_objext
15537 if { (ac_try="$ac_compile"
15538 case "(($ac_try" in
15539   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15540   *) ac_try_echo=$ac_try;;
15541 esac
15542 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15543   (eval "$ac_compile") 2>conftest.er1
15544   ac_status=$?
15545   grep -v '^ *+' conftest.er1 >conftest.err
15546   rm -rf conftest.er1
15547   cat conftest.err >&5
15548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549   (exit $ac_status); } && {
15550          test -z "$ac_c_werror_flag" ||
15551          test ! -s conftest.err
15552        } && test -s conftest.$ac_objext; then
15553   ac_cv_header_Xm_Xm_h=yes
15554 else
15555   echo "$as_me: failed program was:" >&5
15556 sed 's/^/| /' conftest.$ac_ext >&5
15557
15558         ac_cv_header_Xm_Xm_h=no
15559 fi
15560
15561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15562 fi
15563 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15564 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15565 if test $ac_cv_header_Xm_Xm_h = yes; then
15566   have_motif=yes
15567                      cat >>confdefs.h <<\_ACEOF
15568 #define HAVE_MOTIF 1
15569 _ACEOF
15570
15571                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15572 fi
15573
15574
15575   CPPFLAGS="$ac_save_CPPFLAGS"
15576 fi
15577
15578
15579 if test "$have_motif" = yes; then
15580
15581   ac_save_CPPFLAGS="$CPPFLAGS"
15582   if test \! -z "$includedir" ; then
15583     CPPFLAGS="$CPPFLAGS -I$includedir"
15584   fi
15585   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15586   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15587   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15588 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15589 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15590   echo $ECHO_N "(cached) $ECHO_C" >&6
15591 else
15592   cat >conftest.$ac_ext <<_ACEOF
15593 /* confdefs.h.  */
15594 _ACEOF
15595 cat confdefs.h >>conftest.$ac_ext
15596 cat >>conftest.$ac_ext <<_ACEOF
15597 /* end confdefs.h.  */
15598 #include <stdlib.h>
15599                      #include <stdio.h>
15600                      #include <X11/Intrinsic.h>
15601
15602 #include <Xm/ComboBox.h>
15603 _ACEOF
15604 rm -rf conftest.$ac_objext
15605 if { (ac_try="$ac_compile"
15606 case "(($ac_try" in
15607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15608   *) ac_try_echo=$ac_try;;
15609 esac
15610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15611   (eval "$ac_compile") 2>conftest.er1
15612   ac_status=$?
15613   grep -v '^ *+' conftest.er1 >conftest.err
15614   rm -rf conftest.er1
15615   cat conftest.err >&5
15616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15617   (exit $ac_status); } && {
15618          test -z "$ac_c_werror_flag" ||
15619          test ! -s conftest.err
15620        } && test -s conftest.$ac_objext; then
15621   ac_cv_header_Xm_ComboBox_h=yes
15622 else
15623   echo "$as_me: failed program was:" >&5
15624 sed 's/^/| /' conftest.$ac_ext >&5
15625
15626         ac_cv_header_Xm_ComboBox_h=no
15627 fi
15628
15629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15630 fi
15631 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15632 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15633 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15634   cat >>confdefs.h <<\_ACEOF
15635 #define HAVE_XMCOMBOBOX 1
15636 _ACEOF
15637
15638 fi
15639
15640
15641   CPPFLAGS="$ac_save_CPPFLAGS"
15642 fi
15643
15644
15645 ###############################################################################
15646 #
15647 #       Checking whether Motif is really Lesstif.
15648 #
15649 ###############################################################################
15650
15651 have_lesstif=no
15652 if test "$have_motif" = yes ; then
15653   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15654 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15655 if test "${ac_cv_have_lesstif+set}" = set; then
15656   echo $ECHO_N "(cached) $ECHO_C" >&6
15657 else
15658
15659   ac_save_CPPFLAGS="$CPPFLAGS"
15660   if test \! -z "$includedir" ; then
15661     CPPFLAGS="$CPPFLAGS -I$includedir"
15662   fi
15663   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15664   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15665   cat >conftest.$ac_ext <<_ACEOF
15666 /* confdefs.h.  */
15667 _ACEOF
15668 cat confdefs.h >>conftest.$ac_ext
15669 cat >>conftest.$ac_ext <<_ACEOF
15670 /* end confdefs.h.  */
15671 #include <Xm/Xm.h>
15672 int
15673 main ()
15674 {
15675 long vers = LesstifVersion;
15676   ;
15677   return 0;
15678 }
15679 _ACEOF
15680 rm -rf conftest.$ac_objext
15681 if { (ac_try="$ac_compile"
15682 case "(($ac_try" in
15683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15684   *) ac_try_echo=$ac_try;;
15685 esac
15686 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15687   (eval "$ac_compile") 2>conftest.er1
15688   ac_status=$?
15689   grep -v '^ *+' conftest.er1 >conftest.err
15690   rm -rf conftest.er1
15691   cat conftest.err >&5
15692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693   (exit $ac_status); } && {
15694          test -z "$ac_c_werror_flag" ||
15695          test ! -s conftest.err
15696        } && test -s conftest.$ac_objext; then
15697   ac_cv_have_lesstif=yes
15698 else
15699   echo "$as_me: failed program was:" >&5
15700 sed 's/^/| /' conftest.$ac_ext >&5
15701
15702         ac_cv_have_lesstif=no
15703 fi
15704
15705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15706   CPPFLAGS="$ac_save_CPPFLAGS"
15707 fi
15708 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15709 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15710   have_lesstif=$ac_cv_have_lesstif
15711 fi
15712
15713
15714 lesstif_version=unknown
15715 lesstif_version_string=unknown
15716
15717 if test "$have_lesstif" = yes ; then
15718   ltv=unknown
15719   echo unknown > conftest-lt
15720   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15721 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15722 if test "${ac_cv_lesstif_version_string+set}" = set; then
15723   echo $ECHO_N "(cached) $ECHO_C" >&6
15724 else
15725
15726   ac_save_CPPFLAGS="$CPPFLAGS"
15727   if test \! -z "$includedir" ; then
15728     CPPFLAGS="$CPPFLAGS -I$includedir"
15729   fi
15730   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15731   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15732   if test "$cross_compiling" = yes; then
15733   ac_cv_lesstif_version=unknown
15734                      ac_cv_lesstif_version_string=unknown
15735 else
15736   cat >conftest.$ac_ext <<_ACEOF
15737 /* confdefs.h.  */
15738 _ACEOF
15739 cat confdefs.h >>conftest.$ac_ext
15740 cat >>conftest.$ac_ext <<_ACEOF
15741 /* end confdefs.h.  */
15742 #include <stdio.h>
15743                      #include <Xm/Xm.h>
15744                      int main() {
15745                        FILE *f = fopen("conftest-lt", "w");
15746                        if (!f) exit(1);
15747                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15748                           LESSTIF_VERSION, LESSTIF_REVISION);
15749                        fclose(f);
15750                        exit(0);
15751                      }
15752 _ACEOF
15753 rm -rf conftest$ac_exeext
15754 if { (ac_try="$ac_link"
15755 case "(($ac_try" in
15756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15757   *) ac_try_echo=$ac_try;;
15758 esac
15759 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15760   (eval "$ac_link") 2>&5
15761   ac_status=$?
15762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15763   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15764   { (case "(($ac_try" in
15765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766   *) ac_try_echo=$ac_try;;
15767 esac
15768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15769   (eval "$ac_try") 2>&5
15770   ac_status=$?
15771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772   (exit $ac_status); }; }; then
15773   ltv=`cat conftest-lt`
15774                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15775                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15776 else
15777   echo "$as_me: program exited with status $ac_status" >&5
15778 echo "$as_me: failed program was:" >&5
15779 sed 's/^/| /' conftest.$ac_ext >&5
15780
15781 ( exit $ac_status )
15782 ac_cv_lesstif_version=unknown
15783                      ac_cv_lesstif_version_string=unknown
15784 fi
15785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15786 fi
15787
15788
15789   CPPFLAGS="$ac_save_CPPFLAGS"
15790 fi
15791 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15792 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15793   rm -rf conftest-lt
15794   lesstif_version=$ac_cv_lesstif_version
15795   lesstif_version_string=$ac_cv_lesstif_version_string
15796
15797 fi
15798
15799
15800 if test "$have_motif" = yes ; then
15801   mtv=unknown
15802   echo unknown > conftest-mt
15803   { echo "$as_me:$LINENO: checking Motif version number" >&5
15804 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15805 if test "${ac_cv_motif_version_string+set}" = set; then
15806   echo $ECHO_N "(cached) $ECHO_C" >&6
15807 else
15808
15809   ac_save_CPPFLAGS="$CPPFLAGS"
15810   if test \! -z "$includedir" ; then
15811     CPPFLAGS="$CPPFLAGS -I$includedir"
15812   fi
15813   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15814   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15815   if test "$cross_compiling" = yes; then
15816   ac_cv_motif_version=unknown
15817                      ac_cv_motif_version_string=unknown
15818 else
15819   cat >conftest.$ac_ext <<_ACEOF
15820 /* confdefs.h.  */
15821 _ACEOF
15822 cat confdefs.h >>conftest.$ac_ext
15823 cat >>conftest.$ac_ext <<_ACEOF
15824 /* end confdefs.h.  */
15825 #include <stdio.h>
15826                      #include <Xm/Xm.h>
15827                      int main() {
15828                        FILE *f = fopen("conftest-mt", "w");
15829                        if (!f) exit(1);
15830                        fprintf(f, "%d %d.%d\n", XmVersion,
15831                           XmVERSION, XmREVISION);
15832                        fclose(f);
15833                        exit(0);
15834                      }
15835 _ACEOF
15836 rm -rf conftest$ac_exeext
15837 if { (ac_try="$ac_link"
15838 case "(($ac_try" in
15839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15840   *) ac_try_echo=$ac_try;;
15841 esac
15842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15843   (eval "$ac_link") 2>&5
15844   ac_status=$?
15845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15846   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15847   { (case "(($ac_try" in
15848   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15849   *) ac_try_echo=$ac_try;;
15850 esac
15851 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15852   (eval "$ac_try") 2>&5
15853   ac_status=$?
15854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15855   (exit $ac_status); }; }; then
15856   mtv=`cat conftest-mt`
15857                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15858                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15859 else
15860   echo "$as_me: program exited with status $ac_status" >&5
15861 echo "$as_me: failed program was:" >&5
15862 sed 's/^/| /' conftest.$ac_ext >&5
15863
15864 ( exit $ac_status )
15865 ac_cv_motif_version=unknown
15866                      ac_cv_motif_version_string=unknown
15867 fi
15868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15869 fi
15870
15871
15872   CPPFLAGS="$ac_save_CPPFLAGS"
15873 fi
15874 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15875 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15876   rm -rf conftest-mt
15877   motif_version=$ac_cv_motif_version
15878   motif_version_string=$ac_cv_motif_version_string
15879
15880 fi
15881
15882
15883 ###############################################################################
15884 #
15885 #       Checking whether Motif requires -lXpm.
15886 #
15887 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15888 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15889 #       of the library whether to build the XPM code into libXm, or whether
15890 #       to rely on an external libXm.  So the only way to tell whether XPM is
15891 #       a link-time requirement is to examine libXm.a, which is very
15892 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15893 #       always link against XPM if the XPM lib exists (and this will be a
15894 #       no-op if libXm happens to already have the XPM code in it.)
15895 #
15896 ###############################################################################
15897
15898 motif_requires_xpm=no
15899 if test "$have_motif" = yes ; then
15900    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15901 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15902    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15903    then
15904      motif_requires_xpm=yes
15905      { echo "$as_me:$LINENO: result: maybe" >&5
15906 echo "${ECHO_T}maybe" >&6; }
15907    else
15908      { echo "$as_me:$LINENO: result: no" >&5
15909 echo "${ECHO_T}no" >&6; }
15910    fi
15911 fi
15912
15913
15914 ###############################################################################
15915 #
15916 #       Checking whether Motif requires -lXp.
15917 #
15918 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15919 #       Extension".   Why this extension isn't in -lXext with all the others,
15920 #       I have no idea.
15921 #
15922 ###############################################################################
15923
15924 have_xp_ext=no
15925 if test "$have_motif" = yes ; then
15926    have_xp_ext=no
15927
15928   ac_save_CPPFLAGS="$CPPFLAGS"
15929   ac_save_LDFLAGS="$LDFLAGS"
15930 #  ac_save_LIBS="$LIBS"
15931
15932   if test \! -z "$includedir" ; then
15933     CPPFLAGS="$CPPFLAGS -I$includedir"
15934   fi
15935   # note: $X_CFLAGS includes $x_includes
15936   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15937
15938   if test \! -z "$libdir" ; then
15939     LDFLAGS="$LDFLAGS -L$libdir"
15940   fi
15941   # note: $X_LIBS includes $x_libraries
15942   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15943
15944   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15945   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15946   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15947 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15948 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951   ac_check_lib_save_LIBS=$LIBS
15952 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15953 cat >conftest.$ac_ext <<_ACEOF
15954 /* confdefs.h.  */
15955 _ACEOF
15956 cat confdefs.h >>conftest.$ac_ext
15957 cat >>conftest.$ac_ext <<_ACEOF
15958 /* end confdefs.h.  */
15959
15960 /* Override any GCC internal prototype to avoid an error.
15961    Use char because int might match the return type of a GCC
15962    builtin and then its argument prototype would still apply.  */
15963 #ifdef __cplusplus
15964 extern "C"
15965 #endif
15966 char XpQueryExtension ();
15967 int
15968 main ()
15969 {
15970 return XpQueryExtension ();
15971   ;
15972   return 0;
15973 }
15974 _ACEOF
15975 rm -rf conftest.$ac_objext conftest$ac_exeext
15976 if { (ac_try="$ac_link"
15977 case "(($ac_try" in
15978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15979   *) ac_try_echo=$ac_try;;
15980 esac
15981 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15982   (eval "$ac_link") 2>conftest.er1
15983   ac_status=$?
15984   grep -v '^ *+' conftest.er1 >conftest.err
15985   rm -rf conftest.er1
15986   cat conftest.err >&5
15987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15988   (exit $ac_status); } && {
15989          test -z "$ac_c_werror_flag" ||
15990          test ! -s conftest.err
15991        } && test -s conftest$ac_exeext &&
15992        $as_test_x conftest$ac_exeext; then
15993   ac_cv_lib_Xp_XpQueryExtension=yes
15994 else
15995   echo "$as_me: failed program was:" >&5
15996 sed 's/^/| /' conftest.$ac_ext >&5
15997
15998         ac_cv_lib_Xp_XpQueryExtension=no
15999 fi
16000
16001 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16002       conftest$ac_exeext conftest.$ac_ext
16003 LIBS=$ac_check_lib_save_LIBS
16004 fi
16005 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16006 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16007 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16008   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16009 else
16010   true
16011 fi
16012
16013   CPPFLAGS="$ac_save_CPPFLAGS"
16014   LDFLAGS="$ac_save_LDFLAGS"
16015 #  LIBS="$ac_save_LIBS"
16016
16017 fi
16018
16019
16020 ###############################################################################
16021 #
16022 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16023 #
16024 ###############################################################################
16025
16026 have_xintl=no
16027 if test "$have_motif" = yes ; then
16028
16029   ac_save_CPPFLAGS="$CPPFLAGS"
16030   ac_save_LDFLAGS="$LDFLAGS"
16031 #  ac_save_LIBS="$LIBS"
16032
16033   if test \! -z "$includedir" ; then
16034     CPPFLAGS="$CPPFLAGS -I$includedir"
16035   fi
16036   # note: $X_CFLAGS includes $x_includes
16037   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16038
16039   if test \! -z "$libdir" ; then
16040     LDFLAGS="$LDFLAGS -L$libdir"
16041   fi
16042   # note: $X_LIBS includes $x_libraries
16043   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16044
16045   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16046   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16047   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16048 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16049 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16050   echo $ECHO_N "(cached) $ECHO_C" >&6
16051 else
16052   ac_check_lib_save_LIBS=$LIBS
16053 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16054 cat >conftest.$ac_ext <<_ACEOF
16055 /* confdefs.h.  */
16056 _ACEOF
16057 cat confdefs.h >>conftest.$ac_ext
16058 cat >>conftest.$ac_ext <<_ACEOF
16059 /* end confdefs.h.  */
16060
16061 /* Override any GCC internal prototype to avoid an error.
16062    Use char because int might match the return type of a GCC
16063    builtin and then its argument prototype would still apply.  */
16064 #ifdef __cplusplus
16065 extern "C"
16066 #endif
16067 char _Xsetlocale ();
16068 int
16069 main ()
16070 {
16071 return _Xsetlocale ();
16072   ;
16073   return 0;
16074 }
16075 _ACEOF
16076 rm -rf conftest.$ac_objext conftest$ac_exeext
16077 if { (ac_try="$ac_link"
16078 case "(($ac_try" in
16079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16080   *) ac_try_echo=$ac_try;;
16081 esac
16082 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16083   (eval "$ac_link") 2>conftest.er1
16084   ac_status=$?
16085   grep -v '^ *+' conftest.er1 >conftest.err
16086   rm -rf conftest.er1
16087   cat conftest.err >&5
16088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16089   (exit $ac_status); } && {
16090          test -z "$ac_c_werror_flag" ||
16091          test ! -s conftest.err
16092        } && test -s conftest$ac_exeext &&
16093        $as_test_x conftest$ac_exeext; then
16094   ac_cv_lib_Xintl__Xsetlocale=yes
16095 else
16096   echo "$as_me: failed program was:" >&5
16097 sed 's/^/| /' conftest.$ac_ext >&5
16098
16099         ac_cv_lib_Xintl__Xsetlocale=no
16100 fi
16101
16102 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16103       conftest$ac_exeext conftest.$ac_ext
16104 LIBS=$ac_check_lib_save_LIBS
16105 fi
16106 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16107 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16108 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16109   have_xintl=yes
16110 else
16111   have_xintl=no
16112 fi
16113
16114   CPPFLAGS="$ac_save_CPPFLAGS"
16115   LDFLAGS="$ac_save_LDFLAGS"
16116 #  LIBS="$ac_save_LIBS"
16117
16118   if test "$have_xintl" = yes; then
16119     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16120   fi
16121 fi
16122
16123
16124 ###############################################################################
16125 #
16126 #       Check for -lGL or -lMesaGL.
16127 #
16128 ###############################################################################
16129
16130 have_gl=no
16131 ac_have_mesa_gl=no
16132 with_gl_req=unspecified
16133 gl_halfassed=no
16134
16135 # Check whether --with-gl was given.
16136 if test "${with_gl+set}" = set; then
16137   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16138 else
16139   with_gl=yes
16140 fi
16141
16142
16143
16144    case "$with_gl" in
16145     yes) ;;
16146     no)  ;;
16147
16148     /*)
16149      { echo "$as_me:$LINENO: checking for GL headers" >&5
16150 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16151      d=$with_gl/include
16152      if test -d $d; then
16153        X_CFLAGS="-I$d $X_CFLAGS"
16154        { echo "$as_me:$LINENO: result: $d" >&5
16155 echo "${ECHO_T}$d" >&6; }
16156      else
16157        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16158 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16159      fi
16160
16161      { echo "$as_me:$LINENO: checking for GL libs" >&5
16162 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16163      d=$with_gl/lib
16164      if test -d $d; then
16165        X_LIBS="-L$d $X_LIBS"
16166        { echo "$as_me:$LINENO: result: $d" >&5
16167 echo "${ECHO_T}$d" >&6; }
16168      else
16169        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16170 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16171      fi
16172
16173      # replace the directory string with "yes".
16174      with_gl_req="yes"
16175      with_gl=$with_gl_req
16176      ;;
16177
16178     *)
16179      echo ""
16180      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16181      echo "       If it is a directory, then \`DIR/include' will be added to"
16182      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16183      exit 1
16184      ;;
16185    esac
16186
16187
16188 ac_mesagl_version=unknown
16189 ac_mesagl_version_string=unknown
16190
16191 if test "$with_gl" = yes; then
16192
16193   ac_save_CPPFLAGS="$CPPFLAGS"
16194   if test \! -z "$includedir" ; then
16195     CPPFLAGS="$CPPFLAGS -I$includedir"
16196   fi
16197   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16198   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16199   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16200   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16201 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16202 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16203   echo $ECHO_N "(cached) $ECHO_C" >&6
16204 fi
16205 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16206 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16207 else
16208   # Is the header compilable?
16209 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16210 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16211 cat >conftest.$ac_ext <<_ACEOF
16212 /* confdefs.h.  */
16213 _ACEOF
16214 cat confdefs.h >>conftest.$ac_ext
16215 cat >>conftest.$ac_ext <<_ACEOF
16216 /* end confdefs.h.  */
16217 $ac_includes_default
16218 #include <GL/gl.h>
16219 _ACEOF
16220 rm -rf conftest.$ac_objext
16221 if { (ac_try="$ac_compile"
16222 case "(($ac_try" in
16223   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16224   *) ac_try_echo=$ac_try;;
16225 esac
16226 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16227   (eval "$ac_compile") 2>conftest.er1
16228   ac_status=$?
16229   grep -v '^ *+' conftest.er1 >conftest.err
16230   rm -rf conftest.er1
16231   cat conftest.err >&5
16232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16233   (exit $ac_status); } && {
16234          test -z "$ac_c_werror_flag" ||
16235          test ! -s conftest.err
16236        } && test -s conftest.$ac_objext; then
16237   ac_header_compiler=yes
16238 else
16239   echo "$as_me: failed program was:" >&5
16240 sed 's/^/| /' conftest.$ac_ext >&5
16241
16242         ac_header_compiler=no
16243 fi
16244
16245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16246 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16247 echo "${ECHO_T}$ac_header_compiler" >&6; }
16248
16249 # Is the header present?
16250 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16251 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16252 cat >conftest.$ac_ext <<_ACEOF
16253 /* confdefs.h.  */
16254 _ACEOF
16255 cat confdefs.h >>conftest.$ac_ext
16256 cat >>conftest.$ac_ext <<_ACEOF
16257 /* end confdefs.h.  */
16258 #include <GL/gl.h>
16259 _ACEOF
16260 if { (ac_try="$ac_cpp conftest.$ac_ext"
16261 case "(($ac_try" in
16262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263   *) ac_try_echo=$ac_try;;
16264 esac
16265 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16266   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16267   ac_status=$?
16268   grep -v '^ *+' conftest.er1 >conftest.err
16269   rm -rf conftest.er1
16270   cat conftest.err >&5
16271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16272   (exit $ac_status); } >/dev/null && {
16273          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16274          test ! -s conftest.err
16275        }; then
16276   ac_header_preproc=yes
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 sed 's/^/| /' conftest.$ac_ext >&5
16280
16281   ac_header_preproc=no
16282 fi
16283
16284 rm -rf conftest.err conftest.$ac_ext
16285 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16286 echo "${ECHO_T}$ac_header_preproc" >&6; }
16287
16288 # So?  What about this header?
16289 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16290   yes:no: )
16291     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16292 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16293     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16294 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16295     ac_header_preproc=yes
16296     ;;
16297   no:yes:* )
16298     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16299 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16300     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16301 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16302     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16303 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16304     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16305 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16306     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16307 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16308     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16309 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16310
16311     ;;
16312 esac
16313 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16314 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16315 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   ac_cv_header_GL_gl_h=$ac_header_preproc
16319 fi
16320 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16321 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16322
16323 fi
16324 if test $ac_cv_header_GL_gl_h = yes; then
16325   have_gl=yes
16326 else
16327   have_gl=no
16328 fi
16329
16330
16331   CPPFLAGS="$ac_save_CPPFLAGS"
16332   if test "$have_gl" = yes ; then
16333
16334   ac_save_CPPFLAGS="$CPPFLAGS"
16335   if test \! -z "$includedir" ; then
16336     CPPFLAGS="$CPPFLAGS -I$includedir"
16337   fi
16338   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16339   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16340   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16341 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16342 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16343   echo $ECHO_N "(cached) $ECHO_C" >&6
16344 else
16345   cat >conftest.$ac_ext <<_ACEOF
16346 /* confdefs.h.  */
16347 _ACEOF
16348 cat confdefs.h >>conftest.$ac_ext
16349 cat >>conftest.$ac_ext <<_ACEOF
16350 /* end confdefs.h.  */
16351 #include <GL/gl.h>
16352
16353 #include <GL/glx.h>
16354 _ACEOF
16355 rm -rf conftest.$ac_objext
16356 if { (ac_try="$ac_compile"
16357 case "(($ac_try" in
16358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16359   *) ac_try_echo=$ac_try;;
16360 esac
16361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16362   (eval "$ac_compile") 2>conftest.er1
16363   ac_status=$?
16364   grep -v '^ *+' conftest.er1 >conftest.err
16365   rm -rf conftest.er1
16366   cat conftest.err >&5
16367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368   (exit $ac_status); } && {
16369          test -z "$ac_c_werror_flag" ||
16370          test ! -s conftest.err
16371        } && test -s conftest.$ac_objext; then
16372   ac_cv_header_GL_glx_h=yes
16373 else
16374   echo "$as_me: failed program was:" >&5
16375 sed 's/^/| /' conftest.$ac_ext >&5
16376
16377         ac_cv_header_GL_glx_h=no
16378 fi
16379
16380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16381 fi
16382 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16383 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16384 if test $ac_cv_header_GL_glx_h = yes; then
16385   have_gl=yes
16386 else
16387   have_gl=no
16388 fi
16389
16390
16391   CPPFLAGS="$ac_save_CPPFLAGS"
16392   fi
16393
16394   # If we have the headers, try and figure out which vendor it's from.
16395   #
16396   if test "$have_gl" = yes ; then
16397
16398     # We need to know whether it's MesaGL so that we know which libraries
16399     # to link against.
16400     #
16401     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16402 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16403 if test "${ac_cv_have_mesa_gl+set}" = set; then
16404   echo $ECHO_N "(cached) $ECHO_C" >&6
16405 else
16406   ac_cv_have_mesa_gl=no
16407        if test "$ac_macosx" = no; then
16408          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16409          # It's not really Mesa, is it?
16410
16411   ac_save_CPPFLAGS="$CPPFLAGS"
16412   if test \! -z "$includedir" ; then
16413     CPPFLAGS="$CPPFLAGS -I$includedir"
16414   fi
16415   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16416   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16417   cat >conftest.$ac_ext <<_ACEOF
16418 /* confdefs.h.  */
16419 _ACEOF
16420 cat confdefs.h >>conftest.$ac_ext
16421 cat >>conftest.$ac_ext <<_ACEOF
16422 /* end confdefs.h.  */
16423 #include <GL/glx.h>
16424
16425 _ACEOF
16426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16427   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16428   ac_cv_have_mesa_gl=yes
16429 fi
16430 rm -rf conftest*
16431
16432   CPPFLAGS="$ac_save_CPPFLAGS"
16433        fi
16434 fi
16435 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16436 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16437     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16438
16439     gl_lib_1=""
16440     GL_LIBS=""
16441
16442     if test "$ac_macosx" = yes; then
16443
16444       # Without these, every link against libGL gets a bunch of useless
16445       # warnings.
16446       #
16447       osx_crud="-bind_at_load -multiply_defined suppress"
16448       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16449 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16450       GL_LIBS="$GL_LIBS $osx_crud"
16451       unset osx_crud
16452
16453       # New lossage in 10.5.0: without this, we get:
16454       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16455       #
16456       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16457       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16458
16459       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16460 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16461       GL_LIBS="$GL_LIBS $osx_crud"
16462       unset osx_crud
16463     fi
16464
16465
16466     # Some versions of MesaGL are compiled to require -lpthread.
16467     # So if the Mesa headers exist, and -lpthread exists, then always
16468     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16469     #
16470     if test "$ac_have_mesa_gl" = yes; then
16471       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16472 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16473 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16474   echo $ECHO_N "(cached) $ECHO_C" >&6
16475 else
16476   ac_check_lib_save_LIBS=$LIBS
16477 LIBS="-lpthread  $LIBS"
16478 cat >conftest.$ac_ext <<_ACEOF
16479 /* confdefs.h.  */
16480 _ACEOF
16481 cat confdefs.h >>conftest.$ac_ext
16482 cat >>conftest.$ac_ext <<_ACEOF
16483 /* end confdefs.h.  */
16484
16485 /* Override any GCC internal prototype to avoid an error.
16486    Use char because int might match the return type of a GCC
16487    builtin and then its argument prototype would still apply.  */
16488 #ifdef __cplusplus
16489 extern "C"
16490 #endif
16491 char pthread_create ();
16492 int
16493 main ()
16494 {
16495 return pthread_create ();
16496   ;
16497   return 0;
16498 }
16499 _ACEOF
16500 rm -rf conftest.$ac_objext conftest$ac_exeext
16501 if { (ac_try="$ac_link"
16502 case "(($ac_try" in
16503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16504   *) ac_try_echo=$ac_try;;
16505 esac
16506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16507   (eval "$ac_link") 2>conftest.er1
16508   ac_status=$?
16509   grep -v '^ *+' conftest.er1 >conftest.err
16510   rm -rf conftest.er1
16511   cat conftest.err >&5
16512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16513   (exit $ac_status); } && {
16514          test -z "$ac_c_werror_flag" ||
16515          test ! -s conftest.err
16516        } && test -s conftest$ac_exeext &&
16517        $as_test_x conftest$ac_exeext; then
16518   ac_cv_lib_pthread_pthread_create=yes
16519 else
16520   echo "$as_me: failed program was:" >&5
16521 sed 's/^/| /' conftest.$ac_ext >&5
16522
16523         ac_cv_lib_pthread_pthread_create=no
16524 fi
16525
16526 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16527       conftest$ac_exeext conftest.$ac_ext
16528 LIBS=$ac_check_lib_save_LIBS
16529 fi
16530 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16531 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16532 if test $ac_cv_lib_pthread_pthread_create = yes; then
16533   GL_LIBS="-lpthread"
16534 fi
16535
16536     fi
16537
16538
16539     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16540     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16541     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16542     #
16543
16544     if test "$ac_have_mesa_gl" = yes ; then
16545
16546   ac_save_CPPFLAGS="$CPPFLAGS"
16547   ac_save_LDFLAGS="$LDFLAGS"
16548 #  ac_save_LIBS="$LIBS"
16549
16550   if test \! -z "$includedir" ; then
16551     CPPFLAGS="$CPPFLAGS -I$includedir"
16552   fi
16553   # note: $X_CFLAGS includes $x_includes
16554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16555
16556   if test \! -z "$libdir" ; then
16557     LDFLAGS="$LDFLAGS -L$libdir"
16558   fi
16559   # note: $X_LIBS includes $x_libraries
16560   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16561
16562   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16563   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16564   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16565 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16566 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569   ac_check_lib_save_LIBS=$LIBS
16570 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16571 cat >conftest.$ac_ext <<_ACEOF
16572 /* confdefs.h.  */
16573 _ACEOF
16574 cat confdefs.h >>conftest.$ac_ext
16575 cat >>conftest.$ac_ext <<_ACEOF
16576 /* end confdefs.h.  */
16577
16578 /* Override any GCC internal prototype to avoid an error.
16579    Use char because int might match the return type of a GCC
16580    builtin and then its argument prototype would still apply.  */
16581 #ifdef __cplusplus
16582 extern "C"
16583 #endif
16584 char glXCreateContext ();
16585 int
16586 main ()
16587 {
16588 return glXCreateContext ();
16589   ;
16590   return 0;
16591 }
16592 _ACEOF
16593 rm -rf conftest.$ac_objext conftest$ac_exeext
16594 if { (ac_try="$ac_link"
16595 case "(($ac_try" in
16596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16597   *) ac_try_echo=$ac_try;;
16598 esac
16599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16600   (eval "$ac_link") 2>conftest.er1
16601   ac_status=$?
16602   grep -v '^ *+' conftest.er1 >conftest.err
16603   rm -rf conftest.er1
16604   cat conftest.err >&5
16605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606   (exit $ac_status); } && {
16607          test -z "$ac_c_werror_flag" ||
16608          test ! -s conftest.err
16609        } && test -s conftest$ac_exeext &&
16610        $as_test_x conftest$ac_exeext; then
16611   ac_cv_lib_MesaGL_glXCreateContext=yes
16612 else
16613   echo "$as_me: failed program was:" >&5
16614 sed 's/^/| /' conftest.$ac_ext >&5
16615
16616         ac_cv_lib_MesaGL_glXCreateContext=no
16617 fi
16618
16619 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16620       conftest$ac_exeext conftest.$ac_ext
16621 LIBS=$ac_check_lib_save_LIBS
16622 fi
16623 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16624 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16625 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16626   gl_lib_1="MesaGL"
16627                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16628 fi
16629
16630   CPPFLAGS="$ac_save_CPPFLAGS"
16631   LDFLAGS="$ac_save_LDFLAGS"
16632 #  LIBS="$ac_save_LIBS"
16633
16634     fi
16635
16636     if test "$gl_lib_1" = "" ; then
16637
16638   ac_save_CPPFLAGS="$CPPFLAGS"
16639   ac_save_LDFLAGS="$LDFLAGS"
16640 #  ac_save_LIBS="$LIBS"
16641
16642   if test \! -z "$includedir" ; then
16643     CPPFLAGS="$CPPFLAGS -I$includedir"
16644   fi
16645   # note: $X_CFLAGS includes $x_includes
16646   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16647
16648   if test \! -z "$libdir" ; then
16649     LDFLAGS="$LDFLAGS -L$libdir"
16650   fi
16651   # note: $X_LIBS includes $x_libraries
16652   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16653
16654   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16655   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16656   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16657 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16658 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16659   echo $ECHO_N "(cached) $ECHO_C" >&6
16660 else
16661   ac_check_lib_save_LIBS=$LIBS
16662 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16663 cat >conftest.$ac_ext <<_ACEOF
16664 /* confdefs.h.  */
16665 _ACEOF
16666 cat confdefs.h >>conftest.$ac_ext
16667 cat >>conftest.$ac_ext <<_ACEOF
16668 /* end confdefs.h.  */
16669
16670 /* Override any GCC internal prototype to avoid an error.
16671    Use char because int might match the return type of a GCC
16672    builtin and then its argument prototype would still apply.  */
16673 #ifdef __cplusplus
16674 extern "C"
16675 #endif
16676 char glXCreateContext ();
16677 int
16678 main ()
16679 {
16680 return glXCreateContext ();
16681   ;
16682   return 0;
16683 }
16684 _ACEOF
16685 rm -rf conftest.$ac_objext conftest$ac_exeext
16686 if { (ac_try="$ac_link"
16687 case "(($ac_try" in
16688   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16689   *) ac_try_echo=$ac_try;;
16690 esac
16691 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16692   (eval "$ac_link") 2>conftest.er1
16693   ac_status=$?
16694   grep -v '^ *+' conftest.er1 >conftest.err
16695   rm -rf conftest.er1
16696   cat conftest.err >&5
16697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698   (exit $ac_status); } && {
16699          test -z "$ac_c_werror_flag" ||
16700          test ! -s conftest.err
16701        } && test -s conftest$ac_exeext &&
16702        $as_test_x conftest$ac_exeext; then
16703   ac_cv_lib_GL_glXCreateContext=yes
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 sed 's/^/| /' conftest.$ac_ext >&5
16707
16708         ac_cv_lib_GL_glXCreateContext=no
16709 fi
16710
16711 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16712       conftest$ac_exeext conftest.$ac_ext
16713 LIBS=$ac_check_lib_save_LIBS
16714 fi
16715 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16716 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16717 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16718   gl_lib_1="GL"
16719                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16720 fi
16721
16722   CPPFLAGS="$ac_save_CPPFLAGS"
16723   LDFLAGS="$ac_save_LDFLAGS"
16724 #  LIBS="$ac_save_LIBS"
16725
16726     fi
16727
16728     if test "$gl_lib_1" = "" ; then
16729       # we have headers, but no libs -- bail.
16730       have_gl=no
16731       ac_have_mesa_gl=no
16732       gl_halfassed=yes
16733     else
16734       # linking works -- we can build the GL hacks.
16735       cat >>confdefs.h <<\_ACEOF
16736 #define HAVE_GL 1
16737 _ACEOF
16738
16739       if test "$ac_have_mesa_gl" = yes ; then
16740         cat >>confdefs.h <<\_ACEOF
16741 #define HAVE_MESA_GL 1
16742 _ACEOF
16743
16744       fi
16745     fi
16746   fi
16747
16748
16749   # Now that we know we have GL headers and libs, do some more GL testing.
16750   #
16751
16752   if test "$have_gl" = yes ; then
16753     # If it's MesaGL, we'd like to issue a warning if the version number
16754     # is less than or equal to 2.6, because that version had a security bug.
16755     #
16756     if test "$ac_have_mesa_gl" = yes; then
16757
16758       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16759 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16760 if test "${ac_cv_mesagl_version_string+set}" = set; then
16761   echo $ECHO_N "(cached) $ECHO_C" >&6
16762 else
16763   cat > conftest.$ac_ext <<EOF
16764 #line 16768 "configure"
16765 #include "confdefs.h"
16766 #include <GL/gl.h>
16767 #ifndef MESA_MAJOR_VERSION
16768 # include <GL/xmesa.h>
16769 # ifdef XMESA_MAJOR_VERSION
16770    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16771       we have to check the XMesa version number (the number of the X protocol
16772       support, which seems to be the same as the Mesa version number.)
16773     */
16774 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16775 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16776 # else
16777    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16778       so we have no way of telling what version of Mesa this is at all.
16779       So, we'll guess that the osmesa version (the "offscreen protocol")
16780       is less than or equal to the real mesa version number.  Except that
16781       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16782       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16783     */
16784 # include <GL/osmesa.h>
16785 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16786 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16787 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16788 #   undef MESA_MINOR_VERSION
16789 #   define MESA_MINOR_VERSION 4 or newer, probably?
16790 #  endif
16791 # endif
16792 #endif
16793 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16794 EOF
16795
16796          ac_save_CPPFLAGS="$CPPFLAGS"
16797          if test \! -z "$includedir" ; then
16798            CPPFLAGS="$CPPFLAGS -I$includedir"
16799          fi
16800          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16801
16802          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16803
16804          # M4 sucks!!
16805
16806           mglv=`echo "$mglv" | sed -n \
16807              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16808
16809
16810          rm -rf conftest.$ac_ext
16811
16812          CPPFLAGS="$ac_save_CPPFLAGS"
16813
16814          if test "$mglv" = ""; then
16815            ac_mesagl_version=unknown
16816            ac_mesagl_version_string=unknown
16817          else
16818            ac_mesagl_version_string="$mglv"
16819            # M4 sucks!!
16820
16821            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16822            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16823
16824            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16825            if test -z "$ac_mesagl_version"; then
16826              ac_mesagl_version=unknown
16827              ac_mesagl_version_string=unknown
16828            fi
16829          fi
16830          ac_cv_mesagl_version=$ac_mesagl_version
16831          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16832
16833 fi
16834 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16835 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16836       ac_mesagl_version=$ac_cv_mesagl_version
16837       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16838     fi
16839
16840
16841     # Check for OpenGL 1.1 features.
16842     #
16843
16844   ac_save_CPPFLAGS="$CPPFLAGS"
16845   ac_save_LDFLAGS="$LDFLAGS"
16846 #  ac_save_LIBS="$LIBS"
16847
16848   if test \! -z "$includedir" ; then
16849     CPPFLAGS="$CPPFLAGS -I$includedir"
16850   fi
16851   # note: $X_CFLAGS includes $x_includes
16852   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16853
16854   if test \! -z "$libdir" ; then
16855     LDFLAGS="$LDFLAGS -L$libdir"
16856   fi
16857   # note: $X_LIBS includes $x_libraries
16858   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16859
16860   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16861   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16862   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16863 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16864 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16865 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16866   echo $ECHO_N "(cached) $ECHO_C" >&6
16867 else
16868   ac_check_lib_save_LIBS=$LIBS
16869 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16870 cat >conftest.$ac_ext <<_ACEOF
16871 /* confdefs.h.  */
16872 _ACEOF
16873 cat confdefs.h >>conftest.$ac_ext
16874 cat >>conftest.$ac_ext <<_ACEOF
16875 /* end confdefs.h.  */
16876
16877 /* Override any GCC internal prototype to avoid an error.
16878    Use char because int might match the return type of a GCC
16879    builtin and then its argument prototype would still apply.  */
16880 #ifdef __cplusplus
16881 extern "C"
16882 #endif
16883 char glBindTexture ();
16884 int
16885 main ()
16886 {
16887 return glBindTexture ();
16888   ;
16889   return 0;
16890 }
16891 _ACEOF
16892 rm -rf conftest.$ac_objext conftest$ac_exeext
16893 if { (ac_try="$ac_link"
16894 case "(($ac_try" in
16895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16896   *) ac_try_echo=$ac_try;;
16897 esac
16898 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16899   (eval "$ac_link") 2>conftest.er1
16900   ac_status=$?
16901   grep -v '^ *+' conftest.er1 >conftest.err
16902   rm -rf conftest.er1
16903   cat conftest.err >&5
16904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16905   (exit $ac_status); } && {
16906          test -z "$ac_c_werror_flag" ||
16907          test ! -s conftest.err
16908        } && test -s conftest$ac_exeext &&
16909        $as_test_x conftest$ac_exeext; then
16910   eval "$as_ac_Lib=yes"
16911 else
16912   echo "$as_me: failed program was:" >&5
16913 sed 's/^/| /' conftest.$ac_ext >&5
16914
16915         eval "$as_ac_Lib=no"
16916 fi
16917
16918 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16919       conftest$ac_exeext conftest.$ac_ext
16920 LIBS=$ac_check_lib_save_LIBS
16921 fi
16922 ac_res=`eval echo '${'$as_ac_Lib'}'`
16923                { echo "$as_me:$LINENO: result: $ac_res" >&5
16924 echo "${ECHO_T}$ac_res" >&6; }
16925 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16926   cat >>confdefs.h <<\_ACEOF
16927 #define HAVE_GLBINDTEXTURE 1
16928 _ACEOF
16929
16930 else
16931   true
16932 fi
16933
16934   CPPFLAGS="$ac_save_CPPFLAGS"
16935   LDFLAGS="$ac_save_LDFLAGS"
16936 #  LIBS="$ac_save_LIBS"
16937
16938   fi
16939
16940 elif test "$with_gl" != no; then
16941   echo "error: must be yes or no: --with-gl=$with_gl"
16942   exit 1
16943 fi
16944
16945
16946 ###############################################################################
16947 #
16948 #       Check for -lgle.
16949 #
16950 ###############################################################################
16951
16952 have_gle=no
16953 with_gle_req=unspecified
16954 gle_halfassed=no
16955
16956 # Check whether --with-gle was given.
16957 if test "${with_gle+set}" = set; then
16958   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16959 else
16960   with_gle=yes
16961 fi
16962
16963
16964
16965    case "$with_gle" in
16966     yes) ;;
16967     no)  ;;
16968
16969     /*)
16970      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16971 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16972      d=$with_gle/include
16973      if test -d $d; then
16974        X_CFLAGS="-I$d $X_CFLAGS"
16975        { echo "$as_me:$LINENO: result: $d" >&5
16976 echo "${ECHO_T}$d" >&6; }
16977      else
16978        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16979 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16980      fi
16981
16982      { echo "$as_me:$LINENO: checking for GLE libs" >&5
16983 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
16984      d=$with_gle/lib
16985      if test -d $d; then
16986        X_LIBS="-L$d $X_LIBS"
16987        { echo "$as_me:$LINENO: result: $d" >&5
16988 echo "${ECHO_T}$d" >&6; }
16989      else
16990        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16991 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16992      fi
16993
16994      # replace the directory string with "yes".
16995      with_gle_req="yes"
16996      with_gle=$with_gle_req
16997      ;;
16998
16999     *)
17000      echo ""
17001      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17002      echo "       If it is a directory, then \`DIR/include' will be added to"
17003      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17004      exit 1
17005      ;;
17006    esac
17007
17008
17009 GLE_LIBS=""
17010
17011 if test "$have_gl" = no ; then
17012  true
17013 elif test "$with_gle" = yes; then
17014
17015
17016   ac_save_CPPFLAGS="$CPPFLAGS"
17017   if test \! -z "$includedir" ; then
17018     CPPFLAGS="$CPPFLAGS -I$includedir"
17019   fi
17020   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17021   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17022   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17023 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17024 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17025   echo $ECHO_N "(cached) $ECHO_C" >&6
17026 else
17027   cat >conftest.$ac_ext <<_ACEOF
17028 /* confdefs.h.  */
17029 _ACEOF
17030 cat confdefs.h >>conftest.$ac_ext
17031 cat >>conftest.$ac_ext <<_ACEOF
17032 /* end confdefs.h.  */
17033 #include <GL/gl.h>
17034
17035 #include <GL/gle.h>
17036 _ACEOF
17037 rm -rf conftest.$ac_objext
17038 if { (ac_try="$ac_compile"
17039 case "(($ac_try" in
17040   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17041   *) ac_try_echo=$ac_try;;
17042 esac
17043 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17044   (eval "$ac_compile") 2>conftest.er1
17045   ac_status=$?
17046   grep -v '^ *+' conftest.er1 >conftest.err
17047   rm -rf conftest.er1
17048   cat conftest.err >&5
17049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17050   (exit $ac_status); } && {
17051          test -z "$ac_c_werror_flag" ||
17052          test ! -s conftest.err
17053        } && test -s conftest.$ac_objext; then
17054   ac_cv_header_GL_gle_h=yes
17055 else
17056   echo "$as_me: failed program was:" >&5
17057 sed 's/^/| /' conftest.$ac_ext >&5
17058
17059         ac_cv_header_GL_gle_h=no
17060 fi
17061
17062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17063 fi
17064 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17065 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17066 if test $ac_cv_header_GL_gle_h = yes; then
17067   have_gle3=yes
17068 else
17069   have_gle3=no
17070 fi
17071
17072
17073   CPPFLAGS="$ac_save_CPPFLAGS"
17074   if test "$have_gle3" = yes ; then
17075     have_gle=yes;
17076   else
17077
17078   ac_save_CPPFLAGS="$CPPFLAGS"
17079   if test \! -z "$includedir" ; then
17080     CPPFLAGS="$CPPFLAGS -I$includedir"
17081   fi
17082   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17083   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17084   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17085 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17086 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17087   echo $ECHO_N "(cached) $ECHO_C" >&6
17088 else
17089   cat >conftest.$ac_ext <<_ACEOF
17090 /* confdefs.h.  */
17091 _ACEOF
17092 cat confdefs.h >>conftest.$ac_ext
17093 cat >>conftest.$ac_ext <<_ACEOF
17094 /* end confdefs.h.  */
17095 #include <GL/gl.h>
17096
17097 #include <GL/gutil.h>
17098 _ACEOF
17099 rm -rf conftest.$ac_objext
17100 if { (ac_try="$ac_compile"
17101 case "(($ac_try" in
17102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17103   *) ac_try_echo=$ac_try;;
17104 esac
17105 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17106   (eval "$ac_compile") 2>conftest.er1
17107   ac_status=$?
17108   grep -v '^ *+' conftest.er1 >conftest.err
17109   rm -rf conftest.er1
17110   cat conftest.err >&5
17111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17112   (exit $ac_status); } && {
17113          test -z "$ac_c_werror_flag" ||
17114          test ! -s conftest.err
17115        } && test -s conftest.$ac_objext; then
17116   ac_cv_header_GL_gutil_h=yes
17117 else
17118   echo "$as_me: failed program was:" >&5
17119 sed 's/^/| /' conftest.$ac_ext >&5
17120
17121         ac_cv_header_GL_gutil_h=no
17122 fi
17123
17124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17125 fi
17126 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17127 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17128 if test $ac_cv_header_GL_gutil_h = yes; then
17129   have_gle=yes
17130 else
17131   have_gle=no
17132 fi
17133
17134
17135   CPPFLAGS="$ac_save_CPPFLAGS"
17136     if test "$have_gle" = yes ; then
17137
17138   ac_save_CPPFLAGS="$CPPFLAGS"
17139   if test \! -z "$includedir" ; then
17140     CPPFLAGS="$CPPFLAGS -I$includedir"
17141   fi
17142   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17143   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17144   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17145 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17146 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17147   echo $ECHO_N "(cached) $ECHO_C" >&6
17148 else
17149   cat >conftest.$ac_ext <<_ACEOF
17150 /* confdefs.h.  */
17151 _ACEOF
17152 cat confdefs.h >>conftest.$ac_ext
17153 cat >>conftest.$ac_ext <<_ACEOF
17154 /* end confdefs.h.  */
17155 #include <GL/gl.h>
17156
17157 #include <GL/tube.h>
17158 _ACEOF
17159 rm -rf conftest.$ac_objext
17160 if { (ac_try="$ac_compile"
17161 case "(($ac_try" in
17162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17163   *) ac_try_echo=$ac_try;;
17164 esac
17165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17166   (eval "$ac_compile") 2>conftest.er1
17167   ac_status=$?
17168   grep -v '^ *+' conftest.er1 >conftest.err
17169   rm -rf conftest.er1
17170   cat conftest.err >&5
17171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172   (exit $ac_status); } && {
17173          test -z "$ac_c_werror_flag" ||
17174          test ! -s conftest.err
17175        } && test -s conftest.$ac_objext; then
17176   ac_cv_header_GL_tube_h=yes
17177 else
17178   echo "$as_me: failed program was:" >&5
17179 sed 's/^/| /' conftest.$ac_ext >&5
17180
17181         ac_cv_header_GL_tube_h=no
17182 fi
17183
17184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17185 fi
17186 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17187 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17188 if test $ac_cv_header_GL_tube_h = yes; then
17189   have_gle=yes
17190 else
17191   have_gle=no
17192 fi
17193
17194
17195   CPPFLAGS="$ac_save_CPPFLAGS"
17196     fi
17197   fi
17198
17199   if test "$have_gle" = yes ; then
17200     have_gle=no
17201     gle_halfassed=yes
17202
17203   ac_save_CPPFLAGS="$CPPFLAGS"
17204   ac_save_LDFLAGS="$LDFLAGS"
17205 #  ac_save_LIBS="$LIBS"
17206
17207   if test \! -z "$includedir" ; then
17208     CPPFLAGS="$CPPFLAGS -I$includedir"
17209   fi
17210   # note: $X_CFLAGS includes $x_includes
17211   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17212
17213   if test \! -z "$libdir" ; then
17214     LDFLAGS="$LDFLAGS -L$libdir"
17215   fi
17216   # note: $X_LIBS includes $x_libraries
17217   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17218
17219   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17220   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17221   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17222 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17223 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17224   echo $ECHO_N "(cached) $ECHO_C" >&6
17225 else
17226   ac_check_lib_save_LIBS=$LIBS
17227 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17228 cat >conftest.$ac_ext <<_ACEOF
17229 /* confdefs.h.  */
17230 _ACEOF
17231 cat confdefs.h >>conftest.$ac_ext
17232 cat >>conftest.$ac_ext <<_ACEOF
17233 /* end confdefs.h.  */
17234
17235 /* Override any GCC internal prototype to avoid an error.
17236    Use char because int might match the return type of a GCC
17237    builtin and then its argument prototype would still apply.  */
17238 #ifdef __cplusplus
17239 extern "C"
17240 #endif
17241 char gleCreateGC ();
17242 int
17243 main ()
17244 {
17245 return gleCreateGC ();
17246   ;
17247   return 0;
17248 }
17249 _ACEOF
17250 rm -rf conftest.$ac_objext conftest$ac_exeext
17251 if { (ac_try="$ac_link"
17252 case "(($ac_try" in
17253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17254   *) ac_try_echo=$ac_try;;
17255 esac
17256 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17257   (eval "$ac_link") 2>conftest.er1
17258   ac_status=$?
17259   grep -v '^ *+' conftest.er1 >conftest.err
17260   rm -rf conftest.er1
17261   cat conftest.err >&5
17262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17263   (exit $ac_status); } && {
17264          test -z "$ac_c_werror_flag" ||
17265          test ! -s conftest.err
17266        } && test -s conftest$ac_exeext &&
17267        $as_test_x conftest$ac_exeext; then
17268   ac_cv_lib_gle_gleCreateGC=yes
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 sed 's/^/| /' conftest.$ac_ext >&5
17272
17273         ac_cv_lib_gle_gleCreateGC=no
17274 fi
17275
17276 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17277       conftest$ac_exeext conftest.$ac_ext
17278 LIBS=$ac_check_lib_save_LIBS
17279 fi
17280 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17281 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17282 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17283   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17284 fi
17285
17286   CPPFLAGS="$ac_save_CPPFLAGS"
17287   LDFLAGS="$ac_save_LDFLAGS"
17288 #  LIBS="$ac_save_LIBS"
17289
17290   fi
17291   if test "$have_gle" = yes ; then
17292     have_gle=no
17293     gle_halfassed=yes
17294
17295     # sometimes the libmatrix stuff is included in libgle.  look there first.
17296 #
17297 # I don't get it.  For some reason, this test passes on SGI, as if
17298 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17299 # Yet the link is succeeding.  Why???
17300 #
17301 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17302 #                   [have_gle=yes; gle_halfassed=no],
17303 #                   [], $GL_LIBS -lX11 -lXext -lm)
17304
17305     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17306     # *sigh*
17307     if test "$have_gle3" = yes ; then
17308
17309   ac_save_CPPFLAGS="$CPPFLAGS"
17310   ac_save_LDFLAGS="$LDFLAGS"
17311 #  ac_save_LIBS="$LIBS"
17312
17313   if test \! -z "$includedir" ; then
17314     CPPFLAGS="$CPPFLAGS -I$includedir"
17315   fi
17316   # note: $X_CFLAGS includes $x_includes
17317   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17318
17319   if test \! -z "$libdir" ; then
17320     LDFLAGS="$LDFLAGS -L$libdir"
17321   fi
17322   # note: $X_LIBS includes $x_libraries
17323   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17324
17325   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17326   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17327   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17328 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17329 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17330   echo $ECHO_N "(cached) $ECHO_C" >&6
17331 else
17332   ac_check_lib_save_LIBS=$LIBS
17333 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17334 cat >conftest.$ac_ext <<_ACEOF
17335 /* confdefs.h.  */
17336 _ACEOF
17337 cat confdefs.h >>conftest.$ac_ext
17338 cat >>conftest.$ac_ext <<_ACEOF
17339 /* end confdefs.h.  */
17340
17341 /* Override any GCC internal prototype to avoid an error.
17342    Use char because int might match the return type of a GCC
17343    builtin and then its argument prototype would still apply.  */
17344 #ifdef __cplusplus
17345 extern "C"
17346 #endif
17347 char uview_direction ();
17348 int
17349 main ()
17350 {
17351 return uview_direction ();
17352   ;
17353   return 0;
17354 }
17355 _ACEOF
17356 rm -rf conftest.$ac_objext conftest$ac_exeext
17357 if { (ac_try="$ac_link"
17358 case "(($ac_try" in
17359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360   *) ac_try_echo=$ac_try;;
17361 esac
17362 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17363   (eval "$ac_link") 2>conftest.er1
17364   ac_status=$?
17365   grep -v '^ *+' conftest.er1 >conftest.err
17366   rm -rf conftest.er1
17367   cat conftest.err >&5
17368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369   (exit $ac_status); } && {
17370          test -z "$ac_c_werror_flag" ||
17371          test ! -s conftest.err
17372        } && test -s conftest$ac_exeext &&
17373        $as_test_x conftest$ac_exeext; then
17374   ac_cv_lib_gle_uview_direction=yes
17375 else
17376   echo "$as_me: failed program was:" >&5
17377 sed 's/^/| /' conftest.$ac_ext >&5
17378
17379         ac_cv_lib_gle_uview_direction=no
17380 fi
17381
17382 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17383       conftest$ac_exeext conftest.$ac_ext
17384 LIBS=$ac_check_lib_save_LIBS
17385 fi
17386 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17387 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17388 if test $ac_cv_lib_gle_uview_direction = yes; then
17389   have_gle=yes; gle_halfassed=no
17390 fi
17391
17392   CPPFLAGS="$ac_save_CPPFLAGS"
17393   LDFLAGS="$ac_save_LDFLAGS"
17394 #  LIBS="$ac_save_LIBS"
17395
17396     fi
17397     # if it wasn't in libgle, then look in libmatrix.
17398     if test "$have_gle" = no ; then
17399
17400   ac_save_CPPFLAGS="$CPPFLAGS"
17401   ac_save_LDFLAGS="$LDFLAGS"
17402 #  ac_save_LIBS="$LIBS"
17403
17404   if test \! -z "$includedir" ; then
17405     CPPFLAGS="$CPPFLAGS -I$includedir"
17406   fi
17407   # note: $X_CFLAGS includes $x_includes
17408   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17409
17410   if test \! -z "$libdir" ; then
17411     LDFLAGS="$LDFLAGS -L$libdir"
17412   fi
17413   # note: $X_LIBS includes $x_libraries
17414   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17415
17416   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17417   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17418   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17419 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17420 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17421   echo $ECHO_N "(cached) $ECHO_C" >&6
17422 else
17423   ac_check_lib_save_LIBS=$LIBS
17424 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17425 cat >conftest.$ac_ext <<_ACEOF
17426 /* confdefs.h.  */
17427 _ACEOF
17428 cat confdefs.h >>conftest.$ac_ext
17429 cat >>conftest.$ac_ext <<_ACEOF
17430 /* end confdefs.h.  */
17431
17432 /* Override any GCC internal prototype to avoid an error.
17433    Use char because int might match the return type of a GCC
17434    builtin and then its argument prototype would still apply.  */
17435 #ifdef __cplusplus
17436 extern "C"
17437 #endif
17438 char uview_direction_d ();
17439 int
17440 main ()
17441 {
17442 return uview_direction_d ();
17443   ;
17444   return 0;
17445 }
17446 _ACEOF
17447 rm -rf conftest.$ac_objext conftest$ac_exeext
17448 if { (ac_try="$ac_link"
17449 case "(($ac_try" in
17450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17451   *) ac_try_echo=$ac_try;;
17452 esac
17453 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17454   (eval "$ac_link") 2>conftest.er1
17455   ac_status=$?
17456   grep -v '^ *+' conftest.er1 >conftest.err
17457   rm -rf conftest.er1
17458   cat conftest.err >&5
17459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17460   (exit $ac_status); } && {
17461          test -z "$ac_c_werror_flag" ||
17462          test ! -s conftest.err
17463        } && test -s conftest$ac_exeext &&
17464        $as_test_x conftest$ac_exeext; then
17465   ac_cv_lib_matrix_uview_direction_d=yes
17466 else
17467   echo "$as_me: failed program was:" >&5
17468 sed 's/^/| /' conftest.$ac_ext >&5
17469
17470         ac_cv_lib_matrix_uview_direction_d=no
17471 fi
17472
17473 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17474       conftest$ac_exeext conftest.$ac_ext
17475 LIBS=$ac_check_lib_save_LIBS
17476 fi
17477 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17478 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17479 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17480   have_gle=yes; gle_halfassed=no;
17481                       GLE_LIBS="$GLE_LIBS -lmatrix"
17482 fi
17483
17484   CPPFLAGS="$ac_save_CPPFLAGS"
17485   LDFLAGS="$ac_save_LDFLAGS"
17486 #  LIBS="$ac_save_LIBS"
17487
17488     fi
17489   fi
17490
17491   if test "$have_gle" = yes ; then
17492     cat >>confdefs.h <<\_ACEOF
17493 #define HAVE_GLE 1
17494 _ACEOF
17495
17496     if test "$have_gle3" = yes ; then
17497       cat >>confdefs.h <<\_ACEOF
17498 #define HAVE_GLE3 1
17499 _ACEOF
17500
17501     fi
17502   fi
17503
17504 elif test "$with_gle" != no; then
17505   echo "error: must be yes or no: --with-gle=$with_gle"
17506   exit 1
17507
17508 fi
17509
17510
17511 ###############################################################################
17512 #
17513 #       Check for -lgdk_pixbuf.
17514 #       These tests are for gdk_pixbuf usage of the hacks,
17515 #       not xscreensaver-demo (thus we have to test again to get
17516 #       the libraries right: don't want to pull in all of GTK
17517 #       for the hacks.)
17518 #
17519 ###############################################################################
17520
17521 have_gdk_pixbuf=no
17522 with_gdk_pixbuf_req=unspecified
17523
17524 # Check whether --with-pixbuf was given.
17525 if test "${with_pixbuf+set}" = set; then
17526   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17527 else
17528   with_gdk_pixbuf=yes
17529 fi
17530
17531
17532 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17533 # we can also look for the `gdk-pixbuf-config' program in that directory.
17534 case "$with_gdk_pixbuf" in
17535   /*)
17536     gdk_pixbuf_dir="$with_gdk_pixbuf"
17537     ;;
17538   *)
17539     gdk_pixbuf_dir=""
17540     ;;
17541 esac
17542
17543
17544    case "$with_gdk_pixbuf" in
17545     yes) ;;
17546     no)  ;;
17547
17548     /*)
17549      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17550 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17551      d=$with_gdk_pixbuf/include
17552      if test -d $d; then
17553        X_CFLAGS="-I$d $X_CFLAGS"
17554        { echo "$as_me:$LINENO: result: $d" >&5
17555 echo "${ECHO_T}$d" >&6; }
17556      else
17557        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17558 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17559      fi
17560
17561      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17562 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17563      d=$with_gdk_pixbuf/lib
17564      if test -d $d; then
17565        X_LIBS="-L$d $X_LIBS"
17566        { echo "$as_me:$LINENO: result: $d" >&5
17567 echo "${ECHO_T}$d" >&6; }
17568      else
17569        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17570 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17571      fi
17572
17573      # replace the directory string with "yes".
17574      with_gdk_pixbuf_req="yes"
17575      with_gdk_pixbuf=$with_gdk_pixbuf_req
17576      ;;
17577
17578     *)
17579      echo ""
17580      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17581      echo "       If it is a directory, then \`DIR/include' will be added to"
17582      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17583      exit 1
17584      ;;
17585    esac
17586
17587
17588 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17589   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17590   exit 1
17591 fi
17592
17593 if test "$with_gdk_pixbuf" = yes; then
17594   have_gdk_pixbuf=no
17595
17596   pkgs=''
17597   ok="yes"
17598
17599   pkg_check_version gdk-pixbuf-2.0      2.0.0
17600   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17601   have_gdk_pixbuf="$ok"
17602
17603   if test "$have_gdk_pixbuf" = yes; then
17604     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17605 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17606 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17607   echo $ECHO_N "(cached) $ECHO_C" >&6
17608 else
17609   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17610 fi
17611 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17612 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17613     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17614 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17615 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17616   echo $ECHO_N "(cached) $ECHO_C" >&6
17617 else
17618   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17619 fi
17620 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17621 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17622   fi
17623
17624   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17625   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17626
17627
17628   if test "$have_gdk_pixbuf" = yes; then
17629     #
17630     # we appear to have pixbuf; check for headers/libs to be sure.
17631     #
17632     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17633     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17634
17635     have_gdk_pixbuf=no
17636
17637     # check for header A...
17638
17639   ac_save_CPPFLAGS="$CPPFLAGS"
17640   if test \! -z "$includedir" ; then
17641     CPPFLAGS="$CPPFLAGS -I$includedir"
17642   fi
17643   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17644   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17645   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17646   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17647 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17648 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17649   echo $ECHO_N "(cached) $ECHO_C" >&6
17650 fi
17651 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17652 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17653 else
17654   # Is the header compilable?
17655 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17656 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17657 cat >conftest.$ac_ext <<_ACEOF
17658 /* confdefs.h.  */
17659 _ACEOF
17660 cat confdefs.h >>conftest.$ac_ext
17661 cat >>conftest.$ac_ext <<_ACEOF
17662 /* end confdefs.h.  */
17663 $ac_includes_default
17664 #include <gdk-pixbuf/gdk-pixbuf.h>
17665 _ACEOF
17666 rm -rf conftest.$ac_objext
17667 if { (ac_try="$ac_compile"
17668 case "(($ac_try" in
17669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670   *) ac_try_echo=$ac_try;;
17671 esac
17672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17673   (eval "$ac_compile") 2>conftest.er1
17674   ac_status=$?
17675   grep -v '^ *+' conftest.er1 >conftest.err
17676   rm -rf conftest.er1
17677   cat conftest.err >&5
17678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679   (exit $ac_status); } && {
17680          test -z "$ac_c_werror_flag" ||
17681          test ! -s conftest.err
17682        } && test -s conftest.$ac_objext; then
17683   ac_header_compiler=yes
17684 else
17685   echo "$as_me: failed program was:" >&5
17686 sed 's/^/| /' conftest.$ac_ext >&5
17687
17688         ac_header_compiler=no
17689 fi
17690
17691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17692 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17693 echo "${ECHO_T}$ac_header_compiler" >&6; }
17694
17695 # Is the header present?
17696 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17697 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17698 cat >conftest.$ac_ext <<_ACEOF
17699 /* confdefs.h.  */
17700 _ACEOF
17701 cat confdefs.h >>conftest.$ac_ext
17702 cat >>conftest.$ac_ext <<_ACEOF
17703 /* end confdefs.h.  */
17704 #include <gdk-pixbuf/gdk-pixbuf.h>
17705 _ACEOF
17706 if { (ac_try="$ac_cpp conftest.$ac_ext"
17707 case "(($ac_try" in
17708   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17709   *) ac_try_echo=$ac_try;;
17710 esac
17711 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17712   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17713   ac_status=$?
17714   grep -v '^ *+' conftest.er1 >conftest.err
17715   rm -rf conftest.er1
17716   cat conftest.err >&5
17717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17718   (exit $ac_status); } >/dev/null && {
17719          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17720          test ! -s conftest.err
17721        }; then
17722   ac_header_preproc=yes
17723 else
17724   echo "$as_me: failed program was:" >&5
17725 sed 's/^/| /' conftest.$ac_ext >&5
17726
17727   ac_header_preproc=no
17728 fi
17729
17730 rm -rf conftest.err conftest.$ac_ext
17731 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17732 echo "${ECHO_T}$ac_header_preproc" >&6; }
17733
17734 # So?  What about this header?
17735 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17736   yes:no: )
17737     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17738 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17739     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17740 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17741     ac_header_preproc=yes
17742     ;;
17743   no:yes:* )
17744     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17745 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17746     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17747 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17748     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17749 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17750     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17751 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17752     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17753 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17754     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17755 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17756
17757     ;;
17758 esac
17759 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17760 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17761 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17762   echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17764   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17765 fi
17766 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17767 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17768
17769 fi
17770 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17771   have_gdk_pixbuf=yes
17772 fi
17773
17774
17775   CPPFLAGS="$ac_save_CPPFLAGS"
17776
17777     # if that worked, check for header B...
17778     if test "$have_gdk_pixbuf" = yes; then
17779       have_gdk_pixbuf=no
17780       gdk_pixbuf_halfassed=yes
17781
17782   ac_save_CPPFLAGS="$CPPFLAGS"
17783   if test \! -z "$includedir" ; then
17784     CPPFLAGS="$CPPFLAGS -I$includedir"
17785   fi
17786   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17787   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17788   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17789   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17790 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17791 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17792   echo $ECHO_N "(cached) $ECHO_C" >&6
17793 fi
17794 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17795 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17796 else
17797   # Is the header compilable?
17798 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17799 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17800 cat >conftest.$ac_ext <<_ACEOF
17801 /* confdefs.h.  */
17802 _ACEOF
17803 cat confdefs.h >>conftest.$ac_ext
17804 cat >>conftest.$ac_ext <<_ACEOF
17805 /* end confdefs.h.  */
17806 $ac_includes_default
17807 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17808 _ACEOF
17809 rm -rf conftest.$ac_objext
17810 if { (ac_try="$ac_compile"
17811 case "(($ac_try" in
17812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17813   *) ac_try_echo=$ac_try;;
17814 esac
17815 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17816   (eval "$ac_compile") 2>conftest.er1
17817   ac_status=$?
17818   grep -v '^ *+' conftest.er1 >conftest.err
17819   rm -rf conftest.er1
17820   cat conftest.err >&5
17821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17822   (exit $ac_status); } && {
17823          test -z "$ac_c_werror_flag" ||
17824          test ! -s conftest.err
17825        } && test -s conftest.$ac_objext; then
17826   ac_header_compiler=yes
17827 else
17828   echo "$as_me: failed program was:" >&5
17829 sed 's/^/| /' conftest.$ac_ext >&5
17830
17831         ac_header_compiler=no
17832 fi
17833
17834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17835 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17836 echo "${ECHO_T}$ac_header_compiler" >&6; }
17837
17838 # Is the header present?
17839 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17840 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17841 cat >conftest.$ac_ext <<_ACEOF
17842 /* confdefs.h.  */
17843 _ACEOF
17844 cat confdefs.h >>conftest.$ac_ext
17845 cat >>conftest.$ac_ext <<_ACEOF
17846 /* end confdefs.h.  */
17847 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17848 _ACEOF
17849 if { (ac_try="$ac_cpp conftest.$ac_ext"
17850 case "(($ac_try" in
17851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17852   *) ac_try_echo=$ac_try;;
17853 esac
17854 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17855   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17856   ac_status=$?
17857   grep -v '^ *+' conftest.er1 >conftest.err
17858   rm -rf conftest.er1
17859   cat conftest.err >&5
17860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861   (exit $ac_status); } >/dev/null && {
17862          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17863          test ! -s conftest.err
17864        }; then
17865   ac_header_preproc=yes
17866 else
17867   echo "$as_me: failed program was:" >&5
17868 sed 's/^/| /' conftest.$ac_ext >&5
17869
17870   ac_header_preproc=no
17871 fi
17872
17873 rm -rf conftest.err conftest.$ac_ext
17874 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17875 echo "${ECHO_T}$ac_header_preproc" >&6; }
17876
17877 # So?  What about this header?
17878 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17879   yes:no: )
17880     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17881 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17882     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17883 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17884     ac_header_preproc=yes
17885     ;;
17886   no:yes:* )
17887     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17888 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17889     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17890 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17891     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17892 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17893     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17894 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17895     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17896 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17897     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17898 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17899
17900     ;;
17901 esac
17902 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17903 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17904 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17905   echo $ECHO_N "(cached) $ECHO_C" >&6
17906 else
17907   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17908 fi
17909 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17910 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17911
17912 fi
17913 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17914   have_gdk_pixbuf=yes
17915                          gdk_pixbuf_halfassed=no
17916 fi
17917
17918
17919   CPPFLAGS="$ac_save_CPPFLAGS"
17920
17921       # yay, it has a new name in Gtk 2.x...
17922       if test "$have_gdk_pixbuf" = no; then
17923         have_gdk_pixbuf=no
17924         gdk_pixbuf_halfassed=yes
17925
17926   ac_save_CPPFLAGS="$CPPFLAGS"
17927   if test \! -z "$includedir" ; then
17928     CPPFLAGS="$CPPFLAGS -I$includedir"
17929   fi
17930   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17931   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17932   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17933   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17934 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17935 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17936   echo $ECHO_N "(cached) $ECHO_C" >&6
17937 fi
17938 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17939 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17940 else
17941   # Is the header compilable?
17942 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17943 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17944 cat >conftest.$ac_ext <<_ACEOF
17945 /* confdefs.h.  */
17946 _ACEOF
17947 cat confdefs.h >>conftest.$ac_ext
17948 cat >>conftest.$ac_ext <<_ACEOF
17949 /* end confdefs.h.  */
17950 $ac_includes_default
17951 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17952 _ACEOF
17953 rm -rf conftest.$ac_objext
17954 if { (ac_try="$ac_compile"
17955 case "(($ac_try" in
17956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17957   *) ac_try_echo=$ac_try;;
17958 esac
17959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17960   (eval "$ac_compile") 2>conftest.er1
17961   ac_status=$?
17962   grep -v '^ *+' conftest.er1 >conftest.err
17963   rm -rf conftest.er1
17964   cat conftest.err >&5
17965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17966   (exit $ac_status); } && {
17967          test -z "$ac_c_werror_flag" ||
17968          test ! -s conftest.err
17969        } && test -s conftest.$ac_objext; then
17970   ac_header_compiler=yes
17971 else
17972   echo "$as_me: failed program was:" >&5
17973 sed 's/^/| /' conftest.$ac_ext >&5
17974
17975         ac_header_compiler=no
17976 fi
17977
17978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17979 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17980 echo "${ECHO_T}$ac_header_compiler" >&6; }
17981
17982 # Is the header present?
17983 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17984 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17985 cat >conftest.$ac_ext <<_ACEOF
17986 /* confdefs.h.  */
17987 _ACEOF
17988 cat confdefs.h >>conftest.$ac_ext
17989 cat >>conftest.$ac_ext <<_ACEOF
17990 /* end confdefs.h.  */
17991 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17992 _ACEOF
17993 if { (ac_try="$ac_cpp conftest.$ac_ext"
17994 case "(($ac_try" in
17995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17996   *) ac_try_echo=$ac_try;;
17997 esac
17998 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17999   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18000   ac_status=$?
18001   grep -v '^ *+' conftest.er1 >conftest.err
18002   rm -rf conftest.er1
18003   cat conftest.err >&5
18004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005   (exit $ac_status); } >/dev/null && {
18006          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18007          test ! -s conftest.err
18008        }; then
18009   ac_header_preproc=yes
18010 else
18011   echo "$as_me: failed program was:" >&5
18012 sed 's/^/| /' conftest.$ac_ext >&5
18013
18014   ac_header_preproc=no
18015 fi
18016
18017 rm -rf conftest.err conftest.$ac_ext
18018 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18019 echo "${ECHO_T}$ac_header_preproc" >&6; }
18020
18021 # So?  What about this header?
18022 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18023   yes:no: )
18024     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18025 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18026     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18027 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18028     ac_header_preproc=yes
18029     ;;
18030   no:yes:* )
18031     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18032 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18033     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18034 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18035     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18036 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18037     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18038 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18039     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18040 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18041     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18042 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18043
18044     ;;
18045 esac
18046 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18047 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18048 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18049   echo $ECHO_N "(cached) $ECHO_C" >&6
18050 else
18051   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18052 fi
18053 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18054 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18055
18056 fi
18057 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18058   have_gdk_pixbuf=yes
18059                            gdk_pixbuf_halfassed=no
18060 fi
18061
18062
18063   CPPFLAGS="$ac_save_CPPFLAGS"
18064       fi
18065     fi
18066     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18067   fi
18068
18069   if test "$have_gdk_pixbuf" = yes; then
18070     # we have the headers, now check for the libraries
18071     have_gdk_pixbuf=no
18072     gdk_pixbuf_halfassed=yes
18073
18074     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18075 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18076
18077     # library A...
18078
18079   ac_save_CPPFLAGS="$CPPFLAGS"
18080   ac_save_LDFLAGS="$LDFLAGS"
18081 #  ac_save_LIBS="$LIBS"
18082
18083   if test \! -z "$includedir" ; then
18084     CPPFLAGS="$CPPFLAGS -I$includedir"
18085   fi
18086   # note: $X_CFLAGS includes $x_includes
18087   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18088
18089   if test \! -z "$libdir" ; then
18090     LDFLAGS="$LDFLAGS -L$libdir"
18091   fi
18092   # note: $X_LIBS includes $x_libraries
18093   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18094
18095   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18096   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18097   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18098 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18099 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18100   echo $ECHO_N "(cached) $ECHO_C" >&6
18101 else
18102   ac_check_lib_save_LIBS=$LIBS
18103 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18104 cat >conftest.$ac_ext <<_ACEOF
18105 /* confdefs.h.  */
18106 _ACEOF
18107 cat confdefs.h >>conftest.$ac_ext
18108 cat >>conftest.$ac_ext <<_ACEOF
18109 /* end confdefs.h.  */
18110
18111 /* Override any GCC internal prototype to avoid an error.
18112    Use char because int might match the return type of a GCC
18113    builtin and then its argument prototype would still apply.  */
18114 #ifdef __cplusplus
18115 extern "C"
18116 #endif
18117 char gdk_pixbuf_new_from_file ();
18118 int
18119 main ()
18120 {
18121 return gdk_pixbuf_new_from_file ();
18122   ;
18123   return 0;
18124 }
18125 _ACEOF
18126 rm -rf conftest.$ac_objext conftest$ac_exeext
18127 if { (ac_try="$ac_link"
18128 case "(($ac_try" in
18129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18130   *) ac_try_echo=$ac_try;;
18131 esac
18132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18133   (eval "$ac_link") 2>conftest.er1
18134   ac_status=$?
18135   grep -v '^ *+' conftest.er1 >conftest.err
18136   rm -rf conftest.er1
18137   cat conftest.err >&5
18138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18139   (exit $ac_status); } && {
18140          test -z "$ac_c_werror_flag" ||
18141          test ! -s conftest.err
18142        } && test -s conftest$ac_exeext &&
18143        $as_test_x conftest$ac_exeext; then
18144   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18145 else
18146   echo "$as_me: failed program was:" >&5
18147 sed 's/^/| /' conftest.$ac_ext >&5
18148
18149         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18150 fi
18151
18152 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18153       conftest$ac_exeext conftest.$ac_ext
18154 LIBS=$ac_check_lib_save_LIBS
18155 fi
18156 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18157 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18158 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18159   have_gdk_pixbuf=yes
18160 fi
18161
18162   CPPFLAGS="$ac_save_CPPFLAGS"
18163   LDFLAGS="$ac_save_LDFLAGS"
18164 #  LIBS="$ac_save_LIBS"
18165
18166     # library B...
18167     if test "$have_gdk_pixbuf" = yes; then
18168       have_gdk_pixbuf=no
18169
18170   ac_save_CPPFLAGS="$CPPFLAGS"
18171   ac_save_LDFLAGS="$LDFLAGS"
18172 #  ac_save_LIBS="$LIBS"
18173
18174   if test \! -z "$includedir" ; then
18175     CPPFLAGS="$CPPFLAGS -I$includedir"
18176   fi
18177   # note: $X_CFLAGS includes $x_includes
18178   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18179
18180   if test \! -z "$libdir" ; then
18181     LDFLAGS="$LDFLAGS -L$libdir"
18182   fi
18183   # note: $X_LIBS includes $x_libraries
18184   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18185
18186   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18187   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18188   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18189 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18190 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18191   echo $ECHO_N "(cached) $ECHO_C" >&6
18192 else
18193   ac_check_lib_save_LIBS=$LIBS
18194 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18195 cat >conftest.$ac_ext <<_ACEOF
18196 /* confdefs.h.  */
18197 _ACEOF
18198 cat confdefs.h >>conftest.$ac_ext
18199 cat >>conftest.$ac_ext <<_ACEOF
18200 /* end confdefs.h.  */
18201
18202 /* Override any GCC internal prototype to avoid an error.
18203    Use char because int might match the return type of a GCC
18204    builtin and then its argument prototype would still apply.  */
18205 #ifdef __cplusplus
18206 extern "C"
18207 #endif
18208 char gdk_pixbuf_xlib_init ();
18209 int
18210 main ()
18211 {
18212 return gdk_pixbuf_xlib_init ();
18213   ;
18214   return 0;
18215 }
18216 _ACEOF
18217 rm -rf conftest.$ac_objext conftest$ac_exeext
18218 if { (ac_try="$ac_link"
18219 case "(($ac_try" in
18220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18221   *) ac_try_echo=$ac_try;;
18222 esac
18223 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18224   (eval "$ac_link") 2>conftest.er1
18225   ac_status=$?
18226   grep -v '^ *+' conftest.er1 >conftest.err
18227   rm -rf conftest.er1
18228   cat conftest.err >&5
18229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18230   (exit $ac_status); } && {
18231          test -z "$ac_c_werror_flag" ||
18232          test ! -s conftest.err
18233        } && test -s conftest$ac_exeext &&
18234        $as_test_x conftest$ac_exeext; then
18235   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18236 else
18237   echo "$as_me: failed program was:" >&5
18238 sed 's/^/| /' conftest.$ac_ext >&5
18239
18240         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18241 fi
18242
18243 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18244       conftest$ac_exeext conftest.$ac_ext
18245 LIBS=$ac_check_lib_save_LIBS
18246 fi
18247 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18248 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18249 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18250   have_gdk_pixbuf=yes
18251                       gdk_pixbuf_halfassed=no
18252 fi
18253
18254   CPPFLAGS="$ac_save_CPPFLAGS"
18255   LDFLAGS="$ac_save_LDFLAGS"
18256 #  LIBS="$ac_save_LIBS"
18257
18258     fi
18259   fi
18260
18261   if test "$have_gdk_pixbuf" = yes; then
18262     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18263     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18264     cat >>confdefs.h <<\_ACEOF
18265 #define HAVE_GDK_PIXBUF 1
18266 _ACEOF
18267
18268   else
18269     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18270 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18271   fi
18272 fi
18273
18274
18275 ###############################################################################
18276 #
18277 #       Check for -lXpm.
18278 #
18279 ###############################################################################
18280
18281 have_xpm=no
18282 with_xpm_req=unspecified
18283
18284 # Check whether --with-xpm was given.
18285 if test "${with_xpm+set}" = set; then
18286   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18287 else
18288   with_xpm=yes
18289 fi
18290
18291
18292
18293    case "$with_xpm" in
18294     yes) ;;
18295     no)  ;;
18296
18297     /*)
18298      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18299 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18300      d=$with_xpm/include
18301      if test -d $d; then
18302        X_CFLAGS="-I$d $X_CFLAGS"
18303        { echo "$as_me:$LINENO: result: $d" >&5
18304 echo "${ECHO_T}$d" >&6; }
18305      else
18306        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18307 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18308      fi
18309
18310      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18311 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18312      d=$with_xpm/lib
18313      if test -d $d; then
18314        X_LIBS="-L$d $X_LIBS"
18315        { echo "$as_me:$LINENO: result: $d" >&5
18316 echo "${ECHO_T}$d" >&6; }
18317      else
18318        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18319 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18320      fi
18321
18322      # replace the directory string with "yes".
18323      with_xpm_req="yes"
18324      with_xpm=$with_xpm_req
18325      ;;
18326
18327     *)
18328      echo ""
18329      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18330      echo "       If it is a directory, then \`DIR/include' will be added to"
18331      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18332      exit 1
18333      ;;
18334    esac
18335
18336
18337 if test "$with_xpm" = yes; then
18338
18339   ac_save_CPPFLAGS="$CPPFLAGS"
18340   if test \! -z "$includedir" ; then
18341     CPPFLAGS="$CPPFLAGS -I$includedir"
18342   fi
18343   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18344   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18345   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18346 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18347 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18348   echo $ECHO_N "(cached) $ECHO_C" >&6
18349 else
18350   cat >conftest.$ac_ext <<_ACEOF
18351 /* confdefs.h.  */
18352 _ACEOF
18353 cat confdefs.h >>conftest.$ac_ext
18354 cat >>conftest.$ac_ext <<_ACEOF
18355 /* end confdefs.h.  */
18356 #include <X11/Xlib.h>
18357
18358 #include <X11/xpm.h>
18359 _ACEOF
18360 rm -rf conftest.$ac_objext
18361 if { (ac_try="$ac_compile"
18362 case "(($ac_try" in
18363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18364   *) ac_try_echo=$ac_try;;
18365 esac
18366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18367   (eval "$ac_compile") 2>conftest.er1
18368   ac_status=$?
18369   grep -v '^ *+' conftest.er1 >conftest.err
18370   rm -rf conftest.er1
18371   cat conftest.err >&5
18372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18373   (exit $ac_status); } && {
18374          test -z "$ac_c_werror_flag" ||
18375          test ! -s conftest.err
18376        } && test -s conftest.$ac_objext; then
18377   ac_cv_header_X11_xpm_h=yes
18378 else
18379   echo "$as_me: failed program was:" >&5
18380 sed 's/^/| /' conftest.$ac_ext >&5
18381
18382         ac_cv_header_X11_xpm_h=no
18383 fi
18384
18385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18386 fi
18387 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18388 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18389 if test $ac_cv_header_X11_xpm_h = yes; then
18390   have_xpm=yes
18391                     cat >>confdefs.h <<\_ACEOF
18392 #define HAVE_XPM 1
18393 _ACEOF
18394
18395                     XPM_LIBS="-lXpm $XPM_LIBS"
18396 fi
18397
18398
18399   CPPFLAGS="$ac_save_CPPFLAGS"
18400 elif test "$with_xpm" != no; then
18401   echo "error: must be yes or no: --with-xpm=$with_xpm"
18402   exit 1
18403 fi
18404
18405 # See comment near $motif_requires_xpm, above.
18406 # Need to do this here, after both Motif and XPM have been checked for.
18407 #
18408 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18409   if test "$motif_requires_xpm" = yes ; then
18410     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18411   fi
18412 fi
18413
18414 if test "$XPM_LIBS" = "" ; then
18415   XPM_LIBS=$(MINIXPM)
18416 fi
18417
18418
18419 ###############################################################################
18420 #
18421 #       Check for -ljpeg
18422 #
18423 ###############################################################################
18424
18425 have_jpeg=no
18426 with_jpeg_req=unspecified
18427 jpeg_halfassed=no
18428
18429 # Check whether --with-jpeg was given.
18430 if test "${with_jpeg+set}" = set; then
18431   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18432 else
18433   with_jpeg=yes
18434 fi
18435
18436
18437
18438    case "$with_jpeg" in
18439     yes) ;;
18440     no)  ;;
18441
18442     /*)
18443      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18444 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18445      d=$with_jpeg/include
18446      if test -d $d; then
18447        X_CFLAGS="-I$d $X_CFLAGS"
18448        { echo "$as_me:$LINENO: result: $d" >&5
18449 echo "${ECHO_T}$d" >&6; }
18450      else
18451        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18452 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18453      fi
18454
18455      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18456 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18457      d=$with_jpeg/lib
18458      if test -d $d; then
18459        X_LIBS="-L$d $X_LIBS"
18460        { echo "$as_me:$LINENO: result: $d" >&5
18461 echo "${ECHO_T}$d" >&6; }
18462      else
18463        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18464 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18465      fi
18466
18467      # replace the directory string with "yes".
18468      with_jpeg_req="yes"
18469      with_jpeg=$with_jpeg_req
18470      ;;
18471
18472     *)
18473      echo ""
18474      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18475      echo "       If it is a directory, then \`DIR/include' will be added to"
18476      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18477      exit 1
18478      ;;
18479    esac
18480
18481
18482 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18483   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18484   exit 1
18485 fi
18486
18487 if test "$with_jpeg" = yes; then
18488
18489   have_jpeg=no
18490
18491   ac_save_CPPFLAGS="$CPPFLAGS"
18492   if test \! -z "$includedir" ; then
18493     CPPFLAGS="$CPPFLAGS -I$includedir"
18494   fi
18495   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18496   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18497   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18498   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18499 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18500 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18501   echo $ECHO_N "(cached) $ECHO_C" >&6
18502 fi
18503 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18504 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18505 else
18506   # Is the header compilable?
18507 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18508 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18509 cat >conftest.$ac_ext <<_ACEOF
18510 /* confdefs.h.  */
18511 _ACEOF
18512 cat confdefs.h >>conftest.$ac_ext
18513 cat >>conftest.$ac_ext <<_ACEOF
18514 /* end confdefs.h.  */
18515 $ac_includes_default
18516 #include <jpeglib.h>
18517 _ACEOF
18518 rm -rf conftest.$ac_objext
18519 if { (ac_try="$ac_compile"
18520 case "(($ac_try" in
18521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18522   *) ac_try_echo=$ac_try;;
18523 esac
18524 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18525   (eval "$ac_compile") 2>conftest.er1
18526   ac_status=$?
18527   grep -v '^ *+' conftest.er1 >conftest.err
18528   rm -rf conftest.er1
18529   cat conftest.err >&5
18530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18531   (exit $ac_status); } && {
18532          test -z "$ac_c_werror_flag" ||
18533          test ! -s conftest.err
18534        } && test -s conftest.$ac_objext; then
18535   ac_header_compiler=yes
18536 else
18537   echo "$as_me: failed program was:" >&5
18538 sed 's/^/| /' conftest.$ac_ext >&5
18539
18540         ac_header_compiler=no
18541 fi
18542
18543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18544 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18545 echo "${ECHO_T}$ac_header_compiler" >&6; }
18546
18547 # Is the header present?
18548 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18549 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18550 cat >conftest.$ac_ext <<_ACEOF
18551 /* confdefs.h.  */
18552 _ACEOF
18553 cat confdefs.h >>conftest.$ac_ext
18554 cat >>conftest.$ac_ext <<_ACEOF
18555 /* end confdefs.h.  */
18556 #include <jpeglib.h>
18557 _ACEOF
18558 if { (ac_try="$ac_cpp conftest.$ac_ext"
18559 case "(($ac_try" in
18560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18561   *) ac_try_echo=$ac_try;;
18562 esac
18563 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18564   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18565   ac_status=$?
18566   grep -v '^ *+' conftest.er1 >conftest.err
18567   rm -rf conftest.er1
18568   cat conftest.err >&5
18569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18570   (exit $ac_status); } >/dev/null && {
18571          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18572          test ! -s conftest.err
18573        }; then
18574   ac_header_preproc=yes
18575 else
18576   echo "$as_me: failed program was:" >&5
18577 sed 's/^/| /' conftest.$ac_ext >&5
18578
18579   ac_header_preproc=no
18580 fi
18581
18582 rm -rf conftest.err conftest.$ac_ext
18583 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18584 echo "${ECHO_T}$ac_header_preproc" >&6; }
18585
18586 # So?  What about this header?
18587 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18588   yes:no: )
18589     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18590 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18591     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18592 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18593     ac_header_preproc=yes
18594     ;;
18595   no:yes:* )
18596     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18597 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18598     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18599 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18600     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18601 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18602     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18603 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18604     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18605 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18606     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18607 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18608
18609     ;;
18610 esac
18611 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18612 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18613 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18614   echo $ECHO_N "(cached) $ECHO_C" >&6
18615 else
18616   ac_cv_header_jpeglib_h=$ac_header_preproc
18617 fi
18618 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18619 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18620
18621 fi
18622 if test $ac_cv_header_jpeglib_h = yes; then
18623   have_jpeg=yes
18624 fi
18625
18626
18627   CPPFLAGS="$ac_save_CPPFLAGS"
18628
18629   if test "$have_jpeg" = yes; then
18630     # we have the header, now check for the library
18631     have_jpeg=no
18632     jpeg_halfassed=yes
18633
18634   ac_save_CPPFLAGS="$CPPFLAGS"
18635   ac_save_LDFLAGS="$LDFLAGS"
18636 #  ac_save_LIBS="$LIBS"
18637
18638   if test \! -z "$includedir" ; then
18639     CPPFLAGS="$CPPFLAGS -I$includedir"
18640   fi
18641   # note: $X_CFLAGS includes $x_includes
18642   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18643
18644   if test \! -z "$libdir" ; then
18645     LDFLAGS="$LDFLAGS -L$libdir"
18646   fi
18647   # note: $X_LIBS includes $x_libraries
18648   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18649
18650   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18651   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18652   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18653 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18654 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18655   echo $ECHO_N "(cached) $ECHO_C" >&6
18656 else
18657   ac_check_lib_save_LIBS=$LIBS
18658 LIBS="-ljpeg  $LIBS"
18659 cat >conftest.$ac_ext <<_ACEOF
18660 /* confdefs.h.  */
18661 _ACEOF
18662 cat confdefs.h >>conftest.$ac_ext
18663 cat >>conftest.$ac_ext <<_ACEOF
18664 /* end confdefs.h.  */
18665
18666 /* Override any GCC internal prototype to avoid an error.
18667    Use char because int might match the return type of a GCC
18668    builtin and then its argument prototype would still apply.  */
18669 #ifdef __cplusplus
18670 extern "C"
18671 #endif
18672 char jpeg_start_compress ();
18673 int
18674 main ()
18675 {
18676 return jpeg_start_compress ();
18677   ;
18678   return 0;
18679 }
18680 _ACEOF
18681 rm -rf conftest.$ac_objext conftest$ac_exeext
18682 if { (ac_try="$ac_link"
18683 case "(($ac_try" in
18684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18685   *) ac_try_echo=$ac_try;;
18686 esac
18687 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18688   (eval "$ac_link") 2>conftest.er1
18689   ac_status=$?
18690   grep -v '^ *+' conftest.er1 >conftest.err
18691   rm -rf conftest.er1
18692   cat conftest.err >&5
18693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694   (exit $ac_status); } && {
18695          test -z "$ac_c_werror_flag" ||
18696          test ! -s conftest.err
18697        } && test -s conftest$ac_exeext &&
18698        $as_test_x conftest$ac_exeext; then
18699   ac_cv_lib_jpeg_jpeg_start_compress=yes
18700 else
18701   echo "$as_me: failed program was:" >&5
18702 sed 's/^/| /' conftest.$ac_ext >&5
18703
18704         ac_cv_lib_jpeg_jpeg_start_compress=no
18705 fi
18706
18707 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18708       conftest$ac_exeext conftest.$ac_ext
18709 LIBS=$ac_check_lib_save_LIBS
18710 fi
18711 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18712 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18713 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18714   have_jpeg=yes
18715                     jpeg_halfassed=no
18716                     JPEG_LIBS="-ljpeg"
18717                     cat >>confdefs.h <<\_ACEOF
18718 #define HAVE_JPEGLIB 1
18719 _ACEOF
18720
18721 fi
18722
18723   CPPFLAGS="$ac_save_CPPFLAGS"
18724   LDFLAGS="$ac_save_LDFLAGS"
18725 #  LIBS="$ac_save_LIBS"
18726
18727   fi
18728 fi
18729
18730
18731 ###############################################################################
18732 #
18733 #       Check for pty support: this allows 'phosphor' and 'apple2'
18734 #       to run curses-based programs, or be used as terminal windows.
18735 #
18736 ###############################################################################
18737
18738 PTY_LIBS=
18739
18740
18741 for ac_header in pty.h util.h
18742 do
18743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18744 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18745   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18747 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18748   echo $ECHO_N "(cached) $ECHO_C" >&6
18749 fi
18750 ac_res=`eval echo '${'$as_ac_Header'}'`
18751                { echo "$as_me:$LINENO: result: $ac_res" >&5
18752 echo "${ECHO_T}$ac_res" >&6; }
18753 else
18754   # Is the header compilable?
18755 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18756 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18757 cat >conftest.$ac_ext <<_ACEOF
18758 /* confdefs.h.  */
18759 _ACEOF
18760 cat confdefs.h >>conftest.$ac_ext
18761 cat >>conftest.$ac_ext <<_ACEOF
18762 /* end confdefs.h.  */
18763 $ac_includes_default
18764 #include <$ac_header>
18765 _ACEOF
18766 rm -rf conftest.$ac_objext
18767 if { (ac_try="$ac_compile"
18768 case "(($ac_try" in
18769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18770   *) ac_try_echo=$ac_try;;
18771 esac
18772 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18773   (eval "$ac_compile") 2>conftest.er1
18774   ac_status=$?
18775   grep -v '^ *+' conftest.er1 >conftest.err
18776   rm -rf conftest.er1
18777   cat conftest.err >&5
18778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18779   (exit $ac_status); } && {
18780          test -z "$ac_c_werror_flag" ||
18781          test ! -s conftest.err
18782        } && test -s conftest.$ac_objext; then
18783   ac_header_compiler=yes
18784 else
18785   echo "$as_me: failed program was:" >&5
18786 sed 's/^/| /' conftest.$ac_ext >&5
18787
18788         ac_header_compiler=no
18789 fi
18790
18791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18792 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18793 echo "${ECHO_T}$ac_header_compiler" >&6; }
18794
18795 # Is the header present?
18796 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18797 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18798 cat >conftest.$ac_ext <<_ACEOF
18799 /* confdefs.h.  */
18800 _ACEOF
18801 cat confdefs.h >>conftest.$ac_ext
18802 cat >>conftest.$ac_ext <<_ACEOF
18803 /* end confdefs.h.  */
18804 #include <$ac_header>
18805 _ACEOF
18806 if { (ac_try="$ac_cpp conftest.$ac_ext"
18807 case "(($ac_try" in
18808   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18809   *) ac_try_echo=$ac_try;;
18810 esac
18811 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18812   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18813   ac_status=$?
18814   grep -v '^ *+' conftest.er1 >conftest.err
18815   rm -rf conftest.er1
18816   cat conftest.err >&5
18817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18818   (exit $ac_status); } >/dev/null && {
18819          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18820          test ! -s conftest.err
18821        }; then
18822   ac_header_preproc=yes
18823 else
18824   echo "$as_me: failed program was:" >&5
18825 sed 's/^/| /' conftest.$ac_ext >&5
18826
18827   ac_header_preproc=no
18828 fi
18829
18830 rm -rf conftest.err conftest.$ac_ext
18831 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18832 echo "${ECHO_T}$ac_header_preproc" >&6; }
18833
18834 # So?  What about this header?
18835 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18836   yes:no: )
18837     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18838 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18839     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18840 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18841     ac_header_preproc=yes
18842     ;;
18843   no:yes:* )
18844     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18845 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18846     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18847 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18848     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18849 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18850     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18851 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18852     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18853 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18854     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18855 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18856
18857     ;;
18858 esac
18859 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18861 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18862   echo $ECHO_N "(cached) $ECHO_C" >&6
18863 else
18864   eval "$as_ac_Header=\$ac_header_preproc"
18865 fi
18866 ac_res=`eval echo '${'$as_ac_Header'}'`
18867                { echo "$as_me:$LINENO: result: $ac_res" >&5
18868 echo "${ECHO_T}$ac_res" >&6; }
18869
18870 fi
18871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18872   cat >>confdefs.h <<_ACEOF
18873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18874 _ACEOF
18875
18876 fi
18877
18878 done
18879
18880
18881   ac_save_CPPFLAGS="$CPPFLAGS"
18882   ac_save_LDFLAGS="$LDFLAGS"
18883 #  ac_save_LIBS="$LIBS"
18884
18885   if test \! -z "$includedir" ; then
18886     CPPFLAGS="$CPPFLAGS -I$includedir"
18887   fi
18888   # note: $X_CFLAGS includes $x_includes
18889   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18890
18891   if test \! -z "$libdir" ; then
18892     LDFLAGS="$LDFLAGS -L$libdir"
18893   fi
18894   # note: $X_LIBS includes $x_libraries
18895   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18896
18897   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18898   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18899   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18900 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
18901 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18902   echo $ECHO_N "(cached) $ECHO_C" >&6
18903 else
18904   ac_check_lib_save_LIBS=$LIBS
18905 LIBS="-lutil  $LIBS"
18906 cat >conftest.$ac_ext <<_ACEOF
18907 /* confdefs.h.  */
18908 _ACEOF
18909 cat confdefs.h >>conftest.$ac_ext
18910 cat >>conftest.$ac_ext <<_ACEOF
18911 /* end confdefs.h.  */
18912
18913 /* Override any GCC internal prototype to avoid an error.
18914    Use char because int might match the return type of a GCC
18915    builtin and then its argument prototype would still apply.  */
18916 #ifdef __cplusplus
18917 extern "C"
18918 #endif
18919 char forkpty ();
18920 int
18921 main ()
18922 {
18923 return forkpty ();
18924   ;
18925   return 0;
18926 }
18927 _ACEOF
18928 rm -rf conftest.$ac_objext conftest$ac_exeext
18929 if { (ac_try="$ac_link"
18930 case "(($ac_try" in
18931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18932   *) ac_try_echo=$ac_try;;
18933 esac
18934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18935   (eval "$ac_link") 2>conftest.er1
18936   ac_status=$?
18937   grep -v '^ *+' conftest.er1 >conftest.err
18938   rm -rf conftest.er1
18939   cat conftest.err >&5
18940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18941   (exit $ac_status); } && {
18942          test -z "$ac_c_werror_flag" ||
18943          test ! -s conftest.err
18944        } && test -s conftest$ac_exeext &&
18945        $as_test_x conftest$ac_exeext; then
18946   ac_cv_lib_util_forkpty=yes
18947 else
18948   echo "$as_me: failed program was:" >&5
18949 sed 's/^/| /' conftest.$ac_ext >&5
18950
18951         ac_cv_lib_util_forkpty=no
18952 fi
18953
18954 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18955       conftest$ac_exeext conftest.$ac_ext
18956 LIBS=$ac_check_lib_save_LIBS
18957 fi
18958 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18959 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18960 if test $ac_cv_lib_util_forkpty = yes; then
18961   PTY_LIBS="-lutil"
18962                 ac_have_forkpty=yes
18963                 cat >>confdefs.h <<\_ACEOF
18964 #define HAVE_FORKPTY 1
18965 _ACEOF
18966
18967 fi
18968
18969   CPPFLAGS="$ac_save_CPPFLAGS"
18970   LDFLAGS="$ac_save_LDFLAGS"
18971 #  LIBS="$ac_save_LIBS"
18972
18973
18974 if test "$ac_have_forkpty" != yes ; then
18975   # we don't need (or have) -lutil on MacOS 10.4.2...
18976
18977   ac_save_CPPFLAGS="$CPPFLAGS"
18978   ac_save_LDFLAGS="$LDFLAGS"
18979 #  ac_save_LIBS="$LIBS"
18980
18981   if test \! -z "$includedir" ; then
18982     CPPFLAGS="$CPPFLAGS -I$includedir"
18983   fi
18984   # note: $X_CFLAGS includes $x_includes
18985   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18986
18987   if test \! -z "$libdir" ; then
18988     LDFLAGS="$LDFLAGS -L$libdir"
18989   fi
18990   # note: $X_LIBS includes $x_libraries
18991   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18992
18993   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18994   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18995   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
18996 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
18997 if test "${ac_cv_lib_c_forkpty+set}" = set; then
18998   echo $ECHO_N "(cached) $ECHO_C" >&6
18999 else
19000   ac_check_lib_save_LIBS=$LIBS
19001 LIBS="-lc  $LIBS"
19002 cat >conftest.$ac_ext <<_ACEOF
19003 /* confdefs.h.  */
19004 _ACEOF
19005 cat confdefs.h >>conftest.$ac_ext
19006 cat >>conftest.$ac_ext <<_ACEOF
19007 /* end confdefs.h.  */
19008
19009 /* Override any GCC internal prototype to avoid an error.
19010    Use char because int might match the return type of a GCC
19011    builtin and then its argument prototype would still apply.  */
19012 #ifdef __cplusplus
19013 extern "C"
19014 #endif
19015 char forkpty ();
19016 int
19017 main ()
19018 {
19019 return forkpty ();
19020   ;
19021   return 0;
19022 }
19023 _ACEOF
19024 rm -rf conftest.$ac_objext conftest$ac_exeext
19025 if { (ac_try="$ac_link"
19026 case "(($ac_try" in
19027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19028   *) ac_try_echo=$ac_try;;
19029 esac
19030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19031   (eval "$ac_link") 2>conftest.er1
19032   ac_status=$?
19033   grep -v '^ *+' conftest.er1 >conftest.err
19034   rm -rf conftest.er1
19035   cat conftest.err >&5
19036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19037   (exit $ac_status); } && {
19038          test -z "$ac_c_werror_flag" ||
19039          test ! -s conftest.err
19040        } && test -s conftest$ac_exeext &&
19041        $as_test_x conftest$ac_exeext; then
19042   ac_cv_lib_c_forkpty=yes
19043 else
19044   echo "$as_me: failed program was:" >&5
19045 sed 's/^/| /' conftest.$ac_ext >&5
19046
19047         ac_cv_lib_c_forkpty=no
19048 fi
19049
19050 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19051       conftest$ac_exeext conftest.$ac_ext
19052 LIBS=$ac_check_lib_save_LIBS
19053 fi
19054 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19055 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19056 if test $ac_cv_lib_c_forkpty = yes; then
19057   PTY_LIBS=""
19058                   cat >>confdefs.h <<\_ACEOF
19059 #define HAVE_FORKPTY 1
19060 _ACEOF
19061
19062 fi
19063
19064   CPPFLAGS="$ac_save_CPPFLAGS"
19065   LDFLAGS="$ac_save_LDFLAGS"
19066 #  LIBS="$ac_save_LIBS"
19067
19068 fi
19069
19070 ###############################################################################
19071 #
19072 #       Check for the XSHM server extension.
19073 #
19074 ###############################################################################
19075
19076 have_xshm=no
19077 with_xshm_req=unspecified
19078
19079 # Check whether --with-xshm-ext was given.
19080 if test "${with_xshm_ext+set}" = set; then
19081   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19082 else
19083   with_xshm=yes
19084 fi
19085
19086
19087
19088    case "$with_xshm" in
19089     yes) ;;
19090     no)  ;;
19091
19092     /*)
19093      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19094 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19095      d=$with_xshm/include
19096      if test -d $d; then
19097        X_CFLAGS="-I$d $X_CFLAGS"
19098        { echo "$as_me:$LINENO: result: $d" >&5
19099 echo "${ECHO_T}$d" >&6; }
19100      else
19101        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19102 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19103      fi
19104
19105      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19106 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19107      d=$with_xshm/lib
19108      if test -d $d; then
19109        X_LIBS="-L$d $X_LIBS"
19110        { echo "$as_me:$LINENO: result: $d" >&5
19111 echo "${ECHO_T}$d" >&6; }
19112      else
19113        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19114 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19115      fi
19116
19117      # replace the directory string with "yes".
19118      with_xshm_req="yes"
19119      with_xshm=$with_xshm_req
19120      ;;
19121
19122     *)
19123      echo ""
19124      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19125      echo "       If it is a directory, then \`DIR/include' will be added to"
19126      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19127      exit 1
19128      ;;
19129    esac
19130
19131
19132 if test "$with_xshm" = yes; then
19133
19134   # first check for Xshm.h.
19135
19136   ac_save_CPPFLAGS="$CPPFLAGS"
19137   if test \! -z "$includedir" ; then
19138     CPPFLAGS="$CPPFLAGS -I$includedir"
19139   fi
19140   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19141   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19142   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19143 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19144 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19145   echo $ECHO_N "(cached) $ECHO_C" >&6
19146 else
19147   cat >conftest.$ac_ext <<_ACEOF
19148 /* confdefs.h.  */
19149 _ACEOF
19150 cat confdefs.h >>conftest.$ac_ext
19151 cat >>conftest.$ac_ext <<_ACEOF
19152 /* end confdefs.h.  */
19153 #include <X11/Xlib.h>
19154
19155 #include <X11/extensions/XShm.h>
19156 _ACEOF
19157 rm -rf conftest.$ac_objext
19158 if { (ac_try="$ac_compile"
19159 case "(($ac_try" in
19160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19161   *) ac_try_echo=$ac_try;;
19162 esac
19163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19164   (eval "$ac_compile") 2>conftest.er1
19165   ac_status=$?
19166   grep -v '^ *+' conftest.er1 >conftest.err
19167   rm -rf conftest.er1
19168   cat conftest.err >&5
19169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19170   (exit $ac_status); } && {
19171          test -z "$ac_c_werror_flag" ||
19172          test ! -s conftest.err
19173        } && test -s conftest.$ac_objext; then
19174   ac_cv_header_X11_extensions_XShm_h=yes
19175 else
19176   echo "$as_me: failed program was:" >&5
19177 sed 's/^/| /' conftest.$ac_ext >&5
19178
19179         ac_cv_header_X11_extensions_XShm_h=no
19180 fi
19181
19182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19183 fi
19184 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19185 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19186 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19187   have_xshm=yes
19188 fi
19189
19190
19191   CPPFLAGS="$ac_save_CPPFLAGS"
19192
19193   # if that succeeded, then check for sys/ipc.h.
19194   if test "$have_xshm" = yes; then
19195     have_xshm=no
19196
19197   ac_save_CPPFLAGS="$CPPFLAGS"
19198   if test \! -z "$includedir" ; then
19199     CPPFLAGS="$CPPFLAGS -I$includedir"
19200   fi
19201   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19202   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19203   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19204   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19205 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19206 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19207   echo $ECHO_N "(cached) $ECHO_C" >&6
19208 fi
19209 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19210 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19211 else
19212   # Is the header compilable?
19213 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19214 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19215 cat >conftest.$ac_ext <<_ACEOF
19216 /* confdefs.h.  */
19217 _ACEOF
19218 cat confdefs.h >>conftest.$ac_ext
19219 cat >>conftest.$ac_ext <<_ACEOF
19220 /* end confdefs.h.  */
19221 $ac_includes_default
19222 #include <sys/ipc.h>
19223 _ACEOF
19224 rm -rf conftest.$ac_objext
19225 if { (ac_try="$ac_compile"
19226 case "(($ac_try" in
19227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19228   *) ac_try_echo=$ac_try;;
19229 esac
19230 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19231   (eval "$ac_compile") 2>conftest.er1
19232   ac_status=$?
19233   grep -v '^ *+' conftest.er1 >conftest.err
19234   rm -rf conftest.er1
19235   cat conftest.err >&5
19236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19237   (exit $ac_status); } && {
19238          test -z "$ac_c_werror_flag" ||
19239          test ! -s conftest.err
19240        } && test -s conftest.$ac_objext; then
19241   ac_header_compiler=yes
19242 else
19243   echo "$as_me: failed program was:" >&5
19244 sed 's/^/| /' conftest.$ac_ext >&5
19245
19246         ac_header_compiler=no
19247 fi
19248
19249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19250 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19251 echo "${ECHO_T}$ac_header_compiler" >&6; }
19252
19253 # Is the header present?
19254 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19255 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19256 cat >conftest.$ac_ext <<_ACEOF
19257 /* confdefs.h.  */
19258 _ACEOF
19259 cat confdefs.h >>conftest.$ac_ext
19260 cat >>conftest.$ac_ext <<_ACEOF
19261 /* end confdefs.h.  */
19262 #include <sys/ipc.h>
19263 _ACEOF
19264 if { (ac_try="$ac_cpp conftest.$ac_ext"
19265 case "(($ac_try" in
19266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19267   *) ac_try_echo=$ac_try;;
19268 esac
19269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19270   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19271   ac_status=$?
19272   grep -v '^ *+' conftest.er1 >conftest.err
19273   rm -rf conftest.er1
19274   cat conftest.err >&5
19275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19276   (exit $ac_status); } >/dev/null && {
19277          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19278          test ! -s conftest.err
19279        }; then
19280   ac_header_preproc=yes
19281 else
19282   echo "$as_me: failed program was:" >&5
19283 sed 's/^/| /' conftest.$ac_ext >&5
19284
19285   ac_header_preproc=no
19286 fi
19287
19288 rm -rf conftest.err conftest.$ac_ext
19289 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19290 echo "${ECHO_T}$ac_header_preproc" >&6; }
19291
19292 # So?  What about this header?
19293 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19294   yes:no: )
19295     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19296 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19297     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19298 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19299     ac_header_preproc=yes
19300     ;;
19301   no:yes:* )
19302     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19303 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19304     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19305 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19306     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19307 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19308     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19309 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19310     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19311 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19312     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19313 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19314
19315     ;;
19316 esac
19317 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19318 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19319 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19320   echo $ECHO_N "(cached) $ECHO_C" >&6
19321 else
19322   ac_cv_header_sys_ipc_h=$ac_header_preproc
19323 fi
19324 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19325 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19326
19327 fi
19328 if test $ac_cv_header_sys_ipc_h = yes; then
19329   have_xshm=yes
19330 fi
19331
19332
19333   CPPFLAGS="$ac_save_CPPFLAGS"
19334   fi
19335
19336   # if that succeeded, then check for sys/shm.h.
19337   if test "$have_xshm" = yes; then
19338     have_xshm=no
19339
19340   ac_save_CPPFLAGS="$CPPFLAGS"
19341   if test \! -z "$includedir" ; then
19342     CPPFLAGS="$CPPFLAGS -I$includedir"
19343   fi
19344   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19345   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19346   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19347   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19348 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19349 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19350   echo $ECHO_N "(cached) $ECHO_C" >&6
19351 fi
19352 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19353 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19354 else
19355   # Is the header compilable?
19356 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19357 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19358 cat >conftest.$ac_ext <<_ACEOF
19359 /* confdefs.h.  */
19360 _ACEOF
19361 cat confdefs.h >>conftest.$ac_ext
19362 cat >>conftest.$ac_ext <<_ACEOF
19363 /* end confdefs.h.  */
19364 $ac_includes_default
19365 #include <sys/shm.h>
19366 _ACEOF
19367 rm -rf conftest.$ac_objext
19368 if { (ac_try="$ac_compile"
19369 case "(($ac_try" in
19370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19371   *) ac_try_echo=$ac_try;;
19372 esac
19373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19374   (eval "$ac_compile") 2>conftest.er1
19375   ac_status=$?
19376   grep -v '^ *+' conftest.er1 >conftest.err
19377   rm -rf conftest.er1
19378   cat conftest.err >&5
19379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19380   (exit $ac_status); } && {
19381          test -z "$ac_c_werror_flag" ||
19382          test ! -s conftest.err
19383        } && test -s conftest.$ac_objext; then
19384   ac_header_compiler=yes
19385 else
19386   echo "$as_me: failed program was:" >&5
19387 sed 's/^/| /' conftest.$ac_ext >&5
19388
19389         ac_header_compiler=no
19390 fi
19391
19392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19393 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19394 echo "${ECHO_T}$ac_header_compiler" >&6; }
19395
19396 # Is the header present?
19397 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19398 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19399 cat >conftest.$ac_ext <<_ACEOF
19400 /* confdefs.h.  */
19401 _ACEOF
19402 cat confdefs.h >>conftest.$ac_ext
19403 cat >>conftest.$ac_ext <<_ACEOF
19404 /* end confdefs.h.  */
19405 #include <sys/shm.h>
19406 _ACEOF
19407 if { (ac_try="$ac_cpp conftest.$ac_ext"
19408 case "(($ac_try" in
19409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19410   *) ac_try_echo=$ac_try;;
19411 esac
19412 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19413   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19414   ac_status=$?
19415   grep -v '^ *+' conftest.er1 >conftest.err
19416   rm -rf conftest.er1
19417   cat conftest.err >&5
19418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419   (exit $ac_status); } >/dev/null && {
19420          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19421          test ! -s conftest.err
19422        }; then
19423   ac_header_preproc=yes
19424 else
19425   echo "$as_me: failed program was:" >&5
19426 sed 's/^/| /' conftest.$ac_ext >&5
19427
19428   ac_header_preproc=no
19429 fi
19430
19431 rm -rf conftest.err conftest.$ac_ext
19432 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19433 echo "${ECHO_T}$ac_header_preproc" >&6; }
19434
19435 # So?  What about this header?
19436 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19437   yes:no: )
19438     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19439 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19440     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19441 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19442     ac_header_preproc=yes
19443     ;;
19444   no:yes:* )
19445     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19446 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19447     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19448 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19449     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19450 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19451     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19452 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19453     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19454 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19455     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19456 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19457
19458     ;;
19459 esac
19460 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19461 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19462 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19463   echo $ECHO_N "(cached) $ECHO_C" >&6
19464 else
19465   ac_cv_header_sys_shm_h=$ac_header_preproc
19466 fi
19467 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19468 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19469
19470 fi
19471 if test $ac_cv_header_sys_shm_h = yes; then
19472   have_xshm=yes
19473 fi
19474
19475
19476   CPPFLAGS="$ac_save_CPPFLAGS"
19477   fi
19478
19479   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19480   # to exist, but the library code to not exist.  And even better, the library
19481   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19482   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19483   # that's not quite right, but close enough.)
19484   #
19485   case "$host" in
19486     *-aix*)
19487       if  `uname -v` -eq 3 ; then
19488         have_xshm=no
19489
19490   ac_save_CPPFLAGS="$CPPFLAGS"
19491   ac_save_LDFLAGS="$LDFLAGS"
19492 #  ac_save_LIBS="$LIBS"
19493
19494   if test \! -z "$includedir" ; then
19495     CPPFLAGS="$CPPFLAGS -I$includedir"
19496   fi
19497   # note: $X_CFLAGS includes $x_includes
19498   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19499
19500   if test \! -z "$libdir" ; then
19501     LDFLAGS="$LDFLAGS -L$libdir"
19502   fi
19503   # note: $X_LIBS includes $x_libraries
19504   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19505
19506   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19507   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19508   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19509 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19510 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19511   echo $ECHO_N "(cached) $ECHO_C" >&6
19512 else
19513   ac_check_lib_save_LIBS=$LIBS
19514 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19515 cat >conftest.$ac_ext <<_ACEOF
19516 /* confdefs.h.  */
19517 _ACEOF
19518 cat confdefs.h >>conftest.$ac_ext
19519 cat >>conftest.$ac_ext <<_ACEOF
19520 /* end confdefs.h.  */
19521
19522 /* Override any GCC internal prototype to avoid an error.
19523    Use char because int might match the return type of a GCC
19524    builtin and then its argument prototype would still apply.  */
19525 #ifdef __cplusplus
19526 extern "C"
19527 #endif
19528 char XShmQueryExtension ();
19529 int
19530 main ()
19531 {
19532 return XShmQueryExtension ();
19533   ;
19534   return 0;
19535 }
19536 _ACEOF
19537 rm -rf conftest.$ac_objext conftest$ac_exeext
19538 if { (ac_try="$ac_link"
19539 case "(($ac_try" in
19540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19541   *) ac_try_echo=$ac_try;;
19542 esac
19543 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19544   (eval "$ac_link") 2>conftest.er1
19545   ac_status=$?
19546   grep -v '^ *+' conftest.er1 >conftest.err
19547   rm -rf conftest.er1
19548   cat conftest.err >&5
19549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19550   (exit $ac_status); } && {
19551          test -z "$ac_c_werror_flag" ||
19552          test ! -s conftest.err
19553        } && test -s conftest$ac_exeext &&
19554        $as_test_x conftest$ac_exeext; then
19555   ac_cv_lib_XextSam_XShmQueryExtension=yes
19556 else
19557   echo "$as_me: failed program was:" >&5
19558 sed 's/^/| /' conftest.$ac_ext >&5
19559
19560         ac_cv_lib_XextSam_XShmQueryExtension=no
19561 fi
19562
19563 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19564       conftest$ac_exeext conftest.$ac_ext
19565 LIBS=$ac_check_lib_save_LIBS
19566 fi
19567 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19568 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19569 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19570   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19571 else
19572   true
19573 fi
19574
19575   CPPFLAGS="$ac_save_CPPFLAGS"
19576   LDFLAGS="$ac_save_LDFLAGS"
19577 #  LIBS="$ac_save_LIBS"
19578
19579       fi
19580     ;;
19581   esac
19582
19583   # if that succeeded, then we've really got it.
19584   if test "$have_xshm" = yes; then
19585     cat >>confdefs.h <<\_ACEOF
19586 #define HAVE_XSHM_EXTENSION 1
19587 _ACEOF
19588
19589   fi
19590
19591 elif test "$with_xshm" != no; then
19592   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19593   exit 1
19594 fi
19595
19596
19597 ###############################################################################
19598 #
19599 #       Check for the DOUBLE-BUFFER server extension.
19600 #
19601 ###############################################################################
19602
19603 have_xdbe=no
19604 with_xdbe_req=unspecified
19605
19606 # Check whether --with-xdbe-ext was given.
19607 if test "${with_xdbe_ext+set}" = set; then
19608   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19609 else
19610   with_xdbe=yes
19611 fi
19612
19613
19614
19615    case "$with_xdbe" in
19616     yes) ;;
19617     no)  ;;
19618
19619     /*)
19620      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19621 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19622      d=$with_xdbe/include
19623      if test -d $d; then
19624        X_CFLAGS="-I$d $X_CFLAGS"
19625        { echo "$as_me:$LINENO: result: $d" >&5
19626 echo "${ECHO_T}$d" >&6; }
19627      else
19628        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19629 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19630      fi
19631
19632      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19633 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19634      d=$with_xdbe/lib
19635      if test -d $d; then
19636        X_LIBS="-L$d $X_LIBS"
19637        { echo "$as_me:$LINENO: result: $d" >&5
19638 echo "${ECHO_T}$d" >&6; }
19639      else
19640        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19641 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19642      fi
19643
19644      # replace the directory string with "yes".
19645      with_xdbe_req="yes"
19646      with_xdbe=$with_xdbe_req
19647      ;;
19648
19649     *)
19650      echo ""
19651      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19652      echo "       If it is a directory, then \`DIR/include' will be added to"
19653      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19654      exit 1
19655      ;;
19656    esac
19657
19658
19659 if test "$with_xdbe" = yes; then
19660
19661
19662   ac_save_CPPFLAGS="$CPPFLAGS"
19663   if test \! -z "$includedir" ; then
19664     CPPFLAGS="$CPPFLAGS -I$includedir"
19665   fi
19666   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19667   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19668   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19669 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19670 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19671   echo $ECHO_N "(cached) $ECHO_C" >&6
19672 else
19673   cat >conftest.$ac_ext <<_ACEOF
19674 /* confdefs.h.  */
19675 _ACEOF
19676 cat confdefs.h >>conftest.$ac_ext
19677 cat >>conftest.$ac_ext <<_ACEOF
19678 /* end confdefs.h.  */
19679 #include <X11/Xlib.h>
19680
19681 #include <X11/extensions/Xdbe.h>
19682 _ACEOF
19683 rm -rf conftest.$ac_objext
19684 if { (ac_try="$ac_compile"
19685 case "(($ac_try" in
19686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19687   *) ac_try_echo=$ac_try;;
19688 esac
19689 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19690   (eval "$ac_compile") 2>conftest.er1
19691   ac_status=$?
19692   grep -v '^ *+' conftest.er1 >conftest.err
19693   rm -rf conftest.er1
19694   cat conftest.err >&5
19695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19696   (exit $ac_status); } && {
19697          test -z "$ac_c_werror_flag" ||
19698          test ! -s conftest.err
19699        } && test -s conftest.$ac_objext; then
19700   ac_cv_header_X11_extensions_Xdbe_h=yes
19701 else
19702   echo "$as_me: failed program was:" >&5
19703 sed 's/^/| /' conftest.$ac_ext >&5
19704
19705         ac_cv_header_X11_extensions_Xdbe_h=no
19706 fi
19707
19708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19709 fi
19710 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19711 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19712 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19713   have_xdbe=yes
19714 fi
19715
19716
19717   CPPFLAGS="$ac_save_CPPFLAGS"
19718   if test "$have_xdbe" = yes; then
19719     cat >>confdefs.h <<\_ACEOF
19720 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19721 _ACEOF
19722
19723   fi
19724
19725 elif test "$with_xdbe" != no; then
19726   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19727   exit 1
19728 fi
19729
19730
19731 ###############################################################################
19732 #
19733 #       Check for the SGI XReadDisplay server extension.
19734 #
19735 #       Note: this has to be down here, rather than up with the other server
19736 #       extension tests, so that the output of `configure --help' is in the
19737 #       right order.  Arrgh!
19738 #
19739 ###############################################################################
19740
19741 have_readdisplay=no
19742 with_readdisplay_req=unspecified
19743
19744 # Check whether --with-readdisplay was given.
19745 if test "${with_readdisplay+set}" = set; then
19746   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19747 else
19748   with_readdisplay=yes
19749 fi
19750
19751
19752
19753    case "$with_readdisplay" in
19754     yes) ;;
19755     no)  ;;
19756
19757     /*)
19758      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19759 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19760      d=$with_readdisplay/include
19761      if test -d $d; then
19762        X_CFLAGS="-I$d $X_CFLAGS"
19763        { echo "$as_me:$LINENO: result: $d" >&5
19764 echo "${ECHO_T}$d" >&6; }
19765      else
19766        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19767 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19768      fi
19769
19770      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19771 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19772      d=$with_readdisplay/lib
19773      if test -d $d; then
19774        X_LIBS="-L$d $X_LIBS"
19775        { echo "$as_me:$LINENO: result: $d" >&5
19776 echo "${ECHO_T}$d" >&6; }
19777      else
19778        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19779 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19780      fi
19781
19782      # replace the directory string with "yes".
19783      with_readdisplay_req="yes"
19784      with_readdisplay=$with_readdisplay_req
19785      ;;
19786
19787     *)
19788      echo ""
19789      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19790      echo "       If it is a directory, then \`DIR/include' will be added to"
19791      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19792      exit 1
19793      ;;
19794    esac
19795
19796
19797 if test "$with_readdisplay" = yes; then
19798
19799   ac_save_CPPFLAGS="$CPPFLAGS"
19800   if test \! -z "$includedir" ; then
19801     CPPFLAGS="$CPPFLAGS -I$includedir"
19802   fi
19803   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19804   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19805   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19806 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19807 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19808   echo $ECHO_N "(cached) $ECHO_C" >&6
19809 else
19810   cat >conftest.$ac_ext <<_ACEOF
19811 /* confdefs.h.  */
19812 _ACEOF
19813 cat confdefs.h >>conftest.$ac_ext
19814 cat >>conftest.$ac_ext <<_ACEOF
19815 /* end confdefs.h.  */
19816 #include <X11/Xlib.h>
19817
19818 #include <X11/extensions/readdisplay.h>
19819 _ACEOF
19820 rm -rf conftest.$ac_objext
19821 if { (ac_try="$ac_compile"
19822 case "(($ac_try" in
19823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19824   *) ac_try_echo=$ac_try;;
19825 esac
19826 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19827   (eval "$ac_compile") 2>conftest.er1
19828   ac_status=$?
19829   grep -v '^ *+' conftest.er1 >conftest.err
19830   rm -rf conftest.er1
19831   cat conftest.err >&5
19832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19833   (exit $ac_status); } && {
19834          test -z "$ac_c_werror_flag" ||
19835          test ! -s conftest.err
19836        } && test -s conftest.$ac_objext; then
19837   ac_cv_header_X11_extensions_readdisplay_h=yes
19838 else
19839   echo "$as_me: failed program was:" >&5
19840 sed 's/^/| /' conftest.$ac_ext >&5
19841
19842         ac_cv_header_X11_extensions_readdisplay_h=no
19843 fi
19844
19845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19846 fi
19847 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19848 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19849 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19850   cat >>confdefs.h <<\_ACEOF
19851 #define HAVE_READ_DISPLAY_EXTENSION 1
19852 _ACEOF
19853
19854 fi
19855
19856
19857   CPPFLAGS="$ac_save_CPPFLAGS"
19858 elif test "$with_readdisplay" != no; then
19859   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19860   exit 1
19861 fi
19862
19863
19864 ###############################################################################
19865 #
19866 #       Check for a directory full of images to use as the default value
19867 #       of the "imageDirectory" preference.
19868 #
19869 ###############################################################################
19870
19871 have_imagedir=no
19872 with_imagedir_req=unspecified
19873
19874
19875 # Check whether --with-image-directory was given.
19876 if test "${with_image_directory+set}" = set; then
19877   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19878 else
19879   with_imagedir=yes
19880 fi
19881
19882 # no HANDLE_X_PATH_ARG for this one
19883
19884 case "$with_imagedir" in
19885   /*)
19886     # absolute path
19887     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19888 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
19889     if test -d "$with_imagedir" ; then
19890       { echo "$as_me:$LINENO: result: yes" >&5
19891 echo "${ECHO_T}yes" >&6; }
19892     else
19893       { echo "$as_me:$LINENO: result: no" >&5
19894 echo "${ECHO_T}no" >&6; }
19895       with_imagedir=""
19896     fi
19897   ;;
19898   yes)
19899     with_imagedir=""
19900
19901     #### Could use some more defaults here...
19902     for dd in \
19903       "/usr/share/backgrounds/images/"          \
19904       "/usr/share/wallpapers/"                  \
19905       "/Library/Desktop Pictures/"              \
19906     ; do
19907       if test -z "$with_imagedir"; then
19908         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
19909 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
19910         if test -d "$dd" ; then
19911           { echo "$as_me:$LINENO: result: yes" >&5
19912 echo "${ECHO_T}yes" >&6; }
19913           with_imagedir="$dd"
19914         else
19915           { echo "$as_me:$LINENO: result: no" >&5
19916 echo "${ECHO_T}no" >&6; }
19917         fi
19918       fi
19919     done
19920
19921   ;;
19922   no)
19923     with_imagedir=""
19924   ;;
19925
19926   *)
19927     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19928     exit 1
19929   ;;
19930 esac
19931 ac_cv_imagedir="$with_imagedir"
19932
19933 DEFAULT_IMAGES_P='True'
19934 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19935
19936 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19937   DEFAULT_IMAGES_P='False'
19938 fi
19939
19940
19941 ###############################################################################
19942 #
19943 #       Pick a text file to use as the default of the "textFile" preference.
19944 #       Any old file will do, but preferably one that will make interesting
19945 #       shapes when displayed by "starwars" and "fontglide".
19946 #
19947 ###############################################################################
19948
19949 have_textfile=no
19950 with_textfile_req=unspecified
19951
19952
19953 # Check whether --with-text-file was given.
19954 if test "${with_text_file+set}" = set; then
19955   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
19956 else
19957   with_textfile=yes
19958 fi
19959
19960 # no HANDLE_X_PATH_ARG for this one
19961
19962 case "$with_textfile" in
19963   /*)
19964     # absolute path
19965     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
19966 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
19967     if test -f "$with_textfile" ; then
19968       { echo "$as_me:$LINENO: result: yes" >&5
19969 echo "${ECHO_T}yes" >&6; }
19970     else
19971       { echo "$as_me:$LINENO: result: no" >&5
19972 echo "${ECHO_T}no" >&6; }
19973       with_textfile=""
19974     fi
19975   ;;
19976   yes)
19977     with_textfile=""
19978
19979     #### Could use some more defaults here...
19980     for f in \
19981       "/usr/X11R6/lib/X11/doc/README"              \
19982       "/usr/share/doc/xserver-common/copyright"    \
19983       "/usr/share/doc/xserver-xorg-core/copyright" \
19984       "/usr/X11R6/README"                          \
19985       "/usr/share/doc/debian/debian-manifesto"     \
19986     ; do
19987       if test -z "$with_textfile"; then
19988         { echo "$as_me:$LINENO: checking for text file $f" >&5
19989 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
19990         if test -f "$f" ; then
19991           { echo "$as_me:$LINENO: result: yes" >&5
19992 echo "${ECHO_T}yes" >&6; }
19993           with_textfile="$f"
19994         else
19995           { echo "$as_me:$LINENO: result: no" >&5
19996 echo "${ECHO_T}no" >&6; }
19997         fi
19998       fi
19999     done
20000
20001   ;;
20002   no)
20003     with_textfile=""
20004   ;;
20005
20006   *)
20007     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20008     exit 1
20009   ;;
20010 esac
20011 ac_cv_textfile="$with_textfile"
20012
20013 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20014
20015
20016 ###############################################################################
20017 #
20018 #       Check the browser to see help URL
20019 #
20020 ###############################################################################
20021
20022 have_browser=no
20023 with_browser_req=unspecified
20024
20025
20026 # Check whether --with-browser was given.
20027 if test "${with_browser+set}" = set; then
20028   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20029 else
20030   with_browser=no
20031 fi
20032
20033 # no HANDLE_X_PATH_ARG for this one
20034
20035 case "$with_browser" in
20036   no )
20037   ;;
20038   * )
20039     WITH_BROWSER=$with_browser
20040     gnome_open_program=$with_browser
20041     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20042 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20043     with_browser_fullpath=`which $with_browser 2>/dev/null`
20044     case $with_browser_fullpath in
20045          /* )
20046                 { echo "$as_me:$LINENO: result: yes" >&5
20047 echo "${ECHO_T}yes" >&6; }
20048                  have_browser=yes
20049                  ;;
20050         * )
20051                { echo "$as_me:$LINENO: result: no" >&5
20052 echo "${ECHO_T}no" >&6; }
20053 # Only warning: we don't want to install all packages for the
20054 # dependency of the browser in building stage...
20055                echo "WARNING: browser not found: --with-browser=$with_browser"
20056                ;;
20057     esac
20058   ;;
20059 esac
20060 ac_cv_browser="$with_browser"
20061
20062 ###############################################################################
20063 #
20064 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20065 #       This should be safe, but let's give people the option.
20066 #
20067 ###############################################################################
20068
20069 setuid_hacks_default=no
20070 setuid_hacks="$setuid_hacks_default"
20071
20072 # Check whether --with-setuid-hacks was given.
20073 if test "${with_setuid_hacks+set}" = set; then
20074   withval=$with_setuid_hacks; setuid_hacks="$withval"
20075 else
20076   setuid_hacks="$setuid_hacks_default"
20077 fi
20078
20079
20080
20081    case "$setuid_hacks" in
20082     yes) ;;
20083     no)  ;;
20084
20085     /*)
20086      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20087 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20088      d=$setuid_hacks/include
20089      if test -d $d; then
20090        X_CFLAGS="-I$d $X_CFLAGS"
20091        { echo "$as_me:$LINENO: result: $d" >&5
20092 echo "${ECHO_T}$d" >&6; }
20093      else
20094        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20095 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20096      fi
20097
20098      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20099 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20100      d=$setuid_hacks/lib
20101      if test -d $d; then
20102        X_LIBS="-L$d $X_LIBS"
20103        { echo "$as_me:$LINENO: result: $d" >&5
20104 echo "${ECHO_T}$d" >&6; }
20105      else
20106        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20107 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20108      fi
20109
20110      # replace the directory string with "yes".
20111      setuid_hacks_req="yes"
20112      setuid_hacks=$setuid_hacks_req
20113      ;;
20114
20115     *)
20116      echo ""
20117      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20118      echo "       If it is a directory, then \`DIR/include' will be added to"
20119      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20120      exit 1
20121      ;;
20122    esac
20123
20124
20125 if test "$setuid_hacks" = yes; then
20126   true
20127 elif test "$setuid_hacks" != no; then
20128   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20129   exit 1
20130 fi
20131
20132
20133 ###############################################################################
20134 #
20135 #       Done testing.  Now, set up the various -I and -L variables,
20136 #       and decide which GUI program to build by default.
20137 #
20138 ###############################################################################
20139
20140 DEPEND=makedepend
20141 DEPEND_FLAGS=
20142 DEPEND_DEFINES=
20143
20144
20145 if test \! -z "$includedir" ; then
20146   INCLUDES="$INCLUDES -I$includedir"
20147 fi
20148
20149 if test \! -z "$libdir" ; then
20150   LDFLAGS="$LDFLAGS -L$libdir"
20151 fi
20152
20153
20154 PREFERRED_DEMO_PROGRAM=''
20155 ALL_DEMO_PROGRAMS=
20156 if test "$have_motif" = yes; then
20157   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20158   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20159 fi
20160 if test "$have_gtk" = yes; then
20161   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20162   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20163 fi
20164
20165
20166 if test "$have_kerberos" = yes; then
20167   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20168   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20169 fi
20170 if test "$have_pam" = yes; then
20171   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20172   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20173   INSTALL_PAM="install-pam"
20174 fi
20175 if test "$have_passwd_helper" = yes; then
20176   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20177   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20178 fi
20179   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20180   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20181
20182
20183 if test "$enable_locking" = yes; then
20184   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20185   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20186 else
20187   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20188   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20189 fi
20190
20191 if test "$ac_macosx" = yes; then
20192   EXES_OSX='$(EXES_OSX)'
20193   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20194   MEN_OSX='$(MEN_OSX)'
20195 else
20196   EXES_OSX=
20197   SCRIPTS_OSX=
20198   MEN_OSX=
20199 fi
20200
20201
20202 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20203
20204 if test "$need_setuid" = yes; then
20205   NEED_SETUID=yes
20206 else
20207   NEED_SETUID=no
20208 fi
20209
20210 if test "$setuid_hacks" = yes; then
20211   SETUID_HACKS=yes
20212 else
20213   SETUID_HACKS=no
20214 fi
20215
20216 tab='   '
20217 if test "$have_gl" = yes; then
20218   GL_EXES='$(GL_EXES)'
20219   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20220   GL_MEN='$(GL_MEN)'
20221   GL_KLUDGE="${tab}  "
20222 else
20223   GL_KLUDGE="-${tab}  "
20224 fi
20225
20226 if test "$have_gle" = yes; then
20227   GLE_EXES='$(GLE_EXES)'
20228   GLE_KLUDGE="${tab}   "
20229 else
20230   GLE_KLUDGE="-${tab}   "
20231 fi
20232
20233 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20234  JPEG_EXES='$(JPEG_EXES)'
20235 fi
20236
20237
20238 # Another substitution in the XScreenSaver.ad.in file:
20239 #
20240 if test "$gnome_open_program" != ''; then
20241   GNOME24=''
20242   GNOME22='!    '
20243   NOGNOME='!    '
20244 elif test "$gnome_url_show_program" != ''; then
20245   GNOME24='!    '
20246   GNOME22=''
20247   NOGNOME='!    '
20248 else
20249   GNOME24='!    '
20250   GNOME22='!    '
20251   NOGNOME=''
20252 fi
20253
20254
20255 # Set PO_DATADIR to something sensible.
20256 #
20257 { echo "$as_me:$LINENO: checking for locale directory" >&5
20258 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20259 if test -n "$GTK_DATADIR" ; then
20260   PO_DATADIR="$GTK_DATADIR"
20261 elif test "$have_gtk" = yes; then
20262   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20263   PO_DATADIR="$PO_DATADIR/share"
20264 fi
20265
20266 if test -z "$PO_DATADIR" ; then
20267   #
20268   # #### Total fucking kludge --
20269   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20270   # but of course we need to expand all the nested variables to do that...
20271   #
20272   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20273   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20274 fi
20275
20276 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20277 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20278
20279
20280 # canonicalize slashes.
20281 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20282
20283 # gcc 3.0 likes to issue this warning for every file:
20284 #
20285 # cc1: warning: changing search order for system directory "/usr/local/include"
20286 # cc1: warning:   as it has already been specified as a non-system directory
20287 #
20288 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20289 # Which *should* be totally redundant, and thus an ok thing to delete?
20290 #
20291 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20292
20293
20294 ###############################################################################
20295 #
20296 #       Perform substitutions and write Makefiles.
20297 #
20298 ###############################################################################
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362 APPDEFAULTS=$ac_x_app_defaults
20363
20364
20365
20366
20367
20368
20369
20370 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20371
20372 cat >confcache <<\_ACEOF
20373 # This file is a shell script that caches the results of configure
20374 # tests run on this system so they can be shared between configure
20375 # scripts and configure runs, see configure's option --config-cache.
20376 # It is not useful on other systems.  If it contains results you don't
20377 # want to keep, you may remove or edit it.
20378 #
20379 # config.status only pays attention to the cache file if you give it
20380 # the --recheck option to rerun configure.
20381 #
20382 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20383 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20384 # following values.
20385
20386 _ACEOF
20387
20388 # The following way of writing the cache mishandles newlines in values,
20389 # but we know of no workaround that is simple, portable, and efficient.
20390 # So, we kill variables containing newlines.
20391 # Ultrix sh set writes to stderr and can't be redirected directly,
20392 # and sets the high bit in the cache file unless we assign to the vars.
20393 (
20394   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20395     eval ac_val=\$$ac_var
20396     case $ac_val in #(
20397     *${as_nl}*)
20398       case $ac_var in #(
20399       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20400 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20401       esac
20402       case $ac_var in #(
20403       _ | IFS | as_nl) ;; #(
20404       *) $as_unset $ac_var ;;
20405       esac ;;
20406     esac
20407   done
20408
20409   (set) 2>&1 |
20410     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20411     *${as_nl}ac_space=\ *)
20412       # `set' does not quote correctly, so add quotes (double-quote
20413       # substitution turns \\\\ into \\, and sed turns \\ into \).
20414       sed -n \
20415         "s/'/'\\\\''/g;
20416           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20417       ;; #(
20418     *)
20419       # `set' quotes correctly as required by POSIX, so do not add quotes.
20420       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20421       ;;
20422     esac |
20423     sort
20424 ) |
20425   sed '
20426      /^ac_cv_env_/b end
20427      t clear
20428      :clear
20429      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20430      t end
20431      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20432      :end' >>confcache
20433 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20434   if test -w "$cache_file"; then
20435     test "x$cache_file" != "x/dev/null" &&
20436       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20437 echo "$as_me: updating cache $cache_file" >&6;}
20438     cat confcache >$cache_file
20439   else
20440     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20441 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20442   fi
20443 fi
20444 rm -f confcache
20445
20446 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20447 # Let make expand exec_prefix.
20448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20449
20450 DEFS=-DHAVE_CONFIG_H
20451
20452 ac_libobjs=
20453 ac_ltlibobjs=
20454 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20455   # 1. Remove the extension, and $U if already installed.
20456   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20457   ac_i=`echo "$ac_i" | sed "$ac_script"`
20458   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20459   #    will be set to the directory where LIBOBJS objects are built.
20460   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20461   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20462 done
20463 LIBOBJS=$ac_libobjs
20464
20465 LTLIBOBJS=$ac_ltlibobjs
20466
20467
20468
20469
20470         mv -f po/POTFILES po/POTFILES.tmp
20471         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20472         rm -f po/POTFILES.tmp
20473
20474
20475
20476 : ${CONFIG_STATUS=./config.status}
20477 ac_clean_files_save=$ac_clean_files
20478 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20479 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20480 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20481 cat >$CONFIG_STATUS <<_ACEOF
20482 #! $SHELL
20483 # Generated by $as_me.
20484 # Run this file to recreate the current configuration.
20485 # Compiler output produced by configure, useful for debugging
20486 # configure, is in config.log if it exists.
20487
20488 debug=false
20489 ac_cs_recheck=false
20490 ac_cs_silent=false
20491 SHELL=\${CONFIG_SHELL-$SHELL}
20492 _ACEOF
20493
20494 cat >>$CONFIG_STATUS <<\_ACEOF
20495 ## --------------------- ##
20496 ## M4sh Initialization.  ##
20497 ## --------------------- ##
20498
20499 # Be more Bourne compatible
20500 DUALCASE=1; export DUALCASE # for MKS sh
20501 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20502   emulate sh
20503   NULLCMD=:
20504   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20505   # is contrary to our usage.  Disable this feature.
20506   alias -g '${1+"$@"}'='"$@"'
20507   setopt NO_GLOB_SUBST
20508 else
20509   case `(set -o) 2>/dev/null` in
20510   *posix*) set -o posix ;;
20511 esac
20512
20513 fi
20514
20515
20516
20517
20518 # PATH needs CR
20519 # Avoid depending upon Character Ranges.
20520 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20521 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20522 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20523 as_cr_digits='0123456789'
20524 as_cr_alnum=$as_cr_Letters$as_cr_digits
20525
20526 # The user is always right.
20527 if test "${PATH_SEPARATOR+set}" != set; then
20528   echo "#! /bin/sh" >conf$$.sh
20529   echo  "exit 0"   >>conf$$.sh
20530   chmod +x conf$$.sh
20531   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20532     PATH_SEPARATOR=';'
20533   else
20534     PATH_SEPARATOR=:
20535   fi
20536   rm -f conf$$.sh
20537 fi
20538
20539 # Support unset when possible.
20540 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20541   as_unset=unset
20542 else
20543   as_unset=false
20544 fi
20545
20546
20547 # IFS
20548 # We need space, tab and new line, in precisely that order.  Quoting is
20549 # there to prevent editors from complaining about space-tab.
20550 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20551 # splitting by setting IFS to empty value.)
20552 as_nl='
20553 '
20554 IFS=" ""        $as_nl"
20555
20556 # Find who we are.  Look in the path if we contain no directory separator.
20557 case $0 in
20558   *[\\/]* ) as_myself=$0 ;;
20559   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20560 for as_dir in $PATH
20561 do
20562   IFS=$as_save_IFS
20563   test -z "$as_dir" && as_dir=.
20564   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20565 done
20566 IFS=$as_save_IFS
20567
20568      ;;
20569 esac
20570 # We did not find ourselves, most probably we were run as `sh COMMAND'
20571 # in which case we are not to be found in the path.
20572 if test "x$as_myself" = x; then
20573   as_myself=$0
20574 fi
20575 if test ! -f "$as_myself"; then
20576   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20577   { (exit 1); exit 1; }
20578 fi
20579
20580 # Work around bugs in pre-3.0 UWIN ksh.
20581 for as_var in ENV MAIL MAILPATH
20582 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20583 done
20584 PS1='$ '
20585 PS2='> '
20586 PS4='+ '
20587
20588 # NLS nuisances.
20589 for as_var in \
20590   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20591   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20592   LC_TELEPHONE LC_TIME
20593 do
20594   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20595     eval $as_var=C; export $as_var
20596   else
20597     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20598   fi
20599 done
20600
20601 # Required to use basename.
20602 if expr a : '\(a\)' >/dev/null 2>&1 &&
20603    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20604   as_expr=expr
20605 else
20606   as_expr=false
20607 fi
20608
20609 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20610   as_basename=basename
20611 else
20612   as_basename=false
20613 fi
20614
20615
20616 # Name of the executable.
20617 as_me=`$as_basename -- "$0" ||
20618 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20619          X"$0" : 'X\(//\)$' \| \
20620          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20621 echo X/"$0" |
20622     sed '/^.*\/\([^/][^/]*\)\/*$/{
20623             s//\1/
20624             q
20625           }
20626           /^X\/\(\/\/\)$/{
20627             s//\1/
20628             q
20629           }
20630           /^X\/\(\/\).*/{
20631             s//\1/
20632             q
20633           }
20634           s/.*/./; q'`
20635
20636 # CDPATH.
20637 $as_unset CDPATH
20638
20639
20640
20641   as_lineno_1=$LINENO
20642   as_lineno_2=$LINENO
20643   test "x$as_lineno_1" != "x$as_lineno_2" &&
20644   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20645
20646   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20647   # uniformly replaced by the line number.  The first 'sed' inserts a
20648   # line-number line after each line using $LINENO; the second 'sed'
20649   # does the real work.  The second script uses 'N' to pair each
20650   # line-number line with the line containing $LINENO, and appends
20651   # trailing '-' during substitution so that $LINENO is not a special
20652   # case at line end.
20653   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20654   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20655   # E. McMahon (1931-1989) for sed's syntax.  :-)
20656   sed -n '
20657     p
20658     /[$]LINENO/=
20659   ' <$as_myself |
20660     sed '
20661       s/[$]LINENO.*/&-/
20662       t lineno
20663       b
20664       :lineno
20665       N
20666       :loop
20667       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20668       t loop
20669       s/-\n.*//
20670     ' >$as_me.lineno &&
20671   chmod +x "$as_me.lineno" ||
20672     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20673    { (exit 1); exit 1; }; }
20674
20675   # Don't try to exec as it changes $[0], causing all sort of problems
20676   # (the dirname of $[0] is not the place where we might find the
20677   # original and so on.  Autoconf is especially sensitive to this).
20678   . "./$as_me.lineno"
20679   # Exit status is that of the last command.
20680   exit
20681 }
20682
20683
20684 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20685   as_dirname=dirname
20686 else
20687   as_dirname=false
20688 fi
20689
20690 ECHO_C= ECHO_N= ECHO_T=
20691 case `echo -n x` in
20692 -n*)
20693   case `echo 'x\c'` in
20694   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20695   *)   ECHO_C='\c';;
20696   esac;;
20697 *)
20698   ECHO_N='-n';;
20699 esac
20700
20701 if expr a : '\(a\)' >/dev/null 2>&1 &&
20702    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20703   as_expr=expr
20704 else
20705   as_expr=false
20706 fi
20707
20708 rm -f conf$$ conf$$.exe conf$$.file
20709 if test -d conf$$.dir; then
20710   rm -f conf$$.dir/conf$$.file
20711 else
20712   rm -f conf$$.dir
20713   mkdir conf$$.dir
20714 fi
20715 echo >conf$$.file
20716 if ln -s conf$$.file conf$$ 2>/dev/null; then
20717   as_ln_s='ln -s'
20718   # ... but there are two gotchas:
20719   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20720   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20721   # In both cases, we have to default to `cp -p'.
20722   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20723     as_ln_s='cp -p'
20724 elif ln conf$$.file conf$$ 2>/dev/null; then
20725   as_ln_s=ln
20726 else
20727   as_ln_s='cp -p'
20728 fi
20729 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20730 rmdir conf$$.dir 2>/dev/null
20731
20732 if mkdir -p . 2>/dev/null; then
20733   as_mkdir_p=:
20734 else
20735   test -d ./-p && rmdir ./-p
20736   as_mkdir_p=false
20737 fi
20738
20739 if test -x / >/dev/null 2>&1; then
20740   as_test_x='test -x'
20741 else
20742   if ls -dL / >/dev/null 2>&1; then
20743     as_ls_L_option=L
20744   else
20745     as_ls_L_option=
20746   fi
20747   as_test_x='
20748     eval sh -c '\''
20749       if test -d "$1"; then
20750         test -d "$1/.";
20751       else
20752         case $1 in
20753         -*)set "./$1";;
20754         esac;
20755         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20756         ???[sx]*):;;*)false;;esac;fi
20757     '\'' sh
20758   '
20759 fi
20760 as_executable_p=$as_test_x
20761
20762 # Sed expression to map a string onto a valid CPP name.
20763 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20764
20765 # Sed expression to map a string onto a valid variable name.
20766 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20767
20768
20769 exec 6>&1
20770
20771 # Save the log message, to keep $[0] and so on meaningful, and to
20772 # report actual input values of CONFIG_FILES etc. instead of their
20773 # values after options handling.
20774 ac_log="
20775 This file was extended by $as_me, which was
20776 generated by GNU Autoconf 2.61.  Invocation command line was
20777
20778   CONFIG_FILES    = $CONFIG_FILES
20779   CONFIG_HEADERS  = $CONFIG_HEADERS
20780   CONFIG_LINKS    = $CONFIG_LINKS
20781   CONFIG_COMMANDS = $CONFIG_COMMANDS
20782   $ $0 $@
20783
20784 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20785 "
20786
20787 _ACEOF
20788
20789 cat >>$CONFIG_STATUS <<_ACEOF
20790 # Files that config.status was made for.
20791 config_files="$ac_config_files"
20792 config_headers="$ac_config_headers"
20793 config_commands="$ac_config_commands"
20794
20795 _ACEOF
20796
20797 cat >>$CONFIG_STATUS <<\_ACEOF
20798 ac_cs_usage="\
20799 \`$as_me' instantiates files from templates according to the
20800 current configuration.
20801
20802 Usage: $0 [OPTIONS] [FILE]...
20803
20804   -h, --help       print this help, then exit
20805   -V, --version    print version number and configuration settings, then exit
20806   -q, --quiet      do not print progress messages
20807   -d, --debug      don't remove temporary files
20808       --recheck    update $as_me by reconfiguring in the same conditions
20809   --file=FILE[:TEMPLATE]
20810                    instantiate the configuration file FILE
20811   --header=FILE[:TEMPLATE]
20812                    instantiate the configuration header FILE
20813
20814 Configuration files:
20815 $config_files
20816
20817 Configuration headers:
20818 $config_headers
20819
20820 Configuration commands:
20821 $config_commands
20822
20823 Report bugs to <bug-autoconf@gnu.org>."
20824
20825 _ACEOF
20826 cat >>$CONFIG_STATUS <<_ACEOF
20827 ac_cs_version="\\
20828 config.status
20829 configured by $0, generated by GNU Autoconf 2.61,
20830   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20831
20832 Copyright (C) 2006 Free Software Foundation, Inc.
20833 This config.status script is free software; the Free Software Foundation
20834 gives unlimited permission to copy, distribute and modify it."
20835
20836 ac_pwd='$ac_pwd'
20837 srcdir='$srcdir'
20838 INSTALL='$INSTALL'
20839 _ACEOF
20840
20841 cat >>$CONFIG_STATUS <<\_ACEOF
20842 # If no file are specified by the user, then we need to provide default
20843 # value.  By we need to know if files were specified by the user.
20844 ac_need_defaults=:
20845 while test $# != 0
20846 do
20847   case $1 in
20848   --*=*)
20849     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20850     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20851     ac_shift=:
20852     ;;
20853   *)
20854     ac_option=$1
20855     ac_optarg=$2
20856     ac_shift=shift
20857     ;;
20858   esac
20859
20860   case $ac_option in
20861   # Handling of the options.
20862   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20863     ac_cs_recheck=: ;;
20864   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20865     echo "$ac_cs_version"; exit ;;
20866   --debug | --debu | --deb | --de | --d | -d )
20867     debug=: ;;
20868   --file | --fil | --fi | --f )
20869     $ac_shift
20870     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20871     ac_need_defaults=false;;
20872   --header | --heade | --head | --hea )
20873     $ac_shift
20874     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20875     ac_need_defaults=false;;
20876   --he | --h)
20877     # Conflict between --help and --header
20878     { echo "$as_me: error: ambiguous option: $1
20879 Try \`$0 --help' for more information." >&2
20880    { (exit 1); exit 1; }; };;
20881   --help | --hel | -h )
20882     echo "$ac_cs_usage"; exit ;;
20883   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20884   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20885     ac_cs_silent=: ;;
20886
20887   # This is an error.
20888   -*) { echo "$as_me: error: unrecognized option: $1
20889 Try \`$0 --help' for more information." >&2
20890    { (exit 1); exit 1; }; } ;;
20891
20892   *) ac_config_targets="$ac_config_targets $1"
20893      ac_need_defaults=false ;;
20894
20895   esac
20896   shift
20897 done
20898
20899 ac_configure_extra_args=
20900
20901 if $ac_cs_silent; then
20902   exec 6>/dev/null
20903   ac_configure_extra_args="$ac_configure_extra_args --silent"
20904 fi
20905
20906 _ACEOF
20907 cat >>$CONFIG_STATUS <<_ACEOF
20908 if \$ac_cs_recheck; then
20909   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20910   CONFIG_SHELL=$SHELL
20911   export CONFIG_SHELL
20912   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20913 fi
20914
20915 _ACEOF
20916 cat >>$CONFIG_STATUS <<\_ACEOF
20917 exec 5>>config.log
20918 {
20919   echo
20920   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20921 ## Running $as_me. ##
20922 _ASBOX
20923   echo "$ac_log"
20924 } >&5
20925
20926 _ACEOF
20927 cat >>$CONFIG_STATUS <<_ACEOF
20928 #
20929 # INIT-COMMANDS
20930 #
20931 INTLTOOL_PERL=${INTLTOOL_PERL}
20932
20933
20934 _ACEOF
20935
20936 cat >>$CONFIG_STATUS <<\_ACEOF
20937
20938 # Handling of arguments.
20939 for ac_config_target in $ac_config_targets
20940 do
20941   case $ac_config_target in
20942     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20943     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20944     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20945     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20946     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20947     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20948     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20949     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20950     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20951     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20952
20953   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20954 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20955    { (exit 1); exit 1; }; };;
20956   esac
20957 done
20958
20959
20960 # If the user did not use the arguments to specify the items to instantiate,
20961 # then the envvar interface is used.  Set only those that are not.
20962 # We use the long form for the default assignment because of an extremely
20963 # bizarre bug on SunOS 4.1.3.
20964 if $ac_need_defaults; then
20965   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20966   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20967   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20968 fi
20969
20970 # Have a temporary directory for convenience.  Make it in the build tree
20971 # simply because there is no reason against having it here, and in addition,
20972 # creating and moving files from /tmp can sometimes cause problems.
20973 # Hook for its removal unless debugging.
20974 # Note that there is a small window in which the directory will not be cleaned:
20975 # after its creation but before its name has been assigned to `$tmp'.
20976 $debug ||
20977 {
20978   tmp=
20979   trap 'exit_status=$?
20980   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
20981 ' 0
20982   trap '{ (exit 1); exit 1; }' 1 2 13 15
20983 }
20984 # Create a (secure) tmp directory for tmp files.
20985
20986 {
20987   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20988   test -n "$tmp" && test -d "$tmp"
20989 }  ||
20990 {
20991   tmp=./conf$$-$RANDOM
20992   (umask 077 && mkdir "$tmp")
20993 } ||
20994 {
20995    echo "$me: cannot create a temporary directory in ." >&2
20996    { (exit 1); exit 1; }
20997 }
20998
20999 #
21000 # Set up the sed scripts for CONFIG_FILES section.
21001 #
21002
21003 # No need to generate the scripts if there are no CONFIG_FILES.
21004 # This happens for instance when ./config.status config.h
21005 if test -n "$CONFIG_FILES"; then
21006
21007 _ACEOF
21008
21009
21010
21011 ac_delim='%!_!# '
21012 for ac_last_try in false false false false false :; do
21013   cat >conf$$subs.sed <<_ACEOF
21014 SHELL!$SHELL$ac_delim
21015 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21016 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21017 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21018 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21019 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21020 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21021 exec_prefix!$exec_prefix$ac_delim
21022 prefix!$prefix$ac_delim
21023 program_transform_name!$program_transform_name$ac_delim
21024 bindir!$bindir$ac_delim
21025 sbindir!$sbindir$ac_delim
21026 libexecdir!$libexecdir$ac_delim
21027 datarootdir!$datarootdir$ac_delim
21028 datadir!$datadir$ac_delim
21029 sysconfdir!$sysconfdir$ac_delim
21030 sharedstatedir!$sharedstatedir$ac_delim
21031 localstatedir!$localstatedir$ac_delim
21032 includedir!$includedir$ac_delim
21033 oldincludedir!$oldincludedir$ac_delim
21034 docdir!$docdir$ac_delim
21035 infodir!$infodir$ac_delim
21036 htmldir!$htmldir$ac_delim
21037 dvidir!$dvidir$ac_delim
21038 pdfdir!$pdfdir$ac_delim
21039 psdir!$psdir$ac_delim
21040 libdir!$libdir$ac_delim
21041 localedir!$localedir$ac_delim
21042 mandir!$mandir$ac_delim
21043 DEFS!$DEFS$ac_delim
21044 ECHO_C!$ECHO_C$ac_delim
21045 ECHO_N!$ECHO_N$ac_delim
21046 ECHO_T!$ECHO_T$ac_delim
21047 LIBS!$LIBS$ac_delim
21048 build_alias!$build_alias$ac_delim
21049 host_alias!$host_alias$ac_delim
21050 target_alias!$target_alias$ac_delim
21051 build!$build$ac_delim
21052 build_cpu!$build_cpu$ac_delim
21053 build_vendor!$build_vendor$ac_delim
21054 build_os!$build_os$ac_delim
21055 host!$host$ac_delim
21056 host_cpu!$host_cpu$ac_delim
21057 host_vendor!$host_vendor$ac_delim
21058 host_os!$host_os$ac_delim
21059 CC!$CC$ac_delim
21060 CFLAGS!$CFLAGS$ac_delim
21061 LDFLAGS!$LDFLAGS$ac_delim
21062 CPPFLAGS!$CPPFLAGS$ac_delim
21063 ac_ct_CC!$ac_ct_CC$ac_delim
21064 EXEEXT!$EXEEXT$ac_delim
21065 OBJEXT!$OBJEXT$ac_delim
21066 CPP!$CPP$ac_delim
21067 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21068 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21069 INSTALL_DATA!$INSTALL_DATA$ac_delim
21070 SET_MAKE!$SET_MAKE$ac_delim
21071 GREP!$GREP$ac_delim
21072 EGREP!$EGREP$ac_delim
21073 PERL!$PERL$ac_delim
21074 XMKMF!$XMKMF$ac_delim
21075 X_CFLAGS!$X_CFLAGS$ac_delim
21076 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21077 X_LIBS!$X_LIBS$ac_delim
21078 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21079 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21080 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21081 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21082 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21083 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21084 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21085 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21086 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21087 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21088 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21089 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21090 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21091 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21092 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21093 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21094 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21095 RANLIB!$RANLIB$ac_delim
21096 ALLOCA!$ALLOCA$ac_delim
21097 USE_NLS!$USE_NLS$ac_delim
21098 MSGFMT!$MSGFMT$ac_delim
21099 GMSGFMT!$GMSGFMT$ac_delim
21100 XGETTEXT!$XGETTEXT$ac_delim
21101 CATALOGS!$CATALOGS$ac_delim
21102 CATOBJEXT!$CATOBJEXT$ac_delim
21103 DATADIRNAME!$DATADIRNAME$ac_delim
21104 GMOFILES!$GMOFILES$ac_delim
21105 INSTOBJEXT!$INSTOBJEXT$ac_delim
21106 INTLDEPS!$INTLDEPS$ac_delim
21107 INTLLIBS!$INTLLIBS$ac_delim
21108 INTLOBJS!$INTLOBJS$ac_delim
21109 POFILES!$POFILES$ac_delim
21110 POSUB!$POSUB$ac_delim
21111 _ACEOF
21112
21113   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21114     break
21115   elif $ac_last_try; then
21116     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21117 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21118    { (exit 1); exit 1; }; }
21119   else
21120     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21121   fi
21122 done
21123
21124 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21125 if test -n "$ac_eof"; then
21126   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21127   ac_eof=`expr $ac_eof + 1`
21128 fi
21129
21130 cat >>$CONFIG_STATUS <<_ACEOF
21131 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21132 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21133 _ACEOF
21134 sed '
21135 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21136 s/^/s,@/; s/!/@,|#_!!_#|/
21137 :n
21138 t n
21139 s/'"$ac_delim"'$/,g/; t
21140 s/$/\\/; p
21141 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21142 ' >>$CONFIG_STATUS <conf$$subs.sed
21143 rm -f conf$$subs.sed
21144 cat >>$CONFIG_STATUS <<_ACEOF
21145 CEOF$ac_eof
21146 _ACEOF
21147
21148
21149 ac_delim='%!_!# '
21150 for ac_last_try in false false false false false :; do
21151   cat >conf$$subs.sed <<_ACEOF
21152 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21153 login_manager_tmp!$login_manager_tmp$ac_delim
21154 pkg_config!$pkg_config$ac_delim
21155 gnome_open_program!$gnome_open_program$ac_delim
21156 gnome_url_show_program!$gnome_url_show_program$ac_delim
21157 INCLUDES!$INCLUDES$ac_delim
21158 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21159 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21160 SAVER_LIBS!$SAVER_LIBS$ac_delim
21161 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21162 GTK_LIBS!$GTK_LIBS$ac_delim
21163 XML_LIBS!$XML_LIBS$ac_delim
21164 JPEG_LIBS!$JPEG_LIBS$ac_delim
21165 HACK_LIBS!$HACK_LIBS$ac_delim
21166 XPM_LIBS!$XPM_LIBS$ac_delim
21167 PTY_LIBS!$PTY_LIBS$ac_delim
21168 GL_LIBS!$GL_LIBS$ac_delim
21169 GLE_LIBS!$GLE_LIBS$ac_delim
21170 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21171 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21172 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21173 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21174 SETUID_HACKS!$SETUID_HACKS$ac_delim
21175 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21176 NEED_SETUID!$NEED_SETUID$ac_delim
21177 INSTALL_PAM!$INSTALL_PAM$ac_delim
21178 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21179 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21180 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21181 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21182 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21183 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21184 WITH_BROWSER!$WITH_BROWSER$ac_delim
21185 OBJCC!$OBJCC$ac_delim
21186 EXES_OSX!$EXES_OSX$ac_delim
21187 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21188 MEN_OSX!$MEN_OSX$ac_delim
21189 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21190 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21191 XMU_SRCS!$XMU_SRCS$ac_delim
21192 XMU_OBJS!$XMU_OBJS$ac_delim
21193 XMU_LIBS!$XMU_LIBS$ac_delim
21194 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21195 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21196 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21197 LOCK_SRCS!$LOCK_SRCS$ac_delim
21198 LOCK_OBJS!$LOCK_OBJS$ac_delim
21199 JPEG_EXES!$JPEG_EXES$ac_delim
21200 GL_EXES!$GL_EXES$ac_delim
21201 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21202 GL_MEN!$GL_MEN$ac_delim
21203 GL_KLUDGE!$GL_KLUDGE$ac_delim
21204 GLE_EXES!$GLE_EXES$ac_delim
21205 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21206 GNOME24!$GNOME24$ac_delim
21207 GNOME22!$GNOME22$ac_delim
21208 NOGNOME!$NOGNOME$ac_delim
21209 HACKDIR!$HACKDIR$ac_delim
21210 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21211 GTK_DATADIR!$GTK_DATADIR$ac_delim
21212 PO_DATADIR!$PO_DATADIR$ac_delim
21213 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21214 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21215 APPDEFAULTS!$APPDEFAULTS$ac_delim
21216 DEPEND!$DEPEND$ac_delim
21217 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21218 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21219 LIBOBJS!$LIBOBJS$ac_delim
21220 LTLIBOBJS!$LTLIBOBJS$ac_delim
21221 _ACEOF
21222
21223   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
21224     break
21225   elif $ac_last_try; then
21226     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21227 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21228    { (exit 1); exit 1; }; }
21229   else
21230     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21231   fi
21232 done
21233
21234 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21235 if test -n "$ac_eof"; then
21236   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21237   ac_eof=`expr $ac_eof + 1`
21238 fi
21239
21240 cat >>$CONFIG_STATUS <<_ACEOF
21241 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21242 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21243 _ACEOF
21244 sed '
21245 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21246 s/^/s,@/; s/!/@,|#_!!_#|/
21247 :n
21248 t n
21249 s/'"$ac_delim"'$/,g/; t
21250 s/$/\\/; p
21251 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21252 ' >>$CONFIG_STATUS <conf$$subs.sed
21253 rm -f conf$$subs.sed
21254 cat >>$CONFIG_STATUS <<_ACEOF
21255 :end
21256 s/|#_!!_#|//g
21257 CEOF$ac_eof
21258 _ACEOF
21259
21260
21261 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21262 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21263 # trailing colons and then remove the whole line if VPATH becomes empty
21264 # (actually we leave an empty line to preserve line numbers).
21265 if test "x$srcdir" = x.; then
21266   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21267 s/:*\$(srcdir):*/:/
21268 s/:*\${srcdir}:*/:/
21269 s/:*@srcdir@:*/:/
21270 s/^\([^=]*=[     ]*\):*/\1/
21271 s/:*$//
21272 s/^[^=]*=[       ]*$//
21273 }'
21274 fi
21275
21276 cat >>$CONFIG_STATUS <<\_ACEOF
21277 fi # test -n "$CONFIG_FILES"
21278
21279
21280 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21281 do
21282   case $ac_tag in
21283   :[FHLC]) ac_mode=$ac_tag; continue;;
21284   esac
21285   case $ac_mode$ac_tag in
21286   :[FHL]*:*);;
21287   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21288 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21289    { (exit 1); exit 1; }; };;
21290   :[FH]-) ac_tag=-:-;;
21291   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21292   esac
21293   ac_save_IFS=$IFS
21294   IFS=:
21295   set x $ac_tag
21296   IFS=$ac_save_IFS
21297   shift
21298   ac_file=$1
21299   shift
21300
21301   case $ac_mode in
21302   :L) ac_source=$1;;
21303   :[FH])
21304     ac_file_inputs=
21305     for ac_f
21306     do
21307       case $ac_f in
21308       -) ac_f="$tmp/stdin";;
21309       *) # Look for the file first in the build tree, then in the source tree
21310          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21311          # because $ac_f cannot contain `:'.
21312          test -f "$ac_f" ||
21313            case $ac_f in
21314            [\\/$]*) false;;
21315            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21316            esac ||
21317            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21318 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21319    { (exit 1); exit 1; }; };;
21320       esac
21321       ac_file_inputs="$ac_file_inputs $ac_f"
21322     done
21323
21324     # Let's still pretend it is `configure' which instantiates (i.e., don't
21325     # use $as_me), people would be surprised to read:
21326     #    /* config.h.  Generated by config.status.  */
21327     configure_input="Generated from "`IFS=:
21328           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21329     if test x"$ac_file" != x-; then
21330       configure_input="$ac_file.  $configure_input"
21331       { echo "$as_me:$LINENO: creating $ac_file" >&5
21332 echo "$as_me: creating $ac_file" >&6;}
21333     fi
21334
21335     case $ac_tag in
21336     *:-:* | *:-) cat >"$tmp/stdin";;
21337     esac
21338     ;;
21339   esac
21340
21341   ac_dir=`$as_dirname -- "$ac_file" ||
21342 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21343          X"$ac_file" : 'X\(//\)[^/]' \| \
21344          X"$ac_file" : 'X\(//\)$' \| \
21345          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21346 echo X"$ac_file" |
21347     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21348             s//\1/
21349             q
21350           }
21351           /^X\(\/\/\)[^/].*/{
21352             s//\1/
21353             q
21354           }
21355           /^X\(\/\/\)$/{
21356             s//\1/
21357             q
21358           }
21359           /^X\(\/\).*/{
21360             s//\1/
21361             q
21362           }
21363           s/.*/./; q'`
21364   { as_dir="$ac_dir"
21365   case $as_dir in #(
21366   -*) as_dir=./$as_dir;;
21367   esac
21368   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21369     as_dirs=
21370     while :; do
21371       case $as_dir in #(
21372       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21373       *) as_qdir=$as_dir;;
21374       esac
21375       as_dirs="'$as_qdir' $as_dirs"
21376       as_dir=`$as_dirname -- "$as_dir" ||
21377 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21378          X"$as_dir" : 'X\(//\)[^/]' \| \
21379          X"$as_dir" : 'X\(//\)$' \| \
21380          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21381 echo X"$as_dir" |
21382     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21383             s//\1/
21384             q
21385           }
21386           /^X\(\/\/\)[^/].*/{
21387             s//\1/
21388             q
21389           }
21390           /^X\(\/\/\)$/{
21391             s//\1/
21392             q
21393           }
21394           /^X\(\/\).*/{
21395             s//\1/
21396             q
21397           }
21398           s/.*/./; q'`
21399       test -d "$as_dir" && break
21400     done
21401     test -z "$as_dirs" || eval "mkdir $as_dirs"
21402   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21403 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21404    { (exit 1); exit 1; }; }; }
21405   ac_builddir=.
21406
21407 case "$ac_dir" in
21408 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21409 *)
21410   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21411   # A ".." for each directory in $ac_dir_suffix.
21412   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21413   case $ac_top_builddir_sub in
21414   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21415   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21416   esac ;;
21417 esac
21418 ac_abs_top_builddir=$ac_pwd
21419 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21420 # for backward compatibility:
21421 ac_top_builddir=$ac_top_build_prefix
21422
21423 case $srcdir in
21424   .)  # We are building in place.
21425     ac_srcdir=.
21426     ac_top_srcdir=$ac_top_builddir_sub
21427     ac_abs_top_srcdir=$ac_pwd ;;
21428   [\\/]* | ?:[\\/]* )  # Absolute name.
21429     ac_srcdir=$srcdir$ac_dir_suffix;
21430     ac_top_srcdir=$srcdir
21431     ac_abs_top_srcdir=$srcdir ;;
21432   *) # Relative name.
21433     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21434     ac_top_srcdir=$ac_top_build_prefix$srcdir
21435     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21436 esac
21437 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21438
21439
21440   case $ac_mode in
21441   :F)
21442   #
21443   # CONFIG_FILE
21444   #
21445
21446   case $INSTALL in
21447   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21448   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21449   esac
21450 _ACEOF
21451
21452 cat >>$CONFIG_STATUS <<\_ACEOF
21453 # If the template does not know about datarootdir, expand it.
21454 # FIXME: This hack should be removed a few years after 2.60.
21455 ac_datarootdir_hack=; ac_datarootdir_seen=
21456
21457 case `sed -n '/datarootdir/ {
21458   p
21459   q
21460 }
21461 /@datadir@/p
21462 /@docdir@/p
21463 /@infodir@/p
21464 /@localedir@/p
21465 /@mandir@/p
21466 ' $ac_file_inputs` in
21467 *datarootdir*) ac_datarootdir_seen=yes;;
21468 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21469   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21470 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21471 _ACEOF
21472 cat >>$CONFIG_STATUS <<_ACEOF
21473   ac_datarootdir_hack='
21474   s&@datadir@&$datadir&g
21475   s&@docdir@&$docdir&g
21476   s&@infodir@&$infodir&g
21477   s&@localedir@&$localedir&g
21478   s&@mandir@&$mandir&g
21479     s&\\\${datarootdir}&$datarootdir&g' ;;
21480 esac
21481 _ACEOF
21482
21483 # Neutralize VPATH when `$srcdir' = `.'.
21484 # Shell code in configure.ac might set extrasub.
21485 # FIXME: do we really want to maintain this feature?
21486 cat >>$CONFIG_STATUS <<_ACEOF
21487   sed "$ac_vpsub
21488 $extrasub
21489 _ACEOF
21490 cat >>$CONFIG_STATUS <<\_ACEOF
21491 :t
21492 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21493 s&@configure_input@&$configure_input&;t t
21494 s&@top_builddir@&$ac_top_builddir_sub&;t t
21495 s&@srcdir@&$ac_srcdir&;t t
21496 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21497 s&@top_srcdir@&$ac_top_srcdir&;t t
21498 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21499 s&@builddir@&$ac_builddir&;t t
21500 s&@abs_builddir@&$ac_abs_builddir&;t t
21501 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21502 s&@INSTALL@&$ac_INSTALL&;t t
21503 $ac_datarootdir_hack
21504 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21505
21506 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21507   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21508   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21509   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21510 which seems to be undefined.  Please make sure it is defined." >&5
21511 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21512 which seems to be undefined.  Please make sure it is defined." >&2;}
21513
21514   rm -f "$tmp/stdin"
21515   case $ac_file in
21516   -) cat "$tmp/out"; rm -f "$tmp/out";;
21517   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21518   esac
21519  ;;
21520   :H)
21521   #
21522   # CONFIG_HEADER
21523   #
21524 _ACEOF
21525
21526 # Transform confdefs.h into a sed script `conftest.defines', that
21527 # substitutes the proper values into config.h.in to produce config.h.
21528 rm -rf conftest.defines conftest.tail
21529 # First, append a space to every undef/define line, to ease matching.
21530 echo 's/$/ /' >conftest.defines
21531 # Then, protect against being on the right side of a sed subst, or in
21532 # an unquoted here document, in config.status.  If some macros were
21533 # called several times there might be several #defines for the same
21534 # symbol, which is useless.  But do not sort them, since the last
21535 # AC_DEFINE must be honored.
21536 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21537 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21538 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21539 # PARAMS is the parameter list in the macro definition--in most cases, it's
21540 # just an empty string.
21541 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21542 ac_dB='\\)[      (].*,\\1define\\2'
21543 ac_dC=' '
21544 ac_dD=' ,'
21545
21546 uniq confdefs.h |
21547   sed -n '
21548         t rset
21549         :rset
21550         s/^[     ]*#[    ]*define[       ][      ]*//
21551         t ok
21552         d
21553         :ok
21554         s/[\\&,]/\\&/g
21555         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21556         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21557   ' >>conftest.defines
21558
21559 # Remove the space that was appended to ease matching.
21560 # Then replace #undef with comments.  This is necessary, for
21561 # example, in the case of _POSIX_SOURCE, which is predefined and required
21562 # on some systems where configure will not decide to define it.
21563 # (The regexp can be short, since the line contains either #define or #undef.)
21564 echo 's/ $//
21565 s,^[     #]*u.*,/* & */,' >>conftest.defines
21566
21567 # Break up conftest.defines:
21568 ac_max_sed_lines=50
21569
21570 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21571 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21572 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21573 # et cetera.
21574 ac_in='$ac_file_inputs'
21575 ac_out='"$tmp/out1"'
21576 ac_nxt='"$tmp/out2"'
21577
21578 while :
21579 do
21580   # Write a here document:
21581     cat >>$CONFIG_STATUS <<_ACEOF
21582     # First, check the format of the line:
21583     cat >"\$tmp/defines.sed" <<\\CEOF
21584 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21585 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21586 b
21587 :def
21588 _ACEOF
21589   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21590   echo 'CEOF
21591     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21592   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21593   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21594   grep . conftest.tail >/dev/null || break
21595   rm -rf conftest.defines
21596   mv conftest.tail conftest.defines
21597 done
21598 rm -rf conftest.defines conftest.tail
21599
21600 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21601 cat >>$CONFIG_STATUS <<\_ACEOF
21602   if test x"$ac_file" != x-; then
21603     echo "/* $configure_input  */" >"$tmp/config.h"
21604     cat "$ac_result" >>"$tmp/config.h"
21605     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21606       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21607 echo "$as_me: $ac_file is unchanged" >&6;}
21608     else
21609       rm -f $ac_file
21610       mv "$tmp/config.h" $ac_file
21611     fi
21612   else
21613     echo "/* $configure_input  */"
21614     cat "$ac_result"
21615   fi
21616   rm -f "$tmp/out12"
21617  ;;
21618
21619   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21620 echo "$as_me: executing $ac_file commands" >&6;}
21621  ;;
21622   esac
21623
21624
21625   case $ac_file$ac_mode in
21626     "default-1":C)
21627
21628 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21629 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21630   rm -f intltool-extract.out
21631 else
21632   mv -f intltool-extract.out intltool-extract
21633 fi
21634 chmod ugo+x intltool-extract
21635 chmod u+w intltool-extract
21636
21637 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21638 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21639   rm -f intltool-merge.out
21640 else
21641   mv -f intltool-merge.out intltool-merge
21642 fi
21643 chmod ugo+x intltool-merge
21644 chmod u+w intltool-merge
21645
21646 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21647 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21648   rm -f intltool-update.out
21649 else
21650   mv -f intltool-update.out intltool-update
21651 fi
21652 chmod ugo+x intltool-update
21653 chmod u+w intltool-update
21654
21655  ;;
21656     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21657         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21658       esac ;;
21659
21660   esac
21661 done # for ac_tag
21662
21663
21664 { (exit 0); exit 0; }
21665 _ACEOF
21666 chmod +x $CONFIG_STATUS
21667 ac_clean_files=$ac_clean_files_save
21668
21669
21670 # configure is writing to config.log, and then calls config.status.
21671 # config.status does its own redirection, appending to config.log.
21672 # Unfortunately, on DOS this fails, as config.log is still kept open
21673 # by configure, so config.status won't be able to write to it; its
21674 # output is simply discarded.  So we exec the FD to /dev/null,
21675 # effectively closing config.log, so it can be properly (re)opened and
21676 # appended to by config.status.  When coming back to configure, we
21677 # need to make the FD available again.
21678 if test "$no_create" != yes; then
21679   ac_cs_success=:
21680   ac_config_status_args=
21681   test "$silent" = yes &&
21682     ac_config_status_args="$ac_config_status_args --quiet"
21683   exec 5>/dev/null
21684   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21685   exec 5>>config.log
21686   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21687   # would make configure fail if this is the last instruction.
21688   $ac_cs_success || { (exit 1); exit 1; }
21689 fi
21690
21691
21692 ###############################################################################
21693 #
21694 #       Print some warnings at the end.
21695 #
21696 ###############################################################################
21697
21698 warn_prefix_1="    Warning:"
21699 warn_prefix_2="       Note:"
21700 warn_prefix="$warn_prefix_1"
21701
21702 warning=no
21703 warnsep='    #################################################################'
21704
21705 warnpre() {
21706   if test "$warning" = no ; then
21707     echo '' ; echo "$warnsep" ; echo ''
21708     warning=yes
21709   fi
21710 }
21711
21712 warn() {
21713   warnpre
21714   if test "$warning" = long ; then echo '' ; fi
21715   warning=yes
21716   rest="$@"
21717   echo "$warn_prefix $rest"
21718 }
21719
21720 warnL() {
21721   was=$warning
21722   warnpre
21723   warning=yes
21724   if test "$was" != no ; then echo '' ; fi
21725   rest="$@"
21726   echo "$warn_prefix $rest"
21727 }
21728
21729 warn2() {
21730   rest="$@"
21731   echo "             $rest"
21732   warning=long
21733 }
21734
21735 note() {
21736   warn_prefix="$warn_prefix_2"
21737   warn $@
21738   warn_prefix="$warn_prefix_1"
21739 }
21740
21741 noteL() {
21742   warn_prefix="$warn_prefix_2"
21743   warnL $@
21744   warn_prefix="$warn_prefix_1"
21745 }
21746
21747
21748 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21749   warn 'The SGI saver extension was requested, but was not found.'
21750 fi
21751
21752 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21753   warn 'The XIdle extension was requested, but was not found.'
21754 fi
21755
21756 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21757   warn 'The XSHM extension was requested, but was not found.'
21758 fi
21759
21760 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21761   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21762 fi
21763
21764 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21765   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21766 fi
21767
21768 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21769   warn 'The DPMS extension was requested, but was not found.'
21770 fi
21771
21772 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21773   warn 'The Xinerama extension was requested, but was not found.'
21774 fi
21775
21776 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21777   warn 'The XF86VMODE extension was requested, but was not found.'
21778 fi
21779
21780 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21781   warn 'The RANDR extension was requested, but was not found.'
21782 fi
21783
21784 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21785   warn "Checking of /proc/interrupts was requested, but it's bogus."
21786 fi
21787
21788 if test "$pkg_config" = false ; then
21789   warnL 'The "pkg-config" program was not found.  Without that,'
21790   warn2 "detection of the various GTK libraries won't work."
21791 else
21792   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21793   if test "x$pkgerr" != "x" ; then
21794     warnL 'The "pkg-config" program produces errors.  This often causes'
21795     warn2 "detection of the various GTK libraries to malfunction."
21796     warn2 "The errors are:"
21797     echo ''
21798     echo "$pkgerr" | sed 's/^/             > /g'
21799   fi
21800 fi
21801
21802 if test "$gtk_halfassed" != no ; then
21803   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21804   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21805   warn2 "Perhaps some of the development packages are not installed?"
21806   if test "$have_gtk" = yes ; then
21807     v="$ac_gtk_version_string"
21808     warn2 "GTK $v is also installed, so it will be used instead."
21809     warn2 "Please read the above output and the \`config.log' file"
21810     warn2 "for more details."
21811   fi
21812 fi
21813
21814 motif_warn2() {
21815   warn2 'Though the Motif front-end to xscreensaver is still'
21816   warn2 'maintained, it is no longer being updated with new'
21817   warn2 'features: all new development on the xscreensaver-demo'
21818   warn2 'program is happening in the GTK version, and not in the'
21819   warn2 'Motif version.  It is recommended that you build against'
21820   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21821 }
21822
21823 if test "$have_motif" = no -a "$have_gtk" = no; then
21824
21825   if test "$with_motif" = yes; then
21826     warnL "Neither the GTK nor Motif libraries were found; the"
21827     warn2 "\`xscreensaver-demo' program requires one of these."
21828     echo ''
21829     motif_warn2
21830   else
21831     warnL "The GTK libraries do not seem to be available; the"
21832     warn2 "\`xscreensaver-demo' program requires them."
21833 #   echo ''
21834 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21835 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21836 #   motif_warn2
21837   fi
21838
21839 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21840   warnL "Use of Motif was requested, but it wasn't found;"
21841   warn2 "Gtk will be used instead."
21842
21843 elif test "$jurassic_gtk" = yes ; then
21844
21845   pref_gtk=2.0
21846
21847   v="$ac_gtk_version_string"
21848   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21849     warnL "Use of Gtk was requested, but its version number is unknown;"
21850   elif test "$with_gtk_req" = yes ; then
21851     warnL "Use of Gtk was requested, but it is version $v;"
21852   else
21853     warnL "Gtk was found on this system, but it is version $v;"
21854   fi
21855
21856   warn2 "Gtk $pref_gtk or newer is required."
21857
21858 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21859   warnL "Use of Gtk was requested, but it wasn't found."
21860 fi
21861
21862
21863 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21864   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21865   warn2 "headers were not found.  That can't be good.  Please"
21866   warn2 "install the GDK-Pixbuf development kit and re-configure."
21867 fi
21868
21869 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21870
21871   preferred_lesstif=0.92
21872
21873   if test "$lesstif_version" = unknown; then
21874     warnL "Unable to determine the LessTif version number!"
21875     warn2 "Make sure you are using version $preferred_lesstif or newer."
21876     warn2 "See <http://www.lesstif.org/>."
21877
21878   elif test \! $lesstif_version -gt 82; then
21879     warnL "LessTif version $lesstif_version_string is being used."
21880     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21881     warn2 "use with XScreenSaver; it is strongly recommended"
21882     warn2 "that you upgrade to at least version $preferred_lesstif!"
21883     warn2 "See <http://www.lesstif.org/>."
21884   fi
21885 fi
21886
21887
21888 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21889   warn  'Motif is being used, and GTK is not.'
21890   echo  ''
21891   motif_warn2
21892 fi
21893
21894
21895 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21896   warnL 'Use of XPM was requested, but it was not found.'
21897 fi
21898
21899 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21900   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21901 fi
21902
21903 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21904    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21905
21906   if test "$with_gdk_pixbuf_req" = yes ; then
21907     true
21908   elif test "$with_gdk_pixbuf_req" = no ; then
21909     warnL 'The GDK-Pixbuf library is not being used.'
21910   else
21911     warnL 'The GDK-Pixbuf library was not found.'
21912   fi
21913
21914   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21915     true
21916   elif test "$with_xpm_req" = no ; then
21917     warnL 'The XPM library is not being used.'
21918   else
21919     warnL 'The XPM library was not found.'
21920   fi
21921
21922   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21923     warn2 'The XPM library is being used instead.'
21924   fi
21925
21926   if test "$gdk_pixbuf_halfassed" = yes ; then
21927     echo ''
21928     warn2 'More specifically, we found the headers, but not the'
21929     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21930     warn2 "system, or something else went wrong.  The \`config.log'"
21931     warn2 'file might contain some clues.'
21932   fi
21933
21934   echo ''
21935   warn2 'Some of the demos will not use images as much as they could.'
21936   warn2 'You should consider installing GDK-Pixbuf and re-running'
21937   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21938   warn2 'provides support for more image formats.)'
21939 fi
21940
21941
21942 if test "$have_jpeg" = no ; then
21943   if test "$with_jpeg_req" = yes ; then
21944     warnL 'Use of libjpeg was requested, but it was not found.'
21945   elif test "$with_jpeg_req" = no ; then
21946     noteL 'The JPEG library is not being used.'
21947   else
21948     noteL 'The JPEG library was not found.'
21949   fi
21950
21951   if test "$jpeg_halfassed" = yes ; then
21952     echo ''
21953     warn2 'More specifically, we found the headers, but not the'
21954     warn2 'library; so either JPEG is half-installed on this'
21955     warn2 "system, or something else went wrong.  The \`config.log'"
21956     warn2 'file might contain some clues.'
21957     echo ''
21958   fi
21959
21960   if test "$have_gdk_pixbuf" = no ; then
21961     warn2 "This means that it won't be possible for the image-manipulating"
21962     warn2 "display modes to load files from disk; and it also means that"
21963     warn2 "the \`webcollage' program will be much slower."
21964   else
21965     warn2 "This means the \`webcollage' program will be much slower."
21966   fi
21967 fi
21968
21969
21970 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21971   preferred_mesagl=3.4
21972   mgv="$ac_mesagl_version_string"
21973   pgl="$preferred_mesagl"
21974
21975   if test "$ac_mesagl_version" = unknown; then
21976     true
21977     # warnL "Unable to determine the MesaGL version number!"
21978     # warn2 "Make sure you are using version $preferred_mesagl or newer."
21979
21980   elif test \! "$ac_mesagl_version" -gt 2006; then
21981     warnL "MesaGL version number is $mgv --"
21982     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21983     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21984
21985   elif test \! "$ac_mesagl_version" -gt 3003; then
21986     warnL "MesaGL version number is $mgv --"
21987     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21988     warn2 "that you upgrade to $pgl or newer."
21989   fi
21990 fi
21991
21992 if test "$have_gl" = no ; then
21993   if test "$with_gl_req" = yes ; then
21994     warnL 'Use of GL was requested, but it was not found.'
21995   elif test "$with_gl_req" = no ; then
21996     noteL 'The OpenGL 3D library is not being used.'
21997   else
21998     noteL 'The OpenGL 3D library was not found.'
21999   fi
22000
22001   if test "$gl_halfassed" = yes ; then
22002     echo ''
22003     warn2 'More specifically, we found the headers, but not the'
22004     warn2 'libraries; so either GL is half-installed on this'
22005     warn2 "system, or something else went wrong.  The \`config.log'"
22006     warn2 'file might contain some clues.'
22007   fi
22008
22009   echo ''
22010   warn2 'Those demos which use 3D will not be built or installed.'
22011   warn2 'You might want to consider installing OpenGL and'
22012   warn2 "re-running configure.  If your vendor doesn't ship"
22013   warn2 'their own implementation of OpenGL, you can get a free'
22014   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22015   warn2 'info, see <http://www.opengl.org/>.'
22016
22017 fi
22018
22019
22020 if test "$have_gl" = yes -a "$have_gle" = no ; then
22021
22022  # nobody cares about this; don't print the warning unless it was
22023  # requested and not found, or halfway-found.
22024  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22025
22026   if test "$with_gle_req" = yes ; then
22027     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22028     warn2 'it was not found (though the OpenGL library was found, and'
22029     warn2 'is being used.)'
22030   elif test "$with_gle_req" = no ; then
22031     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22032     warn2 'library is not.'
22033   else
22034     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22035     warn2 'was not.'
22036   fi
22037
22038   if test "$gle_halfassed" = yes ; then
22039     echo ''
22040     warn2 'More specifically, we found the headers, but not the'
22041     warn2 'libraries; so either GLE is half-installed on this'
22042     warn2 "system, or something else went wrong.  The \`config.log'"
22043     warn2 'file might contain some clues.'
22044   fi
22045
22046   echo ''
22047   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22048   warn2 'will not be built or installed.  You might want to consider'
22049   warn2 'installing GLE and re-running configure.  You can find the'
22050   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22051   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22052
22053  fi
22054 fi
22055
22056
22057 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22058   warn 'Use of XReadDisplay was requested, but it was not found.'
22059 fi
22060
22061 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22062   warn 'Use of Kerberos was requested, but it was not found.'
22063 fi
22064
22065 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22066   warn 'Use of PAM was requested, but it was not found.'
22067 fi
22068
22069 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22070   warn 'Use of shadow passwords was requested, but they were not found.'
22071 fi
22072
22073 if test "$ac_macosx" = yes ; then
22074   if test "$enable_locking" = yes ; then
22075     warn  "You have specified --enable-locking on MacOS X."
22076     warn2 "THIS DOES NOT WORK!  Don't do this!"
22077   fi
22078 fi
22079
22080
22081 # You are in a twisty maze of namespaces and syntaxes, all alike.
22082 # Fuck the skull of Unix.
22083 #
22084 bindir=`eval eval eval eval eval eval eval echo $bindir`
22085 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22086 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22087
22088 # canonicalize slashes.
22089 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22090 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22091 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22092
22093
22094 # Sanity check the hackdir
22095 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22096   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22097     echo ""
22098     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22099                    There will be an executable installed with that name, so
22100                    that can't be the name of a directory as well.  Please
22101                    re-configure with a different directory name." >&5
22102 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22103                    There will be an executable installed with that name, so
22104                    that can't be the name of a directory as well.  Please
22105                    re-configure with a different directory name." >&2;}
22106    { (exit 1); exit 1; }; }
22107   fi
22108 done
22109
22110
22111 do_dir_warning=no
22112
22113 # Now let's warn if there's a previous RPM version already installed.
22114 # But don't bother with this test if we are currently *building* an RPM.
22115
22116 if test -z "$RPM_PACKAGE_VERSION" ; then
22117
22118   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22119
22120   # M4 sucks!!
22121
22122   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22123         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22124         head -1`
22125
22126
22127   if test \! -z "$rpmv" ; then
22128     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22129     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22130
22131     warning=no
22132     warnL "There is already an installed RPM of xscreensaver $rpmv"
22133     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22134     warn2 'before running "make install" in this directory.'
22135     echo ""
22136     warn2 "Alternately, you could build this version of xscreensaver"
22137     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22138     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22139     warn2 "See the RPM documentation for more info."
22140     echo ""
22141
22142     if test "$rpmbdir" = "$rpmhdir" ; then
22143       warn2 "The RPM version was installed in $rpmbdir/."
22144       do_dir_warning=yes
22145     else
22146       warn2 "The RPM version was installed in $rpmbdir/,"
22147       warn2 "with demos in $rpmhdir/."
22148     fi
22149   fi
22150 fi
22151
22152 # Also warn if there's a Debian package installed.
22153 #
22154 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22155 debv=''
22156 for dpkg in $debnames ; do
22157   if test -z "$debv"; then
22158     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22159   fi
22160 done
22161
22162 if test \! -z "$debv" ; then
22163   debbdir=`dpkg -L $debnames 2>/dev/null | \
22164             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22165   debhdir=`dpkg -L $debnames 2>/dev/null | \
22166             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22167   if test -z "$debbdir" ; then debbdir='???'; fi
22168   if test -z "$debhdir" ; then debhdir='???'; fi
22169
22170   warning=no
22171   warnL "There is already an installed dpkg of xscreensaver"
22172   warn2 "version \"$debv\" on this system."
22173   echo ""
22174   warn2 "The dpkg was installed in $debbdir,"
22175   warn2 "with demos in $debhdir."
22176 fi
22177
22178
22179 if test "${bindir}" = "${HACKDIR}" ; then
22180   do_dir_warning=yes
22181 fi
22182
22183 if test "$do_dir_warning" = yes; then
22184   echo ""
22185   echo "$warnsep"
22186   echo ""
22187   echo '      When you run "make install", the "xscreensaver",'
22188   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22189   echo "      will be installed in ${bindir}/."
22190   echo ""
22191   echo "      The various graphics demos (190+ different executables) will"
22192   echo "      be installed in ${HACKDIR}/."
22193   echo ""
22194   echo "      If you would prefer the demos to be installed elsewhere,"
22195   echo "      you should re-run configure with the --with-hackdir=DIR"
22196   echo "      option.  For more information, run \`./configure --help'."
22197   warning=yes
22198 fi
22199
22200 if test "$warning" != no; then
22201   echo '' ; echo "$warnsep" ; echo ''
22202 fi
22203
22204 if test "$do_dir_warning" = no; then
22205   if test "$warning" = no; then
22206     echo ''
22207   fi
22208   echo "User programs will be installed in ${bindir}/"
22209   echo "Screen savers will be installed in ${HACKDIR}/"
22210   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22211   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22212   echo ''
22213 fi