fe4156a97fa289425a3a117eaa072e0a3233a90e
[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 SUID_EXES
763 GL_UTIL_EXES
764 GL_MEN
765 GL_KLUDGE
766 GLE_EXES
767 GLE_KLUDGE
768 GNOME24
769 GNOME22
770 NOGNOME
771 HACKDIR
772 HACKDIR_FULL
773 GTK_DATADIR
774 PO_DATADIR
775 HACK_CONF_DIR
776 GTK_EXTRA_OBJS
777 APPDEFAULTS
778 DEPEND
779 DEPEND_FLAGS
780 DEPEND_DEFINES
781 LIBOBJS
782 LTLIBOBJS'
783 ac_subst_files=''
784       ac_precious_vars='build_alias
785 host_alias
786 target_alias
787 CC
788 CFLAGS
789 LDFLAGS
790 LIBS
791 CPPFLAGS
792 CPP
793 XMKMF'
794
795
796 # Initialize some variables set by options.
797 ac_init_help=
798 ac_init_version=false
799 # The variables have the same names as the options, with
800 # dashes changed to underlines.
801 cache_file=/dev/null
802 exec_prefix=NONE
803 no_create=
804 no_recursion=
805 prefix=NONE
806 program_prefix=NONE
807 program_suffix=NONE
808 program_transform_name=s,x,x,
809 silent=
810 site=
811 srcdir=
812 verbose=
813 x_includes=NONE
814 x_libraries=NONE
815
816 # Installation directory options.
817 # These are left unexpanded so users can "make install exec_prefix=/foo"
818 # and all the variables that are supposed to be based on exec_prefix
819 # by default will actually change.
820 # Use braces instead of parens because sh, perl, etc. also accept them.
821 # (The list follows the same order as the GNU Coding Standards.)
822 bindir='${exec_prefix}/bin'
823 sbindir='${exec_prefix}/sbin'
824 libexecdir='${exec_prefix}/libexec'
825 datarootdir='${prefix}/share'
826 datadir='${datarootdir}'
827 sysconfdir='${prefix}/etc'
828 sharedstatedir='${prefix}/com'
829 localstatedir='${prefix}/var'
830 includedir='${prefix}/include'
831 oldincludedir='/usr/include'
832 docdir='${datarootdir}/doc/${PACKAGE}'
833 infodir='${datarootdir}/info'
834 htmldir='${docdir}'
835 dvidir='${docdir}'
836 pdfdir='${docdir}'
837 psdir='${docdir}'
838 libdir='${exec_prefix}/lib'
839 localedir='${datarootdir}/locale'
840 mandir='${datarootdir}/man'
841
842 ac_prev=
843 ac_dashdash=
844 for ac_option
845 do
846   # If the previous option needs an argument, assign it.
847   if test -n "$ac_prev"; then
848     eval $ac_prev=\$ac_option
849     ac_prev=
850     continue
851   fi
852
853   case $ac_option in
854   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
855   *)    ac_optarg=yes ;;
856   esac
857
858   # Accept the important Cygnus configure options, so we can diagnose typos.
859
860   case $ac_dashdash$ac_option in
861   --)
862     ac_dashdash=yes ;;
863
864   -bindir | --bindir | --bindi | --bind | --bin | --bi)
865     ac_prev=bindir ;;
866   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
867     bindir=$ac_optarg ;;
868
869   -build | --build | --buil | --bui | --bu)
870     ac_prev=build_alias ;;
871   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
872     build_alias=$ac_optarg ;;
873
874   -cache-file | --cache-file | --cache-fil | --cache-fi \
875   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
876     ac_prev=cache_file ;;
877   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
878   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
879     cache_file=$ac_optarg ;;
880
881   --config-cache | -C)
882     cache_file=config.cache ;;
883
884   -datadir | --datadir | --datadi | --datad)
885     ac_prev=datadir ;;
886   -datadir=* | --datadir=* | --datadi=* | --datad=*)
887     datadir=$ac_optarg ;;
888
889   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
890   | --dataroo | --dataro | --datar)
891     ac_prev=datarootdir ;;
892   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
893   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
894     datarootdir=$ac_optarg ;;
895
896   -disable-* | --disable-*)
897     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
898     # Reject names that are not valid shell variable names.
899     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
900       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
901    { (exit 1); exit 1; }; }
902     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
903     eval enable_$ac_feature=no ;;
904
905   -docdir | --docdir | --docdi | --doc | --do)
906     ac_prev=docdir ;;
907   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
908     docdir=$ac_optarg ;;
909
910   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
911     ac_prev=dvidir ;;
912   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
913     dvidir=$ac_optarg ;;
914
915   -enable-* | --enable-*)
916     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
917     # Reject names that are not valid shell variable names.
918     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
919       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
920    { (exit 1); exit 1; }; }
921     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
922     eval enable_$ac_feature=\$ac_optarg ;;
923
924   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926   | --exec | --exe | --ex)
927     ac_prev=exec_prefix ;;
928   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930   | --exec=* | --exe=* | --ex=*)
931     exec_prefix=$ac_optarg ;;
932
933   -gas | --gas | --ga | --g)
934     # Obsolete; use --with-gas.
935     with_gas=yes ;;
936
937   -help | --help | --hel | --he | -h)
938     ac_init_help=long ;;
939   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940     ac_init_help=recursive ;;
941   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942     ac_init_help=short ;;
943
944   -host | --host | --hos | --ho)
945     ac_prev=host_alias ;;
946   -host=* | --host=* | --hos=* | --ho=*)
947     host_alias=$ac_optarg ;;
948
949   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
950     ac_prev=htmldir ;;
951   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
952   | --ht=*)
953     htmldir=$ac_optarg ;;
954
955   -includedir | --includedir | --includedi | --included | --include \
956   | --includ | --inclu | --incl | --inc)
957     ac_prev=includedir ;;
958   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
959   | --includ=* | --inclu=* | --incl=* | --inc=*)
960     includedir=$ac_optarg ;;
961
962   -infodir | --infodir | --infodi | --infod | --info | --inf)
963     ac_prev=infodir ;;
964   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
965     infodir=$ac_optarg ;;
966
967   -libdir | --libdir | --libdi | --libd)
968     ac_prev=libdir ;;
969   -libdir=* | --libdir=* | --libdi=* | --libd=*)
970     libdir=$ac_optarg ;;
971
972   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
973   | --libexe | --libex | --libe)
974     ac_prev=libexecdir ;;
975   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
976   | --libexe=* | --libex=* | --libe=*)
977     libexecdir=$ac_optarg ;;
978
979   -localedir | --localedir | --localedi | --localed | --locale)
980     ac_prev=localedir ;;
981   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
982     localedir=$ac_optarg ;;
983
984   -localstatedir | --localstatedir | --localstatedi | --localstated \
985   | --localstate | --localstat | --localsta | --localst | --locals)
986     ac_prev=localstatedir ;;
987   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
988   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
989     localstatedir=$ac_optarg ;;
990
991   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
992     ac_prev=mandir ;;
993   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
994     mandir=$ac_optarg ;;
995
996   -nfp | --nfp | --nf)
997     # Obsolete; use --without-fp.
998     with_fp=no ;;
999
1000   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001   | --no-cr | --no-c | -n)
1002     no_create=yes ;;
1003
1004   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006     no_recursion=yes ;;
1007
1008   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1009   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1010   | --oldin | --oldi | --old | --ol | --o)
1011     ac_prev=oldincludedir ;;
1012   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1013   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1014   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1015     oldincludedir=$ac_optarg ;;
1016
1017   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1018     ac_prev=prefix ;;
1019   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1020     prefix=$ac_optarg ;;
1021
1022   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1023   | --program-pre | --program-pr | --program-p)
1024     ac_prev=program_prefix ;;
1025   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1026   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1027     program_prefix=$ac_optarg ;;
1028
1029   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1030   | --program-suf | --program-su | --program-s)
1031     ac_prev=program_suffix ;;
1032   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1033   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1034     program_suffix=$ac_optarg ;;
1035
1036   -program-transform-name | --program-transform-name \
1037   | --program-transform-nam | --program-transform-na \
1038   | --program-transform-n | --program-transform- \
1039   | --program-transform | --program-transfor \
1040   | --program-transfo | --program-transf \
1041   | --program-trans | --program-tran \
1042   | --progr-tra | --program-tr | --program-t)
1043     ac_prev=program_transform_name ;;
1044   -program-transform-name=* | --program-transform-name=* \
1045   | --program-transform-nam=* | --program-transform-na=* \
1046   | --program-transform-n=* | --program-transform-=* \
1047   | --program-transform=* | --program-transfor=* \
1048   | --program-transfo=* | --program-transf=* \
1049   | --program-trans=* | --program-tran=* \
1050   | --progr-tra=* | --program-tr=* | --program-t=*)
1051     program_transform_name=$ac_optarg ;;
1052
1053   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1054     ac_prev=pdfdir ;;
1055   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1056     pdfdir=$ac_optarg ;;
1057
1058   -psdir | --psdir | --psdi | --psd | --ps)
1059     ac_prev=psdir ;;
1060   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1061     psdir=$ac_optarg ;;
1062
1063   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1064   | -silent | --silent | --silen | --sile | --sil)
1065     silent=yes ;;
1066
1067   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1068     ac_prev=sbindir ;;
1069   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1070   | --sbi=* | --sb=*)
1071     sbindir=$ac_optarg ;;
1072
1073   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1074   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1075   | --sharedst | --shareds | --shared | --share | --shar \
1076   | --sha | --sh)
1077     ac_prev=sharedstatedir ;;
1078   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1079   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1080   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1081   | --sha=* | --sh=*)
1082     sharedstatedir=$ac_optarg ;;
1083
1084   -site | --site | --sit)
1085     ac_prev=site ;;
1086   -site=* | --site=* | --sit=*)
1087     site=$ac_optarg ;;
1088
1089   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1090     ac_prev=srcdir ;;
1091   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1092     srcdir=$ac_optarg ;;
1093
1094   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1095   | --syscon | --sysco | --sysc | --sys | --sy)
1096     ac_prev=sysconfdir ;;
1097   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1098   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1099     sysconfdir=$ac_optarg ;;
1100
1101   -target | --target | --targe | --targ | --tar | --ta | --t)
1102     ac_prev=target_alias ;;
1103   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1104     target_alias=$ac_optarg ;;
1105
1106   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1107     verbose=yes ;;
1108
1109   -version | --version | --versio | --versi | --vers | -V)
1110     ac_init_version=: ;;
1111
1112   -with-* | --with-*)
1113     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1114     # Reject names that are not valid shell variable names.
1115     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1116       { echo "$as_me: error: invalid package name: $ac_package" >&2
1117    { (exit 1); exit 1; }; }
1118     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1119     eval with_$ac_package=\$ac_optarg ;;
1120
1121   -without-* | --without-*)
1122     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1123     # Reject names that are not valid shell variable names.
1124     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1125       { echo "$as_me: error: invalid package name: $ac_package" >&2
1126    { (exit 1); exit 1; }; }
1127     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1128     eval with_$ac_package=no ;;
1129
1130   --x)
1131     # Obsolete; use --with-x.
1132     with_x=yes ;;
1133
1134   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1135   | --x-incl | --x-inc | --x-in | --x-i)
1136     ac_prev=x_includes ;;
1137   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1138   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1139     x_includes=$ac_optarg ;;
1140
1141   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1142   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1143     ac_prev=x_libraries ;;
1144   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1145   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1146     x_libraries=$ac_optarg ;;
1147
1148   -*) { echo "$as_me: error: unrecognized option: $ac_option
1149 Try \`$0 --help' for more information." >&2
1150    { (exit 1); exit 1; }; }
1151     ;;
1152
1153   *=*)
1154     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155     # Reject names that are not valid shell variable names.
1156     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1157       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1158    { (exit 1); exit 1; }; }
1159     eval $ac_envvar=\$ac_optarg
1160     export $ac_envvar ;;
1161
1162   *)
1163     # FIXME: should be removed in autoconf 3.0.
1164     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1165     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1166       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1167     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1168     ;;
1169
1170   esac
1171 done
1172
1173 if test -n "$ac_prev"; then
1174   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1175   { echo "$as_me: error: missing argument to $ac_option" >&2
1176    { (exit 1); exit 1; }; }
1177 fi
1178
1179 # Be sure to have absolute directory names.
1180 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1181                 datadir sysconfdir sharedstatedir localstatedir includedir \
1182                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1183                 libdir localedir mandir
1184 do
1185   eval ac_val=\$$ac_var
1186   case $ac_val in
1187     [\\/$]* | ?:[\\/]* )  continue;;
1188     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1189   esac
1190   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1191    { (exit 1); exit 1; }; }
1192 done
1193
1194 # There might be people who depend on the old broken behavior: `$host'
1195 # used to hold the argument of --host etc.
1196 # FIXME: To remove some day.
1197 build=$build_alias
1198 host=$host_alias
1199 target=$target_alias
1200
1201 # FIXME: To remove some day.
1202 if test "x$host_alias" != x; then
1203   if test "x$build_alias" = x; then
1204     cross_compiling=maybe
1205     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1206     If a cross compiler is detected then cross compile mode will be used." >&2
1207   elif test "x$build_alias" != "x$host_alias"; then
1208     cross_compiling=yes
1209   fi
1210 fi
1211
1212 ac_tool_prefix=
1213 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1214
1215 test "$silent" = yes && exec 6>/dev/null
1216
1217
1218 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1219 ac_ls_di=`ls -di .` &&
1220 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1221   { echo "$as_me: error: Working directory cannot be determined" >&2
1222    { (exit 1); exit 1; }; }
1223 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1224   { echo "$as_me: error: pwd does not report name of working directory" >&2
1225    { (exit 1); exit 1; }; }
1226
1227
1228 # Find the source files, if location was not specified.
1229 if test -z "$srcdir"; then
1230   ac_srcdir_defaulted=yes
1231   # Try the directory containing this script, then the parent directory.
1232   ac_confdir=`$as_dirname -- "$0" ||
1233 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1234          X"$0" : 'X\(//\)[^/]' \| \
1235          X"$0" : 'X\(//\)$' \| \
1236          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1237 echo X"$0" |
1238     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1239             s//\1/
1240             q
1241           }
1242           /^X\(\/\/\)[^/].*/{
1243             s//\1/
1244             q
1245           }
1246           /^X\(\/\/\)$/{
1247             s//\1/
1248             q
1249           }
1250           /^X\(\/\).*/{
1251             s//\1/
1252             q
1253           }
1254           s/.*/./; q'`
1255   srcdir=$ac_confdir
1256   if test ! -r "$srcdir/$ac_unique_file"; then
1257     srcdir=..
1258   fi
1259 else
1260   ac_srcdir_defaulted=no
1261 fi
1262 if test ! -r "$srcdir/$ac_unique_file"; then
1263   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1264   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1265    { (exit 1); exit 1; }; }
1266 fi
1267 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1268 ac_abs_confdir=`(
1269         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1270    { (exit 1); exit 1; }; }
1271         pwd)`
1272 # When building in place, set srcdir=.
1273 if test "$ac_abs_confdir" = "$ac_pwd"; then
1274   srcdir=.
1275 fi
1276 # Remove unnecessary trailing slashes from srcdir.
1277 # Double slashes in file names in object file debugging info
1278 # mess up M-x gdb in Emacs.
1279 case $srcdir in
1280 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1281 esac
1282 for ac_var in $ac_precious_vars; do
1283   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1284   eval ac_env_${ac_var}_value=\$${ac_var}
1285   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1286   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1287 done
1288
1289 #
1290 # Report the --help message.
1291 #
1292 if test "$ac_init_help" = "long"; then
1293   # Omit some internal or obsolete options to make the list less imposing.
1294   # This message is too long to be a string in the A/UX 3.1 sh.
1295   cat <<_ACEOF
1296 \`configure' configures this package to adapt to many kinds of systems.
1297
1298 Usage: $0 [OPTION]... [VAR=VALUE]...
1299
1300 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1301 VAR=VALUE.  See below for descriptions of some of the useful variables.
1302
1303 Defaults for the options are specified in brackets.
1304
1305
1306 Configuration:
1307
1308   -h, --help              display this help and exit
1309       --help=short        display options specific to this package
1310       --help=recursive    display the short help of all the included packages
1311   -V, --version           display version information and exit
1312   -q, --quiet, --silent   do not print \`checking...' messages
1313       --cache-file=FILE   cache test results in FILE [disabled]
1314   -C, --config-cache      alias for \`--cache-file=config.cache'
1315   -n, --no-create         do not create output files
1316       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1317
1318 Installation directories:
1319   --prefix=PREFIX         install architecture-independent files in PREFIX
1320                           [$ac_default_prefix]
1321   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1322                           [PREFIX]
1323
1324 By default, \`make install' will install all the files in
1325 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1326 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1327 for instance \`--prefix=\$HOME'.
1328
1329 For better control, use the options below.
1330
1331 Fine tuning of the installation directories:
1332   --bindir=DIR           user executables [EPREFIX/bin]
1333   --libexecdir=DIR       program executables [EPREFIX/libexec]
1334   --libdir=DIR           object code libraries [EPREFIX/lib]
1335   --includedir=DIR       C header files [PREFIX/include]
1336   --x-includes=DIR        X include files are in DIR
1337   --x-libraries=DIR       X library files are in DIR
1338   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1339   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1340   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1341   --mandir=DIR           man documentation [DATAROOTDIR/man]
1342   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1343   --htmldir=DIR          html documentation [DOCDIR]
1344   --dvidir=DIR           dvi documentation [DOCDIR]
1345   --pdfdir=DIR           pdf documentation [DOCDIR]
1346   --psdir=DIR            ps documentation [DOCDIR]
1347 _ACEOF
1348
1349   cat <<\_ACEOF
1350
1351 X features:
1352   --x-includes=DIR    X include files are in DIR
1353   --x-libraries=DIR   X library files are in DIR
1354
1355 System types:
1356   --build=BUILD     configure for building on BUILD [guessed]
1357   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1358 _ACEOF
1359 fi
1360
1361 if test -n "$ac_init_help"; then
1362
1363   cat <<\_ACEOF
1364
1365 Optional Features:
1366   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1367   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1368
1369 Screen locking options:
1370   --enable-locking        Compile in support for locking the display.
1371   --disable-locking       Do not allow locking at all.
1372
1373   --enable-root-passwd        Allow root passwd to unlock screen.
1374   --disable-root-passwd       Do not allow that.
1375
1376 Optional Packages:
1377   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1378   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1379
1380
1381 Installation options:
1382   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1383                           Default: `PREFIX/libexec/xscreensaver/'
1384   --with-configdir=DIR    Where to install the data files that describe each
1385                           of the display modes to the GUI.
1386                           Default: `PREFIX/share/xscreensaver/config/'
1387   --with-x-app-defaults=DIR
1388                            Where to install xscreensaver configuration file.
1389
1390 Except where noted, all of the --with options below can also take a
1391 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1392 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1393 to be added to the -L list, assuming those directories exist.
1394
1395 By default, support for each of these options will be built in, if the
1396 relevant library routines exist.  At run time, they will then be used
1397 only if the X server being used supports them.  Each --with option has
1398 a corresponding --without option, to override building support for them
1399 at all.
1400
1401 Screen blanking and idle-detection options:
1402
1403   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1404   --with-xidle-ext        Include support for the XIDLE extension.
1405   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1406   --with-dpms-ext         Include support for the DPMS extension.
1407   --with-xinerama-ext     Include support for the XINERAMA extension.
1408   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1409   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1410   --with-randr-ext        Include support for the X Resize+Rotate extension.
1411   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1412                           file to notice keyboard activity.
1413   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1414   --with-pam-service-name=NAME
1415                           NAME is the name of the PAM service that
1416                           xscreensaver will authenticate as.
1417   --with-kerberos         Include support for Kerberos authentication.
1418   --with-shadow           Include support for shadow password authentication.
1419   --with-passwd-helper    Include support for an external password
1420                           verification helper program.
1421   --with-login-manager    Put a "New Login" button on the unlock dialog that
1422                           runs a login manager such as gdmflexiserver.
1423
1424 User interface options:
1425
1426   --with-gtk              Use the Gtk toolkit for the user interface.
1427   --with-motif            Use the Motif toolkit for the user interface
1428                           (not recommended.)
1429
1430 Graphics options:
1431
1432   --with-gl               Build those demos which depend on OpenGL.
1433   --with-gle              Build those demos which depend on GLE
1434                           (the OpenGL "extrusion" library.)
1435   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1436                           demos, which will make it possible for them to read
1437                           GIF, JPEG, and PNG files as well.
1438   --with-xpm              Include support for XPM files in some demos.
1439                           (Not needed if Pixbuf is used.)
1440   --with-jpeg             Include support for the JPEG library.
1441   --with-xshm-ext         Include support for the Shared Memory extension.
1442   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1443   --with-readdisplay      Include support for the XReadDisplay extension.
1444   --with-image-directory=DIR  By default, some demos may display random images
1445                           from this directory.
1446   --with-text-file=FILE   By default, some demos may display this file.
1447   --with-browser=BROWSER   Specify the browser to show help URL.
1448   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1449                           (which is needed in order to ping other hosts.)
1450
1451
1452 Some influential environment variables:
1453   CC          C compiler command
1454   CFLAGS      C compiler flags
1455   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1456               nonstandard directory <lib dir>
1457   LIBS        libraries to pass to the linker, e.g. -l<library>
1458   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1459               you have headers in a nonstandard directory <include dir>
1460   CPP         C preprocessor
1461   XMKMF       Path to xmkmf, Makefile generator for X Window System
1462
1463 Use these variables to override the choices made by `configure' or to help
1464 it to find libraries and programs with nonstandard names/locations.
1465
1466 _ACEOF
1467 ac_status=$?
1468 fi
1469
1470 if test "$ac_init_help" = "recursive"; then
1471   # If there are subdirs, report their specific --help.
1472   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1473     test -d "$ac_dir" || continue
1474     ac_builddir=.
1475
1476 case "$ac_dir" in
1477 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1478 *)
1479   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1480   # A ".." for each directory in $ac_dir_suffix.
1481   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1482   case $ac_top_builddir_sub in
1483   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1485   esac ;;
1486 esac
1487 ac_abs_top_builddir=$ac_pwd
1488 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1489 # for backward compatibility:
1490 ac_top_builddir=$ac_top_build_prefix
1491
1492 case $srcdir in
1493   .)  # We are building in place.
1494     ac_srcdir=.
1495     ac_top_srcdir=$ac_top_builddir_sub
1496     ac_abs_top_srcdir=$ac_pwd ;;
1497   [\\/]* | ?:[\\/]* )  # Absolute name.
1498     ac_srcdir=$srcdir$ac_dir_suffix;
1499     ac_top_srcdir=$srcdir
1500     ac_abs_top_srcdir=$srcdir ;;
1501   *) # Relative name.
1502     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1503     ac_top_srcdir=$ac_top_build_prefix$srcdir
1504     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1505 esac
1506 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1507
1508     cd "$ac_dir" || { ac_status=$?; continue; }
1509     # Check for guested configure.
1510     if test -f "$ac_srcdir/configure.gnu"; then
1511       echo &&
1512       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1513     elif test -f "$ac_srcdir/configure"; then
1514       echo &&
1515       $SHELL "$ac_srcdir/configure" --help=recursive
1516     else
1517       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1518     fi || ac_status=$?
1519     cd "$ac_pwd" || { ac_status=$?; break; }
1520   done
1521 fi
1522
1523 test -n "$ac_init_help" && exit $ac_status
1524 if $ac_init_version; then
1525   cat <<\_ACEOF
1526 configure
1527 generated by GNU Autoconf 2.61
1528
1529 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1530 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1531 This configure script is free software; the Free Software Foundation
1532 gives unlimited permission to copy, distribute and modify it.
1533 _ACEOF
1534   exit
1535 fi
1536 cat >config.log <<_ACEOF
1537 This file contains any messages produced by compilers while
1538 running configure, to aid debugging if configure makes a mistake.
1539
1540 It was created by $as_me, which was
1541 generated by GNU Autoconf 2.61.  Invocation command line was
1542
1543   $ $0 $@
1544
1545 _ACEOF
1546 exec 5>>config.log
1547 {
1548 cat <<_ASUNAME
1549 ## --------- ##
1550 ## Platform. ##
1551 ## --------- ##
1552
1553 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1554 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1555 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1556 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1557 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1558
1559 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1560 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1561
1562 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1563 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1564 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1565 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1566 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1567 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1568 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1569
1570 _ASUNAME
1571
1572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1573 for as_dir in $PATH
1574 do
1575   IFS=$as_save_IFS
1576   test -z "$as_dir" && as_dir=.
1577   echo "PATH: $as_dir"
1578 done
1579 IFS=$as_save_IFS
1580
1581 } >&5
1582
1583 cat >&5 <<_ACEOF
1584
1585
1586 ## ----------- ##
1587 ## Core tests. ##
1588 ## ----------- ##
1589
1590 _ACEOF
1591
1592
1593 # Keep a trace of the command line.
1594 # Strip out --no-create and --no-recursion so they do not pile up.
1595 # Strip out --silent because we don't want to record it for future runs.
1596 # Also quote any args containing shell meta-characters.
1597 # Make two passes to allow for proper duplicate-argument suppression.
1598 ac_configure_args=
1599 ac_configure_args0=
1600 ac_configure_args1=
1601 ac_must_keep_next=false
1602 for ac_pass in 1 2
1603 do
1604   for ac_arg
1605   do
1606     case $ac_arg in
1607     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1608     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1609     | -silent | --silent | --silen | --sile | --sil)
1610       continue ;;
1611     *\'*)
1612       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1613     esac
1614     case $ac_pass in
1615     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1616     2)
1617       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1618       if test $ac_must_keep_next = true; then
1619         ac_must_keep_next=false # Got value, back to normal.
1620       else
1621         case $ac_arg in
1622           *=* | --config-cache | -C | -disable-* | --disable-* \
1623           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1624           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1625           | -with-* | --with-* | -without-* | --without-* | --x)
1626             case "$ac_configure_args0 " in
1627               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1628             esac
1629             ;;
1630           -* ) ac_must_keep_next=true ;;
1631         esac
1632       fi
1633       ac_configure_args="$ac_configure_args '$ac_arg'"
1634       ;;
1635     esac
1636   done
1637 done
1638 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1639 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1640
1641 # When interrupted or exit'd, cleanup temporary files, and complete
1642 # config.log.  We remove comments because anyway the quotes in there
1643 # would cause problems or look ugly.
1644 # WARNING: Use '\'' to represent an apostrophe within the trap.
1645 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1646 trap 'exit_status=$?
1647   # Save into config.log some information that might help in debugging.
1648   {
1649     echo
1650
1651     cat <<\_ASBOX
1652 ## ---------------- ##
1653 ## Cache variables. ##
1654 ## ---------------- ##
1655 _ASBOX
1656     echo
1657     # The following way of writing the cache mishandles newlines in values,
1658 (
1659   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1660     eval ac_val=\$$ac_var
1661     case $ac_val in #(
1662     *${as_nl}*)
1663       case $ac_var in #(
1664       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1665 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1666       esac
1667       case $ac_var in #(
1668       _ | IFS | as_nl) ;; #(
1669       *) $as_unset $ac_var ;;
1670       esac ;;
1671     esac
1672   done
1673   (set) 2>&1 |
1674     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1675     *${as_nl}ac_space=\ *)
1676       sed -n \
1677         "s/'\''/'\''\\\\'\'''\''/g;
1678           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1679       ;; #(
1680     *)
1681       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1682       ;;
1683     esac |
1684     sort
1685 )
1686     echo
1687
1688     cat <<\_ASBOX
1689 ## ----------------- ##
1690 ## Output variables. ##
1691 ## ----------------- ##
1692 _ASBOX
1693     echo
1694     for ac_var in $ac_subst_vars
1695     do
1696       eval ac_val=\$$ac_var
1697       case $ac_val in
1698       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1699       esac
1700       echo "$ac_var='\''$ac_val'\''"
1701     done | sort
1702     echo
1703
1704     if test -n "$ac_subst_files"; then
1705       cat <<\_ASBOX
1706 ## ------------------- ##
1707 ## File substitutions. ##
1708 ## ------------------- ##
1709 _ASBOX
1710       echo
1711       for ac_var in $ac_subst_files
1712       do
1713         eval ac_val=\$$ac_var
1714         case $ac_val in
1715         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1716         esac
1717         echo "$ac_var='\''$ac_val'\''"
1718       done | sort
1719       echo
1720     fi
1721
1722     if test -s confdefs.h; then
1723       cat <<\_ASBOX
1724 ## ----------- ##
1725 ## confdefs.h. ##
1726 ## ----------- ##
1727 _ASBOX
1728       echo
1729       cat confdefs.h
1730       echo
1731     fi
1732     test "$ac_signal" != 0 &&
1733       echo "$as_me: caught signal $ac_signal"
1734     echo "$as_me: exit $exit_status"
1735   } >&5
1736   rm -f core *.core core.conftest.* &&
1737     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1738     exit $exit_status
1739 ' 0
1740 for ac_signal in 1 2 13 15; do
1741   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1742 done
1743 ac_signal=0
1744
1745 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1746 rm -f -r conftest* confdefs.h
1747
1748 # Predefined preprocessor variables.
1749
1750 cat >>confdefs.h <<_ACEOF
1751 #define PACKAGE_NAME "$PACKAGE_NAME"
1752 _ACEOF
1753
1754
1755 cat >>confdefs.h <<_ACEOF
1756 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1757 _ACEOF
1758
1759
1760 cat >>confdefs.h <<_ACEOF
1761 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1762 _ACEOF
1763
1764
1765 cat >>confdefs.h <<_ACEOF
1766 #define PACKAGE_STRING "$PACKAGE_STRING"
1767 _ACEOF
1768
1769
1770 cat >>confdefs.h <<_ACEOF
1771 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1772 _ACEOF
1773
1774
1775 # Let the site file select an alternate cache file if it wants to.
1776 # Prefer explicitly selected file to automatically selected ones.
1777 if test -n "$CONFIG_SITE"; then
1778   set x "$CONFIG_SITE"
1779 elif test "x$prefix" != xNONE; then
1780   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1781 else
1782   set x "$ac_default_prefix/share/config.site" \
1783         "$ac_default_prefix/etc/config.site"
1784 fi
1785 shift
1786 for ac_site_file
1787 do
1788   if test -r "$ac_site_file"; then
1789     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1790 echo "$as_me: loading site script $ac_site_file" >&6;}
1791     sed 's/^/| /' "$ac_site_file" >&5
1792     . "$ac_site_file"
1793   fi
1794 done
1795
1796 if test -r "$cache_file"; then
1797   # Some versions of bash will fail to source /dev/null (special
1798   # files actually), so we avoid doing that.
1799   if test -f "$cache_file"; then
1800     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1801 echo "$as_me: loading cache $cache_file" >&6;}
1802     case $cache_file in
1803       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1804       *)                      . "./$cache_file";;
1805     esac
1806   fi
1807 else
1808   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1809 echo "$as_me: creating cache $cache_file" >&6;}
1810   >$cache_file
1811 fi
1812
1813 # Check that the precious variables saved in the cache have kept the same
1814 # value.
1815 ac_cache_corrupted=false
1816 for ac_var in $ac_precious_vars; do
1817   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1818   eval ac_new_set=\$ac_env_${ac_var}_set
1819   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1820   eval ac_new_val=\$ac_env_${ac_var}_value
1821   case $ac_old_set,$ac_new_set in
1822     set,)
1823       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1824 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1825       ac_cache_corrupted=: ;;
1826     ,set)
1827       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1828 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1829       ac_cache_corrupted=: ;;
1830     ,);;
1831     *)
1832       if test "x$ac_old_val" != "x$ac_new_val"; then
1833         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1834 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1835         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1836 echo "$as_me:   former value:  $ac_old_val" >&2;}
1837         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1838 echo "$as_me:   current value: $ac_new_val" >&2;}
1839         ac_cache_corrupted=:
1840       fi;;
1841   esac
1842   # Pass precious variables to config.status.
1843   if test "$ac_new_set" = set; then
1844     case $ac_new_val in
1845     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1846     *) ac_arg=$ac_var=$ac_new_val ;;
1847     esac
1848     case " $ac_configure_args " in
1849       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1850       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1851     esac
1852   fi
1853 done
1854 if $ac_cache_corrupted; then
1855   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1856 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1857   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1858 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1859    { (exit 1); exit 1; }; }
1860 fi
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878 ac_ext=c
1879 ac_cpp='$CPP $CPPFLAGS'
1880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1883
1884
1885 ac_config_headers="$ac_config_headers config.h"
1886
1887
1888 echo "current directory: `pwd`"
1889 echo "command line was: $0 $@"
1890
1891 ###############################################################################
1892 #
1893 #       Autoheader stuff
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
2067
2068
2069
2070 # After checking to see that --srcdir is correct (which AC_INIT does)
2071 # check for some random other files that come later in the tar file,
2072 # to make sure everything is here.
2073 #
2074 for d in driver utils hacks hacks/glx ; do
2075   f=$srcdir/$d/Makefile.in
2076   if test \! -r $f ; then
2077     echo ""
2078     echo "ERROR: The package is incomplete: $f does not exist."
2079     echo "       This probably means that your download was truncated."
2080     echo ""
2081     exit 1
2082   fi
2083 done
2084
2085 ###############################################################################
2086 #
2087 #       Function to figure out how to run the compiler.
2088 #
2089 ###############################################################################
2090
2091
2092
2093
2094 ###############################################################################
2095 #
2096 #       Check for availability of various gcc command-line options.
2097 #
2098 ###############################################################################
2099
2100
2101
2102
2103
2104
2105
2106 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2107 # around an Apple-specific gcc bug.
2108 #
2109
2110
2111 ###############################################################################
2112 #
2113 #       Function to figure out how to disable // comments in ANSI C code.
2114 #
2115 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2116 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2117 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2118 #       so much for compatibility!)
2119 #
2120 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2121 #       declarations preceed statements, without resorting to "-pedantic".
2122 #       This means that there is no way to get gcc3 to issue warnings that
2123 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2124 #       also drowning in totally useless warnings.  Thank you master may I
2125 #       have another.
2126 #
2127 #       So, I give up, let's just use -pedantic.
2128 #
2129 ###############################################################################
2130
2131
2132
2133
2134
2135
2136 ###############################################################################
2137 #
2138 #       Function to figure out how to create directory trees.
2139 #
2140 ###############################################################################
2141
2142
2143
2144
2145 ###############################################################################
2146 #
2147 #       Function to check whether gettimeofday() exists, and how to call it.
2148 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2149 #
2150 ###############################################################################
2151
2152
2153
2154
2155 ###############################################################################
2156 #
2157 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2158 #
2159 ###############################################################################
2160
2161 # M4 sucks!!  perl sucks too!!
2162
2163 perl_version_cmd='print $]'
2164
2165
2166
2167
2168
2169 ###############################################################################
2170 #
2171 #       Function to demand "bc".  Losers.
2172 #
2173 ###############################################################################
2174
2175
2176
2177 ###############################################################################
2178 #
2179 #       Functions to check how to do ICMP PING requests.
2180 #
2181 ###############################################################################
2182
2183
2184
2185
2186
2187
2188 ###############################################################################
2189 #
2190 #       Functions to check for various X11 crap.
2191 #
2192 ###############################################################################
2193
2194 # Try and find the app-defaults directory.
2195 # It sucks that autoconf doesn't do this already...
2196 #
2197
2198
2199 ###############################################################################
2200 #
2201 #       Handle the --with-x-app-defaults option HERE
2202 #
2203 ###############################################################################
2204
2205
2206 # Check whether --with-x-app-defaults was given.
2207 if test "${with_x_app_defaults+set}" = set; then
2208   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2209 else
2210   eval ac_x_app_defaults="$withval"
2211 fi
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223 # Random special-cases for X on certain pathological OSes.
2224 # You know who you are.
2225 #
2226
2227
2228
2229
2230 ###############################################################################
2231 #
2232 #       Some utility functions to make checking for X things easier.
2233 #
2234 ###############################################################################
2235
2236 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2237 #
2238
2239
2240 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2241 #
2242
2243
2244 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2245 #
2246
2247
2248
2249 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2250 # Use this sparingly; it probably doesn't work very well on X programs.
2251 #
2252
2253
2254 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2255 # (But not the -L directories!)
2256 #
2257
2258
2259
2260
2261 # Usage: HANDLE_X_PATH_ARG([variable_name],
2262 #                          [--command-line-option],
2263 #                          [descriptive string])
2264 #
2265 # All of the --with options take three forms:
2266 #
2267 #   --with-foo (or --with-foo=yes)
2268 #   --without-foo (or --with-foo=no)
2269 #   --with-foo=/DIR
2270 #
2271 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2272 # a directory (string beginning with a slash) it checks to see whether
2273 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2274 # as appropriate.
2275 #
2276
2277
2278
2279
2280 ###############################################################################
2281 ###############################################################################
2282 #
2283 #       End of function definitions.  Now start actually executing stuff.
2284 #
2285 ###############################################################################
2286 ###############################################################################
2287
2288 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2289 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2290 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2291
2292
2293 # random compiler setup
2294 ac_aux_dir=
2295 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2296   if 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/install.sh"; then
2301     ac_aux_dir=$ac_dir
2302     ac_install_sh="$ac_aux_dir/install.sh -c"
2303     break
2304   elif test -f "$ac_dir/shtool"; then
2305     ac_aux_dir=$ac_dir
2306     ac_install_sh="$ac_aux_dir/shtool install -c"
2307     break
2308   fi
2309 done
2310 if test -z "$ac_aux_dir"; then
2311   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2312 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2313    { (exit 1); exit 1; }; }
2314 fi
2315
2316 # These three variables are undocumented and unsupported,
2317 # and are intended to be withdrawn in a future Autoconf release.
2318 # They can cause serious problems if a builder's source tree is in a directory
2319 # whose full name contains unusual characters.
2320 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2321 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2322 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2323
2324
2325 # Make sure we can run config.sub.
2326 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2327   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2328 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2329    { (exit 1); exit 1; }; }
2330
2331 { echo "$as_me:$LINENO: checking build system type" >&5
2332 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2333 if test "${ac_cv_build+set}" = set; then
2334   echo $ECHO_N "(cached) $ECHO_C" >&6
2335 else
2336   ac_build_alias=$build_alias
2337 test "x$ac_build_alias" = x &&
2338   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2339 test "x$ac_build_alias" = x &&
2340   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2341 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2342    { (exit 1); exit 1; }; }
2343 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2344   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2345 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2346    { (exit 1); exit 1; }; }
2347
2348 fi
2349 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2350 echo "${ECHO_T}$ac_cv_build" >&6; }
2351 case $ac_cv_build in
2352 *-*-*) ;;
2353 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2354 echo "$as_me: error: invalid value of canonical build" >&2;}
2355    { (exit 1); exit 1; }; };;
2356 esac
2357 build=$ac_cv_build
2358 ac_save_IFS=$IFS; IFS='-'
2359 set x $ac_cv_build
2360 shift
2361 build_cpu=$1
2362 build_vendor=$2
2363 shift; shift
2364 # Remember, the first character of IFS is used to create $*,
2365 # except with old shells:
2366 build_os=$*
2367 IFS=$ac_save_IFS
2368 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2369
2370
2371 { echo "$as_me:$LINENO: checking host system type" >&5
2372 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2373 if test "${ac_cv_host+set}" = set; then
2374   echo $ECHO_N "(cached) $ECHO_C" >&6
2375 else
2376   if test "x$host_alias" = x; then
2377   ac_cv_host=$ac_cv_build
2378 else
2379   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2380     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2381 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2382    { (exit 1); exit 1; }; }
2383 fi
2384
2385 fi
2386 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2387 echo "${ECHO_T}$ac_cv_host" >&6; }
2388 case $ac_cv_host in
2389 *-*-*) ;;
2390 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2391 echo "$as_me: error: invalid value of canonical host" >&2;}
2392    { (exit 1); exit 1; }; };;
2393 esac
2394 host=$ac_cv_host
2395 ac_save_IFS=$IFS; IFS='-'
2396 set x $ac_cv_host
2397 shift
2398 host_cpu=$1
2399 host_vendor=$2
2400 shift; shift
2401 # Remember, the first character of IFS is used to create $*,
2402 # except with old shells:
2403 host_os=$*
2404 IFS=$ac_save_IFS
2405 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2406
2407
2408
2409 ac_ext=c
2410 ac_cpp='$CPP $CPPFLAGS'
2411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2414 if test -n "$ac_tool_prefix"; then
2415   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2416 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2417 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2419 if test "${ac_cv_prog_CC+set}" = set; then
2420   echo $ECHO_N "(cached) $ECHO_C" >&6
2421 else
2422   if test -n "$CC"; then
2423   ac_cv_prog_CC="$CC" # Let the user override the test.
2424 else
2425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2426 for as_dir in $PATH
2427 do
2428   IFS=$as_save_IFS
2429   test -z "$as_dir" && as_dir=.
2430   for ac_exec_ext in '' $ac_executable_extensions; do
2431   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2432     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2433     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2434     break 2
2435   fi
2436 done
2437 done
2438 IFS=$as_save_IFS
2439
2440 fi
2441 fi
2442 CC=$ac_cv_prog_CC
2443 if test -n "$CC"; then
2444   { echo "$as_me:$LINENO: result: $CC" >&5
2445 echo "${ECHO_T}$CC" >&6; }
2446 else
2447   { echo "$as_me:$LINENO: result: no" >&5
2448 echo "${ECHO_T}no" >&6; }
2449 fi
2450
2451
2452 fi
2453 if test -z "$ac_cv_prog_CC"; then
2454   ac_ct_CC=$CC
2455   # Extract the first word of "gcc", so it can be a program name with args.
2456 set dummy gcc; ac_word=$2
2457 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2459 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462   if test -n "$ac_ct_CC"; then
2463   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2464 else
2465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466 for as_dir in $PATH
2467 do
2468   IFS=$as_save_IFS
2469   test -z "$as_dir" && as_dir=.
2470   for ac_exec_ext in '' $ac_executable_extensions; do
2471   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2472     ac_cv_prog_ac_ct_CC="gcc"
2473     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2474     break 2
2475   fi
2476 done
2477 done
2478 IFS=$as_save_IFS
2479
2480 fi
2481 fi
2482 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2483 if test -n "$ac_ct_CC"; then
2484   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2485 echo "${ECHO_T}$ac_ct_CC" >&6; }
2486 else
2487   { echo "$as_me:$LINENO: result: no" >&5
2488 echo "${ECHO_T}no" >&6; }
2489 fi
2490
2491   if test "x$ac_ct_CC" = x; then
2492     CC=""
2493   else
2494     case $cross_compiling:$ac_tool_warned in
2495 yes:)
2496 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2497 whose name does not start with the host triplet.  If you think this
2498 configuration is useful to you, please write to autoconf@gnu.org." >&5
2499 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2500 whose name does not start with the host triplet.  If you think this
2501 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2502 ac_tool_warned=yes ;;
2503 esac
2504     CC=$ac_ct_CC
2505   fi
2506 else
2507   CC="$ac_cv_prog_CC"
2508 fi
2509
2510 if test -z "$CC"; then
2511           if test -n "$ac_tool_prefix"; then
2512     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2513 set dummy ${ac_tool_prefix}cc; ac_word=$2
2514 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2516 if test "${ac_cv_prog_CC+set}" = set; then
2517   echo $ECHO_N "(cached) $ECHO_C" >&6
2518 else
2519   if test -n "$CC"; then
2520   ac_cv_prog_CC="$CC" # Let the user override the test.
2521 else
2522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523 for as_dir in $PATH
2524 do
2525   IFS=$as_save_IFS
2526   test -z "$as_dir" && as_dir=.
2527   for ac_exec_ext in '' $ac_executable_extensions; do
2528   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2529     ac_cv_prog_CC="${ac_tool_prefix}cc"
2530     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2531     break 2
2532   fi
2533 done
2534 done
2535 IFS=$as_save_IFS
2536
2537 fi
2538 fi
2539 CC=$ac_cv_prog_CC
2540 if test -n "$CC"; then
2541   { echo "$as_me:$LINENO: result: $CC" >&5
2542 echo "${ECHO_T}$CC" >&6; }
2543 else
2544   { echo "$as_me:$LINENO: result: no" >&5
2545 echo "${ECHO_T}no" >&6; }
2546 fi
2547
2548
2549   fi
2550 fi
2551 if test -z "$CC"; then
2552   # Extract the first word of "cc", so it can be a program name with args.
2553 set dummy cc; ac_word=$2
2554 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2556 if test "${ac_cv_prog_CC+set}" = set; then
2557   echo $ECHO_N "(cached) $ECHO_C" >&6
2558 else
2559   if test -n "$CC"; then
2560   ac_cv_prog_CC="$CC" # Let the user override the test.
2561 else
2562   ac_prog_rejected=no
2563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2564 for as_dir in $PATH
2565 do
2566   IFS=$as_save_IFS
2567   test -z "$as_dir" && as_dir=.
2568   for ac_exec_ext in '' $ac_executable_extensions; do
2569   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2570     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2571        ac_prog_rejected=yes
2572        continue
2573      fi
2574     ac_cv_prog_CC="cc"
2575     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2576     break 2
2577   fi
2578 done
2579 done
2580 IFS=$as_save_IFS
2581
2582 if test $ac_prog_rejected = yes; then
2583   # We found a bogon in the path, so make sure we never use it.
2584   set dummy $ac_cv_prog_CC
2585   shift
2586   if test $# != 0; then
2587     # We chose a different compiler from the bogus one.
2588     # However, it has the same basename, so the bogon will be chosen
2589     # first if we set CC to just the basename; use the full file name.
2590     shift
2591     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2592   fi
2593 fi
2594 fi
2595 fi
2596 CC=$ac_cv_prog_CC
2597 if test -n "$CC"; then
2598   { echo "$as_me:$LINENO: result: $CC" >&5
2599 echo "${ECHO_T}$CC" >&6; }
2600 else
2601   { echo "$as_me:$LINENO: result: no" >&5
2602 echo "${ECHO_T}no" >&6; }
2603 fi
2604
2605
2606 fi
2607 if test -z "$CC"; then
2608   if test -n "$ac_tool_prefix"; then
2609   for ac_prog in cl.exe
2610   do
2611     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2613 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2615 if test "${ac_cv_prog_CC+set}" = set; then
2616   echo $ECHO_N "(cached) $ECHO_C" >&6
2617 else
2618   if test -n "$CC"; then
2619   ac_cv_prog_CC="$CC" # Let the user override the test.
2620 else
2621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622 for as_dir in $PATH
2623 do
2624   IFS=$as_save_IFS
2625   test -z "$as_dir" && as_dir=.
2626   for ac_exec_ext in '' $ac_executable_extensions; do
2627   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2628     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2629     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2630     break 2
2631   fi
2632 done
2633 done
2634 IFS=$as_save_IFS
2635
2636 fi
2637 fi
2638 CC=$ac_cv_prog_CC
2639 if test -n "$CC"; then
2640   { echo "$as_me:$LINENO: result: $CC" >&5
2641 echo "${ECHO_T}$CC" >&6; }
2642 else
2643   { echo "$as_me:$LINENO: result: no" >&5
2644 echo "${ECHO_T}no" >&6; }
2645 fi
2646
2647
2648     test -n "$CC" && break
2649   done
2650 fi
2651 if test -z "$CC"; then
2652   ac_ct_CC=$CC
2653   for ac_prog in cl.exe
2654 do
2655   # Extract the first word of "$ac_prog", so it can be a program name with args.
2656 set dummy $ac_prog; ac_word=$2
2657 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2660   echo $ECHO_N "(cached) $ECHO_C" >&6
2661 else
2662   if test -n "$ac_ct_CC"; then
2663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2664 else
2665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2666 for as_dir in $PATH
2667 do
2668   IFS=$as_save_IFS
2669   test -z "$as_dir" && as_dir=.
2670   for ac_exec_ext in '' $ac_executable_extensions; do
2671   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2672     ac_cv_prog_ac_ct_CC="$ac_prog"
2673     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2674     break 2
2675   fi
2676 done
2677 done
2678 IFS=$as_save_IFS
2679
2680 fi
2681 fi
2682 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2683 if test -n "$ac_ct_CC"; then
2684   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2685 echo "${ECHO_T}$ac_ct_CC" >&6; }
2686 else
2687   { echo "$as_me:$LINENO: result: no" >&5
2688 echo "${ECHO_T}no" >&6; }
2689 fi
2690
2691
2692   test -n "$ac_ct_CC" && break
2693 done
2694
2695   if test "x$ac_ct_CC" = x; then
2696     CC=""
2697   else
2698     case $cross_compiling:$ac_tool_warned in
2699 yes:)
2700 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2701 whose name does not start with the host triplet.  If you think this
2702 configuration is useful to you, please write to autoconf@gnu.org." >&5
2703 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2704 whose name does not start with the host triplet.  If you think this
2705 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2706 ac_tool_warned=yes ;;
2707 esac
2708     CC=$ac_ct_CC
2709   fi
2710 fi
2711
2712 fi
2713
2714
2715 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2716 See \`config.log' for more details." >&5
2717 echo "$as_me: error: no acceptable C compiler found in \$PATH
2718 See \`config.log' for more details." >&2;}
2719    { (exit 1); exit 1; }; }
2720
2721 # Provide some information about the compiler.
2722 echo "$as_me:$LINENO: checking for C compiler version" >&5
2723 ac_compiler=`set X $ac_compile; echo $2`
2724 { (ac_try="$ac_compiler --version >&5"
2725 case "(($ac_try" in
2726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2727   *) ac_try_echo=$ac_try;;
2728 esac
2729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2730   (eval "$ac_compiler --version >&5") 2>&5
2731   ac_status=$?
2732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733   (exit $ac_status); }
2734 { (ac_try="$ac_compiler -v >&5"
2735 case "(($ac_try" in
2736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2737   *) ac_try_echo=$ac_try;;
2738 esac
2739 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2740   (eval "$ac_compiler -v >&5") 2>&5
2741   ac_status=$?
2742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743   (exit $ac_status); }
2744 { (ac_try="$ac_compiler -V >&5"
2745 case "(($ac_try" in
2746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2747   *) ac_try_echo=$ac_try;;
2748 esac
2749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2750   (eval "$ac_compiler -V >&5") 2>&5
2751   ac_status=$?
2752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2753   (exit $ac_status); }
2754
2755 cat >conftest.$ac_ext <<_ACEOF
2756 /* confdefs.h.  */
2757 _ACEOF
2758 cat confdefs.h >>conftest.$ac_ext
2759 cat >>conftest.$ac_ext <<_ACEOF
2760 /* end confdefs.h.  */
2761
2762 int
2763 main ()
2764 {
2765
2766   ;
2767   return 0;
2768 }
2769 _ACEOF
2770 ac_clean_files_save=$ac_clean_files
2771 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2772 # Try to create an executable without -o first, disregard a.out.
2773 # It will help us diagnose broken compilers, and finding out an intuition
2774 # of exeext.
2775 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2776 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2777 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2778 #
2779 # List of possible output files, starting from the most likely.
2780 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2781 # only as a last resort.  b.out is created by i960 compilers.
2782 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2783 #
2784 # The IRIX 6 linker writes into existing files which may not be
2785 # executable, retaining their permissions.  Remove them first so a
2786 # subsequent execution test works.
2787 ac_rmfiles=
2788 for ac_file in $ac_files
2789 do
2790   case $ac_file in
2791     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2792     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2793   esac
2794 done
2795 rm -f $ac_rmfiles
2796
2797 if { (ac_try="$ac_link_default"
2798 case "(($ac_try" in
2799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2800   *) ac_try_echo=$ac_try;;
2801 esac
2802 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2803   (eval "$ac_link_default") 2>&5
2804   ac_status=$?
2805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2806   (exit $ac_status); }; then
2807   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2808 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2809 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2810 # so that the user can short-circuit this test for compilers unknown to
2811 # Autoconf.
2812 for ac_file in $ac_files ''
2813 do
2814   test -f "$ac_file" || continue
2815   case $ac_file in
2816     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2817         ;;
2818     [ab].out )
2819         # We found the default executable, but exeext='' is most
2820         # certainly right.
2821         break;;
2822     *.* )
2823         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2824         then :; else
2825            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2826         fi
2827         # We set ac_cv_exeext here because the later test for it is not
2828         # safe: cross compilers may not add the suffix if given an `-o'
2829         # argument, so we may need to know it at that point already.
2830         # Even if this section looks crufty: it has the advantage of
2831         # actually working.
2832         break;;
2833     * )
2834         break;;
2835   esac
2836 done
2837 test "$ac_cv_exeext" = no && ac_cv_exeext=
2838
2839 else
2840   ac_file=''
2841 fi
2842
2843 { echo "$as_me:$LINENO: result: $ac_file" >&5
2844 echo "${ECHO_T}$ac_file" >&6; }
2845 if test -z "$ac_file"; then
2846   echo "$as_me: failed program was:" >&5
2847 sed 's/^/| /' conftest.$ac_ext >&5
2848
2849 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2850 See \`config.log' for more details." >&5
2851 echo "$as_me: error: C compiler cannot create executables
2852 See \`config.log' for more details." >&2;}
2853    { (exit 77); exit 77; }; }
2854 fi
2855
2856 ac_exeext=$ac_cv_exeext
2857
2858 # Check that the compiler produces executables we can run.  If not, either
2859 # the compiler is broken, or we cross compile.
2860 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2861 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2862 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2863 # If not cross compiling, check that we can run a simple program.
2864 if test "$cross_compiling" != yes; then
2865   if { ac_try='./$ac_file'
2866   { (case "(($ac_try" in
2867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868   *) ac_try_echo=$ac_try;;
2869 esac
2870 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2871   (eval "$ac_try") 2>&5
2872   ac_status=$?
2873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875     cross_compiling=no
2876   else
2877     if test "$cross_compiling" = maybe; then
2878         cross_compiling=yes
2879     else
2880         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2881 If you meant to cross compile, use \`--host'.
2882 See \`config.log' for more details." >&5
2883 echo "$as_me: error: cannot run C compiled programs.
2884 If you meant to cross compile, use \`--host'.
2885 See \`config.log' for more details." >&2;}
2886    { (exit 1); exit 1; }; }
2887     fi
2888   fi
2889 fi
2890 { echo "$as_me:$LINENO: result: yes" >&5
2891 echo "${ECHO_T}yes" >&6; }
2892
2893 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2894 ac_clean_files=$ac_clean_files_save
2895 # Check that the compiler produces executables we can run.  If not, either
2896 # the compiler is broken, or we cross compile.
2897 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2898 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2899 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2900 echo "${ECHO_T}$cross_compiling" >&6; }
2901
2902 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2903 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2904 if { (ac_try="$ac_link"
2905 case "(($ac_try" in
2906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2907   *) ac_try_echo=$ac_try;;
2908 esac
2909 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2910   (eval "$ac_link") 2>&5
2911   ac_status=$?
2912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2913   (exit $ac_status); }; then
2914   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2915 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2916 # work properly (i.e., refer to `conftest.exe'), while it won't with
2917 # `rm'.
2918 for ac_file in conftest.exe conftest conftest.*; do
2919   test -f "$ac_file" || continue
2920   case $ac_file in
2921     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2922     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2923           break;;
2924     * ) break;;
2925   esac
2926 done
2927 else
2928   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2929 See \`config.log' for more details." >&5
2930 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2931 See \`config.log' for more details." >&2;}
2932    { (exit 1); exit 1; }; }
2933 fi
2934
2935 rm -rf conftest$ac_cv_exeext
2936 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2937 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2938
2939 rm -rf conftest.$ac_ext
2940 EXEEXT=$ac_cv_exeext
2941 ac_exeext=$EXEEXT
2942 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2943 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2944 if test "${ac_cv_objext+set}" = set; then
2945   echo $ECHO_N "(cached) $ECHO_C" >&6
2946 else
2947   cat >conftest.$ac_ext <<_ACEOF
2948 /* confdefs.h.  */
2949 _ACEOF
2950 cat confdefs.h >>conftest.$ac_ext
2951 cat >>conftest.$ac_ext <<_ACEOF
2952 /* end confdefs.h.  */
2953
2954 int
2955 main ()
2956 {
2957
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -rf conftest.o conftest.obj
2963 if { (ac_try="$ac_compile"
2964 case "(($ac_try" in
2965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2966   *) ac_try_echo=$ac_try;;
2967 esac
2968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2969   (eval "$ac_compile") 2>&5
2970   ac_status=$?
2971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2972   (exit $ac_status); }; then
2973   for ac_file in conftest.o conftest.obj conftest.*; do
2974   test -f "$ac_file" || continue;
2975   case $ac_file in
2976     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2977     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2978        break;;
2979   esac
2980 done
2981 else
2982   echo "$as_me: failed program was:" >&5
2983 sed 's/^/| /' conftest.$ac_ext >&5
2984
2985 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2986 See \`config.log' for more details." >&5
2987 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2988 See \`config.log' for more details." >&2;}
2989    { (exit 1); exit 1; }; }
2990 fi
2991
2992 rm -rf conftest.$ac_cv_objext conftest.$ac_ext
2993 fi
2994 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2995 echo "${ECHO_T}$ac_cv_objext" >&6; }
2996 OBJEXT=$ac_cv_objext
2997 ac_objext=$OBJEXT
2998 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2999 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3000 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3001   echo $ECHO_N "(cached) $ECHO_C" >&6
3002 else
3003   cat >conftest.$ac_ext <<_ACEOF
3004 /* confdefs.h.  */
3005 _ACEOF
3006 cat confdefs.h >>conftest.$ac_ext
3007 cat >>conftest.$ac_ext <<_ACEOF
3008 /* end confdefs.h.  */
3009
3010 int
3011 main ()
3012 {
3013 #ifndef __GNUC__
3014        choke me
3015 #endif
3016
3017   ;
3018   return 0;
3019 }
3020 _ACEOF
3021 rm -rf conftest.$ac_objext
3022 if { (ac_try="$ac_compile"
3023 case "(($ac_try" in
3024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025   *) ac_try_echo=$ac_try;;
3026 esac
3027 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3028   (eval "$ac_compile") 2>conftest.er1
3029   ac_status=$?
3030   grep -v '^ *+' conftest.er1 >conftest.err
3031   rm -rf conftest.er1
3032   cat conftest.err >&5
3033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034   (exit $ac_status); } && {
3035          test -z "$ac_c_werror_flag" ||
3036          test ! -s conftest.err
3037        } && test -s conftest.$ac_objext; then
3038   ac_compiler_gnu=yes
3039 else
3040   echo "$as_me: failed program was:" >&5
3041 sed 's/^/| /' conftest.$ac_ext >&5
3042
3043         ac_compiler_gnu=no
3044 fi
3045
3046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3047 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3048
3049 fi
3050 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3051 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3052 GCC=`test $ac_compiler_gnu = yes && echo yes`
3053 ac_test_CFLAGS=${CFLAGS+set}
3054 ac_save_CFLAGS=$CFLAGS
3055 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3056 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3057 if test "${ac_cv_prog_cc_g+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   ac_save_c_werror_flag=$ac_c_werror_flag
3061    ac_c_werror_flag=yes
3062    ac_cv_prog_cc_g=no
3063    CFLAGS="-g"
3064    cat >conftest.$ac_ext <<_ACEOF
3065 /* confdefs.h.  */
3066 _ACEOF
3067 cat confdefs.h >>conftest.$ac_ext
3068 cat >>conftest.$ac_ext <<_ACEOF
3069 /* end confdefs.h.  */
3070
3071 int
3072 main ()
3073 {
3074
3075   ;
3076   return 0;
3077 }
3078 _ACEOF
3079 rm -rf conftest.$ac_objext
3080 if { (ac_try="$ac_compile"
3081 case "(($ac_try" in
3082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3083   *) ac_try_echo=$ac_try;;
3084 esac
3085 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3086   (eval "$ac_compile") 2>conftest.er1
3087   ac_status=$?
3088   grep -v '^ *+' conftest.er1 >conftest.err
3089   rm -rf conftest.er1
3090   cat conftest.err >&5
3091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3092   (exit $ac_status); } && {
3093          test -z "$ac_c_werror_flag" ||
3094          test ! -s conftest.err
3095        } && test -s conftest.$ac_objext; then
3096   ac_cv_prog_cc_g=yes
3097 else
3098   echo "$as_me: failed program was:" >&5
3099 sed 's/^/| /' conftest.$ac_ext >&5
3100
3101         CFLAGS=""
3102       cat >conftest.$ac_ext <<_ACEOF
3103 /* confdefs.h.  */
3104 _ACEOF
3105 cat confdefs.h >>conftest.$ac_ext
3106 cat >>conftest.$ac_ext <<_ACEOF
3107 /* end confdefs.h.  */
3108
3109 int
3110 main ()
3111 {
3112
3113   ;
3114   return 0;
3115 }
3116 _ACEOF
3117 rm -rf conftest.$ac_objext
3118 if { (ac_try="$ac_compile"
3119 case "(($ac_try" in
3120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3121   *) ac_try_echo=$ac_try;;
3122 esac
3123 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3124   (eval "$ac_compile") 2>conftest.er1
3125   ac_status=$?
3126   grep -v '^ *+' conftest.er1 >conftest.err
3127   rm -rf conftest.er1
3128   cat conftest.err >&5
3129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3130   (exit $ac_status); } && {
3131          test -z "$ac_c_werror_flag" ||
3132          test ! -s conftest.err
3133        } && test -s conftest.$ac_objext; then
3134   :
3135 else
3136   echo "$as_me: failed program was:" >&5
3137 sed 's/^/| /' conftest.$ac_ext >&5
3138
3139         ac_c_werror_flag=$ac_save_c_werror_flag
3140          CFLAGS="-g"
3141          cat >conftest.$ac_ext <<_ACEOF
3142 /* confdefs.h.  */
3143 _ACEOF
3144 cat confdefs.h >>conftest.$ac_ext
3145 cat >>conftest.$ac_ext <<_ACEOF
3146 /* end confdefs.h.  */
3147
3148 int
3149 main ()
3150 {
3151
3152   ;
3153   return 0;
3154 }
3155 _ACEOF
3156 rm -rf conftest.$ac_objext
3157 if { (ac_try="$ac_compile"
3158 case "(($ac_try" in
3159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160   *) ac_try_echo=$ac_try;;
3161 esac
3162 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3163   (eval "$ac_compile") 2>conftest.er1
3164   ac_status=$?
3165   grep -v '^ *+' conftest.er1 >conftest.err
3166   rm -rf conftest.er1
3167   cat conftest.err >&5
3168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3169   (exit $ac_status); } && {
3170          test -z "$ac_c_werror_flag" ||
3171          test ! -s conftest.err
3172        } && test -s conftest.$ac_objext; then
3173   ac_cv_prog_cc_g=yes
3174 else
3175   echo "$as_me: failed program was:" >&5
3176 sed 's/^/| /' conftest.$ac_ext >&5
3177
3178
3179 fi
3180
3181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3182 fi
3183
3184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185 fi
3186
3187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3188    ac_c_werror_flag=$ac_save_c_werror_flag
3189 fi
3190 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3191 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3192 if test "$ac_test_CFLAGS" = set; then
3193   CFLAGS=$ac_save_CFLAGS
3194 elif test $ac_cv_prog_cc_g = yes; then
3195   if test "$GCC" = yes; then
3196     CFLAGS="-g -O2"
3197   else
3198     CFLAGS="-g"
3199   fi
3200 else
3201   if test "$GCC" = yes; then
3202     CFLAGS="-O2"
3203   else
3204     CFLAGS=
3205   fi
3206 fi
3207 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3208 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3209 if test "${ac_cv_prog_cc_c89+set}" = set; then
3210   echo $ECHO_N "(cached) $ECHO_C" >&6
3211 else
3212   ac_cv_prog_cc_c89=no
3213 ac_save_CC=$CC
3214 cat >conftest.$ac_ext <<_ACEOF
3215 /* confdefs.h.  */
3216 _ACEOF
3217 cat confdefs.h >>conftest.$ac_ext
3218 cat >>conftest.$ac_ext <<_ACEOF
3219 /* end confdefs.h.  */
3220 #include <stdarg.h>
3221 #include <stdio.h>
3222 #include <sys/types.h>
3223 #include <sys/stat.h>
3224 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3225 struct buf { int x; };
3226 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3227 static char *e (p, i)
3228      char **p;
3229      int i;
3230 {
3231   return p[i];
3232 }
3233 static char *f (char * (*g) (char **, int), char **p, ...)
3234 {
3235   char *s;
3236   va_list v;
3237   va_start (v,p);
3238   s = g (p, va_arg (v,int));
3239   va_end (v);
3240   return s;
3241 }
3242
3243 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3244    function prototypes and stuff, but not '\xHH' hex character constants.
3245    These don't provoke an error unfortunately, instead are silently treated
3246    as 'x'.  The following induces an error, until -std is added to get
3247    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3248    array size at least.  It's necessary to write '\x00'==0 to get something
3249    that's true only with -std.  */
3250 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3251
3252 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3253    inside strings and character constants.  */
3254 #define FOO(x) 'x'
3255 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3256
3257 int test (int i, double x);
3258 struct s1 {int (*f) (int a);};
3259 struct s2 {int (*f) (double a);};
3260 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3261 int argc;
3262 char **argv;
3263 int
3264 main ()
3265 {
3266 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3267   ;
3268   return 0;
3269 }
3270 _ACEOF
3271 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3272         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3273 do
3274   CC="$ac_save_CC $ac_arg"
3275   rm -rf conftest.$ac_objext
3276 if { (ac_try="$ac_compile"
3277 case "(($ac_try" in
3278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3279   *) ac_try_echo=$ac_try;;
3280 esac
3281 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3282   (eval "$ac_compile") 2>conftest.er1
3283   ac_status=$?
3284   grep -v '^ *+' conftest.er1 >conftest.err
3285   rm -rf conftest.er1
3286   cat conftest.err >&5
3287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288   (exit $ac_status); } && {
3289          test -z "$ac_c_werror_flag" ||
3290          test ! -s conftest.err
3291        } && test -s conftest.$ac_objext; then
3292   ac_cv_prog_cc_c89=$ac_arg
3293 else
3294   echo "$as_me: failed program was:" >&5
3295 sed 's/^/| /' conftest.$ac_ext >&5
3296
3297
3298 fi
3299
3300 rm -f core conftest.err conftest.$ac_objext
3301   test "x$ac_cv_prog_cc_c89" != "xno" && break
3302 done
3303 rm -rf conftest.$ac_ext
3304 CC=$ac_save_CC
3305
3306 fi
3307 # AC_CACHE_VAL
3308 case "x$ac_cv_prog_cc_c89" in
3309   x)
3310     { echo "$as_me:$LINENO: result: none needed" >&5
3311 echo "${ECHO_T}none needed" >&6; } ;;
3312   xno)
3313     { echo "$as_me:$LINENO: result: unsupported" >&5
3314 echo "${ECHO_T}unsupported" >&6; } ;;
3315   *)
3316     CC="$CC $ac_cv_prog_cc_c89"
3317     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3318 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3319 esac
3320
3321
3322 ac_ext=c
3323 ac_cpp='$CPP $CPPFLAGS'
3324 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3325 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3326 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3327
3328
3329   if test -z "$GCC"; then
3330     # not using GCC
3331     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3332 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3333     case "$host" in
3334       *-hpux* )
3335         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3336 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3337         CC="$CC -Ae"
3338       ;;
3339       *-aix* )
3340         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3341 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3342         CC="$CC -qlanglvl=ansi -qhalt=e"
3343       ;;
3344       *-dec-* )
3345         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3346 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3347         CC="$CC -std1"
3348       ;;
3349       *)
3350         { echo "$as_me:$LINENO: result: no idea" >&5
3351 echo "${ECHO_T}no idea" >&6; }
3352       ;;
3353     esac
3354   else
3355     # using GCC
3356     case "$host" in
3357       *-solaris*)
3358         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3359 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3360         CC="$CC -D__EXTENSIONS__"
3361       ;;
3362     esac
3363   fi
3364
3365   OBJCC="$CC"
3366
3367   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3368 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3369   if test "$cross_compiling" = yes; then
3370   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3371 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3372    { (exit 1); exit 1; }; }
3373 else
3374   cat >conftest.$ac_ext <<_ACEOF
3375 /* confdefs.h.  */
3376 _ACEOF
3377 cat confdefs.h >>conftest.$ac_ext
3378 cat >>conftest.$ac_ext <<_ACEOF
3379 /* end confdefs.h.  */
3380  main(int ac, char **av) { return 0; }
3381 _ACEOF
3382 rm -rf conftest$ac_exeext
3383 if { (ac_try="$ac_link"
3384 case "(($ac_try" in
3385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3386   *) ac_try_echo=$ac_try;;
3387 esac
3388 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3389   (eval "$ac_link") 2>&5
3390   ac_status=$?
3391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3393   { (case "(($ac_try" in
3394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395   *) ac_try_echo=$ac_try;;
3396 esac
3397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3398   (eval "$ac_try") 2>&5
3399   ac_status=$?
3400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3401   (exit $ac_status); }; }; then
3402   { echo "$as_me:$LINENO: result: yes" >&5
3403 echo "${ECHO_T}yes" >&6; }
3404 else
3405   echo "$as_me: program exited with status $ac_status" >&5
3406 echo "$as_me: failed program was:" >&5
3407 sed 's/^/| /' conftest.$ac_ext >&5
3408
3409 ( exit $ac_status )
3410 { echo "$as_me:$LINENO: result: no" >&5
3411 echo "${ECHO_T}no" >&6; }
3412      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3413 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3414    { (exit 1); exit 1; }; }
3415 fi
3416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3417 fi
3418
3419
3420
3421   if test -n "$GCC"; then
3422     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3423 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3424     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3425     OBJCC="$OBJCC -Wall"
3426     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3427     # and so perhaps now we can do without -pedantic?
3428   else
3429     case "$host" in
3430       *-irix5* |*-irix6.0-3* )
3431         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3432 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3433         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3434       ;;
3435 #     *-dec-osf* )
3436 #       if test -z "$GCC"; then
3437 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3438 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3439 #       fi
3440 #     ;;
3441     esac
3442   fi
3443
3444 if test -n "$GCC"; then
3445    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3446 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3447 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3448   echo $ECHO_N "(cached) $ECHO_C" >&6
3449 else
3450   rm -rf conftest.$ac_ext
3451      touch conftest.$ac_ext
3452      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3453           grep unrecognized >/dev/null ); then
3454        ac_cv_gcc_accepts_no_overlength=no
3455      else
3456        ac_cv_gcc_accepts_no_overlength=yes
3457        CC="$CC -Wno-overlength-strings"
3458      fi
3459 fi
3460 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3461 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3462    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3463   fi
3464
3465 if test -n "$GCC"; then
3466    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3467 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3468 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3469   echo $ECHO_N "(cached) $ECHO_C" >&6
3470 else
3471   rm -rf conftest.$ac_ext
3472      touch conftest.$ac_ext
3473      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3474           grep unrecognized >/dev/null ); then
3475        ac_cv_gcc_accepts_no_decl_after=no
3476      else
3477        ac_cv_gcc_accepts_no_decl_after=yes
3478        CC="$CC -Wdeclaration-after-statement"
3479      fi
3480 fi
3481 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3482 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3483    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3484   fi
3485
3486 if test -n "$GCC"; then
3487    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3488 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3489 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492   rm -rf conftest.$ac_ext
3493      touch conftest.$ac_ext
3494      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3495           grep unrecognized >/dev/null ); then
3496        ac_cv_gcc_accepts_no_cpp_precomp=no
3497      else
3498        ac_cv_gcc_accepts_no_cpp_precomp=yes
3499        CC="$CC -no-cpp-precomp"
3500      fi
3501 fi
3502 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3503 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3504    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3505   fi
3506
3507 if test -n "$GCC"; then
3508    if test -n "$GCC"; then
3509    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3510 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3511 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3512   echo $ECHO_N "(cached) $ECHO_C" >&6
3513 else
3514   rm -rf conftest.$ac_ext
3515      touch conftest.$ac_ext
3516      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3517           grep unrecognized >/dev/null ); then
3518        ac_cv_gcc_accepts_std=no
3519      else
3520        ac_cv_gcc_accepts_std=yes
3521        CC="$CC -std=c89"
3522      fi
3523 fi
3524 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3525 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3526    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3527   fi
3528
3529    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3530 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3531    #
3532    # The reason that // comments are banned from xscreensaver is that gcc is
3533    # basically the only compiler in the world that supports them in C code.
3534    # All other vendors support them only in their C++ compilers, not in their
3535    # ANSI C compilers.  This means that it's a portability problem: every time
3536    # these comments have snuck into the xscreensaver source code, I've gotten
3537    # complaints about it the next day.  So we turn off support for them in gcc
3538    # as well to prevent them from accidentially slipping in.
3539    #
3540    if test "$ac_gcc_accepts_std" = yes ; then
3541      #
3542      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3543      # (That appears to be the only additional preprocessor symbol
3544      # it defines, in addition to the syntax changes it makes.)
3545      #
3546      # -std=gnu89 is no good, because // comments were a GNU extension
3547      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3548      # with -std=gnu89 but not with -std=c89.)
3549      #
3550      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3551      CC="$CC -U__STRICT_ANSI__"
3552    else
3553      # The old way:
3554      CC="$CC -Wp,-lang-c89"
3555    fi
3556   fi
3557
3558 ac_ext=c
3559 ac_cpp='$CPP $CPPFLAGS'
3560 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3561 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3562 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3563 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3564 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3565 # On Suns, sometimes $CPP names a directory.
3566 if test -n "$CPP" && test -d "$CPP"; then
3567   CPP=
3568 fi
3569 if test -z "$CPP"; then
3570   if test "${ac_cv_prog_CPP+set}" = set; then
3571   echo $ECHO_N "(cached) $ECHO_C" >&6
3572 else
3573       # Double quotes because CPP needs to be expanded
3574     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3575     do
3576       ac_preproc_ok=false
3577 for ac_c_preproc_warn_flag in '' yes
3578 do
3579   # Use a header file that comes with gcc, so configuring glibc
3580   # with a fresh cross-compiler works.
3581   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3582   # <limits.h> exists even on freestanding compilers.
3583   # On the NeXT, cc -E runs the code through the compiler's parser,
3584   # not just through cpp. "Syntax error" is here to catch this case.
3585   cat >conftest.$ac_ext <<_ACEOF
3586 /* confdefs.h.  */
3587 _ACEOF
3588 cat confdefs.h >>conftest.$ac_ext
3589 cat >>conftest.$ac_ext <<_ACEOF
3590 /* end confdefs.h.  */
3591 #ifdef __STDC__
3592 # include <limits.h>
3593 #else
3594 # include <assert.h>
3595 #endif
3596                      Syntax error
3597 _ACEOF
3598 if { (ac_try="$ac_cpp conftest.$ac_ext"
3599 case "(($ac_try" in
3600   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601   *) ac_try_echo=$ac_try;;
3602 esac
3603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3604   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3605   ac_status=$?
3606   grep -v '^ *+' conftest.er1 >conftest.err
3607   rm -rf conftest.er1
3608   cat conftest.err >&5
3609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3610   (exit $ac_status); } >/dev/null && {
3611          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3612          test ! -s conftest.err
3613        }; then
3614   :
3615 else
3616   echo "$as_me: failed program was:" >&5
3617 sed 's/^/| /' conftest.$ac_ext >&5
3618
3619   # Broken: fails on valid input.
3620 continue
3621 fi
3622
3623 rm -rf conftest.err conftest.$ac_ext
3624
3625   # OK, works on sane cases.  Now check whether nonexistent headers
3626   # can be detected and how.
3627   cat >conftest.$ac_ext <<_ACEOF
3628 /* confdefs.h.  */
3629 _ACEOF
3630 cat confdefs.h >>conftest.$ac_ext
3631 cat >>conftest.$ac_ext <<_ACEOF
3632 /* end confdefs.h.  */
3633 #include <ac_nonexistent.h>
3634 _ACEOF
3635 if { (ac_try="$ac_cpp conftest.$ac_ext"
3636 case "(($ac_try" in
3637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3638   *) ac_try_echo=$ac_try;;
3639 esac
3640 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3641   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3642   ac_status=$?
3643   grep -v '^ *+' conftest.er1 >conftest.err
3644   rm -rf conftest.er1
3645   cat conftest.err >&5
3646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3647   (exit $ac_status); } >/dev/null && {
3648          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3649          test ! -s conftest.err
3650        }; then
3651   # Broken: success on invalid input.
3652 continue
3653 else
3654   echo "$as_me: failed program was:" >&5
3655 sed 's/^/| /' conftest.$ac_ext >&5
3656
3657   # Passes both tests.
3658 ac_preproc_ok=:
3659 break
3660 fi
3661
3662 rm -rf conftest.err conftest.$ac_ext
3663
3664 done
3665 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3666 rm -rf conftest.err conftest.$ac_ext
3667 if $ac_preproc_ok; then
3668   break
3669 fi
3670
3671     done
3672     ac_cv_prog_CPP=$CPP
3673
3674 fi
3675   CPP=$ac_cv_prog_CPP
3676 else
3677   ac_cv_prog_CPP=$CPP
3678 fi
3679 { echo "$as_me:$LINENO: result: $CPP" >&5
3680 echo "${ECHO_T}$CPP" >&6; }
3681 ac_preproc_ok=false
3682 for ac_c_preproc_warn_flag in '' yes
3683 do
3684   # Use a header file that comes with gcc, so configuring glibc
3685   # with a fresh cross-compiler works.
3686   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3687   # <limits.h> exists even on freestanding compilers.
3688   # On the NeXT, cc -E runs the code through the compiler's parser,
3689   # not just through cpp. "Syntax error" is here to catch this case.
3690   cat >conftest.$ac_ext <<_ACEOF
3691 /* confdefs.h.  */
3692 _ACEOF
3693 cat confdefs.h >>conftest.$ac_ext
3694 cat >>conftest.$ac_ext <<_ACEOF
3695 /* end confdefs.h.  */
3696 #ifdef __STDC__
3697 # include <limits.h>
3698 #else
3699 # include <assert.h>
3700 #endif
3701                      Syntax error
3702 _ACEOF
3703 if { (ac_try="$ac_cpp conftest.$ac_ext"
3704 case "(($ac_try" in
3705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3706   *) ac_try_echo=$ac_try;;
3707 esac
3708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3709   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3710   ac_status=$?
3711   grep -v '^ *+' conftest.er1 >conftest.err
3712   rm -rf conftest.er1
3713   cat conftest.err >&5
3714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715   (exit $ac_status); } >/dev/null && {
3716          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3717          test ! -s conftest.err
3718        }; then
3719   :
3720 else
3721   echo "$as_me: failed program was:" >&5
3722 sed 's/^/| /' conftest.$ac_ext >&5
3723
3724   # Broken: fails on valid input.
3725 continue
3726 fi
3727
3728 rm -rf conftest.err conftest.$ac_ext
3729
3730   # OK, works on sane cases.  Now check whether nonexistent headers
3731   # can be detected and how.
3732   cat >conftest.$ac_ext <<_ACEOF
3733 /* confdefs.h.  */
3734 _ACEOF
3735 cat confdefs.h >>conftest.$ac_ext
3736 cat >>conftest.$ac_ext <<_ACEOF
3737 /* end confdefs.h.  */
3738 #include <ac_nonexistent.h>
3739 _ACEOF
3740 if { (ac_try="$ac_cpp conftest.$ac_ext"
3741 case "(($ac_try" in
3742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743   *) ac_try_echo=$ac_try;;
3744 esac
3745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3746   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3747   ac_status=$?
3748   grep -v '^ *+' conftest.er1 >conftest.err
3749   rm -rf conftest.er1
3750   cat conftest.err >&5
3751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752   (exit $ac_status); } >/dev/null && {
3753          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3754          test ! -s conftest.err
3755        }; then
3756   # Broken: success on invalid input.
3757 continue
3758 else
3759   echo "$as_me: failed program was:" >&5
3760 sed 's/^/| /' conftest.$ac_ext >&5
3761
3762   # Passes both tests.
3763 ac_preproc_ok=:
3764 break
3765 fi
3766
3767 rm -rf conftest.err conftest.$ac_ext
3768
3769 done
3770 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3771 rm -rf conftest.err conftest.$ac_ext
3772 if $ac_preproc_ok; then
3773   :
3774 else
3775   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3776 See \`config.log' for more details." >&5
3777 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3778 See \`config.log' for more details." >&2;}
3779    { (exit 1); exit 1; }; }
3780 fi
3781
3782 ac_ext=c
3783 ac_cpp='$CPP $CPPFLAGS'
3784 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3785 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3786 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3787
3788 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3789 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3790 if test "${ac_cv_c_const+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   cat >conftest.$ac_ext <<_ACEOF
3794 /* confdefs.h.  */
3795 _ACEOF
3796 cat confdefs.h >>conftest.$ac_ext
3797 cat >>conftest.$ac_ext <<_ACEOF
3798 /* end confdefs.h.  */
3799
3800 int
3801 main ()
3802 {
3803 /* FIXME: Include the comments suggested by Paul. */
3804 #ifndef __cplusplus
3805   /* Ultrix mips cc rejects this.  */
3806   typedef int charset[2];
3807   const charset cs;
3808   /* SunOS 4.1.1 cc rejects this.  */
3809   char const *const *pcpcc;
3810   char **ppc;
3811   /* NEC SVR4.0.2 mips cc rejects this.  */
3812   struct point {int x, y;};
3813   static struct point const zero = {0,0};
3814   /* AIX XL C 1.02.0.0 rejects this.
3815      It does not let you subtract one const X* pointer from another in
3816      an arm of an if-expression whose if-part is not a constant
3817      expression */
3818   const char *g = "string";
3819   pcpcc = &g + (g ? g-g : 0);
3820   /* HPUX 7.0 cc rejects these. */
3821   ++pcpcc;
3822   ppc = (char**) pcpcc;
3823   pcpcc = (char const *const *) ppc;
3824   { /* SCO 3.2v4 cc rejects this.  */
3825     char *t;
3826     char const *s = 0 ? (char *) 0 : (char const *) 0;
3827
3828     *t++ = 0;
3829     if (s) return 0;
3830   }
3831   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3832     int x[] = {25, 17};
3833     const int *foo = &x[0];
3834     ++foo;
3835   }
3836   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3837     typedef const int *iptr;
3838     iptr p = 0;
3839     ++p;
3840   }
3841   { /* AIX XL C 1.02.0.0 rejects this saying
3842        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3843     struct s { int j; const int *ap[3]; };
3844     struct s *b; b->j = 5;
3845   }
3846   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3847     const int foo = 10;
3848     if (!foo) return 0;
3849   }
3850   return !cs[0] && !zero.x;
3851 #endif
3852
3853   ;
3854   return 0;
3855 }
3856 _ACEOF
3857 rm -rf conftest.$ac_objext
3858 if { (ac_try="$ac_compile"
3859 case "(($ac_try" in
3860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3861   *) ac_try_echo=$ac_try;;
3862 esac
3863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3864   (eval "$ac_compile") 2>conftest.er1
3865   ac_status=$?
3866   grep -v '^ *+' conftest.er1 >conftest.err
3867   rm -rf conftest.er1
3868   cat conftest.err >&5
3869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870   (exit $ac_status); } && {
3871          test -z "$ac_c_werror_flag" ||
3872          test ! -s conftest.err
3873        } && test -s conftest.$ac_objext; then
3874   ac_cv_c_const=yes
3875 else
3876   echo "$as_me: failed program was:" >&5
3877 sed 's/^/| /' conftest.$ac_ext >&5
3878
3879         ac_cv_c_const=no
3880 fi
3881
3882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3883 fi
3884 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3885 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3886 if test $ac_cv_c_const = no; then
3887
3888 cat >>confdefs.h <<\_ACEOF
3889 #define const
3890 _ACEOF
3891
3892 fi
3893
3894 { echo "$as_me:$LINENO: checking for inline" >&5
3895 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3896 if test "${ac_cv_c_inline+set}" = set; then
3897   echo $ECHO_N "(cached) $ECHO_C" >&6
3898 else
3899   ac_cv_c_inline=no
3900 for ac_kw in inline __inline__ __inline; do
3901   cat >conftest.$ac_ext <<_ACEOF
3902 /* confdefs.h.  */
3903 _ACEOF
3904 cat confdefs.h >>conftest.$ac_ext
3905 cat >>conftest.$ac_ext <<_ACEOF
3906 /* end confdefs.h.  */
3907 #ifndef __cplusplus
3908 typedef int foo_t;
3909 static $ac_kw foo_t static_foo () {return 0; }
3910 $ac_kw foo_t foo () {return 0; }
3911 #endif
3912
3913 _ACEOF
3914 rm -rf conftest.$ac_objext
3915 if { (ac_try="$ac_compile"
3916 case "(($ac_try" in
3917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3918   *) ac_try_echo=$ac_try;;
3919 esac
3920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3921   (eval "$ac_compile") 2>conftest.er1
3922   ac_status=$?
3923   grep -v '^ *+' conftest.er1 >conftest.err
3924   rm -rf conftest.er1
3925   cat conftest.err >&5
3926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927   (exit $ac_status); } && {
3928          test -z "$ac_c_werror_flag" ||
3929          test ! -s conftest.err
3930        } && test -s conftest.$ac_objext; then
3931   ac_cv_c_inline=$ac_kw
3932 else
3933   echo "$as_me: failed program was:" >&5
3934 sed 's/^/| /' conftest.$ac_ext >&5
3935
3936
3937 fi
3938
3939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3940   test "$ac_cv_c_inline" != no && break
3941 done
3942
3943 fi
3944 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3945 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3946
3947
3948 case $ac_cv_c_inline in
3949   inline | yes) ;;
3950   *)
3951     case $ac_cv_c_inline in
3952       no) ac_val=;;
3953       *) ac_val=$ac_cv_c_inline;;
3954     esac
3955     cat >>confdefs.h <<_ACEOF
3956 #ifndef __cplusplus
3957 #define inline $ac_val
3958 #endif
3959 _ACEOF
3960     ;;
3961 esac
3962
3963
3964 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3965   { echo "$as_me:$LINENO: checking for bc" >&5
3966 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3967   if test "$ac_bc_result" = "15" ; then
3968     { echo "$as_me:$LINENO: result: yes" >&5
3969 echo "${ECHO_T}yes" >&6; }
3970   else
3971     { echo "$as_me:$LINENO: result: no" >&5
3972 echo "${ECHO_T}no" >&6; }
3973     echo ''
3974     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3975                   part of Unix since the 1970s.  Come back when your vendor
3976                   has grown a clue." >&5
3977 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3978                   part of Unix since the 1970s.  Come back when your vendor
3979                   has grown a clue." >&2;}
3980    { (exit 1); exit 1; }; }
3981   fi
3982
3983
3984 # stuff for Makefiles
3985 # Find a good install program.  We prefer a C program (faster),
3986 # so one script is as good as another.  But avoid the broken or
3987 # incompatible versions:
3988 # SysV /etc/install, /usr/sbin/install
3989 # SunOS /usr/etc/install
3990 # IRIX /sbin/install
3991 # AIX /bin/install
3992 # AmigaOS /C/install, which installs bootblocks on floppy discs
3993 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3994 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3995 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3996 # OS/2's system install, which has a completely different semantic
3997 # ./install, which can be erroneously created by make from ./install.sh.
3998 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3999 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4000 if test -z "$INSTALL"; then
4001 if test "${ac_cv_path_install+set}" = set; then
4002   echo $ECHO_N "(cached) $ECHO_C" >&6
4003 else
4004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4005 for as_dir in $PATH
4006 do
4007   IFS=$as_save_IFS
4008   test -z "$as_dir" && as_dir=.
4009   # Account for people who put trailing slashes in PATH elements.
4010 case $as_dir/ in
4011   ./ | .// | /cC/* | \
4012   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4013   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4014   /usr/ucb/* ) ;;
4015   *)
4016     # OSF1 and SCO ODT 3.0 have their own names for install.
4017     # Don't use installbsd from OSF since it installs stuff as root
4018     # by default.
4019     for ac_prog in ginstall scoinst install; do
4020       for ac_exec_ext in '' $ac_executable_extensions; do
4021         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4022           if test $ac_prog = install &&
4023             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4024             # AIX install.  It has an incompatible calling convention.
4025             :
4026           elif test $ac_prog = install &&
4027             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4028             # program-specific install script used by HP pwplus--don't use.
4029             :
4030           else
4031             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4032             break 3
4033           fi
4034         fi
4035       done
4036     done
4037     ;;
4038 esac
4039 done
4040 IFS=$as_save_IFS
4041
4042
4043 fi
4044   if test "${ac_cv_path_install+set}" = set; then
4045     INSTALL=$ac_cv_path_install
4046   else
4047     # As a last resort, use the slow shell script.  Don't cache a
4048     # value for INSTALL within a source directory, because that will
4049     # break other packages using the cache if that directory is
4050     # removed, or if the value is a relative name.
4051     INSTALL=$ac_install_sh
4052   fi
4053 fi
4054 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4055 echo "${ECHO_T}$INSTALL" >&6; }
4056
4057 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4058 # It thinks the first close brace ends the variable substitution.
4059 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4060
4061 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4062
4063 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4064
4065 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4066 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4067 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4068   echo $ECHO_N "(cached) $ECHO_C" >&6
4069 else
4070   ac_cv_install_d_creates_dirs=no
4071      rm -rf conftestdir
4072      if mkdir conftestdir; then
4073        cd conftestdir 2>/dev/null
4074        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4075        if test -d dir1/dir2/. ; then
4076          ac_cv_install_d_creates_dirs=yes
4077        fi
4078        cd .. 2>/dev/null
4079        rm -rf conftestdir
4080      fi
4081
4082 fi
4083 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4084 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4085
4086   if test "$ac_cv_install_d_creates_dirs" = no ; then
4087     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4088 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4089 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4090   echo $ECHO_N "(cached) $ECHO_C" >&6
4091 else
4092   ac_cv_mkdir_p_creates_dirs=no
4093        rm -rf conftestdir
4094        if mkdir conftestdir; then
4095          cd conftestdir 2>/dev/null
4096          mkdir -p dir1/dir2 >/dev/null 2>&1
4097          if test -d dir1/dir2/. ; then
4098            ac_cv_mkdir_p_creates_dirs=yes
4099          fi
4100          cd .. 2>/dev/null
4101          rm -rf conftestdir
4102        fi
4103
4104 fi
4105 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4106 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4107   fi
4108
4109   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4110     INSTALL_DIRS='${INSTALL} -d'
4111   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4112     INSTALL_DIRS='mkdir -p'
4113   else
4114     # any other ideas?
4115     INSTALL_DIRS='${INSTALL} -d'
4116   fi
4117
4118 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4119 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4120 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4121 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4122   echo $ECHO_N "(cached) $ECHO_C" >&6
4123 else
4124   cat >conftest.make <<\_ACEOF
4125 SHELL = /bin/sh
4126 all:
4127         @echo '@@@%%%=$(MAKE)=@@@%%%'
4128 _ACEOF
4129 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4130 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4131   *@@@%%%=?*=@@@%%%*)
4132     eval ac_cv_prog_make_${ac_make}_set=yes;;
4133   *)
4134     eval ac_cv_prog_make_${ac_make}_set=no;;
4135 esac
4136 rm -rf conftest.make
4137 fi
4138 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4139   { echo "$as_me:$LINENO: result: yes" >&5
4140 echo "${ECHO_T}yes" >&6; }
4141   SET_MAKE=
4142 else
4143   { echo "$as_me:$LINENO: result: no" >&5
4144 echo "${ECHO_T}no" >&6; }
4145   SET_MAKE="MAKE=${MAKE-make}"
4146 fi
4147
4148
4149 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4150 # That's wrong: it should be set to '${INSTALL}', so that one can
4151 # implement the "install-strip" target properly (strip executables,
4152 # but do not try to strip scripts.)
4153 #
4154 INSTALL_SCRIPT='${INSTALL}'
4155
4156 # random libc stuff
4157
4158 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4159 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4160 if test "${ac_cv_path_GREP+set}" = set; then
4161   echo $ECHO_N "(cached) $ECHO_C" >&6
4162 else
4163   # Extract the first word of "grep ggrep" to use in msg output
4164 if test -z "$GREP"; then
4165 set dummy grep ggrep; ac_prog_name=$2
4166 if test "${ac_cv_path_GREP+set}" = set; then
4167   echo $ECHO_N "(cached) $ECHO_C" >&6
4168 else
4169   ac_path_GREP_found=false
4170 # Loop through the user's path and test for each of PROGNAME-LIST
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4173 do
4174   IFS=$as_save_IFS
4175   test -z "$as_dir" && as_dir=.
4176   for ac_prog in grep ggrep; do
4177   for ac_exec_ext in '' $ac_executable_extensions; do
4178     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4179     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4180     # Check for GNU ac_path_GREP and select it if it is found.
4181   # Check for GNU $ac_path_GREP
4182 case `"$ac_path_GREP" --version 2>&1` in
4183 *GNU*)
4184   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4185 *)
4186   ac_count=0
4187   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4188   while :
4189   do
4190     cat "conftest.in" "conftest.in" >"conftest.tmp"
4191     mv "conftest.tmp" "conftest.in"
4192     cp "conftest.in" "conftest.nl"
4193     echo 'GREP' >> "conftest.nl"
4194     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4195     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4196     ac_count=`expr $ac_count + 1`
4197     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4198       # Best one so far, save it but keep looking for a better one
4199       ac_cv_path_GREP="$ac_path_GREP"
4200       ac_path_GREP_max=$ac_count
4201     fi
4202     # 10*(2^10) chars as input seems more than enough
4203     test $ac_count -gt 10 && break
4204   done
4205   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4206 esac
4207
4208
4209     $ac_path_GREP_found && break 3
4210   done
4211 done
4212
4213 done
4214 IFS=$as_save_IFS
4215
4216
4217 fi
4218
4219 GREP="$ac_cv_path_GREP"
4220 if test -z "$GREP"; then
4221   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4222 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4223    { (exit 1); exit 1; }; }
4224 fi
4225
4226 else
4227   ac_cv_path_GREP=$GREP
4228 fi
4229
4230
4231 fi
4232 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4233 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4234  GREP="$ac_cv_path_GREP"
4235
4236
4237 { echo "$as_me:$LINENO: checking for egrep" >&5
4238 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4239 if test "${ac_cv_path_EGREP+set}" = set; then
4240   echo $ECHO_N "(cached) $ECHO_C" >&6
4241 else
4242   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4243    then ac_cv_path_EGREP="$GREP -E"
4244    else
4245      # Extract the first word of "egrep" to use in msg output
4246 if test -z "$EGREP"; then
4247 set dummy egrep; ac_prog_name=$2
4248 if test "${ac_cv_path_EGREP+set}" = set; then
4249   echo $ECHO_N "(cached) $ECHO_C" >&6
4250 else
4251   ac_path_EGREP_found=false
4252 # Loop through the user's path and test for each of PROGNAME-LIST
4253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4255 do
4256   IFS=$as_save_IFS
4257   test -z "$as_dir" && as_dir=.
4258   for ac_prog in egrep; do
4259   for ac_exec_ext in '' $ac_executable_extensions; do
4260     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4261     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4262     # Check for GNU ac_path_EGREP and select it if it is found.
4263   # Check for GNU $ac_path_EGREP
4264 case `"$ac_path_EGREP" --version 2>&1` in
4265 *GNU*)
4266   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4267 *)
4268   ac_count=0
4269   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4270   while :
4271   do
4272     cat "conftest.in" "conftest.in" >"conftest.tmp"
4273     mv "conftest.tmp" "conftest.in"
4274     cp "conftest.in" "conftest.nl"
4275     echo 'EGREP' >> "conftest.nl"
4276     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4277     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4278     ac_count=`expr $ac_count + 1`
4279     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4280       # Best one so far, save it but keep looking for a better one
4281       ac_cv_path_EGREP="$ac_path_EGREP"
4282       ac_path_EGREP_max=$ac_count
4283     fi
4284     # 10*(2^10) chars as input seems more than enough
4285     test $ac_count -gt 10 && break
4286   done
4287   rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
4288 esac
4289
4290
4291     $ac_path_EGREP_found && break 3
4292   done
4293 done
4294
4295 done
4296 IFS=$as_save_IFS
4297
4298
4299 fi
4300
4301 EGREP="$ac_cv_path_EGREP"
4302 if test -z "$EGREP"; then
4303   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4304 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4305    { (exit 1); exit 1; }; }
4306 fi
4307
4308 else
4309   ac_cv_path_EGREP=$EGREP
4310 fi
4311
4312
4313    fi
4314 fi
4315 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4316 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4317  EGREP="$ac_cv_path_EGREP"
4318
4319
4320 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4321 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4322 if test "${ac_cv_header_stdc+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325   cat >conftest.$ac_ext <<_ACEOF
4326 /* confdefs.h.  */
4327 _ACEOF
4328 cat confdefs.h >>conftest.$ac_ext
4329 cat >>conftest.$ac_ext <<_ACEOF
4330 /* end confdefs.h.  */
4331 #include <stdlib.h>
4332 #include <stdarg.h>
4333 #include <string.h>
4334 #include <float.h>
4335
4336 int
4337 main ()
4338 {
4339
4340   ;
4341   return 0;
4342 }
4343 _ACEOF
4344 rm -rf conftest.$ac_objext
4345 if { (ac_try="$ac_compile"
4346 case "(($ac_try" in
4347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4348   *) ac_try_echo=$ac_try;;
4349 esac
4350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4351   (eval "$ac_compile") 2>conftest.er1
4352   ac_status=$?
4353   grep -v '^ *+' conftest.er1 >conftest.err
4354   rm -rf conftest.er1
4355   cat conftest.err >&5
4356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357   (exit $ac_status); } && {
4358          test -z "$ac_c_werror_flag" ||
4359          test ! -s conftest.err
4360        } && test -s conftest.$ac_objext; then
4361   ac_cv_header_stdc=yes
4362 else
4363   echo "$as_me: failed program was:" >&5
4364 sed 's/^/| /' conftest.$ac_ext >&5
4365
4366         ac_cv_header_stdc=no
4367 fi
4368
4369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4370
4371 if test $ac_cv_header_stdc = yes; then
4372   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4373   cat >conftest.$ac_ext <<_ACEOF
4374 /* confdefs.h.  */
4375 _ACEOF
4376 cat confdefs.h >>conftest.$ac_ext
4377 cat >>conftest.$ac_ext <<_ACEOF
4378 /* end confdefs.h.  */
4379 #include <string.h>
4380
4381 _ACEOF
4382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4383   $EGREP "memchr" >/dev/null 2>&1; then
4384   :
4385 else
4386   ac_cv_header_stdc=no
4387 fi
4388 rm -rf conftest*
4389
4390 fi
4391
4392 if test $ac_cv_header_stdc = yes; then
4393   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4394   cat >conftest.$ac_ext <<_ACEOF
4395 /* confdefs.h.  */
4396 _ACEOF
4397 cat confdefs.h >>conftest.$ac_ext
4398 cat >>conftest.$ac_ext <<_ACEOF
4399 /* end confdefs.h.  */
4400 #include <stdlib.h>
4401
4402 _ACEOF
4403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4404   $EGREP "free" >/dev/null 2>&1; then
4405   :
4406 else
4407   ac_cv_header_stdc=no
4408 fi
4409 rm -rf conftest*
4410
4411 fi
4412
4413 if test $ac_cv_header_stdc = yes; then
4414   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4415   if test "$cross_compiling" = yes; then
4416   :
4417 else
4418   cat >conftest.$ac_ext <<_ACEOF
4419 /* confdefs.h.  */
4420 _ACEOF
4421 cat confdefs.h >>conftest.$ac_ext
4422 cat >>conftest.$ac_ext <<_ACEOF
4423 /* end confdefs.h.  */
4424 #include <ctype.h>
4425 #include <stdlib.h>
4426 #if ((' ' & 0x0FF) == 0x020)
4427 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4428 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4429 #else
4430 # define ISLOWER(c) \
4431                    (('a' <= (c) && (c) <= 'i') \
4432                      || ('j' <= (c) && (c) <= 'r') \
4433                      || ('s' <= (c) && (c) <= 'z'))
4434 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4435 #endif
4436
4437 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4438 int
4439 main ()
4440 {
4441   int i;
4442   for (i = 0; i < 256; i++)
4443     if (XOR (islower (i), ISLOWER (i))
4444         || toupper (i) != TOUPPER (i))
4445       return 2;
4446   return 0;
4447 }
4448 _ACEOF
4449 rm -rf conftest$ac_exeext
4450 if { (ac_try="$ac_link"
4451 case "(($ac_try" in
4452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4453   *) ac_try_echo=$ac_try;;
4454 esac
4455 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4456   (eval "$ac_link") 2>&5
4457   ac_status=$?
4458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4460   { (case "(($ac_try" in
4461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4462   *) ac_try_echo=$ac_try;;
4463 esac
4464 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4465   (eval "$ac_try") 2>&5
4466   ac_status=$?
4467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4468   (exit $ac_status); }; }; then
4469   :
4470 else
4471   echo "$as_me: program exited with status $ac_status" >&5
4472 echo "$as_me: failed program was:" >&5
4473 sed 's/^/| /' conftest.$ac_ext >&5
4474
4475 ( exit $ac_status )
4476 ac_cv_header_stdc=no
4477 fi
4478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4479 fi
4480
4481
4482 fi
4483 fi
4484 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4485 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4486 if test $ac_cv_header_stdc = yes; then
4487
4488 cat >>confdefs.h <<\_ACEOF
4489 #define STDC_HEADERS 1
4490 _ACEOF
4491
4492 fi
4493
4494 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4505                   inttypes.h stdint.h unistd.h
4506 do
4507 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4508 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4509 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4510 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4511   echo $ECHO_N "(cached) $ECHO_C" >&6
4512 else
4513   cat >conftest.$ac_ext <<_ACEOF
4514 /* confdefs.h.  */
4515 _ACEOF
4516 cat confdefs.h >>conftest.$ac_ext
4517 cat >>conftest.$ac_ext <<_ACEOF
4518 /* end confdefs.h.  */
4519 $ac_includes_default
4520
4521 #include <$ac_header>
4522 _ACEOF
4523 rm -rf conftest.$ac_objext
4524 if { (ac_try="$ac_compile"
4525 case "(($ac_try" in
4526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4527   *) ac_try_echo=$ac_try;;
4528 esac
4529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4530   (eval "$ac_compile") 2>conftest.er1
4531   ac_status=$?
4532   grep -v '^ *+' conftest.er1 >conftest.err
4533   rm -rf conftest.er1
4534   cat conftest.err >&5
4535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536   (exit $ac_status); } && {
4537          test -z "$ac_c_werror_flag" ||
4538          test ! -s conftest.err
4539        } && test -s conftest.$ac_objext; then
4540   eval "$as_ac_Header=yes"
4541 else
4542   echo "$as_me: failed program was:" >&5
4543 sed 's/^/| /' conftest.$ac_ext >&5
4544
4545         eval "$as_ac_Header=no"
4546 fi
4547
4548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4549 fi
4550 ac_res=`eval echo '${'$as_ac_Header'}'`
4551                { echo "$as_me:$LINENO: result: $ac_res" >&5
4552 echo "${ECHO_T}$ac_res" >&6; }
4553 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4554   cat >>confdefs.h <<_ACEOF
4555 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4556 _ACEOF
4557
4558 fi
4559
4560 done
4561
4562
4563
4564 for ac_header in unistd.h
4565 do
4566 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4567 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4568   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4569 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4570 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4571   echo $ECHO_N "(cached) $ECHO_C" >&6
4572 fi
4573 ac_res=`eval echo '${'$as_ac_Header'}'`
4574                { echo "$as_me:$LINENO: result: $ac_res" >&5
4575 echo "${ECHO_T}$ac_res" >&6; }
4576 else
4577   # Is the header compilable?
4578 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4579 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4580 cat >conftest.$ac_ext <<_ACEOF
4581 /* confdefs.h.  */
4582 _ACEOF
4583 cat confdefs.h >>conftest.$ac_ext
4584 cat >>conftest.$ac_ext <<_ACEOF
4585 /* end confdefs.h.  */
4586 $ac_includes_default
4587 #include <$ac_header>
4588 _ACEOF
4589 rm -rf conftest.$ac_objext
4590 if { (ac_try="$ac_compile"
4591 case "(($ac_try" in
4592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4593   *) ac_try_echo=$ac_try;;
4594 esac
4595 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4596   (eval "$ac_compile") 2>conftest.er1
4597   ac_status=$?
4598   grep -v '^ *+' conftest.er1 >conftest.err
4599   rm -rf conftest.er1
4600   cat conftest.err >&5
4601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602   (exit $ac_status); } && {
4603          test -z "$ac_c_werror_flag" ||
4604          test ! -s conftest.err
4605        } && test -s conftest.$ac_objext; then
4606   ac_header_compiler=yes
4607 else
4608   echo "$as_me: failed program was:" >&5
4609 sed 's/^/| /' conftest.$ac_ext >&5
4610
4611         ac_header_compiler=no
4612 fi
4613
4614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4616 echo "${ECHO_T}$ac_header_compiler" >&6; }
4617
4618 # Is the header present?
4619 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4620 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4621 cat >conftest.$ac_ext <<_ACEOF
4622 /* confdefs.h.  */
4623 _ACEOF
4624 cat confdefs.h >>conftest.$ac_ext
4625 cat >>conftest.$ac_ext <<_ACEOF
4626 /* end confdefs.h.  */
4627 #include <$ac_header>
4628 _ACEOF
4629 if { (ac_try="$ac_cpp conftest.$ac_ext"
4630 case "(($ac_try" in
4631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4632   *) ac_try_echo=$ac_try;;
4633 esac
4634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4635   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4636   ac_status=$?
4637   grep -v '^ *+' conftest.er1 >conftest.err
4638   rm -rf conftest.er1
4639   cat conftest.err >&5
4640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641   (exit $ac_status); } >/dev/null && {
4642          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4643          test ! -s conftest.err
4644        }; then
4645   ac_header_preproc=yes
4646 else
4647   echo "$as_me: failed program was:" >&5
4648 sed 's/^/| /' conftest.$ac_ext >&5
4649
4650   ac_header_preproc=no
4651 fi
4652
4653 rm -rf conftest.err conftest.$ac_ext
4654 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4655 echo "${ECHO_T}$ac_header_preproc" >&6; }
4656
4657 # So?  What about this header?
4658 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4659   yes:no: )
4660     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4661 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4662     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4663 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4664     ac_header_preproc=yes
4665     ;;
4666   no:yes:* )
4667     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4668 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4669     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4670 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4671     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4672 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4673     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4674 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4675     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4676 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4677     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4678 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4679
4680     ;;
4681 esac
4682 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4683 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4684 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   eval "$as_ac_Header=\$ac_header_preproc"
4688 fi
4689 ac_res=`eval echo '${'$as_ac_Header'}'`
4690                { echo "$as_me:$LINENO: result: $ac_res" >&5
4691 echo "${ECHO_T}$ac_res" >&6; }
4692
4693 fi
4694 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4695   cat >>confdefs.h <<_ACEOF
4696 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4697 _ACEOF
4698
4699 fi
4700
4701 done
4702
4703 { echo "$as_me:$LINENO: checking for mode_t" >&5
4704 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4705 if test "${ac_cv_type_mode_t+set}" = set; then
4706   echo $ECHO_N "(cached) $ECHO_C" >&6
4707 else
4708   cat >conftest.$ac_ext <<_ACEOF
4709 /* confdefs.h.  */
4710 _ACEOF
4711 cat confdefs.h >>conftest.$ac_ext
4712 cat >>conftest.$ac_ext <<_ACEOF
4713 /* end confdefs.h.  */
4714 $ac_includes_default
4715 typedef mode_t ac__type_new_;
4716 int
4717 main ()
4718 {
4719 if ((ac__type_new_ *) 0)
4720   return 0;
4721 if (sizeof (ac__type_new_))
4722   return 0;
4723   ;
4724   return 0;
4725 }
4726 _ACEOF
4727 rm -rf conftest.$ac_objext
4728 if { (ac_try="$ac_compile"
4729 case "(($ac_try" in
4730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4731   *) ac_try_echo=$ac_try;;
4732 esac
4733 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4734   (eval "$ac_compile") 2>conftest.er1
4735   ac_status=$?
4736   grep -v '^ *+' conftest.er1 >conftest.err
4737   rm -rf conftest.er1
4738   cat conftest.err >&5
4739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740   (exit $ac_status); } && {
4741          test -z "$ac_c_werror_flag" ||
4742          test ! -s conftest.err
4743        } && test -s conftest.$ac_objext; then
4744   ac_cv_type_mode_t=yes
4745 else
4746   echo "$as_me: failed program was:" >&5
4747 sed 's/^/| /' conftest.$ac_ext >&5
4748
4749         ac_cv_type_mode_t=no
4750 fi
4751
4752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 fi
4754 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4755 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4756 if test $ac_cv_type_mode_t = yes; then
4757   :
4758 else
4759
4760 cat >>confdefs.h <<_ACEOF
4761 #define mode_t int
4762 _ACEOF
4763
4764 fi
4765
4766 { echo "$as_me:$LINENO: checking for pid_t" >&5
4767 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4768 if test "${ac_cv_type_pid_t+set}" = set; then
4769   echo $ECHO_N "(cached) $ECHO_C" >&6
4770 else
4771   cat >conftest.$ac_ext <<_ACEOF
4772 /* confdefs.h.  */
4773 _ACEOF
4774 cat confdefs.h >>conftest.$ac_ext
4775 cat >>conftest.$ac_ext <<_ACEOF
4776 /* end confdefs.h.  */
4777 $ac_includes_default
4778 typedef pid_t ac__type_new_;
4779 int
4780 main ()
4781 {
4782 if ((ac__type_new_ *) 0)
4783   return 0;
4784 if (sizeof (ac__type_new_))
4785   return 0;
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 rm -rf conftest.$ac_objext
4791 if { (ac_try="$ac_compile"
4792 case "(($ac_try" in
4793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794   *) ac_try_echo=$ac_try;;
4795 esac
4796 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4797   (eval "$ac_compile") 2>conftest.er1
4798   ac_status=$?
4799   grep -v '^ *+' conftest.er1 >conftest.err
4800   rm -rf conftest.er1
4801   cat conftest.err >&5
4802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); } && {
4804          test -z "$ac_c_werror_flag" ||
4805          test ! -s conftest.err
4806        } && test -s conftest.$ac_objext; then
4807   ac_cv_type_pid_t=yes
4808 else
4809   echo "$as_me: failed program was:" >&5
4810 sed 's/^/| /' conftest.$ac_ext >&5
4811
4812         ac_cv_type_pid_t=no
4813 fi
4814
4815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4816 fi
4817 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4818 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4819 if test $ac_cv_type_pid_t = yes; then
4820   :
4821 else
4822
4823 cat >>confdefs.h <<_ACEOF
4824 #define pid_t int
4825 _ACEOF
4826
4827 fi
4828
4829 { echo "$as_me:$LINENO: checking for size_t" >&5
4830 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4831 if test "${ac_cv_type_size_t+set}" = set; then
4832   echo $ECHO_N "(cached) $ECHO_C" >&6
4833 else
4834   cat >conftest.$ac_ext <<_ACEOF
4835 /* confdefs.h.  */
4836 _ACEOF
4837 cat confdefs.h >>conftest.$ac_ext
4838 cat >>conftest.$ac_ext <<_ACEOF
4839 /* end confdefs.h.  */
4840 $ac_includes_default
4841 typedef size_t ac__type_new_;
4842 int
4843 main ()
4844 {
4845 if ((ac__type_new_ *) 0)
4846   return 0;
4847 if (sizeof (ac__type_new_))
4848   return 0;
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -rf conftest.$ac_objext
4854 if { (ac_try="$ac_compile"
4855 case "(($ac_try" in
4856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4857   *) ac_try_echo=$ac_try;;
4858 esac
4859 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4860   (eval "$ac_compile") 2>conftest.er1
4861   ac_status=$?
4862   grep -v '^ *+' conftest.er1 >conftest.err
4863   rm -rf conftest.er1
4864   cat conftest.err >&5
4865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866   (exit $ac_status); } && {
4867          test -z "$ac_c_werror_flag" ||
4868          test ! -s conftest.err
4869        } && test -s conftest.$ac_objext; then
4870   ac_cv_type_size_t=yes
4871 else
4872   echo "$as_me: failed program was:" >&5
4873 sed 's/^/| /' conftest.$ac_ext >&5
4874
4875         ac_cv_type_size_t=no
4876 fi
4877
4878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4879 fi
4880 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4881 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4882 if test $ac_cv_type_size_t = yes; then
4883   :
4884 else
4885
4886 cat >>confdefs.h <<_ACEOF
4887 #define size_t unsigned int
4888 _ACEOF
4889
4890 fi
4891
4892 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4893 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4894 if test "${ac_cv_type_signal+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   cat >conftest.$ac_ext <<_ACEOF
4898 /* confdefs.h.  */
4899 _ACEOF
4900 cat confdefs.h >>conftest.$ac_ext
4901 cat >>conftest.$ac_ext <<_ACEOF
4902 /* end confdefs.h.  */
4903 #include <sys/types.h>
4904 #include <signal.h>
4905
4906 int
4907 main ()
4908 {
4909 return *(signal (0, 0)) (0) == 1;
4910   ;
4911   return 0;
4912 }
4913 _ACEOF
4914 rm -rf conftest.$ac_objext
4915 if { (ac_try="$ac_compile"
4916 case "(($ac_try" in
4917   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4918   *) ac_try_echo=$ac_try;;
4919 esac
4920 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4921   (eval "$ac_compile") 2>conftest.er1
4922   ac_status=$?
4923   grep -v '^ *+' conftest.er1 >conftest.err
4924   rm -rf conftest.er1
4925   cat conftest.err >&5
4926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927   (exit $ac_status); } && {
4928          test -z "$ac_c_werror_flag" ||
4929          test ! -s conftest.err
4930        } && test -s conftest.$ac_objext; then
4931   ac_cv_type_signal=int
4932 else
4933   echo "$as_me: failed program was:" >&5
4934 sed 's/^/| /' conftest.$ac_ext >&5
4935
4936         ac_cv_type_signal=void
4937 fi
4938
4939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 fi
4941 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4942 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4943
4944 cat >>confdefs.h <<_ACEOF
4945 #define RETSIGTYPE $ac_cv_type_signal
4946 _ACEOF
4947
4948
4949 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4950 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4951 if test "${ac_cv_header_time+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   cat >conftest.$ac_ext <<_ACEOF
4955 /* confdefs.h.  */
4956 _ACEOF
4957 cat confdefs.h >>conftest.$ac_ext
4958 cat >>conftest.$ac_ext <<_ACEOF
4959 /* end confdefs.h.  */
4960 #include <sys/types.h>
4961 #include <sys/time.h>
4962 #include <time.h>
4963
4964 int
4965 main ()
4966 {
4967 if ((struct tm *) 0)
4968 return 0;
4969   ;
4970   return 0;
4971 }
4972 _ACEOF
4973 rm -rf conftest.$ac_objext
4974 if { (ac_try="$ac_compile"
4975 case "(($ac_try" in
4976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4977   *) ac_try_echo=$ac_try;;
4978 esac
4979 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4980   (eval "$ac_compile") 2>conftest.er1
4981   ac_status=$?
4982   grep -v '^ *+' conftest.er1 >conftest.err
4983   rm -rf conftest.er1
4984   cat conftest.err >&5
4985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986   (exit $ac_status); } && {
4987          test -z "$ac_c_werror_flag" ||
4988          test ! -s conftest.err
4989        } && test -s conftest.$ac_objext; then
4990   ac_cv_header_time=yes
4991 else
4992   echo "$as_me: failed program was:" >&5
4993 sed 's/^/| /' conftest.$ac_ext >&5
4994
4995         ac_cv_header_time=no
4996 fi
4997
4998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4999 fi
5000 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5001 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5002 if test $ac_cv_header_time = yes; then
5003
5004 cat >>confdefs.h <<\_ACEOF
5005 #define TIME_WITH_SYS_TIME 1
5006 _ACEOF
5007
5008 fi
5009
5010 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5011 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5012 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5013   echo $ECHO_N "(cached) $ECHO_C" >&6
5014 else
5015   cat >conftest.$ac_ext <<_ACEOF
5016 /* confdefs.h.  */
5017 _ACEOF
5018 cat confdefs.h >>conftest.$ac_ext
5019 cat >>conftest.$ac_ext <<_ACEOF
5020 /* end confdefs.h.  */
5021 #include <sys/types.h>
5022 #include <sys/wait.h>
5023 #ifndef WEXITSTATUS
5024 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5025 #endif
5026 #ifndef WIFEXITED
5027 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5028 #endif
5029
5030 int
5031 main ()
5032 {
5033   int s;
5034   wait (&s);
5035   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5036   ;
5037   return 0;
5038 }
5039 _ACEOF
5040 rm -rf conftest.$ac_objext
5041 if { (ac_try="$ac_compile"
5042 case "(($ac_try" in
5043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5044   *) ac_try_echo=$ac_try;;
5045 esac
5046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5047   (eval "$ac_compile") 2>conftest.er1
5048   ac_status=$?
5049   grep -v '^ *+' conftest.er1 >conftest.err
5050   rm -rf conftest.er1
5051   cat conftest.err >&5
5052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053   (exit $ac_status); } && {
5054          test -z "$ac_c_werror_flag" ||
5055          test ! -s conftest.err
5056        } && test -s conftest.$ac_objext; then
5057   ac_cv_header_sys_wait_h=yes
5058 else
5059   echo "$as_me: failed program was:" >&5
5060 sed 's/^/| /' conftest.$ac_ext >&5
5061
5062         ac_cv_header_sys_wait_h=no
5063 fi
5064
5065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5066 fi
5067 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5068 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5069 if test $ac_cv_header_sys_wait_h = yes; then
5070
5071 cat >>confdefs.h <<\_ACEOF
5072 #define HAVE_SYS_WAIT_H 1
5073 _ACEOF
5074
5075 fi
5076
5077
5078
5079
5080
5081
5082 ac_header_dirent=no
5083 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5084   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5085 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5086 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5087 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   cat >conftest.$ac_ext <<_ACEOF
5091 /* confdefs.h.  */
5092 _ACEOF
5093 cat confdefs.h >>conftest.$ac_ext
5094 cat >>conftest.$ac_ext <<_ACEOF
5095 /* end confdefs.h.  */
5096 #include <sys/types.h>
5097 #include <$ac_hdr>
5098
5099 int
5100 main ()
5101 {
5102 if ((DIR *) 0)
5103 return 0;
5104   ;
5105   return 0;
5106 }
5107 _ACEOF
5108 rm -rf conftest.$ac_objext
5109 if { (ac_try="$ac_compile"
5110 case "(($ac_try" in
5111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5112   *) ac_try_echo=$ac_try;;
5113 esac
5114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5115   (eval "$ac_compile") 2>conftest.er1
5116   ac_status=$?
5117   grep -v '^ *+' conftest.er1 >conftest.err
5118   rm -rf conftest.er1
5119   cat conftest.err >&5
5120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121   (exit $ac_status); } && {
5122          test -z "$ac_c_werror_flag" ||
5123          test ! -s conftest.err
5124        } && test -s conftest.$ac_objext; then
5125   eval "$as_ac_Header=yes"
5126 else
5127   echo "$as_me: failed program was:" >&5
5128 sed 's/^/| /' conftest.$ac_ext >&5
5129
5130         eval "$as_ac_Header=no"
5131 fi
5132
5133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5134 fi
5135 ac_res=`eval echo '${'$as_ac_Header'}'`
5136                { echo "$as_me:$LINENO: result: $ac_res" >&5
5137 echo "${ECHO_T}$ac_res" >&6; }
5138 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5139   cat >>confdefs.h <<_ACEOF
5140 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5141 _ACEOF
5142
5143 ac_header_dirent=$ac_hdr; break
5144 fi
5145
5146 done
5147 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5148 if test $ac_header_dirent = dirent.h; then
5149   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5150 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5151 if test "${ac_cv_search_opendir+set}" = set; then
5152   echo $ECHO_N "(cached) $ECHO_C" >&6
5153 else
5154   ac_func_search_save_LIBS=$LIBS
5155 cat >conftest.$ac_ext <<_ACEOF
5156 /* confdefs.h.  */
5157 _ACEOF
5158 cat confdefs.h >>conftest.$ac_ext
5159 cat >>conftest.$ac_ext <<_ACEOF
5160 /* end confdefs.h.  */
5161
5162 /* Override any GCC internal prototype to avoid an error.
5163    Use char because int might match the return type of a GCC
5164    builtin and then its argument prototype would still apply.  */
5165 #ifdef __cplusplus
5166 extern "C"
5167 #endif
5168 char opendir ();
5169 int
5170 main ()
5171 {
5172 return opendir ();
5173   ;
5174   return 0;
5175 }
5176 _ACEOF
5177 for ac_lib in '' dir; do
5178   if test -z "$ac_lib"; then
5179     ac_res="none required"
5180   else
5181     ac_res=-l$ac_lib
5182     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5183   fi
5184   rm -rf conftest.$ac_objext conftest$ac_exeext
5185 if { (ac_try="$ac_link"
5186 case "(($ac_try" in
5187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5188   *) ac_try_echo=$ac_try;;
5189 esac
5190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5191   (eval "$ac_link") 2>conftest.er1
5192   ac_status=$?
5193   grep -v '^ *+' conftest.er1 >conftest.err
5194   rm -rf conftest.er1
5195   cat conftest.err >&5
5196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197   (exit $ac_status); } && {
5198          test -z "$ac_c_werror_flag" ||
5199          test ! -s conftest.err
5200        } && test -s conftest$ac_exeext &&
5201        $as_test_x conftest$ac_exeext; then
5202   ac_cv_search_opendir=$ac_res
5203 else
5204   echo "$as_me: failed program was:" >&5
5205 sed 's/^/| /' conftest.$ac_ext >&5
5206
5207
5208 fi
5209
5210 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5211       conftest$ac_exeext
5212   if test "${ac_cv_search_opendir+set}" = set; then
5213   break
5214 fi
5215 done
5216 if test "${ac_cv_search_opendir+set}" = set; then
5217   :
5218 else
5219   ac_cv_search_opendir=no
5220 fi
5221 rm conftest.$ac_ext
5222 LIBS=$ac_func_search_save_LIBS
5223 fi
5224 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5225 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5226 ac_res=$ac_cv_search_opendir
5227 if test "$ac_res" != no; then
5228   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5229
5230 fi
5231
5232 else
5233   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5234 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5235 if test "${ac_cv_search_opendir+set}" = set; then
5236   echo $ECHO_N "(cached) $ECHO_C" >&6
5237 else
5238   ac_func_search_save_LIBS=$LIBS
5239 cat >conftest.$ac_ext <<_ACEOF
5240 /* confdefs.h.  */
5241 _ACEOF
5242 cat confdefs.h >>conftest.$ac_ext
5243 cat >>conftest.$ac_ext <<_ACEOF
5244 /* end confdefs.h.  */
5245
5246 /* Override any GCC internal prototype to avoid an error.
5247    Use char because int might match the return type of a GCC
5248    builtin and then its argument prototype would still apply.  */
5249 #ifdef __cplusplus
5250 extern "C"
5251 #endif
5252 char opendir ();
5253 int
5254 main ()
5255 {
5256 return opendir ();
5257   ;
5258   return 0;
5259 }
5260 _ACEOF
5261 for ac_lib in '' x; do
5262   if test -z "$ac_lib"; then
5263     ac_res="none required"
5264   else
5265     ac_res=-l$ac_lib
5266     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5267   fi
5268   rm -rf conftest.$ac_objext conftest$ac_exeext
5269 if { (ac_try="$ac_link"
5270 case "(($ac_try" in
5271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5272   *) ac_try_echo=$ac_try;;
5273 esac
5274 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5275   (eval "$ac_link") 2>conftest.er1
5276   ac_status=$?
5277   grep -v '^ *+' conftest.er1 >conftest.err
5278   rm -rf conftest.er1
5279   cat conftest.err >&5
5280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281   (exit $ac_status); } && {
5282          test -z "$ac_c_werror_flag" ||
5283          test ! -s conftest.err
5284        } && test -s conftest$ac_exeext &&
5285        $as_test_x conftest$ac_exeext; then
5286   ac_cv_search_opendir=$ac_res
5287 else
5288   echo "$as_me: failed program was:" >&5
5289 sed 's/^/| /' conftest.$ac_ext >&5
5290
5291
5292 fi
5293
5294 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5295       conftest$ac_exeext
5296   if test "${ac_cv_search_opendir+set}" = set; then
5297   break
5298 fi
5299 done
5300 if test "${ac_cv_search_opendir+set}" = set; then
5301   :
5302 else
5303   ac_cv_search_opendir=no
5304 fi
5305 rm conftest.$ac_ext
5306 LIBS=$ac_func_search_save_LIBS
5307 fi
5308 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5309 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5310 ac_res=$ac_cv_search_opendir
5311 if test "$ac_res" != no; then
5312   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5313
5314 fi
5315
5316 fi
5317
5318 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5319 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5320   if test "${ac_cv_gettimeofday_args+set}" = set; then
5321   echo $ECHO_N "(cached) $ECHO_C" >&6
5322 else
5323   cat >conftest.$ac_ext <<_ACEOF
5324 /* confdefs.h.  */
5325 _ACEOF
5326 cat confdefs.h >>conftest.$ac_ext
5327 cat >>conftest.$ac_ext <<_ACEOF
5328 /* end confdefs.h.  */
5329 #include <stdlib.h>
5330                     #include <sys/time.h>
5331 int
5332 main ()
5333 {
5334 struct timeval tv; struct timezone tzp;
5335                     gettimeofday(&tv, &tzp);
5336   ;
5337   return 0;
5338 }
5339 _ACEOF
5340 rm -rf conftest.$ac_objext
5341 if { (ac_try="$ac_compile"
5342 case "(($ac_try" in
5343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5344   *) ac_try_echo=$ac_try;;
5345 esac
5346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5347   (eval "$ac_compile") 2>conftest.er1
5348   ac_status=$?
5349   grep -v '^ *+' conftest.er1 >conftest.err
5350   rm -rf conftest.er1
5351   cat conftest.err >&5
5352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353   (exit $ac_status); } && {
5354          test -z "$ac_c_werror_flag" ||
5355          test ! -s conftest.err
5356        } && test -s conftest.$ac_objext; then
5357   ac_gettimeofday_args=2
5358 else
5359   echo "$as_me: failed program was:" >&5
5360 sed 's/^/| /' conftest.$ac_ext >&5
5361
5362         cat >conftest.$ac_ext <<_ACEOF
5363 /* confdefs.h.  */
5364 _ACEOF
5365 cat confdefs.h >>conftest.$ac_ext
5366 cat >>conftest.$ac_ext <<_ACEOF
5367 /* end confdefs.h.  */
5368 #include <stdlib.h>
5369                                     #include <sys/time.h>
5370 int
5371 main ()
5372 {
5373 struct timeval tv; gettimeofday(&tv);
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 rm -rf conftest.$ac_objext
5379 if { (ac_try="$ac_compile"
5380 case "(($ac_try" in
5381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5382   *) ac_try_echo=$ac_try;;
5383 esac
5384 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5385   (eval "$ac_compile") 2>conftest.er1
5386   ac_status=$?
5387   grep -v '^ *+' conftest.er1 >conftest.err
5388   rm -rf conftest.er1
5389   cat conftest.err >&5
5390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5391   (exit $ac_status); } && {
5392          test -z "$ac_c_werror_flag" ||
5393          test ! -s conftest.err
5394        } && test -s conftest.$ac_objext; then
5395   ac_gettimeofday_args=1
5396 else
5397   echo "$as_me: failed program was:" >&5
5398 sed 's/^/| /' conftest.$ac_ext >&5
5399
5400         ac_gettimeofday_args=0
5401 fi
5402
5403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5404 fi
5405
5406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5408 fi
5409
5410   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5411   if test "$ac_gettimeofday_args" = 1 ; then
5412     cat >>confdefs.h <<\_ACEOF
5413 #define HAVE_GETTIMEOFDAY 1
5414 _ACEOF
5415
5416     { echo "$as_me:$LINENO: result: one argument" >&5
5417 echo "${ECHO_T}one argument" >&6; }
5418   elif test "$ac_gettimeofday_args" = 2 ; then
5419     cat >>confdefs.h <<\_ACEOF
5420 #define HAVE_GETTIMEOFDAY 1
5421 _ACEOF
5422
5423     cat >>confdefs.h <<\_ACEOF
5424 #define GETTIMEOFDAY_TWO_ARGS 1
5425 _ACEOF
5426
5427     { echo "$as_me:$LINENO: result: two arguments" >&5
5428 echo "${ECHO_T}two arguments" >&6; }
5429   else
5430     { echo "$as_me:$LINENO: result: unknown" >&5
5431 echo "${ECHO_T}unknown" >&6; }
5432   fi
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5444 do
5445 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5446 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5447 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5448 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5449   echo $ECHO_N "(cached) $ECHO_C" >&6
5450 else
5451   cat >conftest.$ac_ext <<_ACEOF
5452 /* confdefs.h.  */
5453 _ACEOF
5454 cat confdefs.h >>conftest.$ac_ext
5455 cat >>conftest.$ac_ext <<_ACEOF
5456 /* end confdefs.h.  */
5457 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5458    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5459 #define $ac_func innocuous_$ac_func
5460
5461 /* System header to define __stub macros and hopefully few prototypes,
5462     which can conflict with char $ac_func (); below.
5463     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5464     <limits.h> exists even on freestanding compilers.  */
5465
5466 #ifdef __STDC__
5467 # include <limits.h>
5468 #else
5469 # include <assert.h>
5470 #endif
5471
5472 #undef $ac_func
5473
5474 /* Override any GCC internal prototype to avoid an error.
5475    Use char because int might match the return type of a GCC
5476    builtin and then its argument prototype would still apply.  */
5477 #ifdef __cplusplus
5478 extern "C"
5479 #endif
5480 char $ac_func ();
5481 /* The GNU C library defines this for functions which it implements
5482     to always fail with ENOSYS.  Some functions are actually named
5483     something starting with __ and the normal name is an alias.  */
5484 #if defined __stub_$ac_func || defined __stub___$ac_func
5485 choke me
5486 #endif
5487
5488 int
5489 main ()
5490 {
5491 return $ac_func ();
5492   ;
5493   return 0;
5494 }
5495 _ACEOF
5496 rm -rf conftest.$ac_objext conftest$ac_exeext
5497 if { (ac_try="$ac_link"
5498 case "(($ac_try" in
5499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5500   *) ac_try_echo=$ac_try;;
5501 esac
5502 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5503   (eval "$ac_link") 2>conftest.er1
5504   ac_status=$?
5505   grep -v '^ *+' conftest.er1 >conftest.err
5506   rm -rf conftest.er1
5507   cat conftest.err >&5
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); } && {
5510          test -z "$ac_c_werror_flag" ||
5511          test ! -s conftest.err
5512        } && test -s conftest$ac_exeext &&
5513        $as_test_x conftest$ac_exeext; then
5514   eval "$as_ac_var=yes"
5515 else
5516   echo "$as_me: failed program was:" >&5
5517 sed 's/^/| /' conftest.$ac_ext >&5
5518
5519         eval "$as_ac_var=no"
5520 fi
5521
5522 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5523       conftest$ac_exeext conftest.$ac_ext
5524 fi
5525 ac_res=`eval echo '${'$as_ac_var'}'`
5526                { echo "$as_me:$LINENO: result: $ac_res" >&5
5527 echo "${ECHO_T}$ac_res" >&6; }
5528 if test `eval echo '${'$as_ac_var'}'` = yes; then
5529   cat >>confdefs.h <<_ACEOF
5530 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5531 _ACEOF
5532
5533 fi
5534 done
5535
5536
5537
5538
5539
5540 for ac_func in sigaction syslog realpath setrlimit
5541 do
5542 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5543 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5544 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5545 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5546   echo $ECHO_N "(cached) $ECHO_C" >&6
5547 else
5548   cat >conftest.$ac_ext <<_ACEOF
5549 /* confdefs.h.  */
5550 _ACEOF
5551 cat confdefs.h >>conftest.$ac_ext
5552 cat >>conftest.$ac_ext <<_ACEOF
5553 /* end confdefs.h.  */
5554 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5555    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5556 #define $ac_func innocuous_$ac_func
5557
5558 /* System header to define __stub macros and hopefully few prototypes,
5559     which can conflict with char $ac_func (); below.
5560     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5561     <limits.h> exists even on freestanding compilers.  */
5562
5563 #ifdef __STDC__
5564 # include <limits.h>
5565 #else
5566 # include <assert.h>
5567 #endif
5568
5569 #undef $ac_func
5570
5571 /* Override any GCC internal prototype to avoid an error.
5572    Use char because int might match the return type of a GCC
5573    builtin and then its argument prototype would still apply.  */
5574 #ifdef __cplusplus
5575 extern "C"
5576 #endif
5577 char $ac_func ();
5578 /* The GNU C library defines this for functions which it implements
5579     to always fail with ENOSYS.  Some functions are actually named
5580     something starting with __ and the normal name is an alias.  */
5581 #if defined __stub_$ac_func || defined __stub___$ac_func
5582 choke me
5583 #endif
5584
5585 int
5586 main ()
5587 {
5588 return $ac_func ();
5589   ;
5590   return 0;
5591 }
5592 _ACEOF
5593 rm -rf conftest.$ac_objext conftest$ac_exeext
5594 if { (ac_try="$ac_link"
5595 case "(($ac_try" in
5596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5597   *) ac_try_echo=$ac_try;;
5598 esac
5599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5600   (eval "$ac_link") 2>conftest.er1
5601   ac_status=$?
5602   grep -v '^ *+' conftest.er1 >conftest.err
5603   rm -rf conftest.er1
5604   cat conftest.err >&5
5605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606   (exit $ac_status); } && {
5607          test -z "$ac_c_werror_flag" ||
5608          test ! -s conftest.err
5609        } && test -s conftest$ac_exeext &&
5610        $as_test_x conftest$ac_exeext; then
5611   eval "$as_ac_var=yes"
5612 else
5613   echo "$as_me: failed program was:" >&5
5614 sed 's/^/| /' conftest.$ac_ext >&5
5615
5616         eval "$as_ac_var=no"
5617 fi
5618
5619 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5620       conftest$ac_exeext conftest.$ac_ext
5621 fi
5622 ac_res=`eval echo '${'$as_ac_var'}'`
5623                { echo "$as_me:$LINENO: result: $ac_res" >&5
5624 echo "${ECHO_T}$ac_res" >&6; }
5625 if test `eval echo '${'$as_ac_var'}'` = yes; then
5626   cat >>confdefs.h <<_ACEOF
5627 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5628 _ACEOF
5629
5630 fi
5631 done
5632
5633
5634 for ac_func in setlocale
5635 do
5636 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5637 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5638 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5639 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5640   echo $ECHO_N "(cached) $ECHO_C" >&6
5641 else
5642   cat >conftest.$ac_ext <<_ACEOF
5643 /* confdefs.h.  */
5644 _ACEOF
5645 cat confdefs.h >>conftest.$ac_ext
5646 cat >>conftest.$ac_ext <<_ACEOF
5647 /* end confdefs.h.  */
5648 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5649    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5650 #define $ac_func innocuous_$ac_func
5651
5652 /* System header to define __stub macros and hopefully few prototypes,
5653     which can conflict with char $ac_func (); below.
5654     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5655     <limits.h> exists even on freestanding compilers.  */
5656
5657 #ifdef __STDC__
5658 # include <limits.h>
5659 #else
5660 # include <assert.h>
5661 #endif
5662
5663 #undef $ac_func
5664
5665 /* Override any GCC internal prototype to avoid an error.
5666    Use char because int might match the return type of a GCC
5667    builtin and then its argument prototype would still apply.  */
5668 #ifdef __cplusplus
5669 extern "C"
5670 #endif
5671 char $ac_func ();
5672 /* The GNU C library defines this for functions which it implements
5673     to always fail with ENOSYS.  Some functions are actually named
5674     something starting with __ and the normal name is an alias.  */
5675 #if defined __stub_$ac_func || defined __stub___$ac_func
5676 choke me
5677 #endif
5678
5679 int
5680 main ()
5681 {
5682 return $ac_func ();
5683   ;
5684   return 0;
5685 }
5686 _ACEOF
5687 rm -rf conftest.$ac_objext conftest$ac_exeext
5688 if { (ac_try="$ac_link"
5689 case "(($ac_try" in
5690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5691   *) ac_try_echo=$ac_try;;
5692 esac
5693 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5694   (eval "$ac_link") 2>conftest.er1
5695   ac_status=$?
5696   grep -v '^ *+' conftest.er1 >conftest.err
5697   rm -rf conftest.er1
5698   cat conftest.err >&5
5699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700   (exit $ac_status); } && {
5701          test -z "$ac_c_werror_flag" ||
5702          test ! -s conftest.err
5703        } && test -s conftest$ac_exeext &&
5704        $as_test_x conftest$ac_exeext; then
5705   eval "$as_ac_var=yes"
5706 else
5707   echo "$as_me: failed program was:" >&5
5708 sed 's/^/| /' conftest.$ac_ext >&5
5709
5710         eval "$as_ac_var=no"
5711 fi
5712
5713 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5714       conftest$ac_exeext conftest.$ac_ext
5715 fi
5716 ac_res=`eval echo '${'$as_ac_var'}'`
5717                { echo "$as_me:$LINENO: result: $ac_res" >&5
5718 echo "${ECHO_T}$ac_res" >&6; }
5719 if test `eval echo '${'$as_ac_var'}'` = yes; then
5720   cat >>confdefs.h <<_ACEOF
5721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5722 _ACEOF
5723
5724 fi
5725 done
5726
5727 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5728 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5729 if test "${ac_cv_have_icmp+set}" = set; then
5730   echo $ECHO_N "(cached) $ECHO_C" >&6
5731 else
5732   cat >conftest.$ac_ext <<_ACEOF
5733 /* confdefs.h.  */
5734 _ACEOF
5735 cat confdefs.h >>conftest.$ac_ext
5736 cat >>conftest.$ac_ext <<_ACEOF
5737 /* end confdefs.h.  */
5738 #include <stdlib.h>
5739                    #include <stdio.h>
5740                    #include <math.h>
5741                    #include <unistd.h>
5742                    #include <limits.h>
5743                    #include <signal.h>
5744                    #include <fcntl.h>
5745                    #include <sys/types.h>
5746                    #include <sys/time.h>
5747                    #include <sys/ipc.h>
5748                    #include <sys/shm.h>
5749                    #include <sys/socket.h>
5750                    #include <netinet/in_systm.h>
5751                    #include <netinet/in.h>
5752                    #include <netinet/ip.h>
5753                    #include <netinet/ip_icmp.h>
5754                    #include <netinet/udp.h>
5755                    #include <arpa/inet.h>
5756                    #include <netdb.h>
5757 int
5758 main ()
5759 {
5760 struct icmp i;
5761                    struct sockaddr s;
5762                    struct sockaddr_in si;
5763                    struct ip ip;
5764                    i.icmp_type = ICMP_ECHO;
5765                    i.icmp_code = 0;
5766                    i.icmp_cksum = 0;
5767                    i.icmp_id = 0;
5768                    i.icmp_seq = 0;
5769                    si.sin_family = AF_INET;
5770                    #if defined(__DECC) || defined(_IP_VHL)
5771                    ip.ip_vhl = 0;
5772                    #else
5773                    ip.ip_hl = 0;
5774                    #endif
5775
5776   ;
5777   return 0;
5778 }
5779 _ACEOF
5780 rm -rf conftest.$ac_objext
5781 if { (ac_try="$ac_compile"
5782 case "(($ac_try" in
5783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5784   *) ac_try_echo=$ac_try;;
5785 esac
5786 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5787   (eval "$ac_compile") 2>conftest.er1
5788   ac_status=$?
5789   grep -v '^ *+' conftest.er1 >conftest.err
5790   rm -rf conftest.er1
5791   cat conftest.err >&5
5792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5793   (exit $ac_status); } && {
5794          test -z "$ac_c_werror_flag" ||
5795          test ! -s conftest.err
5796        } && test -s conftest.$ac_objext; then
5797   ac_cv_have_icmp=yes
5798 else
5799   echo "$as_me: failed program was:" >&5
5800 sed 's/^/| /' conftest.$ac_ext >&5
5801
5802         ac_cv_have_icmp=no
5803 fi
5804
5805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5806 fi
5807 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5808 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5809  if test "$ac_cv_have_icmp" = yes ; then
5810    cat >>confdefs.h <<\_ACEOF
5811 #define HAVE_ICMP 1
5812 _ACEOF
5813
5814  fi
5815 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5816 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5817 if test "${ac_cv_have_icmphdr+set}" = set; then
5818   echo $ECHO_N "(cached) $ECHO_C" >&6
5819 else
5820   cat >conftest.$ac_ext <<_ACEOF
5821 /* confdefs.h.  */
5822 _ACEOF
5823 cat confdefs.h >>conftest.$ac_ext
5824 cat >>conftest.$ac_ext <<_ACEOF
5825 /* end confdefs.h.  */
5826 #include <stdlib.h>
5827                    #include <stdio.h>
5828                    #include <math.h>
5829                    #include <unistd.h>
5830                    #include <limits.h>
5831                    #include <signal.h>
5832                    #include <fcntl.h>
5833                    #include <sys/types.h>
5834                    #include <sys/time.h>
5835                    #include <sys/ipc.h>
5836                    #include <sys/shm.h>
5837                    #include <sys/socket.h>
5838                    #include <netinet/in_systm.h>
5839                    #include <netinet/in.h>
5840                    #include <netinet/ip.h>
5841                    #include <netinet/ip_icmp.h>
5842                    #include <netinet/udp.h>
5843                    #include <arpa/inet.h>
5844                    #include <netdb.h>
5845 int
5846 main ()
5847 {
5848 struct icmphdr i;
5849                    struct sockaddr s;
5850                    struct sockaddr_in si;
5851                    struct ip ip;
5852                    i.type = ICMP_ECHO;
5853                    i.code = 0;
5854                    i.checksum = 0;
5855                    i.un.echo.id = 0;
5856                    i.un.echo.sequence = 0;
5857                    si.sin_family = AF_INET;
5858                    ip.ip_hl = 0;
5859   ;
5860   return 0;
5861 }
5862 _ACEOF
5863 rm -rf conftest.$ac_objext
5864 if { (ac_try="$ac_compile"
5865 case "(($ac_try" in
5866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5867   *) ac_try_echo=$ac_try;;
5868 esac
5869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5870   (eval "$ac_compile") 2>conftest.er1
5871   ac_status=$?
5872   grep -v '^ *+' conftest.er1 >conftest.err
5873   rm -rf conftest.er1
5874   cat conftest.err >&5
5875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876   (exit $ac_status); } && {
5877          test -z "$ac_c_werror_flag" ||
5878          test ! -s conftest.err
5879        } && test -s conftest.$ac_objext; then
5880   ac_cv_have_icmphdr=yes
5881 else
5882   echo "$as_me: failed program was:" >&5
5883 sed 's/^/| /' conftest.$ac_ext >&5
5884
5885         ac_cv_have_icmphdr=no
5886 fi
5887
5888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5889 fi
5890 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5891 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5892  if test "$ac_cv_have_icmphdr" = yes ; then
5893    cat >>confdefs.h <<\_ACEOF
5894 #define HAVE_ICMPHDR 1
5895 _ACEOF
5896
5897  fi
5898
5899
5900 for ac_header in crypt.h sys/select.h
5901 do
5902 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5903 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5904   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5905 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5906 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5907   echo $ECHO_N "(cached) $ECHO_C" >&6
5908 fi
5909 ac_res=`eval echo '${'$as_ac_Header'}'`
5910                { echo "$as_me:$LINENO: result: $ac_res" >&5
5911 echo "${ECHO_T}$ac_res" >&6; }
5912 else
5913   # Is the header compilable?
5914 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5915 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5916 cat >conftest.$ac_ext <<_ACEOF
5917 /* confdefs.h.  */
5918 _ACEOF
5919 cat confdefs.h >>conftest.$ac_ext
5920 cat >>conftest.$ac_ext <<_ACEOF
5921 /* end confdefs.h.  */
5922 $ac_includes_default
5923 #include <$ac_header>
5924 _ACEOF
5925 rm -rf conftest.$ac_objext
5926 if { (ac_try="$ac_compile"
5927 case "(($ac_try" in
5928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929   *) ac_try_echo=$ac_try;;
5930 esac
5931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5932   (eval "$ac_compile") 2>conftest.er1
5933   ac_status=$?
5934   grep -v '^ *+' conftest.er1 >conftest.err
5935   rm -rf conftest.er1
5936   cat conftest.err >&5
5937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5938   (exit $ac_status); } && {
5939          test -z "$ac_c_werror_flag" ||
5940          test ! -s conftest.err
5941        } && test -s conftest.$ac_objext; then
5942   ac_header_compiler=yes
5943 else
5944   echo "$as_me: failed program was:" >&5
5945 sed 's/^/| /' conftest.$ac_ext >&5
5946
5947         ac_header_compiler=no
5948 fi
5949
5950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5951 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5952 echo "${ECHO_T}$ac_header_compiler" >&6; }
5953
5954 # Is the header present?
5955 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5956 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5957 cat >conftest.$ac_ext <<_ACEOF
5958 /* confdefs.h.  */
5959 _ACEOF
5960 cat confdefs.h >>conftest.$ac_ext
5961 cat >>conftest.$ac_ext <<_ACEOF
5962 /* end confdefs.h.  */
5963 #include <$ac_header>
5964 _ACEOF
5965 if { (ac_try="$ac_cpp conftest.$ac_ext"
5966 case "(($ac_try" in
5967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5968   *) ac_try_echo=$ac_try;;
5969 esac
5970 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5971   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5972   ac_status=$?
5973   grep -v '^ *+' conftest.er1 >conftest.err
5974   rm -rf conftest.er1
5975   cat conftest.err >&5
5976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5977   (exit $ac_status); } >/dev/null && {
5978          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5979          test ! -s conftest.err
5980        }; then
5981   ac_header_preproc=yes
5982 else
5983   echo "$as_me: failed program was:" >&5
5984 sed 's/^/| /' conftest.$ac_ext >&5
5985
5986   ac_header_preproc=no
5987 fi
5988
5989 rm -rf conftest.err conftest.$ac_ext
5990 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5991 echo "${ECHO_T}$ac_header_preproc" >&6; }
5992
5993 # So?  What about this header?
5994 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5995   yes:no: )
5996     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5997 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5998     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5999 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6000     ac_header_preproc=yes
6001     ;;
6002   no:yes:* )
6003     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6004 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6005     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6006 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6007     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6008 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6009     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6010 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6011     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6012 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6013     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6014 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6015
6016     ;;
6017 esac
6018 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6019 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6020 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6021   echo $ECHO_N "(cached) $ECHO_C" >&6
6022 else
6023   eval "$as_ac_Header=\$ac_header_preproc"
6024 fi
6025 ac_res=`eval echo '${'$as_ac_Header'}'`
6026                { echo "$as_me:$LINENO: result: $ac_res" >&5
6027 echo "${ECHO_T}$ac_res" >&6; }
6028
6029 fi
6030 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6031   cat >>confdefs.h <<_ACEOF
6032 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6033 _ACEOF
6034
6035 fi
6036
6037 done
6038
6039 for ac_prog in perl5 perl
6040 do
6041   # Extract the first word of "$ac_prog", so it can be a program name with args.
6042 set dummy $ac_prog; ac_word=$2
6043 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6045 if test "${ac_cv_path_PERL+set}" = set; then
6046   echo $ECHO_N "(cached) $ECHO_C" >&6
6047 else
6048   case $PERL in
6049   [\\/]* | ?:[\\/]*)
6050   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6051   ;;
6052   *)
6053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054 for as_dir in $PATH
6055 do
6056   IFS=$as_save_IFS
6057   test -z "$as_dir" && as_dir=.
6058   for ac_exec_ext in '' $ac_executable_extensions; do
6059   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6060     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6061     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6062     break 2
6063   fi
6064 done
6065 done
6066 IFS=$as_save_IFS
6067
6068   ;;
6069 esac
6070 fi
6071 PERL=$ac_cv_path_PERL
6072 if test -n "$PERL"; then
6073   { echo "$as_me:$LINENO: result: $PERL" >&5
6074 echo "${ECHO_T}$PERL" >&6; }
6075 else
6076   { echo "$as_me:$LINENO: result: no" >&5
6077 echo "${ECHO_T}no" >&6; }
6078 fi
6079
6080
6081   test -n "$PERL" && break
6082 done
6083
6084   if test -z "$PERL" ; then
6085     PERL_VERSION=0
6086   else
6087     { echo "$as_me:$LINENO: checking perl version" >&5
6088 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6089 if test "${ac_cv_perl_version+set}" = set; then
6090   echo $ECHO_N "(cached) $ECHO_C" >&6
6091 else
6092   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6093 fi
6094 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6095 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6096     PERL_VERSION=$ac_cv_perl_version
6097   fi
6098
6099
6100 if test -z "$PERL" ; then
6101   # don't let it be blank...
6102   PERL=/usr/bin/perl
6103 fi
6104
6105 { echo "$as_me:$LINENO: checking for X" >&5
6106 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6107
6108
6109 # Check whether --with-x was given.
6110 if test "${with_x+set}" = set; then
6111   withval=$with_x;
6112 fi
6113
6114 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6115 if test "x$with_x" = xno; then
6116   # The user explicitly disabled X.
6117   have_x=disabled
6118 else
6119   case $x_includes,$x_libraries in #(
6120     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6121 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6122    { (exit 1); exit 1; }; };; #(
6123     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6124   echo $ECHO_N "(cached) $ECHO_C" >&6
6125 else
6126   # One or both of the vars are not set, and there is no cached value.
6127 ac_x_includes=no ac_x_libraries=no
6128 rm -f -r conftest.dir
6129 if mkdir conftest.dir; then
6130   cd conftest.dir
6131   cat >Imakefile <<'_ACEOF'
6132 incroot:
6133         @echo incroot='${INCROOT}'
6134 usrlibdir:
6135         @echo usrlibdir='${USRLIBDIR}'
6136 libdir:
6137         @echo libdir='${LIBDIR}'
6138 _ACEOF
6139   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6140     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6141     for ac_var in incroot usrlibdir libdir; do
6142       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6143     done
6144     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6145     for ac_extension in a so sl; do
6146       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6147          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6148         ac_im_usrlibdir=$ac_im_libdir; break
6149       fi
6150     done
6151     # Screen out bogus values from the imake configuration.  They are
6152     # bogus both because they are the default anyway, and because
6153     # using them would break gcc on systems where it needs fixed includes.
6154     case $ac_im_incroot in
6155         /usr/include) ac_x_includes= ;;
6156         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6157     esac
6158     case $ac_im_usrlibdir in
6159         /usr/lib | /lib) ;;
6160         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6161     esac
6162   fi
6163   cd ..
6164   rm -f -r conftest.dir
6165 fi
6166
6167 # Standard set of common directories for X headers.
6168 # Check X11 before X11Rn because it is often a symlink to the current release.
6169 ac_x_header_dirs='
6170 /usr/X11/include
6171 /usr/X11R6/include
6172 /usr/X11R5/include
6173 /usr/X11R4/include
6174
6175 /usr/include/X11
6176 /usr/include/X11R6
6177 /usr/include/X11R5
6178 /usr/include/X11R4
6179
6180 /usr/local/X11/include
6181 /usr/local/X11R6/include
6182 /usr/local/X11R5/include
6183 /usr/local/X11R4/include
6184
6185 /usr/local/include/X11
6186 /usr/local/include/X11R6
6187 /usr/local/include/X11R5
6188 /usr/local/include/X11R4
6189
6190 /usr/X386/include
6191 /usr/x386/include
6192 /usr/XFree86/include/X11
6193
6194 /usr/include
6195 /usr/local/include
6196 /usr/unsupported/include
6197 /usr/athena/include
6198 /usr/local/x11r5/include
6199 /usr/lpp/Xamples/include
6200
6201 /usr/openwin/include
6202 /usr/openwin/share/include'
6203
6204 if test "$ac_x_includes" = no; then
6205   # Guess where to find include files, by looking for Xlib.h.
6206   # First, try using that file with no special directory specified.
6207   cat >conftest.$ac_ext <<_ACEOF
6208 /* confdefs.h.  */
6209 _ACEOF
6210 cat confdefs.h >>conftest.$ac_ext
6211 cat >>conftest.$ac_ext <<_ACEOF
6212 /* end confdefs.h.  */
6213 #include <X11/Xlib.h>
6214 _ACEOF
6215 if { (ac_try="$ac_cpp conftest.$ac_ext"
6216 case "(($ac_try" in
6217   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6218   *) ac_try_echo=$ac_try;;
6219 esac
6220 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6221   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6222   ac_status=$?
6223   grep -v '^ *+' conftest.er1 >conftest.err
6224   rm -rf conftest.er1
6225   cat conftest.err >&5
6226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227   (exit $ac_status); } >/dev/null && {
6228          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6229          test ! -s conftest.err
6230        }; then
6231   # We can compile using X headers with no special include directory.
6232 ac_x_includes=
6233 else
6234   echo "$as_me: failed program was:" >&5
6235 sed 's/^/| /' conftest.$ac_ext >&5
6236
6237   for ac_dir in $ac_x_header_dirs; do
6238   if test -r "$ac_dir/X11/Xlib.h"; then
6239     ac_x_includes=$ac_dir
6240     break
6241   fi
6242 done
6243 fi
6244
6245 rm -rf conftest.err conftest.$ac_ext
6246 fi # $ac_x_includes = no
6247
6248 if test "$ac_x_libraries" = no; then
6249   # Check for the libraries.
6250   # See if we find them without any special options.
6251   # Don't add to $LIBS permanently.
6252   ac_save_LIBS=$LIBS
6253   LIBS="-lX11 $LIBS"
6254   cat >conftest.$ac_ext <<_ACEOF
6255 /* confdefs.h.  */
6256 _ACEOF
6257 cat confdefs.h >>conftest.$ac_ext
6258 cat >>conftest.$ac_ext <<_ACEOF
6259 /* end confdefs.h.  */
6260 #include <X11/Xlib.h>
6261 int
6262 main ()
6263 {
6264 XrmInitialize ()
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -rf conftest.$ac_objext conftest$ac_exeext
6270 if { (ac_try="$ac_link"
6271 case "(($ac_try" in
6272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6273   *) ac_try_echo=$ac_try;;
6274 esac
6275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6276   (eval "$ac_link") 2>conftest.er1
6277   ac_status=$?
6278   grep -v '^ *+' conftest.er1 >conftest.err
6279   rm -rf conftest.er1
6280   cat conftest.err >&5
6281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282   (exit $ac_status); } && {
6283          test -z "$ac_c_werror_flag" ||
6284          test ! -s conftest.err
6285        } && test -s conftest$ac_exeext &&
6286        $as_test_x conftest$ac_exeext; then
6287   LIBS=$ac_save_LIBS
6288 # We can link X programs with no special library path.
6289 ac_x_libraries=
6290 else
6291   echo "$as_me: failed program was:" >&5
6292 sed 's/^/| /' conftest.$ac_ext >&5
6293
6294         LIBS=$ac_save_LIBS
6295 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6296 do
6297   # Don't even attempt the hair of trying to link an X program!
6298   for ac_extension in a so sl; do
6299     if test -r "$ac_dir/libX11.$ac_extension"; then
6300       ac_x_libraries=$ac_dir
6301       break 2
6302     fi
6303   done
6304 done
6305 fi
6306
6307 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6308       conftest$ac_exeext conftest.$ac_ext
6309 fi # $ac_x_libraries = no
6310
6311 case $ac_x_includes,$ac_x_libraries in #(
6312   no,* | *,no | *\'*)
6313     # Didn't find X, or a directory has "'" in its name.
6314     ac_cv_have_x="have_x=no";; #(
6315   *)
6316     # Record where we found X for the cache.
6317     ac_cv_have_x="have_x=yes\
6318         ac_x_includes='$ac_x_includes'\
6319         ac_x_libraries='$ac_x_libraries'"
6320 esac
6321 fi
6322 ;; #(
6323     *) have_x=yes;;
6324   esac
6325   eval "$ac_cv_have_x"
6326 fi # $with_x != no
6327
6328 if test "$have_x" != yes; then
6329   { echo "$as_me:$LINENO: result: $have_x" >&5
6330 echo "${ECHO_T}$have_x" >&6; }
6331   no_x=yes
6332 else
6333   # If each of the values was on the command line, it overrides each guess.
6334   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6335   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6336   # Update the cache value to reflect the command line values.
6337   ac_cv_have_x="have_x=yes\
6338         ac_x_includes='$x_includes'\
6339         ac_x_libraries='$x_libraries'"
6340   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6341 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6342 fi
6343
6344 if test "$no_x" = yes; then
6345   # Not all programs may use this symbol, but it does not hurt to define it.
6346
6347 cat >>confdefs.h <<\_ACEOF
6348 #define X_DISPLAY_MISSING 1
6349 _ACEOF
6350
6351   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6352 else
6353   if test -n "$x_includes"; then
6354     X_CFLAGS="$X_CFLAGS -I$x_includes"
6355   fi
6356
6357   # It would also be nice to do this for all -L options, not just this one.
6358   if test -n "$x_libraries"; then
6359     X_LIBS="$X_LIBS -L$x_libraries"
6360     # For Solaris; some versions of Sun CC require a space after -R and
6361     # others require no space.  Words are not sufficient . . . .
6362     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6363 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6364     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6365     ac_xsave_c_werror_flag=$ac_c_werror_flag
6366     ac_c_werror_flag=yes
6367     cat >conftest.$ac_ext <<_ACEOF
6368 /* confdefs.h.  */
6369 _ACEOF
6370 cat confdefs.h >>conftest.$ac_ext
6371 cat >>conftest.$ac_ext <<_ACEOF
6372 /* end confdefs.h.  */
6373
6374 int
6375 main ()
6376 {
6377
6378   ;
6379   return 0;
6380 }
6381 _ACEOF
6382 rm -rf conftest.$ac_objext conftest$ac_exeext
6383 if { (ac_try="$ac_link"
6384 case "(($ac_try" in
6385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6386   *) ac_try_echo=$ac_try;;
6387 esac
6388 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6389   (eval "$ac_link") 2>conftest.er1
6390   ac_status=$?
6391   grep -v '^ *+' conftest.er1 >conftest.err
6392   rm -rf conftest.er1
6393   cat conftest.err >&5
6394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395   (exit $ac_status); } && {
6396          test -z "$ac_c_werror_flag" ||
6397          test ! -s conftest.err
6398        } && test -s conftest$ac_exeext &&
6399        $as_test_x conftest$ac_exeext; then
6400   { echo "$as_me:$LINENO: result: no" >&5
6401 echo "${ECHO_T}no" >&6; }
6402        X_LIBS="$X_LIBS -R$x_libraries"
6403 else
6404   echo "$as_me: failed program was:" >&5
6405 sed 's/^/| /' conftest.$ac_ext >&5
6406
6407         LIBS="$ac_xsave_LIBS -R $x_libraries"
6408        cat >conftest.$ac_ext <<_ACEOF
6409 /* confdefs.h.  */
6410 _ACEOF
6411 cat confdefs.h >>conftest.$ac_ext
6412 cat >>conftest.$ac_ext <<_ACEOF
6413 /* end confdefs.h.  */
6414
6415 int
6416 main ()
6417 {
6418
6419   ;
6420   return 0;
6421 }
6422 _ACEOF
6423 rm -rf conftest.$ac_objext conftest$ac_exeext
6424 if { (ac_try="$ac_link"
6425 case "(($ac_try" in
6426   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6427   *) ac_try_echo=$ac_try;;
6428 esac
6429 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6430   (eval "$ac_link") 2>conftest.er1
6431   ac_status=$?
6432   grep -v '^ *+' conftest.er1 >conftest.err
6433   rm -rf conftest.er1
6434   cat conftest.err >&5
6435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436   (exit $ac_status); } && {
6437          test -z "$ac_c_werror_flag" ||
6438          test ! -s conftest.err
6439        } && test -s conftest$ac_exeext &&
6440        $as_test_x conftest$ac_exeext; then
6441   { echo "$as_me:$LINENO: result: yes" >&5
6442 echo "${ECHO_T}yes" >&6; }
6443           X_LIBS="$X_LIBS -R $x_libraries"
6444 else
6445   echo "$as_me: failed program was:" >&5
6446 sed 's/^/| /' conftest.$ac_ext >&5
6447
6448         { echo "$as_me:$LINENO: result: neither works" >&5
6449 echo "${ECHO_T}neither works" >&6; }
6450 fi
6451
6452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6453       conftest$ac_exeext conftest.$ac_ext
6454 fi
6455
6456 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6457       conftest$ac_exeext conftest.$ac_ext
6458     ac_c_werror_flag=$ac_xsave_c_werror_flag
6459     LIBS=$ac_xsave_LIBS
6460   fi
6461
6462   # Check for system-dependent libraries X programs must link with.
6463   # Do this before checking for the system-independent R6 libraries
6464   # (-lICE), since we may need -lsocket or whatever for X linking.
6465
6466   if test "$ISC" = yes; then
6467     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6468   else
6469     # Martyn Johnson says this is needed for Ultrix, if the X
6470     # libraries were built with DECnet support.  And Karl Berry says
6471     # the Alpha needs dnet_stub (dnet does not exist).
6472     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6473     cat >conftest.$ac_ext <<_ACEOF
6474 /* confdefs.h.  */
6475 _ACEOF
6476 cat confdefs.h >>conftest.$ac_ext
6477 cat >>conftest.$ac_ext <<_ACEOF
6478 /* end confdefs.h.  */
6479
6480 /* Override any GCC internal prototype to avoid an error.
6481    Use char because int might match the return type of a GCC
6482    builtin and then its argument prototype would still apply.  */
6483 #ifdef __cplusplus
6484 extern "C"
6485 #endif
6486 char XOpenDisplay ();
6487 int
6488 main ()
6489 {
6490 return XOpenDisplay ();
6491   ;
6492   return 0;
6493 }
6494 _ACEOF
6495 rm -rf conftest.$ac_objext conftest$ac_exeext
6496 if { (ac_try="$ac_link"
6497 case "(($ac_try" in
6498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499   *) ac_try_echo=$ac_try;;
6500 esac
6501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6502   (eval "$ac_link") 2>conftest.er1
6503   ac_status=$?
6504   grep -v '^ *+' conftest.er1 >conftest.err
6505   rm -rf conftest.er1
6506   cat conftest.err >&5
6507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508   (exit $ac_status); } && {
6509          test -z "$ac_c_werror_flag" ||
6510          test ! -s conftest.err
6511        } && test -s conftest$ac_exeext &&
6512        $as_test_x conftest$ac_exeext; then
6513   :
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 sed 's/^/| /' conftest.$ac_ext >&5
6517
6518         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6519 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6520 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6521   echo $ECHO_N "(cached) $ECHO_C" >&6
6522 else
6523   ac_check_lib_save_LIBS=$LIBS
6524 LIBS="-ldnet  $LIBS"
6525 cat >conftest.$ac_ext <<_ACEOF
6526 /* confdefs.h.  */
6527 _ACEOF
6528 cat confdefs.h >>conftest.$ac_ext
6529 cat >>conftest.$ac_ext <<_ACEOF
6530 /* end confdefs.h.  */
6531
6532 /* Override any GCC internal prototype to avoid an error.
6533    Use char because int might match the return type of a GCC
6534    builtin and then its argument prototype would still apply.  */
6535 #ifdef __cplusplus
6536 extern "C"
6537 #endif
6538 char dnet_ntoa ();
6539 int
6540 main ()
6541 {
6542 return dnet_ntoa ();
6543   ;
6544   return 0;
6545 }
6546 _ACEOF
6547 rm -rf conftest.$ac_objext conftest$ac_exeext
6548 if { (ac_try="$ac_link"
6549 case "(($ac_try" in
6550   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6551   *) ac_try_echo=$ac_try;;
6552 esac
6553 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6554   (eval "$ac_link") 2>conftest.er1
6555   ac_status=$?
6556   grep -v '^ *+' conftest.er1 >conftest.err
6557   rm -rf conftest.er1
6558   cat conftest.err >&5
6559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560   (exit $ac_status); } && {
6561          test -z "$ac_c_werror_flag" ||
6562          test ! -s conftest.err
6563        } && test -s conftest$ac_exeext &&
6564        $as_test_x conftest$ac_exeext; then
6565   ac_cv_lib_dnet_dnet_ntoa=yes
6566 else
6567   echo "$as_me: failed program was:" >&5
6568 sed 's/^/| /' conftest.$ac_ext >&5
6569
6570         ac_cv_lib_dnet_dnet_ntoa=no
6571 fi
6572
6573 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6574       conftest$ac_exeext conftest.$ac_ext
6575 LIBS=$ac_check_lib_save_LIBS
6576 fi
6577 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6578 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6579 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6580   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6581 fi
6582
6583     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6584       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6585 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6586 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6587   echo $ECHO_N "(cached) $ECHO_C" >&6
6588 else
6589   ac_check_lib_save_LIBS=$LIBS
6590 LIBS="-ldnet_stub  $LIBS"
6591 cat >conftest.$ac_ext <<_ACEOF
6592 /* confdefs.h.  */
6593 _ACEOF
6594 cat confdefs.h >>conftest.$ac_ext
6595 cat >>conftest.$ac_ext <<_ACEOF
6596 /* end confdefs.h.  */
6597
6598 /* Override any GCC internal prototype to avoid an error.
6599    Use char because int might match the return type of a GCC
6600    builtin and then its argument prototype would still apply.  */
6601 #ifdef __cplusplus
6602 extern "C"
6603 #endif
6604 char dnet_ntoa ();
6605 int
6606 main ()
6607 {
6608 return dnet_ntoa ();
6609   ;
6610   return 0;
6611 }
6612 _ACEOF
6613 rm -rf conftest.$ac_objext conftest$ac_exeext
6614 if { (ac_try="$ac_link"
6615 case "(($ac_try" in
6616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6617   *) ac_try_echo=$ac_try;;
6618 esac
6619 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6620   (eval "$ac_link") 2>conftest.er1
6621   ac_status=$?
6622   grep -v '^ *+' conftest.er1 >conftest.err
6623   rm -rf conftest.er1
6624   cat conftest.err >&5
6625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626   (exit $ac_status); } && {
6627          test -z "$ac_c_werror_flag" ||
6628          test ! -s conftest.err
6629        } && test -s conftest$ac_exeext &&
6630        $as_test_x conftest$ac_exeext; then
6631   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6632 else
6633   echo "$as_me: failed program was:" >&5
6634 sed 's/^/| /' conftest.$ac_ext >&5
6635
6636         ac_cv_lib_dnet_stub_dnet_ntoa=no
6637 fi
6638
6639 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6640       conftest$ac_exeext conftest.$ac_ext
6641 LIBS=$ac_check_lib_save_LIBS
6642 fi
6643 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6644 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6645 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6646   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6647 fi
6648
6649     fi
6650 fi
6651
6652 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6653       conftest$ac_exeext conftest.$ac_ext
6654     LIBS="$ac_xsave_LIBS"
6655
6656     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6657     # to get the SysV transport functions.
6658     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6659     # needs -lnsl.
6660     # The nsl library prevents programs from opening the X display
6661     # on Irix 5.2, according to T.E. Dickey.
6662     # The functions gethostbyname, getservbyname, and inet_addr are
6663     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6664     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6665 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6666 if test "${ac_cv_func_gethostbyname+set}" = set; then
6667   echo $ECHO_N "(cached) $ECHO_C" >&6
6668 else
6669   cat >conftest.$ac_ext <<_ACEOF
6670 /* confdefs.h.  */
6671 _ACEOF
6672 cat confdefs.h >>conftest.$ac_ext
6673 cat >>conftest.$ac_ext <<_ACEOF
6674 /* end confdefs.h.  */
6675 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6676    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6677 #define gethostbyname innocuous_gethostbyname
6678
6679 /* System header to define __stub macros and hopefully few prototypes,
6680     which can conflict with char gethostbyname (); below.
6681     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6682     <limits.h> exists even on freestanding compilers.  */
6683
6684 #ifdef __STDC__
6685 # include <limits.h>
6686 #else
6687 # include <assert.h>
6688 #endif
6689
6690 #undef gethostbyname
6691
6692 /* Override any GCC internal prototype to avoid an error.
6693    Use char because int might match the return type of a GCC
6694    builtin and then its argument prototype would still apply.  */
6695 #ifdef __cplusplus
6696 extern "C"
6697 #endif
6698 char gethostbyname ();
6699 /* The GNU C library defines this for functions which it implements
6700     to always fail with ENOSYS.  Some functions are actually named
6701     something starting with __ and the normal name is an alias.  */
6702 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6703 choke me
6704 #endif
6705
6706 int
6707 main ()
6708 {
6709 return gethostbyname ();
6710   ;
6711   return 0;
6712 }
6713 _ACEOF
6714 rm -rf conftest.$ac_objext conftest$ac_exeext
6715 if { (ac_try="$ac_link"
6716 case "(($ac_try" in
6717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6718   *) ac_try_echo=$ac_try;;
6719 esac
6720 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6721   (eval "$ac_link") 2>conftest.er1
6722   ac_status=$?
6723   grep -v '^ *+' conftest.er1 >conftest.err
6724   rm -rf conftest.er1
6725   cat conftest.err >&5
6726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727   (exit $ac_status); } && {
6728          test -z "$ac_c_werror_flag" ||
6729          test ! -s conftest.err
6730        } && test -s conftest$ac_exeext &&
6731        $as_test_x conftest$ac_exeext; then
6732   ac_cv_func_gethostbyname=yes
6733 else
6734   echo "$as_me: failed program was:" >&5
6735 sed 's/^/| /' conftest.$ac_ext >&5
6736
6737         ac_cv_func_gethostbyname=no
6738 fi
6739
6740 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6741       conftest$ac_exeext conftest.$ac_ext
6742 fi
6743 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6744 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6745
6746     if test $ac_cv_func_gethostbyname = no; then
6747       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6748 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6749 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6750   echo $ECHO_N "(cached) $ECHO_C" >&6
6751 else
6752   ac_check_lib_save_LIBS=$LIBS
6753 LIBS="-lnsl  $LIBS"
6754 cat >conftest.$ac_ext <<_ACEOF
6755 /* confdefs.h.  */
6756 _ACEOF
6757 cat confdefs.h >>conftest.$ac_ext
6758 cat >>conftest.$ac_ext <<_ACEOF
6759 /* end confdefs.h.  */
6760
6761 /* Override any GCC internal prototype to avoid an error.
6762    Use char because int might match the return type of a GCC
6763    builtin and then its argument prototype would still apply.  */
6764 #ifdef __cplusplus
6765 extern "C"
6766 #endif
6767 char gethostbyname ();
6768 int
6769 main ()
6770 {
6771 return gethostbyname ();
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 rm -rf conftest.$ac_objext conftest$ac_exeext
6777 if { (ac_try="$ac_link"
6778 case "(($ac_try" in
6779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6780   *) ac_try_echo=$ac_try;;
6781 esac
6782 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6783   (eval "$ac_link") 2>conftest.er1
6784   ac_status=$?
6785   grep -v '^ *+' conftest.er1 >conftest.err
6786   rm -rf conftest.er1
6787   cat conftest.err >&5
6788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789   (exit $ac_status); } && {
6790          test -z "$ac_c_werror_flag" ||
6791          test ! -s conftest.err
6792        } && test -s conftest$ac_exeext &&
6793        $as_test_x conftest$ac_exeext; then
6794   ac_cv_lib_nsl_gethostbyname=yes
6795 else
6796   echo "$as_me: failed program was:" >&5
6797 sed 's/^/| /' conftest.$ac_ext >&5
6798
6799         ac_cv_lib_nsl_gethostbyname=no
6800 fi
6801
6802 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6803       conftest$ac_exeext conftest.$ac_ext
6804 LIBS=$ac_check_lib_save_LIBS
6805 fi
6806 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6807 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6808 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6809   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6810 fi
6811
6812       if test $ac_cv_lib_nsl_gethostbyname = no; then
6813         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6814 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6815 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6816   echo $ECHO_N "(cached) $ECHO_C" >&6
6817 else
6818   ac_check_lib_save_LIBS=$LIBS
6819 LIBS="-lbsd  $LIBS"
6820 cat >conftest.$ac_ext <<_ACEOF
6821 /* confdefs.h.  */
6822 _ACEOF
6823 cat confdefs.h >>conftest.$ac_ext
6824 cat >>conftest.$ac_ext <<_ACEOF
6825 /* end confdefs.h.  */
6826
6827 /* Override any GCC internal prototype to avoid an error.
6828    Use char because int might match the return type of a GCC
6829    builtin and then its argument prototype would still apply.  */
6830 #ifdef __cplusplus
6831 extern "C"
6832 #endif
6833 char gethostbyname ();
6834 int
6835 main ()
6836 {
6837 return gethostbyname ();
6838   ;
6839   return 0;
6840 }
6841 _ACEOF
6842 rm -rf conftest.$ac_objext conftest$ac_exeext
6843 if { (ac_try="$ac_link"
6844 case "(($ac_try" in
6845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6846   *) ac_try_echo=$ac_try;;
6847 esac
6848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6849   (eval "$ac_link") 2>conftest.er1
6850   ac_status=$?
6851   grep -v '^ *+' conftest.er1 >conftest.err
6852   rm -rf conftest.er1
6853   cat conftest.err >&5
6854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855   (exit $ac_status); } && {
6856          test -z "$ac_c_werror_flag" ||
6857          test ! -s conftest.err
6858        } && test -s conftest$ac_exeext &&
6859        $as_test_x conftest$ac_exeext; then
6860   ac_cv_lib_bsd_gethostbyname=yes
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 sed 's/^/| /' conftest.$ac_ext >&5
6864
6865         ac_cv_lib_bsd_gethostbyname=no
6866 fi
6867
6868 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6869       conftest$ac_exeext conftest.$ac_ext
6870 LIBS=$ac_check_lib_save_LIBS
6871 fi
6872 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6873 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6874 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6875   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6876 fi
6877
6878       fi
6879     fi
6880
6881     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6882     # socket/setsockopt and other routines are undefined under SCO ODT
6883     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6884     # on later versions), says Simon Leinen: it contains gethostby*
6885     # variants that don't use the name server (or something).  -lsocket
6886     # must be given before -lnsl if both are needed.  We assume that
6887     # if connect needs -lnsl, so does gethostbyname.
6888     { echo "$as_me:$LINENO: checking for connect" >&5
6889 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6890 if test "${ac_cv_func_connect+set}" = set; then
6891   echo $ECHO_N "(cached) $ECHO_C" >&6
6892 else
6893   cat >conftest.$ac_ext <<_ACEOF
6894 /* confdefs.h.  */
6895 _ACEOF
6896 cat confdefs.h >>conftest.$ac_ext
6897 cat >>conftest.$ac_ext <<_ACEOF
6898 /* end confdefs.h.  */
6899 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6900    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6901 #define connect innocuous_connect
6902
6903 /* System header to define __stub macros and hopefully few prototypes,
6904     which can conflict with char connect (); below.
6905     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6906     <limits.h> exists even on freestanding compilers.  */
6907
6908 #ifdef __STDC__
6909 # include <limits.h>
6910 #else
6911 # include <assert.h>
6912 #endif
6913
6914 #undef connect
6915
6916 /* Override any GCC internal prototype to avoid an error.
6917    Use char because int might match the return type of a GCC
6918    builtin and then its argument prototype would still apply.  */
6919 #ifdef __cplusplus
6920 extern "C"
6921 #endif
6922 char connect ();
6923 /* The GNU C library defines this for functions which it implements
6924     to always fail with ENOSYS.  Some functions are actually named
6925     something starting with __ and the normal name is an alias.  */
6926 #if defined __stub_connect || defined __stub___connect
6927 choke me
6928 #endif
6929
6930 int
6931 main ()
6932 {
6933 return connect ();
6934   ;
6935   return 0;
6936 }
6937 _ACEOF
6938 rm -rf conftest.$ac_objext conftest$ac_exeext
6939 if { (ac_try="$ac_link"
6940 case "(($ac_try" in
6941   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6942   *) ac_try_echo=$ac_try;;
6943 esac
6944 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6945   (eval "$ac_link") 2>conftest.er1
6946   ac_status=$?
6947   grep -v '^ *+' conftest.er1 >conftest.err
6948   rm -rf conftest.er1
6949   cat conftest.err >&5
6950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951   (exit $ac_status); } && {
6952          test -z "$ac_c_werror_flag" ||
6953          test ! -s conftest.err
6954        } && test -s conftest$ac_exeext &&
6955        $as_test_x conftest$ac_exeext; then
6956   ac_cv_func_connect=yes
6957 else
6958   echo "$as_me: failed program was:" >&5
6959 sed 's/^/| /' conftest.$ac_ext >&5
6960
6961         ac_cv_func_connect=no
6962 fi
6963
6964 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6965       conftest$ac_exeext conftest.$ac_ext
6966 fi
6967 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6968 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6969
6970     if test $ac_cv_func_connect = no; then
6971       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6972 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6973 if test "${ac_cv_lib_socket_connect+set}" = set; then
6974   echo $ECHO_N "(cached) $ECHO_C" >&6
6975 else
6976   ac_check_lib_save_LIBS=$LIBS
6977 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6978 cat >conftest.$ac_ext <<_ACEOF
6979 /* confdefs.h.  */
6980 _ACEOF
6981 cat confdefs.h >>conftest.$ac_ext
6982 cat >>conftest.$ac_ext <<_ACEOF
6983 /* end confdefs.h.  */
6984
6985 /* Override any GCC internal prototype to avoid an error.
6986    Use char because int might match the return type of a GCC
6987    builtin and then its argument prototype would still apply.  */
6988 #ifdef __cplusplus
6989 extern "C"
6990 #endif
6991 char connect ();
6992 int
6993 main ()
6994 {
6995 return connect ();
6996   ;
6997   return 0;
6998 }
6999 _ACEOF
7000 rm -rf conftest.$ac_objext conftest$ac_exeext
7001 if { (ac_try="$ac_link"
7002 case "(($ac_try" in
7003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7004   *) ac_try_echo=$ac_try;;
7005 esac
7006 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7007   (eval "$ac_link") 2>conftest.er1
7008   ac_status=$?
7009   grep -v '^ *+' conftest.er1 >conftest.err
7010   rm -rf conftest.er1
7011   cat conftest.err >&5
7012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7013   (exit $ac_status); } && {
7014          test -z "$ac_c_werror_flag" ||
7015          test ! -s conftest.err
7016        } && test -s conftest$ac_exeext &&
7017        $as_test_x conftest$ac_exeext; then
7018   ac_cv_lib_socket_connect=yes
7019 else
7020   echo "$as_me: failed program was:" >&5
7021 sed 's/^/| /' conftest.$ac_ext >&5
7022
7023         ac_cv_lib_socket_connect=no
7024 fi
7025
7026 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7027       conftest$ac_exeext conftest.$ac_ext
7028 LIBS=$ac_check_lib_save_LIBS
7029 fi
7030 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7031 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7032 if test $ac_cv_lib_socket_connect = yes; then
7033   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7034 fi
7035
7036     fi
7037
7038     # Guillermo Gomez says -lposix is necessary on A/UX.
7039     { echo "$as_me:$LINENO: checking for remove" >&5
7040 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7041 if test "${ac_cv_func_remove+set}" = set; then
7042   echo $ECHO_N "(cached) $ECHO_C" >&6
7043 else
7044   cat >conftest.$ac_ext <<_ACEOF
7045 /* confdefs.h.  */
7046 _ACEOF
7047 cat confdefs.h >>conftest.$ac_ext
7048 cat >>conftest.$ac_ext <<_ACEOF
7049 /* end confdefs.h.  */
7050 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7051    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7052 #define remove innocuous_remove
7053
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char remove (); below.
7056     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7057     <limits.h> exists even on freestanding compilers.  */
7058
7059 #ifdef __STDC__
7060 # include <limits.h>
7061 #else
7062 # include <assert.h>
7063 #endif
7064
7065 #undef remove
7066
7067 /* Override any GCC internal prototype to avoid an error.
7068    Use char because int might match the return type of a GCC
7069    builtin and then its argument prototype would still apply.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 char remove ();
7074 /* The GNU C library defines this for functions which it implements
7075     to always fail with ENOSYS.  Some functions are actually named
7076     something starting with __ and the normal name is an alias.  */
7077 #if defined __stub_remove || defined __stub___remove
7078 choke me
7079 #endif
7080
7081 int
7082 main ()
7083 {
7084 return remove ();
7085   ;
7086   return 0;
7087 }
7088 _ACEOF
7089 rm -rf conftest.$ac_objext conftest$ac_exeext
7090 if { (ac_try="$ac_link"
7091 case "(($ac_try" in
7092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7093   *) ac_try_echo=$ac_try;;
7094 esac
7095 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7096   (eval "$ac_link") 2>conftest.er1
7097   ac_status=$?
7098   grep -v '^ *+' conftest.er1 >conftest.err
7099   rm -rf conftest.er1
7100   cat conftest.err >&5
7101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102   (exit $ac_status); } && {
7103          test -z "$ac_c_werror_flag" ||
7104          test ! -s conftest.err
7105        } && test -s conftest$ac_exeext &&
7106        $as_test_x conftest$ac_exeext; then
7107   ac_cv_func_remove=yes
7108 else
7109   echo "$as_me: failed program was:" >&5
7110 sed 's/^/| /' conftest.$ac_ext >&5
7111
7112         ac_cv_func_remove=no
7113 fi
7114
7115 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7116       conftest$ac_exeext conftest.$ac_ext
7117 fi
7118 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7119 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7120
7121     if test $ac_cv_func_remove = no; then
7122       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7123 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7124 if test "${ac_cv_lib_posix_remove+set}" = set; then
7125   echo $ECHO_N "(cached) $ECHO_C" >&6
7126 else
7127   ac_check_lib_save_LIBS=$LIBS
7128 LIBS="-lposix  $LIBS"
7129 cat >conftest.$ac_ext <<_ACEOF
7130 /* confdefs.h.  */
7131 _ACEOF
7132 cat confdefs.h >>conftest.$ac_ext
7133 cat >>conftest.$ac_ext <<_ACEOF
7134 /* end confdefs.h.  */
7135
7136 /* Override any GCC internal prototype to avoid an error.
7137    Use char because int might match the return type of a GCC
7138    builtin and then its argument prototype would still apply.  */
7139 #ifdef __cplusplus
7140 extern "C"
7141 #endif
7142 char remove ();
7143 int
7144 main ()
7145 {
7146 return remove ();
7147   ;
7148   return 0;
7149 }
7150 _ACEOF
7151 rm -rf conftest.$ac_objext conftest$ac_exeext
7152 if { (ac_try="$ac_link"
7153 case "(($ac_try" in
7154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7155   *) ac_try_echo=$ac_try;;
7156 esac
7157 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7158   (eval "$ac_link") 2>conftest.er1
7159   ac_status=$?
7160   grep -v '^ *+' conftest.er1 >conftest.err
7161   rm -rf conftest.er1
7162   cat conftest.err >&5
7163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7164   (exit $ac_status); } && {
7165          test -z "$ac_c_werror_flag" ||
7166          test ! -s conftest.err
7167        } && test -s conftest$ac_exeext &&
7168        $as_test_x conftest$ac_exeext; then
7169   ac_cv_lib_posix_remove=yes
7170 else
7171   echo "$as_me: failed program was:" >&5
7172 sed 's/^/| /' conftest.$ac_ext >&5
7173
7174         ac_cv_lib_posix_remove=no
7175 fi
7176
7177 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7178       conftest$ac_exeext conftest.$ac_ext
7179 LIBS=$ac_check_lib_save_LIBS
7180 fi
7181 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7182 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7183 if test $ac_cv_lib_posix_remove = yes; then
7184   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7185 fi
7186
7187     fi
7188
7189     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7190     { echo "$as_me:$LINENO: checking for shmat" >&5
7191 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7192 if test "${ac_cv_func_shmat+set}" = set; then
7193   echo $ECHO_N "(cached) $ECHO_C" >&6
7194 else
7195   cat >conftest.$ac_ext <<_ACEOF
7196 /* confdefs.h.  */
7197 _ACEOF
7198 cat confdefs.h >>conftest.$ac_ext
7199 cat >>conftest.$ac_ext <<_ACEOF
7200 /* end confdefs.h.  */
7201 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7202    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7203 #define shmat innocuous_shmat
7204
7205 /* System header to define __stub macros and hopefully few prototypes,
7206     which can conflict with char shmat (); below.
7207     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7208     <limits.h> exists even on freestanding compilers.  */
7209
7210 #ifdef __STDC__
7211 # include <limits.h>
7212 #else
7213 # include <assert.h>
7214 #endif
7215
7216 #undef shmat
7217
7218 /* Override any GCC internal prototype to avoid an error.
7219    Use char because int might match the return type of a GCC
7220    builtin and then its argument prototype would still apply.  */
7221 #ifdef __cplusplus
7222 extern "C"
7223 #endif
7224 char shmat ();
7225 /* The GNU C library defines this for functions which it implements
7226     to always fail with ENOSYS.  Some functions are actually named
7227     something starting with __ and the normal name is an alias.  */
7228 #if defined __stub_shmat || defined __stub___shmat
7229 choke me
7230 #endif
7231
7232 int
7233 main ()
7234 {
7235 return shmat ();
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -rf conftest.$ac_objext conftest$ac_exeext
7241 if { (ac_try="$ac_link"
7242 case "(($ac_try" in
7243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7244   *) ac_try_echo=$ac_try;;
7245 esac
7246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7247   (eval "$ac_link") 2>conftest.er1
7248   ac_status=$?
7249   grep -v '^ *+' conftest.er1 >conftest.err
7250   rm -rf conftest.er1
7251   cat conftest.err >&5
7252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253   (exit $ac_status); } && {
7254          test -z "$ac_c_werror_flag" ||
7255          test ! -s conftest.err
7256        } && test -s conftest$ac_exeext &&
7257        $as_test_x conftest$ac_exeext; then
7258   ac_cv_func_shmat=yes
7259 else
7260   echo "$as_me: failed program was:" >&5
7261 sed 's/^/| /' conftest.$ac_ext >&5
7262
7263         ac_cv_func_shmat=no
7264 fi
7265
7266 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7267       conftest$ac_exeext conftest.$ac_ext
7268 fi
7269 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7270 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7271
7272     if test $ac_cv_func_shmat = no; then
7273       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7274 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7275 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7276   echo $ECHO_N "(cached) $ECHO_C" >&6
7277 else
7278   ac_check_lib_save_LIBS=$LIBS
7279 LIBS="-lipc  $LIBS"
7280 cat >conftest.$ac_ext <<_ACEOF
7281 /* confdefs.h.  */
7282 _ACEOF
7283 cat confdefs.h >>conftest.$ac_ext
7284 cat >>conftest.$ac_ext <<_ACEOF
7285 /* end confdefs.h.  */
7286
7287 /* Override any GCC internal prototype to avoid an error.
7288    Use char because int might match the return type of a GCC
7289    builtin and then its argument prototype would still apply.  */
7290 #ifdef __cplusplus
7291 extern "C"
7292 #endif
7293 char shmat ();
7294 int
7295 main ()
7296 {
7297 return shmat ();
7298   ;
7299   return 0;
7300 }
7301 _ACEOF
7302 rm -rf conftest.$ac_objext conftest$ac_exeext
7303 if { (ac_try="$ac_link"
7304 case "(($ac_try" in
7305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7306   *) ac_try_echo=$ac_try;;
7307 esac
7308 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7309   (eval "$ac_link") 2>conftest.er1
7310   ac_status=$?
7311   grep -v '^ *+' conftest.er1 >conftest.err
7312   rm -rf conftest.er1
7313   cat conftest.err >&5
7314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315   (exit $ac_status); } && {
7316          test -z "$ac_c_werror_flag" ||
7317          test ! -s conftest.err
7318        } && test -s conftest$ac_exeext &&
7319        $as_test_x conftest$ac_exeext; then
7320   ac_cv_lib_ipc_shmat=yes
7321 else
7322   echo "$as_me: failed program was:" >&5
7323 sed 's/^/| /' conftest.$ac_ext >&5
7324
7325         ac_cv_lib_ipc_shmat=no
7326 fi
7327
7328 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7329       conftest$ac_exeext conftest.$ac_ext
7330 LIBS=$ac_check_lib_save_LIBS
7331 fi
7332 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7333 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7334 if test $ac_cv_lib_ipc_shmat = yes; then
7335   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7336 fi
7337
7338     fi
7339   fi
7340
7341   # Check for libraries that X11R6 Xt/Xaw programs need.
7342   ac_save_LDFLAGS=$LDFLAGS
7343   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7344   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7345   # check for ICE first), but we must link in the order -lSM -lICE or
7346   # we get undefined symbols.  So assume we have SM if we have ICE.
7347   # These have to be linked with before -lX11, unlike the other
7348   # libraries we check for below, so use a different variable.
7349   # John Interrante, Karl Berry
7350   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7351 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7352 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7353   echo $ECHO_N "(cached) $ECHO_C" >&6
7354 else
7355   ac_check_lib_save_LIBS=$LIBS
7356 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7357 cat >conftest.$ac_ext <<_ACEOF
7358 /* confdefs.h.  */
7359 _ACEOF
7360 cat confdefs.h >>conftest.$ac_ext
7361 cat >>conftest.$ac_ext <<_ACEOF
7362 /* end confdefs.h.  */
7363
7364 /* Override any GCC internal prototype to avoid an error.
7365    Use char because int might match the return type of a GCC
7366    builtin and then its argument prototype would still apply.  */
7367 #ifdef __cplusplus
7368 extern "C"
7369 #endif
7370 char IceConnectionNumber ();
7371 int
7372 main ()
7373 {
7374 return IceConnectionNumber ();
7375   ;
7376   return 0;
7377 }
7378 _ACEOF
7379 rm -rf conftest.$ac_objext conftest$ac_exeext
7380 if { (ac_try="$ac_link"
7381 case "(($ac_try" in
7382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7383   *) ac_try_echo=$ac_try;;
7384 esac
7385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7386   (eval "$ac_link") 2>conftest.er1
7387   ac_status=$?
7388   grep -v '^ *+' conftest.er1 >conftest.err
7389   rm -rf conftest.er1
7390   cat conftest.err >&5
7391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7392   (exit $ac_status); } && {
7393          test -z "$ac_c_werror_flag" ||
7394          test ! -s conftest.err
7395        } && test -s conftest$ac_exeext &&
7396        $as_test_x conftest$ac_exeext; then
7397   ac_cv_lib_ICE_IceConnectionNumber=yes
7398 else
7399   echo "$as_me: failed program was:" >&5
7400 sed 's/^/| /' conftest.$ac_ext >&5
7401
7402         ac_cv_lib_ICE_IceConnectionNumber=no
7403 fi
7404
7405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7406       conftest$ac_exeext conftest.$ac_ext
7407 LIBS=$ac_check_lib_save_LIBS
7408 fi
7409 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7410 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7411 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7412   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7413 fi
7414
7415   LDFLAGS=$ac_save_LDFLAGS
7416
7417 fi
7418
7419
7420 if test "$have_x" != yes; then
7421   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7422 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7423    { (exit 1); exit 1; }; }
7424 fi
7425
7426
7427     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7428 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7429 if test "${ac_cv_x_app_defaults+set}" = set; then
7430   echo $ECHO_N "(cached) $ECHO_C" >&6
7431 else
7432
7433   rm -fr conftestdir
7434   if mkdir conftestdir; then
7435     cd conftestdir 2>/dev/null
7436     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7437     cat > Imakefile <<'EOF'
7438 acfindx:
7439         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7440 EOF
7441     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7442       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7443       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7444     fi
7445     cd .. 2>/dev/null
7446     rm -fr conftestdir
7447   fi
7448       if test x"$ac_x_app_defaults" = x; then
7449
7450   # Look for the directory under a standard set of common directories.
7451   # Check X11 before X11Rn because it's often a symlink to the current release.
7452   for ac_dir in                                 \
7453     /usr/X11/lib/app-defaults                   \
7454     /usr/X11R6/lib/app-defaults                 \
7455     /usr/X11R6/lib/X11/app-defaults             \
7456     /usr/X11R5/lib/app-defaults                 \
7457     /usr/X11R5/lib/X11/app-defaults             \
7458     /usr/X11R4/lib/app-defaults                 \
7459     /usr/X11R4/lib/X11/app-defaults             \
7460                                                 \
7461     /usr/lib/X11/app-defaults                   \
7462     /usr/lib/X11R6/app-defaults                 \
7463     /usr/lib/X11R5/app-defaults                 \
7464     /usr/lib/X11R4/app-defaults                 \
7465                                                 \
7466     /usr/local/X11/lib/app-defaults             \
7467     /usr/local/X11R6/lib/app-defaults           \
7468     /usr/local/X11R5/lib/app-defaults           \
7469     /usr/local/X11R4/lib/app-defaults           \
7470                                                 \
7471     /usr/local/lib/X11/app-defaults             \
7472     /usr/local/lib/X11R6/app-defaults           \
7473     /usr/local/lib/X11R6/X11/app-defaults       \
7474     /usr/local/lib/X11R5/app-defaults           \
7475     /usr/local/lib/X11R5/X11/app-defaults       \
7476     /usr/local/lib/X11R4/app-defaults           \
7477     /usr/local/lib/X11R4/X11/app-defaults       \
7478                                                 \
7479     /usr/X386/lib/X11/app-defaults              \
7480     /usr/x386/lib/X11/app-defaults              \
7481     /usr/XFree86/lib/X11/app-defaults           \
7482                                                 \
7483     /usr/lib/X11/app-defaults                   \
7484     /usr/local/lib/X11/app-defaults             \
7485     /usr/unsupported/lib/X11/app-defaults       \
7486     /usr/athena/lib/X11/app-defaults            \
7487     /usr/local/x11r5/lib/X11/app-defaults       \
7488     /usr/lpp/Xamples/lib/X11/app-defaults       \
7489     /lib/usr/lib/X11/app-defaults               \
7490                                                 \
7491     /usr/openwin/lib/app-defaults               \
7492     /usr/openwin/lib/X11/app-defaults           \
7493     /usr/openwin/share/lib/app-defaults         \
7494     /usr/openwin/share/lib/X11/app-defaults     \
7495                                                 \
7496     /X11R6/lib/app-defaults                     \
7497     /X11R5/lib/app-defaults                     \
7498     /X11R4/lib/app-defaults                     \
7499     ; \
7500   do
7501     if test -d "$ac_dir"; then
7502       ac_x_app_defaults=$ac_dir
7503       break
7504     fi
7505   done
7506
7507       fi
7508       if test x"$ac_x_app_defaults" = x; then
7509         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7510       else
7511         # Record where we found app-defaults for the cache.
7512         ac_cv_x_app_defaults="$ac_x_app_defaults"
7513       fi
7514 fi
7515 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7516 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7517     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7518 case "$host" in
7519     *-hpux*)
7520
7521       # The following arcana was gleaned from conversations with
7522       # Eric Schwartz <erics@col.hp.com>:
7523       #
7524       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7525       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7526       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7527       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7528       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7529       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7530       # you don't need any -I or -L arguments.
7531       #
7532       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7533       # are the same division as 10.x.  However, there are no symlinks to
7534       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7535       # arguments are always necessary.
7536       #
7537       # However, X11R6 was available on HPUX 9.x as a patch: if that
7538       # patch was installed, then all of X11R6 went in to
7539       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7540       #
7541       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7542       # whether R5 was available as a patch; R6 undoubtedly was not.)
7543       #
7544       # So.  We try and use the highest numbered pair of
7545       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7546       # that are available.  We do not mix and match different versions
7547       # of X.
7548       #
7549       # Question I still don't know the answer to: (do you?)
7550       #
7551       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7552       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7553       #     that contrib directory?  Did it contain so-called "standard"
7554       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7555       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7556       #     be a situation where one had to reach into the R5 headers and
7557       #     libs to find Xmu?  That is, must both R6 and R5 directories
7558       #     be on the -I and -L lists in that case?
7559       #
7560       for version in X11R6 X11R5 X11R4 ; do
7561         # if either pair of directories exists...
7562         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7563         then
7564            # if contrib exists, use it...
7565            if test -d /usr/contrib/$version/include ; then
7566              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7567              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7568            fi
7569            # if the "standard" one exists, use it.
7570            if test -d /usr/include/$version ; then
7571              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7572              X_LIBS="$X_LIBS -L/usr/lib/$version"
7573            fi
7574            # since at least one of the pair exists, go no farther.
7575            break
7576         fi
7577       done
7578
7579       # Now find Motif.  Thanks for not making xmkmf find this by
7580       # default, you losers.
7581       #
7582       if test -d /usr/include/Motif2.1 ; then
7583         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7584         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7585       elif test -d /usr/include/Motif1.2 ; then
7586         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7587         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7588       elif test -d /usr/include/Motif1.1 ; then
7589         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7590         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7591       fi
7592
7593       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7594       #
7595       if test -d /opt/graphics/OpenGL/include ; then
7596         # HP-UX 10.20 puts it here
7597         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7598         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7599       elif test -d /opt/Mesa/lib ; then
7600         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7601         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7602       fi
7603
7604
7605       if test -d /opt/xpm/lib/X11 ; then
7606         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7607         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7608       fi
7609
7610       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7611       # in /usr/local/, unless there is already an xscreensaver in
7612       # /usr/local/bin/.  This can be overridden with the --prefix arg
7613       # to configure.  I'm not sure this is the right thing to do, but
7614       # Richard Lloyd says so...
7615       #
7616       if test \! -x /usr/local/bin/xscreensaver ; then
7617         ac_default_prefix=/opt/xscreensaver
7618       fi
7619
7620     ;;
7621     *-solaris*)
7622
7623       # Thanks for not making xmkmf find this by default, pinheads.
7624       # And thanks for moving things around again, too.  Is this
7625       # really the standard location now?  What happened to the
7626       # joke that this kind of thing went in /opt?
7627       # cthomp says "answer: CDE (Common Disorganized Environment)"
7628       #
7629       if test -f /usr/dt/include/Xm/Xm.h ; then
7630         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7631         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7632
7633         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7634         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7635 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7636 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7637   echo $ECHO_N "(cached) $ECHO_C" >&6
7638 else
7639   ac_check_lib_save_LIBS=$LIBS
7640 LIBS="-lgen  $LIBS"
7641 cat >conftest.$ac_ext <<_ACEOF
7642 /* confdefs.h.  */
7643 _ACEOF
7644 cat confdefs.h >>conftest.$ac_ext
7645 cat >>conftest.$ac_ext <<_ACEOF
7646 /* end confdefs.h.  */
7647
7648 /* Override any GCC internal prototype to avoid an error.
7649    Use char because int might match the return type of a GCC
7650    builtin and then its argument prototype would still apply.  */
7651 #ifdef __cplusplus
7652 extern "C"
7653 #endif
7654 char regcmp ();
7655 int
7656 main ()
7657 {
7658 return regcmp ();
7659   ;
7660   return 0;
7661 }
7662 _ACEOF
7663 rm -rf conftest.$ac_objext conftest$ac_exeext
7664 if { (ac_try="$ac_link"
7665 case "(($ac_try" in
7666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7667   *) ac_try_echo=$ac_try;;
7668 esac
7669 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7670   (eval "$ac_link") 2>conftest.er1
7671   ac_status=$?
7672   grep -v '^ *+' conftest.er1 >conftest.err
7673   rm -rf conftest.er1
7674   cat conftest.err >&5
7675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7676   (exit $ac_status); } && {
7677          test -z "$ac_c_werror_flag" ||
7678          test ! -s conftest.err
7679        } && test -s conftest$ac_exeext &&
7680        $as_test_x conftest$ac_exeext; then
7681   ac_cv_lib_gen_regcmp=yes
7682 else
7683   echo "$as_me: failed program was:" >&5
7684 sed 's/^/| /' conftest.$ac_ext >&5
7685
7686         ac_cv_lib_gen_regcmp=no
7687 fi
7688
7689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7690       conftest$ac_exeext conftest.$ac_ext
7691 LIBS=$ac_check_lib_save_LIBS
7692 fi
7693 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7694 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7695 if test $ac_cv_lib_gen_regcmp = yes; then
7696   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7697 fi
7698
7699       fi
7700
7701     ;;
7702     *-darwin*)
7703
7704       # On MacOS X (10.x with "fink"), many things are under /sw/.
7705       #
7706       if test -d /sw/include ; then
7707         X_CFLAGS="-I/sw/include $X_CFLAGS"
7708         X_LIBS="-L/sw/lib $X_LIBS"
7709       fi
7710     ;;
7711   esac
7712 { echo "$as_me:$LINENO: checking for XPointer" >&5
7713 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7714 if test "${ac_cv_xpointer+set}" = set; then
7715   echo $ECHO_N "(cached) $ECHO_C" >&6
7716 else
7717
7718   ac_save_CPPFLAGS="$CPPFLAGS"
7719   if test \! -z "$includedir" ; then
7720     CPPFLAGS="$CPPFLAGS -I$includedir"
7721   fi
7722   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7723   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7724   cat >conftest.$ac_ext <<_ACEOF
7725 /* confdefs.h.  */
7726 _ACEOF
7727 cat confdefs.h >>conftest.$ac_ext
7728 cat >>conftest.$ac_ext <<_ACEOF
7729 /* end confdefs.h.  */
7730 #include <X11/Xlib.h>
7731 int
7732 main ()
7733 {
7734 XPointer foo = (XPointer) 0;
7735   ;
7736   return 0;
7737 }
7738 _ACEOF
7739 rm -rf conftest.$ac_objext
7740 if { (ac_try="$ac_compile"
7741 case "(($ac_try" in
7742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7743   *) ac_try_echo=$ac_try;;
7744 esac
7745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7746   (eval "$ac_compile") 2>conftest.er1
7747   ac_status=$?
7748   grep -v '^ *+' conftest.er1 >conftest.err
7749   rm -rf conftest.er1
7750   cat conftest.err >&5
7751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752   (exit $ac_status); } && {
7753          test -z "$ac_c_werror_flag" ||
7754          test ! -s conftest.err
7755        } && test -s conftest.$ac_objext; then
7756   ac_cv_xpointer=yes
7757 else
7758   echo "$as_me: failed program was:" >&5
7759 sed 's/^/| /' conftest.$ac_ext >&5
7760
7761         ac_cv_xpointer=no
7762 fi
7763
7764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7765   CPPFLAGS="$ac_save_CPPFLAGS"
7766 fi
7767 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7768 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7769   if test "$ac_cv_xpointer" != yes; then
7770    cat >>confdefs.h <<\_ACEOF
7771 #define XPointer char*
7772 _ACEOF
7773
7774   fi
7775
7776 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7777 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7778   ac_macosx=no
7779   case "$host" in
7780     *-apple-darwin* )
7781       ac_macosx=yes
7782     ;;
7783   esac
7784 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7785 echo "${ECHO_T}$ac_macosx" >&6; }
7786
7787
7788 ###############################################################################
7789 #
7790 #       Gettext support
7791 #
7792 ###############################################################################
7793
7794
7795
7796 if test -n ""; then
7797     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7798 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7799
7800     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7801     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7802
7803     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7804
7805
7806     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7807         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7808 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7809     else
7810         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7811 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7812         exit 1
7813     fi
7814 fi
7815
7816   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'
7817 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'
7818      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'
7819       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7820      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'
7821    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'
7822     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'
7823 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'
7824        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'
7825       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'
7826     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'
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840 # Use the tools built into the package, not the ones that are installed.
7841
7842 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7843 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7844 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7845
7846
7847
7848
7849
7850 # Extract the first word of "perl", so it can be a program name with args.
7851 set dummy perl; ac_word=$2
7852 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7854 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7855   echo $ECHO_N "(cached) $ECHO_C" >&6
7856 else
7857   case $INTLTOOL_PERL in
7858   [\\/]* | ?:[\\/]*)
7859   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7860   ;;
7861   *)
7862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7863 for as_dir in $PATH
7864 do
7865   IFS=$as_save_IFS
7866   test -z "$as_dir" && as_dir=.
7867   for ac_exec_ext in '' $ac_executable_extensions; do
7868   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7869     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7870     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7871     break 2
7872   fi
7873 done
7874 done
7875 IFS=$as_save_IFS
7876
7877   ;;
7878 esac
7879 fi
7880 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7881 if test -n "$INTLTOOL_PERL"; then
7882   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7883 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7884 else
7885   { echo "$as_me:$LINENO: result: no" >&5
7886 echo "${ECHO_T}no" >&6; }
7887 fi
7888
7889
7890 if test -z "$INTLTOOL_PERL"; then
7891    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7892 echo "$as_me: error: perl not found; required for intltool" >&2;}
7893    { (exit 1); exit 1; }; }
7894 fi
7895 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7896    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7897 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7898    { (exit 1); exit 1; }; }
7899 fi
7900
7901 # Remove file type tags (using []) from po/POTFILES.
7902
7903
7904
7905
7906
7907
7908
7909 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7910
7911 ac_config_commands="$ac_config_commands default-1"
7912
7913
7914
7915 GETTEXT_PACKAGE=xscreensaver
7916
7917 cat >>confdefs.h <<_ACEOF
7918 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7919 _ACEOF
7920
7921
7922 cat >>confdefs.h <<_ACEOF
7923 #define PACKAGE "$GETTEXT_PACKAGE"
7924 _ACEOF
7925
7926
7927
7928 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7929 if test -n "$ac_tool_prefix"; then
7930   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7931 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7932 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7934 if test "${ac_cv_prog_RANLIB+set}" = set; then
7935   echo $ECHO_N "(cached) $ECHO_C" >&6
7936 else
7937   if test -n "$RANLIB"; then
7938   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7939 else
7940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941 for as_dir in $PATH
7942 do
7943   IFS=$as_save_IFS
7944   test -z "$as_dir" && as_dir=.
7945   for ac_exec_ext in '' $ac_executable_extensions; do
7946   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7947     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7948     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7949     break 2
7950   fi
7951 done
7952 done
7953 IFS=$as_save_IFS
7954
7955 fi
7956 fi
7957 RANLIB=$ac_cv_prog_RANLIB
7958 if test -n "$RANLIB"; then
7959   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7960 echo "${ECHO_T}$RANLIB" >&6; }
7961 else
7962   { echo "$as_me:$LINENO: result: no" >&5
7963 echo "${ECHO_T}no" >&6; }
7964 fi
7965
7966
7967 fi
7968 if test -z "$ac_cv_prog_RANLIB"; then
7969   ac_ct_RANLIB=$RANLIB
7970   # Extract the first word of "ranlib", so it can be a program name with args.
7971 set dummy ranlib; ac_word=$2
7972 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7974 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7975   echo $ECHO_N "(cached) $ECHO_C" >&6
7976 else
7977   if test -n "$ac_ct_RANLIB"; then
7978   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7979 else
7980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981 for as_dir in $PATH
7982 do
7983   IFS=$as_save_IFS
7984   test -z "$as_dir" && as_dir=.
7985   for ac_exec_ext in '' $ac_executable_extensions; do
7986   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7987     ac_cv_prog_ac_ct_RANLIB="ranlib"
7988     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7989     break 2
7990   fi
7991 done
7992 done
7993 IFS=$as_save_IFS
7994
7995 fi
7996 fi
7997 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7998 if test -n "$ac_ct_RANLIB"; then
7999   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8000 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8001 else
8002   { echo "$as_me:$LINENO: result: no" >&5
8003 echo "${ECHO_T}no" >&6; }
8004 fi
8005
8006   if test "x$ac_ct_RANLIB" = x; then
8007     RANLIB=":"
8008   else
8009     case $cross_compiling:$ac_tool_warned in
8010 yes:)
8011 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8012 whose name does not start with the host triplet.  If you think this
8013 configuration is useful to you, please write to autoconf@gnu.org." >&5
8014 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8015 whose name does not start with the host triplet.  If you think this
8016 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8017 ac_tool_warned=yes ;;
8018 esac
8019     RANLIB=$ac_ct_RANLIB
8020   fi
8021 else
8022   RANLIB="$ac_cv_prog_RANLIB"
8023 fi
8024
8025 { echo "$as_me:$LINENO: checking for off_t" >&5
8026 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8027 if test "${ac_cv_type_off_t+set}" = set; then
8028   echo $ECHO_N "(cached) $ECHO_C" >&6
8029 else
8030   cat >conftest.$ac_ext <<_ACEOF
8031 /* confdefs.h.  */
8032 _ACEOF
8033 cat confdefs.h >>conftest.$ac_ext
8034 cat >>conftest.$ac_ext <<_ACEOF
8035 /* end confdefs.h.  */
8036 $ac_includes_default
8037 typedef off_t ac__type_new_;
8038 int
8039 main ()
8040 {
8041 if ((ac__type_new_ *) 0)
8042   return 0;
8043 if (sizeof (ac__type_new_))
8044   return 0;
8045   ;
8046   return 0;
8047 }
8048 _ACEOF
8049 rm -rf conftest.$ac_objext
8050 if { (ac_try="$ac_compile"
8051 case "(($ac_try" in
8052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8053   *) ac_try_echo=$ac_try;;
8054 esac
8055 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8056   (eval "$ac_compile") 2>conftest.er1
8057   ac_status=$?
8058   grep -v '^ *+' conftest.er1 >conftest.err
8059   rm -rf conftest.er1
8060   cat conftest.err >&5
8061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8062   (exit $ac_status); } && {
8063          test -z "$ac_c_werror_flag" ||
8064          test ! -s conftest.err
8065        } && test -s conftest.$ac_objext; then
8066   ac_cv_type_off_t=yes
8067 else
8068   echo "$as_me: failed program was:" >&5
8069 sed 's/^/| /' conftest.$ac_ext >&5
8070
8071         ac_cv_type_off_t=no
8072 fi
8073
8074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8075 fi
8076 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8077 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8078 if test $ac_cv_type_off_t = yes; then
8079   :
8080 else
8081
8082 cat >>confdefs.h <<_ACEOF
8083 #define off_t long int
8084 _ACEOF
8085
8086 fi
8087
8088 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8089 # for constant arguments.  Useless!
8090 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8091 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8092 if test "${ac_cv_working_alloca_h+set}" = set; then
8093   echo $ECHO_N "(cached) $ECHO_C" >&6
8094 else
8095   cat >conftest.$ac_ext <<_ACEOF
8096 /* confdefs.h.  */
8097 _ACEOF
8098 cat confdefs.h >>conftest.$ac_ext
8099 cat >>conftest.$ac_ext <<_ACEOF
8100 /* end confdefs.h.  */
8101 #include <alloca.h>
8102 int
8103 main ()
8104 {
8105 char *p = (char *) alloca (2 * sizeof (int));
8106                           if (p) return 0;
8107   ;
8108   return 0;
8109 }
8110 _ACEOF
8111 rm -rf conftest.$ac_objext conftest$ac_exeext
8112 if { (ac_try="$ac_link"
8113 case "(($ac_try" in
8114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8115   *) ac_try_echo=$ac_try;;
8116 esac
8117 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8118   (eval "$ac_link") 2>conftest.er1
8119   ac_status=$?
8120   grep -v '^ *+' conftest.er1 >conftest.err
8121   rm -rf conftest.er1
8122   cat conftest.err >&5
8123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124   (exit $ac_status); } && {
8125          test -z "$ac_c_werror_flag" ||
8126          test ! -s conftest.err
8127        } && test -s conftest$ac_exeext &&
8128        $as_test_x conftest$ac_exeext; then
8129   ac_cv_working_alloca_h=yes
8130 else
8131   echo "$as_me: failed program was:" >&5
8132 sed 's/^/| /' conftest.$ac_ext >&5
8133
8134         ac_cv_working_alloca_h=no
8135 fi
8136
8137 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8138       conftest$ac_exeext conftest.$ac_ext
8139 fi
8140 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8141 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8142 if test $ac_cv_working_alloca_h = yes; then
8143
8144 cat >>confdefs.h <<\_ACEOF
8145 #define HAVE_ALLOCA_H 1
8146 _ACEOF
8147
8148 fi
8149
8150 { echo "$as_me:$LINENO: checking for alloca" >&5
8151 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8152 if test "${ac_cv_func_alloca_works+set}" = set; then
8153   echo $ECHO_N "(cached) $ECHO_C" >&6
8154 else
8155   cat >conftest.$ac_ext <<_ACEOF
8156 /* confdefs.h.  */
8157 _ACEOF
8158 cat confdefs.h >>conftest.$ac_ext
8159 cat >>conftest.$ac_ext <<_ACEOF
8160 /* end confdefs.h.  */
8161 #ifdef __GNUC__
8162 # define alloca __builtin_alloca
8163 #else
8164 # ifdef _MSC_VER
8165 #  include <malloc.h>
8166 #  define alloca _alloca
8167 # else
8168 #  ifdef HAVE_ALLOCA_H
8169 #   include <alloca.h>
8170 #  else
8171 #   ifdef _AIX
8172  #pragma alloca
8173 #   else
8174 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8175 char *alloca ();
8176 #    endif
8177 #   endif
8178 #  endif
8179 # endif
8180 #endif
8181
8182 int
8183 main ()
8184 {
8185 char *p = (char *) alloca (1);
8186                                     if (p) return 0;
8187   ;
8188   return 0;
8189 }
8190 _ACEOF
8191 rm -rf conftest.$ac_objext conftest$ac_exeext
8192 if { (ac_try="$ac_link"
8193 case "(($ac_try" in
8194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8195   *) ac_try_echo=$ac_try;;
8196 esac
8197 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8198   (eval "$ac_link") 2>conftest.er1
8199   ac_status=$?
8200   grep -v '^ *+' conftest.er1 >conftest.err
8201   rm -rf conftest.er1
8202   cat conftest.err >&5
8203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8204   (exit $ac_status); } && {
8205          test -z "$ac_c_werror_flag" ||
8206          test ! -s conftest.err
8207        } && test -s conftest$ac_exeext &&
8208        $as_test_x conftest$ac_exeext; then
8209   ac_cv_func_alloca_works=yes
8210 else
8211   echo "$as_me: failed program was:" >&5
8212 sed 's/^/| /' conftest.$ac_ext >&5
8213
8214         ac_cv_func_alloca_works=no
8215 fi
8216
8217 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8218       conftest$ac_exeext conftest.$ac_ext
8219 fi
8220 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8221 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8222
8223 if test $ac_cv_func_alloca_works = yes; then
8224
8225 cat >>confdefs.h <<\_ACEOF
8226 #define HAVE_ALLOCA 1
8227 _ACEOF
8228
8229 else
8230   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8231 # that cause trouble.  Some versions do not even contain alloca or
8232 # contain a buggy version.  If you still want to use their alloca,
8233 # use ar to extract alloca.o from them instead of compiling alloca.c.
8234
8235 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8236
8237 cat >>confdefs.h <<\_ACEOF
8238 #define C_ALLOCA 1
8239 _ACEOF
8240
8241
8242 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8243 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8244 if test "${ac_cv_os_cray+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247   cat >conftest.$ac_ext <<_ACEOF
8248 /* confdefs.h.  */
8249 _ACEOF
8250 cat confdefs.h >>conftest.$ac_ext
8251 cat >>conftest.$ac_ext <<_ACEOF
8252 /* end confdefs.h.  */
8253 #if defined CRAY && ! defined CRAY2
8254 webecray
8255 #else
8256 wenotbecray
8257 #endif
8258
8259 _ACEOF
8260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8261   $EGREP "webecray" >/dev/null 2>&1; then
8262   ac_cv_os_cray=yes
8263 else
8264   ac_cv_os_cray=no
8265 fi
8266 rm -rf conftest*
8267
8268 fi
8269 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8270 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8271 if test $ac_cv_os_cray = yes; then
8272   for ac_func in _getb67 GETB67 getb67; do
8273     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8274 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8275 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8276 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8277   echo $ECHO_N "(cached) $ECHO_C" >&6
8278 else
8279   cat >conftest.$ac_ext <<_ACEOF
8280 /* confdefs.h.  */
8281 _ACEOF
8282 cat confdefs.h >>conftest.$ac_ext
8283 cat >>conftest.$ac_ext <<_ACEOF
8284 /* end confdefs.h.  */
8285 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8286    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8287 #define $ac_func innocuous_$ac_func
8288
8289 /* System header to define __stub macros and hopefully few prototypes,
8290     which can conflict with char $ac_func (); below.
8291     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8292     <limits.h> exists even on freestanding compilers.  */
8293
8294 #ifdef __STDC__
8295 # include <limits.h>
8296 #else
8297 # include <assert.h>
8298 #endif
8299
8300 #undef $ac_func
8301
8302 /* Override any GCC internal prototype to avoid an error.
8303    Use char because int might match the return type of a GCC
8304    builtin and then its argument prototype would still apply.  */
8305 #ifdef __cplusplus
8306 extern "C"
8307 #endif
8308 char $ac_func ();
8309 /* The GNU C library defines this for functions which it implements
8310     to always fail with ENOSYS.  Some functions are actually named
8311     something starting with __ and the normal name is an alias.  */
8312 #if defined __stub_$ac_func || defined __stub___$ac_func
8313 choke me
8314 #endif
8315
8316 int
8317 main ()
8318 {
8319 return $ac_func ();
8320   ;
8321   return 0;
8322 }
8323 _ACEOF
8324 rm -rf conftest.$ac_objext conftest$ac_exeext
8325 if { (ac_try="$ac_link"
8326 case "(($ac_try" in
8327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8328   *) ac_try_echo=$ac_try;;
8329 esac
8330 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8331   (eval "$ac_link") 2>conftest.er1
8332   ac_status=$?
8333   grep -v '^ *+' conftest.er1 >conftest.err
8334   rm -rf conftest.er1
8335   cat conftest.err >&5
8336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337   (exit $ac_status); } && {
8338          test -z "$ac_c_werror_flag" ||
8339          test ! -s conftest.err
8340        } && test -s conftest$ac_exeext &&
8341        $as_test_x conftest$ac_exeext; then
8342   eval "$as_ac_var=yes"
8343 else
8344   echo "$as_me: failed program was:" >&5
8345 sed 's/^/| /' conftest.$ac_ext >&5
8346
8347         eval "$as_ac_var=no"
8348 fi
8349
8350 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8351       conftest$ac_exeext conftest.$ac_ext
8352 fi
8353 ac_res=`eval echo '${'$as_ac_var'}'`
8354                { echo "$as_me:$LINENO: result: $ac_res" >&5
8355 echo "${ECHO_T}$ac_res" >&6; }
8356 if test `eval echo '${'$as_ac_var'}'` = yes; then
8357
8358 cat >>confdefs.h <<_ACEOF
8359 #define CRAY_STACKSEG_END $ac_func
8360 _ACEOF
8361
8362     break
8363 fi
8364
8365   done
8366 fi
8367
8368 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8369 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8370 if test "${ac_cv_c_stack_direction+set}" = set; then
8371   echo $ECHO_N "(cached) $ECHO_C" >&6
8372 else
8373   if test "$cross_compiling" = yes; then
8374   ac_cv_c_stack_direction=0
8375 else
8376   cat >conftest.$ac_ext <<_ACEOF
8377 /* confdefs.h.  */
8378 _ACEOF
8379 cat confdefs.h >>conftest.$ac_ext
8380 cat >>conftest.$ac_ext <<_ACEOF
8381 /* end confdefs.h.  */
8382 $ac_includes_default
8383 int
8384 find_stack_direction ()
8385 {
8386   static char *addr = 0;
8387   auto char dummy;
8388   if (addr == 0)
8389     {
8390       addr = &dummy;
8391       return find_stack_direction ();
8392     }
8393   else
8394     return (&dummy > addr) ? 1 : -1;
8395 }
8396
8397 int
8398 main ()
8399 {
8400   return find_stack_direction () < 0;
8401 }
8402 _ACEOF
8403 rm -rf conftest$ac_exeext
8404 if { (ac_try="$ac_link"
8405 case "(($ac_try" in
8406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8407   *) ac_try_echo=$ac_try;;
8408 esac
8409 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8410   (eval "$ac_link") 2>&5
8411   ac_status=$?
8412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8414   { (case "(($ac_try" in
8415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8416   *) ac_try_echo=$ac_try;;
8417 esac
8418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8419   (eval "$ac_try") 2>&5
8420   ac_status=$?
8421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422   (exit $ac_status); }; }; then
8423   ac_cv_c_stack_direction=1
8424 else
8425   echo "$as_me: program exited with status $ac_status" >&5
8426 echo "$as_me: failed program was:" >&5
8427 sed 's/^/| /' conftest.$ac_ext >&5
8428
8429 ( exit $ac_status )
8430 ac_cv_c_stack_direction=-1
8431 fi
8432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8433 fi
8434
8435
8436 fi
8437 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8438 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8439
8440 cat >>confdefs.h <<_ACEOF
8441 #define STACK_DIRECTION $ac_cv_c_stack_direction
8442 _ACEOF
8443
8444
8445 fi
8446
8447
8448
8449 for ac_header in stdlib.h unistd.h
8450 do
8451 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8452 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8453   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8455 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8456   echo $ECHO_N "(cached) $ECHO_C" >&6
8457 fi
8458 ac_res=`eval echo '${'$as_ac_Header'}'`
8459                { echo "$as_me:$LINENO: result: $ac_res" >&5
8460 echo "${ECHO_T}$ac_res" >&6; }
8461 else
8462   # Is the header compilable?
8463 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8464 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8465 cat >conftest.$ac_ext <<_ACEOF
8466 /* confdefs.h.  */
8467 _ACEOF
8468 cat confdefs.h >>conftest.$ac_ext
8469 cat >>conftest.$ac_ext <<_ACEOF
8470 /* end confdefs.h.  */
8471 $ac_includes_default
8472 #include <$ac_header>
8473 _ACEOF
8474 rm -rf conftest.$ac_objext
8475 if { (ac_try="$ac_compile"
8476 case "(($ac_try" in
8477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478   *) ac_try_echo=$ac_try;;
8479 esac
8480 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8481   (eval "$ac_compile") 2>conftest.er1
8482   ac_status=$?
8483   grep -v '^ *+' conftest.er1 >conftest.err
8484   rm -rf conftest.er1
8485   cat conftest.err >&5
8486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8487   (exit $ac_status); } && {
8488          test -z "$ac_c_werror_flag" ||
8489          test ! -s conftest.err
8490        } && test -s conftest.$ac_objext; then
8491   ac_header_compiler=yes
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 sed 's/^/| /' conftest.$ac_ext >&5
8495
8496         ac_header_compiler=no
8497 fi
8498
8499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8500 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8501 echo "${ECHO_T}$ac_header_compiler" >&6; }
8502
8503 # Is the header present?
8504 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8505 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8506 cat >conftest.$ac_ext <<_ACEOF
8507 /* confdefs.h.  */
8508 _ACEOF
8509 cat confdefs.h >>conftest.$ac_ext
8510 cat >>conftest.$ac_ext <<_ACEOF
8511 /* end confdefs.h.  */
8512 #include <$ac_header>
8513 _ACEOF
8514 if { (ac_try="$ac_cpp conftest.$ac_ext"
8515 case "(($ac_try" in
8516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8517   *) ac_try_echo=$ac_try;;
8518 esac
8519 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8520   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8521   ac_status=$?
8522   grep -v '^ *+' conftest.er1 >conftest.err
8523   rm -rf conftest.er1
8524   cat conftest.err >&5
8525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526   (exit $ac_status); } >/dev/null && {
8527          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8528          test ! -s conftest.err
8529        }; then
8530   ac_header_preproc=yes
8531 else
8532   echo "$as_me: failed program was:" >&5
8533 sed 's/^/| /' conftest.$ac_ext >&5
8534
8535   ac_header_preproc=no
8536 fi
8537
8538 rm -rf conftest.err conftest.$ac_ext
8539 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8540 echo "${ECHO_T}$ac_header_preproc" >&6; }
8541
8542 # So?  What about this header?
8543 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8544   yes:no: )
8545     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8546 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8547     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8548 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8549     ac_header_preproc=yes
8550     ;;
8551   no:yes:* )
8552     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8553 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8555 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8556     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8557 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8558     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8559 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8560     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8561 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8562     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8563 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8564
8565     ;;
8566 esac
8567 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8569 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   eval "$as_ac_Header=\$ac_header_preproc"
8573 fi
8574 ac_res=`eval echo '${'$as_ac_Header'}'`
8575                { echo "$as_me:$LINENO: result: $ac_res" >&5
8576 echo "${ECHO_T}$ac_res" >&6; }
8577
8578 fi
8579 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8580   cat >>confdefs.h <<_ACEOF
8581 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8582 _ACEOF
8583
8584 fi
8585
8586 done
8587
8588
8589 for ac_func in getpagesize
8590 do
8591 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8592 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8593 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8594 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8595   echo $ECHO_N "(cached) $ECHO_C" >&6
8596 else
8597   cat >conftest.$ac_ext <<_ACEOF
8598 /* confdefs.h.  */
8599 _ACEOF
8600 cat confdefs.h >>conftest.$ac_ext
8601 cat >>conftest.$ac_ext <<_ACEOF
8602 /* end confdefs.h.  */
8603 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8604    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8605 #define $ac_func innocuous_$ac_func
8606
8607 /* System header to define __stub macros and hopefully few prototypes,
8608     which can conflict with char $ac_func (); below.
8609     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8610     <limits.h> exists even on freestanding compilers.  */
8611
8612 #ifdef __STDC__
8613 # include <limits.h>
8614 #else
8615 # include <assert.h>
8616 #endif
8617
8618 #undef $ac_func
8619
8620 /* Override any GCC internal prototype to avoid an error.
8621    Use char because int might match the return type of a GCC
8622    builtin and then its argument prototype would still apply.  */
8623 #ifdef __cplusplus
8624 extern "C"
8625 #endif
8626 char $ac_func ();
8627 /* The GNU C library defines this for functions which it implements
8628     to always fail with ENOSYS.  Some functions are actually named
8629     something starting with __ and the normal name is an alias.  */
8630 #if defined __stub_$ac_func || defined __stub___$ac_func
8631 choke me
8632 #endif
8633
8634 int
8635 main ()
8636 {
8637 return $ac_func ();
8638   ;
8639   return 0;
8640 }
8641 _ACEOF
8642 rm -rf conftest.$ac_objext conftest$ac_exeext
8643 if { (ac_try="$ac_link"
8644 case "(($ac_try" in
8645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8646   *) ac_try_echo=$ac_try;;
8647 esac
8648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8649   (eval "$ac_link") 2>conftest.er1
8650   ac_status=$?
8651   grep -v '^ *+' conftest.er1 >conftest.err
8652   rm -rf conftest.er1
8653   cat conftest.err >&5
8654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655   (exit $ac_status); } && {
8656          test -z "$ac_c_werror_flag" ||
8657          test ! -s conftest.err
8658        } && test -s conftest$ac_exeext &&
8659        $as_test_x conftest$ac_exeext; then
8660   eval "$as_ac_var=yes"
8661 else
8662   echo "$as_me: failed program was:" >&5
8663 sed 's/^/| /' conftest.$ac_ext >&5
8664
8665         eval "$as_ac_var=no"
8666 fi
8667
8668 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8669       conftest$ac_exeext conftest.$ac_ext
8670 fi
8671 ac_res=`eval echo '${'$as_ac_var'}'`
8672                { echo "$as_me:$LINENO: result: $ac_res" >&5
8673 echo "${ECHO_T}$ac_res" >&6; }
8674 if test `eval echo '${'$as_ac_var'}'` = yes; then
8675   cat >>confdefs.h <<_ACEOF
8676 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8677 _ACEOF
8678
8679 fi
8680 done
8681
8682 { echo "$as_me:$LINENO: checking for working mmap" >&5
8683 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8684 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8685   echo $ECHO_N "(cached) $ECHO_C" >&6
8686 else
8687   if test "$cross_compiling" = yes; then
8688   ac_cv_func_mmap_fixed_mapped=no
8689 else
8690   cat >conftest.$ac_ext <<_ACEOF
8691 /* confdefs.h.  */
8692 _ACEOF
8693 cat confdefs.h >>conftest.$ac_ext
8694 cat >>conftest.$ac_ext <<_ACEOF
8695 /* end confdefs.h.  */
8696 $ac_includes_default
8697 /* malloc might have been renamed as rpl_malloc. */
8698 #undef malloc
8699
8700 /* Thanks to Mike Haertel and Jim Avera for this test.
8701    Here is a matrix of mmap possibilities:
8702         mmap private not fixed
8703         mmap private fixed at somewhere currently unmapped
8704         mmap private fixed at somewhere already mapped
8705         mmap shared not fixed
8706         mmap shared fixed at somewhere currently unmapped
8707         mmap shared fixed at somewhere already mapped
8708    For private mappings, we should verify that changes cannot be read()
8709    back from the file, nor mmap's back from the file at a different
8710    address.  (There have been systems where private was not correctly
8711    implemented like the infamous i386 svr4.0, and systems where the
8712    VM page cache was not coherent with the file system buffer cache
8713    like early versions of FreeBSD and possibly contemporary NetBSD.)
8714    For shared mappings, we should conversely verify that changes get
8715    propagated back to all the places they're supposed to be.
8716
8717    Grep wants private fixed already mapped.
8718    The main things grep needs to know about mmap are:
8719    * does it exist and is it safe to write into the mmap'd area
8720    * how to use it (BSD variants)  */
8721
8722 #include <fcntl.h>
8723 #include <sys/mman.h>
8724
8725 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8726 char *malloc ();
8727 #endif
8728
8729 /* This mess was copied from the GNU getpagesize.h.  */
8730 #ifndef HAVE_GETPAGESIZE
8731 /* Assume that all systems that can run configure have sys/param.h.  */
8732 # ifndef HAVE_SYS_PARAM_H
8733 #  define HAVE_SYS_PARAM_H 1
8734 # endif
8735
8736 # ifdef _SC_PAGESIZE
8737 #  define getpagesize() sysconf(_SC_PAGESIZE)
8738 # else /* no _SC_PAGESIZE */
8739 #  ifdef HAVE_SYS_PARAM_H
8740 #   include <sys/param.h>
8741 #   ifdef EXEC_PAGESIZE
8742 #    define getpagesize() EXEC_PAGESIZE
8743 #   else /* no EXEC_PAGESIZE */
8744 #    ifdef NBPG
8745 #     define getpagesize() NBPG * CLSIZE
8746 #     ifndef CLSIZE
8747 #      define CLSIZE 1
8748 #     endif /* no CLSIZE */
8749 #    else /* no NBPG */
8750 #     ifdef NBPC
8751 #      define getpagesize() NBPC
8752 #     else /* no NBPC */
8753 #      ifdef PAGESIZE
8754 #       define getpagesize() PAGESIZE
8755 #      endif /* PAGESIZE */
8756 #     endif /* no NBPC */
8757 #    endif /* no NBPG */
8758 #   endif /* no EXEC_PAGESIZE */
8759 #  else /* no HAVE_SYS_PARAM_H */
8760 #   define getpagesize() 8192   /* punt totally */
8761 #  endif /* no HAVE_SYS_PARAM_H */
8762 # endif /* no _SC_PAGESIZE */
8763
8764 #endif /* no HAVE_GETPAGESIZE */
8765
8766 int
8767 main ()
8768 {
8769   char *data, *data2, *data3;
8770   int i, pagesize;
8771   int fd;
8772
8773   pagesize = getpagesize ();
8774
8775   /* First, make a file with some known garbage in it. */
8776   data = (char *) malloc (pagesize);
8777   if (!data)
8778     return 1;
8779   for (i = 0; i < pagesize; ++i)
8780     *(data + i) = rand ();
8781   umask (0);
8782   fd = creat ("conftest.mmap", 0600);
8783   if (fd < 0)
8784     return 1;
8785   if (write (fd, data, pagesize) != pagesize)
8786     return 1;
8787   close (fd);
8788
8789   /* Next, try to mmap the file at a fixed address which already has
8790      something else allocated at it.  If we can, also make sure that
8791      we see the same garbage.  */
8792   fd = open ("conftest.mmap", O_RDWR);
8793   if (fd < 0)
8794     return 1;
8795   data2 = (char *) malloc (2 * pagesize);
8796   if (!data2)
8797     return 1;
8798   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8799   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8800                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8801     return 1;
8802   for (i = 0; i < pagesize; ++i)
8803     if (*(data + i) != *(data2 + i))
8804       return 1;
8805
8806   /* Finally, make sure that changes to the mapped area do not
8807      percolate back to the file as seen by read().  (This is a bug on
8808      some variants of i386 svr4.0.)  */
8809   for (i = 0; i < pagesize; ++i)
8810     *(data2 + i) = *(data2 + i) + 1;
8811   data3 = (char *) malloc (pagesize);
8812   if (!data3)
8813     return 1;
8814   if (read (fd, data3, pagesize) != pagesize)
8815     return 1;
8816   for (i = 0; i < pagesize; ++i)
8817     if (*(data + i) != *(data3 + i))
8818       return 1;
8819   close (fd);
8820   return 0;
8821 }
8822 _ACEOF
8823 rm -rf conftest$ac_exeext
8824 if { (ac_try="$ac_link"
8825 case "(($ac_try" in
8826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8827   *) ac_try_echo=$ac_try;;
8828 esac
8829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8830   (eval "$ac_link") 2>&5
8831   ac_status=$?
8832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8834   { (case "(($ac_try" in
8835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8836   *) ac_try_echo=$ac_try;;
8837 esac
8838 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8839   (eval "$ac_try") 2>&5
8840   ac_status=$?
8841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8842   (exit $ac_status); }; }; then
8843   ac_cv_func_mmap_fixed_mapped=yes
8844 else
8845   echo "$as_me: program exited with status $ac_status" >&5
8846 echo "$as_me: failed program was:" >&5
8847 sed 's/^/| /' conftest.$ac_ext >&5
8848
8849 ( exit $ac_status )
8850 ac_cv_func_mmap_fixed_mapped=no
8851 fi
8852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8853 fi
8854
8855
8856 fi
8857 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8858 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8859 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8860
8861 cat >>confdefs.h <<\_ACEOF
8862 #define HAVE_MMAP 1
8863 _ACEOF
8864
8865 fi
8866 rm -rf conftest.mmap
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8878 unistd.h sys/param.h
8879 do
8880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8881 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8882   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8883 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8884 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8885   echo $ECHO_N "(cached) $ECHO_C" >&6
8886 fi
8887 ac_res=`eval echo '${'$as_ac_Header'}'`
8888                { echo "$as_me:$LINENO: result: $ac_res" >&5
8889 echo "${ECHO_T}$ac_res" >&6; }
8890 else
8891   # Is the header compilable?
8892 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8893 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8894 cat >conftest.$ac_ext <<_ACEOF
8895 /* confdefs.h.  */
8896 _ACEOF
8897 cat confdefs.h >>conftest.$ac_ext
8898 cat >>conftest.$ac_ext <<_ACEOF
8899 /* end confdefs.h.  */
8900 $ac_includes_default
8901 #include <$ac_header>
8902 _ACEOF
8903 rm -rf conftest.$ac_objext
8904 if { (ac_try="$ac_compile"
8905 case "(($ac_try" in
8906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8907   *) ac_try_echo=$ac_try;;
8908 esac
8909 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8910   (eval "$ac_compile") 2>conftest.er1
8911   ac_status=$?
8912   grep -v '^ *+' conftest.er1 >conftest.err
8913   rm -rf conftest.er1
8914   cat conftest.err >&5
8915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916   (exit $ac_status); } && {
8917          test -z "$ac_c_werror_flag" ||
8918          test ! -s conftest.err
8919        } && test -s conftest.$ac_objext; then
8920   ac_header_compiler=yes
8921 else
8922   echo "$as_me: failed program was:" >&5
8923 sed 's/^/| /' conftest.$ac_ext >&5
8924
8925         ac_header_compiler=no
8926 fi
8927
8928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8930 echo "${ECHO_T}$ac_header_compiler" >&6; }
8931
8932 # Is the header present?
8933 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8934 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8935 cat >conftest.$ac_ext <<_ACEOF
8936 /* confdefs.h.  */
8937 _ACEOF
8938 cat confdefs.h >>conftest.$ac_ext
8939 cat >>conftest.$ac_ext <<_ACEOF
8940 /* end confdefs.h.  */
8941 #include <$ac_header>
8942 _ACEOF
8943 if { (ac_try="$ac_cpp conftest.$ac_ext"
8944 case "(($ac_try" in
8945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946   *) ac_try_echo=$ac_try;;
8947 esac
8948 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8949   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8950   ac_status=$?
8951   grep -v '^ *+' conftest.er1 >conftest.err
8952   rm -rf conftest.er1
8953   cat conftest.err >&5
8954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8955   (exit $ac_status); } >/dev/null && {
8956          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8957          test ! -s conftest.err
8958        }; then
8959   ac_header_preproc=yes
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 sed 's/^/| /' conftest.$ac_ext >&5
8963
8964   ac_header_preproc=no
8965 fi
8966
8967 rm -rf conftest.err conftest.$ac_ext
8968 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8969 echo "${ECHO_T}$ac_header_preproc" >&6; }
8970
8971 # So?  What about this header?
8972 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8973   yes:no: )
8974     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8975 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8976     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8977 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8978     ac_header_preproc=yes
8979     ;;
8980   no:yes:* )
8981     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8982 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8983     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8984 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8985     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8986 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8987     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8988 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8989     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8990 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8991     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8992 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8993
8994     ;;
8995 esac
8996 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8997 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8998 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8999   echo $ECHO_N "(cached) $ECHO_C" >&6
9000 else
9001   eval "$as_ac_Header=\$ac_header_preproc"
9002 fi
9003 ac_res=`eval echo '${'$as_ac_Header'}'`
9004                { echo "$as_me:$LINENO: result: $ac_res" >&5
9005 echo "${ECHO_T}$ac_res" >&6; }
9006
9007 fi
9008 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9009   cat >>confdefs.h <<_ACEOF
9010 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9011 _ACEOF
9012
9013 fi
9014
9015 done
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9029 strdup __argz_count __argz_stringify __argz_next
9030 do
9031 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9032 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9033 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9034 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9035   echo $ECHO_N "(cached) $ECHO_C" >&6
9036 else
9037   cat >conftest.$ac_ext <<_ACEOF
9038 /* confdefs.h.  */
9039 _ACEOF
9040 cat confdefs.h >>conftest.$ac_ext
9041 cat >>conftest.$ac_ext <<_ACEOF
9042 /* end confdefs.h.  */
9043 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9044    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9045 #define $ac_func innocuous_$ac_func
9046
9047 /* System header to define __stub macros and hopefully few prototypes,
9048     which can conflict with char $ac_func (); below.
9049     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9050     <limits.h> exists even on freestanding compilers.  */
9051
9052 #ifdef __STDC__
9053 # include <limits.h>
9054 #else
9055 # include <assert.h>
9056 #endif
9057
9058 #undef $ac_func
9059
9060 /* Override any GCC internal prototype to avoid an error.
9061    Use char because int might match the return type of a GCC
9062    builtin and then its argument prototype would still apply.  */
9063 #ifdef __cplusplus
9064 extern "C"
9065 #endif
9066 char $ac_func ();
9067 /* The GNU C library defines this for functions which it implements
9068     to always fail with ENOSYS.  Some functions are actually named
9069     something starting with __ and the normal name is an alias.  */
9070 #if defined __stub_$ac_func || defined __stub___$ac_func
9071 choke me
9072 #endif
9073
9074 int
9075 main ()
9076 {
9077 return $ac_func ();
9078   ;
9079   return 0;
9080 }
9081 _ACEOF
9082 rm -rf conftest.$ac_objext conftest$ac_exeext
9083 if { (ac_try="$ac_link"
9084 case "(($ac_try" in
9085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9086   *) ac_try_echo=$ac_try;;
9087 esac
9088 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9089   (eval "$ac_link") 2>conftest.er1
9090   ac_status=$?
9091   grep -v '^ *+' conftest.er1 >conftest.err
9092   rm -rf conftest.er1
9093   cat conftest.err >&5
9094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095   (exit $ac_status); } && {
9096          test -z "$ac_c_werror_flag" ||
9097          test ! -s conftest.err
9098        } && test -s conftest$ac_exeext &&
9099        $as_test_x conftest$ac_exeext; then
9100   eval "$as_ac_var=yes"
9101 else
9102   echo "$as_me: failed program was:" >&5
9103 sed 's/^/| /' conftest.$ac_ext >&5
9104
9105         eval "$as_ac_var=no"
9106 fi
9107
9108 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9109       conftest$ac_exeext conftest.$ac_ext
9110 fi
9111 ac_res=`eval echo '${'$as_ac_var'}'`
9112                { echo "$as_me:$LINENO: result: $ac_res" >&5
9113 echo "${ECHO_T}$ac_res" >&6; }
9114 if test `eval echo '${'$as_ac_var'}'` = yes; then
9115   cat >>confdefs.h <<_ACEOF
9116 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9117 _ACEOF
9118
9119 fi
9120 done
9121
9122
9123    if test $ac_cv_header_locale_h = yes; then
9124     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9125 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9126 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9127   echo $ECHO_N "(cached) $ECHO_C" >&6
9128 else
9129   cat >conftest.$ac_ext <<_ACEOF
9130 /* confdefs.h.  */
9131 _ACEOF
9132 cat confdefs.h >>conftest.$ac_ext
9133 cat >>conftest.$ac_ext <<_ACEOF
9134 /* end confdefs.h.  */
9135 #include <locale.h>
9136 int
9137 main ()
9138 {
9139 return LC_MESSAGES
9140   ;
9141   return 0;
9142 }
9143 _ACEOF
9144 rm -rf conftest.$ac_objext conftest$ac_exeext
9145 if { (ac_try="$ac_link"
9146 case "(($ac_try" in
9147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9148   *) ac_try_echo=$ac_try;;
9149 esac
9150 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9151   (eval "$ac_link") 2>conftest.er1
9152   ac_status=$?
9153   grep -v '^ *+' conftest.er1 >conftest.err
9154   rm -rf conftest.er1
9155   cat conftest.err >&5
9156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9157   (exit $ac_status); } && {
9158          test -z "$ac_c_werror_flag" ||
9159          test ! -s conftest.err
9160        } && test -s conftest$ac_exeext &&
9161        $as_test_x conftest$ac_exeext; then
9162   am_cv_val_LC_MESSAGES=yes
9163 else
9164   echo "$as_me: failed program was:" >&5
9165 sed 's/^/| /' conftest.$ac_ext >&5
9166
9167         am_cv_val_LC_MESSAGES=no
9168 fi
9169
9170 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9171       conftest$ac_exeext conftest.$ac_ext
9172 fi
9173 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9174 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9175     if test $am_cv_val_LC_MESSAGES = yes; then
9176
9177 cat >>confdefs.h <<\_ACEOF
9178 #define HAVE_LC_MESSAGES 1
9179 _ACEOF
9180
9181     fi
9182   fi
9183      USE_NLS=yes
9184
9185
9186         nls_cv_force_use_gnu_gettext="no"
9187
9188     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9189     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9190                               nls_cv_header_intl=
9191       nls_cv_header_libgt=
9192       CATOBJEXT=NONE
9193
9194       if test "${ac_cv_header_libintl_h+set}" = set; then
9195   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9196 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9197 if test "${ac_cv_header_libintl_h+set}" = set; then
9198   echo $ECHO_N "(cached) $ECHO_C" >&6
9199 fi
9200 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9201 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9202 else
9203   # Is the header compilable?
9204 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9205 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9206 cat >conftest.$ac_ext <<_ACEOF
9207 /* confdefs.h.  */
9208 _ACEOF
9209 cat confdefs.h >>conftest.$ac_ext
9210 cat >>conftest.$ac_ext <<_ACEOF
9211 /* end confdefs.h.  */
9212 $ac_includes_default
9213 #include <libintl.h>
9214 _ACEOF
9215 rm -rf conftest.$ac_objext
9216 if { (ac_try="$ac_compile"
9217 case "(($ac_try" in
9218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9219   *) ac_try_echo=$ac_try;;
9220 esac
9221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9222   (eval "$ac_compile") 2>conftest.er1
9223   ac_status=$?
9224   grep -v '^ *+' conftest.er1 >conftest.err
9225   rm -rf conftest.er1
9226   cat conftest.err >&5
9227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9228   (exit $ac_status); } && {
9229          test -z "$ac_c_werror_flag" ||
9230          test ! -s conftest.err
9231        } && test -s conftest.$ac_objext; then
9232   ac_header_compiler=yes
9233 else
9234   echo "$as_me: failed program was:" >&5
9235 sed 's/^/| /' conftest.$ac_ext >&5
9236
9237         ac_header_compiler=no
9238 fi
9239
9240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9242 echo "${ECHO_T}$ac_header_compiler" >&6; }
9243
9244 # Is the header present?
9245 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9246 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9247 cat >conftest.$ac_ext <<_ACEOF
9248 /* confdefs.h.  */
9249 _ACEOF
9250 cat confdefs.h >>conftest.$ac_ext
9251 cat >>conftest.$ac_ext <<_ACEOF
9252 /* end confdefs.h.  */
9253 #include <libintl.h>
9254 _ACEOF
9255 if { (ac_try="$ac_cpp conftest.$ac_ext"
9256 case "(($ac_try" in
9257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9258   *) ac_try_echo=$ac_try;;
9259 esac
9260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9261   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9262   ac_status=$?
9263   grep -v '^ *+' conftest.er1 >conftest.err
9264   rm -rf conftest.er1
9265   cat conftest.err >&5
9266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267   (exit $ac_status); } >/dev/null && {
9268          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9269          test ! -s conftest.err
9270        }; then
9271   ac_header_preproc=yes
9272 else
9273   echo "$as_me: failed program was:" >&5
9274 sed 's/^/| /' conftest.$ac_ext >&5
9275
9276   ac_header_preproc=no
9277 fi
9278
9279 rm -rf conftest.err conftest.$ac_ext
9280 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9281 echo "${ECHO_T}$ac_header_preproc" >&6; }
9282
9283 # So?  What about this header?
9284 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9285   yes:no: )
9286     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9287 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9288     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9289 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9290     ac_header_preproc=yes
9291     ;;
9292   no:yes:* )
9293     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9294 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9295     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9296 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9297     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9298 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9299     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9300 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9301     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9302 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9303     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9304 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9305
9306     ;;
9307 esac
9308 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9309 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9310 if test "${ac_cv_header_libintl_h+set}" = set; then
9311   echo $ECHO_N "(cached) $ECHO_C" >&6
9312 else
9313   ac_cv_header_libintl_h=$ac_header_preproc
9314 fi
9315 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9316 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9317
9318 fi
9319 if test $ac_cv_header_libintl_h = yes; then
9320   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9321 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9322 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9323   echo $ECHO_N "(cached) $ECHO_C" >&6
9324 else
9325   cat >conftest.$ac_ext <<_ACEOF
9326 /* confdefs.h.  */
9327 _ACEOF
9328 cat confdefs.h >>conftest.$ac_ext
9329 cat >>conftest.$ac_ext <<_ACEOF
9330 /* end confdefs.h.  */
9331 #include <libintl.h>
9332 int
9333 main ()
9334 {
9335 return (int) dgettext ("","")
9336   ;
9337   return 0;
9338 }
9339 _ACEOF
9340 rm -rf conftest.$ac_objext conftest$ac_exeext
9341 if { (ac_try="$ac_link"
9342 case "(($ac_try" in
9343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9344   *) ac_try_echo=$ac_try;;
9345 esac
9346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9347   (eval "$ac_link") 2>conftest.er1
9348   ac_status=$?
9349   grep -v '^ *+' conftest.er1 >conftest.err
9350   rm -rf conftest.er1
9351   cat conftest.err >&5
9352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9353   (exit $ac_status); } && {
9354          test -z "$ac_c_werror_flag" ||
9355          test ! -s conftest.err
9356        } && test -s conftest$ac_exeext &&
9357        $as_test_x conftest$ac_exeext; then
9358   gt_cv_func_dgettext_libc=yes
9359 else
9360   echo "$as_me: failed program was:" >&5
9361 sed 's/^/| /' conftest.$ac_ext >&5
9362
9363         gt_cv_func_dgettext_libc=no
9364 fi
9365
9366 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9367       conftest$ac_exeext conftest.$ac_ext
9368 fi
9369 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9370 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9371
9372           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9373             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9374 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9375 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9376   echo $ECHO_N "(cached) $ECHO_C" >&6
9377 else
9378   ac_check_lib_save_LIBS=$LIBS
9379 LIBS="-lintl  $LIBS"
9380 cat >conftest.$ac_ext <<_ACEOF
9381 /* confdefs.h.  */
9382 _ACEOF
9383 cat confdefs.h >>conftest.$ac_ext
9384 cat >>conftest.$ac_ext <<_ACEOF
9385 /* end confdefs.h.  */
9386
9387 /* Override any GCC internal prototype to avoid an error.
9388    Use char because int might match the return type of a GCC
9389    builtin and then its argument prototype would still apply.  */
9390 #ifdef __cplusplus
9391 extern "C"
9392 #endif
9393 char bindtextdomain ();
9394 int
9395 main ()
9396 {
9397 return bindtextdomain ();
9398   ;
9399   return 0;
9400 }
9401 _ACEOF
9402 rm -rf conftest.$ac_objext conftest$ac_exeext
9403 if { (ac_try="$ac_link"
9404 case "(($ac_try" in
9405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9406   *) ac_try_echo=$ac_try;;
9407 esac
9408 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9409   (eval "$ac_link") 2>conftest.er1
9410   ac_status=$?
9411   grep -v '^ *+' conftest.er1 >conftest.err
9412   rm -rf conftest.er1
9413   cat conftest.err >&5
9414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415   (exit $ac_status); } && {
9416          test -z "$ac_c_werror_flag" ||
9417          test ! -s conftest.err
9418        } && test -s conftest$ac_exeext &&
9419        $as_test_x conftest$ac_exeext; then
9420   ac_cv_lib_intl_bindtextdomain=yes
9421 else
9422   echo "$as_me: failed program was:" >&5
9423 sed 's/^/| /' conftest.$ac_ext >&5
9424
9425         ac_cv_lib_intl_bindtextdomain=no
9426 fi
9427
9428 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9429       conftest$ac_exeext conftest.$ac_ext
9430 LIBS=$ac_check_lib_save_LIBS
9431 fi
9432 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9433 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9434 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9435   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9436 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9437 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9438   echo $ECHO_N "(cached) $ECHO_C" >&6
9439 else
9440   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9441 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9442 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9443   echo $ECHO_N "(cached) $ECHO_C" >&6
9444 else
9445   ac_check_lib_save_LIBS=$LIBS
9446 LIBS="-lintl  $LIBS"
9447 cat >conftest.$ac_ext <<_ACEOF
9448 /* confdefs.h.  */
9449 _ACEOF
9450 cat confdefs.h >>conftest.$ac_ext
9451 cat >>conftest.$ac_ext <<_ACEOF
9452 /* end confdefs.h.  */
9453
9454 /* Override any GCC internal prototype to avoid an error.
9455    Use char because int might match the return type of a GCC
9456    builtin and then its argument prototype would still apply.  */
9457 #ifdef __cplusplus
9458 extern "C"
9459 #endif
9460 char dgettext ();
9461 int
9462 main ()
9463 {
9464 return dgettext ();
9465   ;
9466   return 0;
9467 }
9468 _ACEOF
9469 rm -rf conftest.$ac_objext conftest$ac_exeext
9470 if { (ac_try="$ac_link"
9471 case "(($ac_try" in
9472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473   *) ac_try_echo=$ac_try;;
9474 esac
9475 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9476   (eval "$ac_link") 2>conftest.er1
9477   ac_status=$?
9478   grep -v '^ *+' conftest.er1 >conftest.err
9479   rm -rf conftest.er1
9480   cat conftest.err >&5
9481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482   (exit $ac_status); } && {
9483          test -z "$ac_c_werror_flag" ||
9484          test ! -s conftest.err
9485        } && test -s conftest$ac_exeext &&
9486        $as_test_x conftest$ac_exeext; then
9487   ac_cv_lib_intl_dgettext=yes
9488 else
9489   echo "$as_me: failed program was:" >&5
9490 sed 's/^/| /' conftest.$ac_ext >&5
9491
9492         ac_cv_lib_intl_dgettext=no
9493 fi
9494
9495 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9496       conftest$ac_exeext conftest.$ac_ext
9497 LIBS=$ac_check_lib_save_LIBS
9498 fi
9499 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9500 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9501 if test $ac_cv_lib_intl_dgettext = yes; then
9502   gt_cv_func_dgettext_libintl=yes
9503 else
9504   gt_cv_func_dgettext_libintl=no
9505 fi
9506
9507 fi
9508 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9509 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9510 fi
9511
9512           fi
9513
9514           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9515             LIBS="$LIBS -lintl";
9516           fi
9517
9518           if test "$gt_cv_func_dgettext_libc" = "yes" \
9519             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9520
9521 cat >>confdefs.h <<\_ACEOF
9522 #define HAVE_GETTEXT 1
9523 _ACEOF
9524
9525             # Extract the first word of "msgfmt", so it can be a program name with args.
9526 set dummy msgfmt; ac_word=$2
9527 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9529 if test "${ac_cv_path_MSGFMT+set}" = set; then
9530   echo $ECHO_N "(cached) $ECHO_C" >&6
9531 else
9532   case "$MSGFMT" in
9533   /*)
9534   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9535   ;;
9536   *)
9537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9538   for ac_dir in $PATH; do
9539     test -z "$ac_dir" && ac_dir=.
9540     if test -f $ac_dir/$ac_word; then
9541       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9542         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9543         break
9544       fi
9545     fi
9546   done
9547   IFS="$ac_save_ifs"
9548   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9549   ;;
9550 esac
9551 fi
9552 MSGFMT="$ac_cv_path_MSGFMT"
9553 if test -n "$MSGFMT"; then
9554   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9555 echo "${ECHO_T}$MSGFMT" >&6; }
9556 else
9557   { echo "$as_me:$LINENO: result: no" >&5
9558 echo "${ECHO_T}no" >&6; }
9559 fi
9560             if test "$MSGFMT" != "no"; then
9561
9562 for ac_func in dcgettext
9563 do
9564 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9565 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9566 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9567 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9568   echo $ECHO_N "(cached) $ECHO_C" >&6
9569 else
9570   cat >conftest.$ac_ext <<_ACEOF
9571 /* confdefs.h.  */
9572 _ACEOF
9573 cat confdefs.h >>conftest.$ac_ext
9574 cat >>conftest.$ac_ext <<_ACEOF
9575 /* end confdefs.h.  */
9576 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9577    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9578 #define $ac_func innocuous_$ac_func
9579
9580 /* System header to define __stub macros and hopefully few prototypes,
9581     which can conflict with char $ac_func (); below.
9582     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9583     <limits.h> exists even on freestanding compilers.  */
9584
9585 #ifdef __STDC__
9586 # include <limits.h>
9587 #else
9588 # include <assert.h>
9589 #endif
9590
9591 #undef $ac_func
9592
9593 /* Override any GCC internal prototype to avoid an error.
9594    Use char because int might match the return type of a GCC
9595    builtin and then its argument prototype would still apply.  */
9596 #ifdef __cplusplus
9597 extern "C"
9598 #endif
9599 char $ac_func ();
9600 /* The GNU C library defines this for functions which it implements
9601     to always fail with ENOSYS.  Some functions are actually named
9602     something starting with __ and the normal name is an alias.  */
9603 #if defined __stub_$ac_func || defined __stub___$ac_func
9604 choke me
9605 #endif
9606
9607 int
9608 main ()
9609 {
9610 return $ac_func ();
9611   ;
9612   return 0;
9613 }
9614 _ACEOF
9615 rm -rf conftest.$ac_objext conftest$ac_exeext
9616 if { (ac_try="$ac_link"
9617 case "(($ac_try" in
9618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9619   *) ac_try_echo=$ac_try;;
9620 esac
9621 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9622   (eval "$ac_link") 2>conftest.er1
9623   ac_status=$?
9624   grep -v '^ *+' conftest.er1 >conftest.err
9625   rm -rf conftest.er1
9626   cat conftest.err >&5
9627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9628   (exit $ac_status); } && {
9629          test -z "$ac_c_werror_flag" ||
9630          test ! -s conftest.err
9631        } && test -s conftest$ac_exeext &&
9632        $as_test_x conftest$ac_exeext; then
9633   eval "$as_ac_var=yes"
9634 else
9635   echo "$as_me: failed program was:" >&5
9636 sed 's/^/| /' conftest.$ac_ext >&5
9637
9638         eval "$as_ac_var=no"
9639 fi
9640
9641 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9642       conftest$ac_exeext conftest.$ac_ext
9643 fi
9644 ac_res=`eval echo '${'$as_ac_var'}'`
9645                { echo "$as_me:$LINENO: result: $ac_res" >&5
9646 echo "${ECHO_T}$ac_res" >&6; }
9647 if test `eval echo '${'$as_ac_var'}'` = yes; then
9648   cat >>confdefs.h <<_ACEOF
9649 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9650 _ACEOF
9651
9652 fi
9653 done
9654
9655               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9656 set dummy gmsgfmt; ac_word=$2
9657 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9659 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9660   echo $ECHO_N "(cached) $ECHO_C" >&6
9661 else
9662   case $GMSGFMT in
9663   [\\/]* | ?:[\\/]*)
9664   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9665   ;;
9666   *)
9667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9668 for as_dir in $PATH
9669 do
9670   IFS=$as_save_IFS
9671   test -z "$as_dir" && as_dir=.
9672   for ac_exec_ext in '' $ac_executable_extensions; do
9673   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9674     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9675     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9676     break 2
9677   fi
9678 done
9679 done
9680 IFS=$as_save_IFS
9681
9682   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9683   ;;
9684 esac
9685 fi
9686 GMSGFMT=$ac_cv_path_GMSGFMT
9687 if test -n "$GMSGFMT"; then
9688   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9689 echo "${ECHO_T}$GMSGFMT" >&6; }
9690 else
9691   { echo "$as_me:$LINENO: result: no" >&5
9692 echo "${ECHO_T}no" >&6; }
9693 fi
9694
9695
9696               # Extract the first word of "xgettext", so it can be a program name with args.
9697 set dummy xgettext; ac_word=$2
9698 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9700 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9701   echo $ECHO_N "(cached) $ECHO_C" >&6
9702 else
9703   case "$XGETTEXT" in
9704   /*)
9705   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9706   ;;
9707   *)
9708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9709   for ac_dir in $PATH; do
9710     test -z "$ac_dir" && ac_dir=.
9711     if test -f $ac_dir/$ac_word; then
9712       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9713         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9714         break
9715       fi
9716     fi
9717   done
9718   IFS="$ac_save_ifs"
9719   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9720   ;;
9721 esac
9722 fi
9723 XGETTEXT="$ac_cv_path_XGETTEXT"
9724 if test -n "$XGETTEXT"; then
9725   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9726 echo "${ECHO_T}$XGETTEXT" >&6; }
9727 else
9728   { echo "$as_me:$LINENO: result: no" >&5
9729 echo "${ECHO_T}no" >&6; }
9730 fi
9731
9732               cat >conftest.$ac_ext <<_ACEOF
9733 /* confdefs.h.  */
9734 _ACEOF
9735 cat confdefs.h >>conftest.$ac_ext
9736 cat >>conftest.$ac_ext <<_ACEOF
9737 /* end confdefs.h.  */
9738
9739 int
9740 main ()
9741 {
9742 extern int _nl_msg_cat_cntr;
9743                              return _nl_msg_cat_cntr
9744   ;
9745   return 0;
9746 }
9747 _ACEOF
9748 rm -rf conftest.$ac_objext conftest$ac_exeext
9749 if { (ac_try="$ac_link"
9750 case "(($ac_try" in
9751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9752   *) ac_try_echo=$ac_try;;
9753 esac
9754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9755   (eval "$ac_link") 2>conftest.er1
9756   ac_status=$?
9757   grep -v '^ *+' conftest.er1 >conftest.err
9758   rm -rf conftest.er1
9759   cat conftest.err >&5
9760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9761   (exit $ac_status); } && {
9762          test -z "$ac_c_werror_flag" ||
9763          test ! -s conftest.err
9764        } && test -s conftest$ac_exeext &&
9765        $as_test_x conftest$ac_exeext; then
9766   CATOBJEXT=.gmo
9767                  DATADIRNAME=share
9768 else
9769   echo "$as_me: failed program was:" >&5
9770 sed 's/^/| /' conftest.$ac_ext >&5
9771
9772         CATOBJEXT=.mo
9773                  DATADIRNAME=lib
9774 fi
9775
9776 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9777       conftest$ac_exeext conftest.$ac_ext
9778               INSTOBJEXT=.mo
9779             fi
9780           fi
9781
9782           # Added by Martin Baulig 12/15/98 for libc5 systems
9783           if test "$gt_cv_func_dgettext_libc" != "yes" \
9784             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9785             INTLLIBS=-lintl
9786             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9787           fi
9788
9789 fi
9790
9791
9792
9793       if test "$CATOBJEXT" = "NONE"; then
9794                         nls_cv_use_gnu_gettext=yes
9795       fi
9796     fi
9797
9798     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9799
9800 cat >>confdefs.h <<\_ACEOF
9801 #define ENABLE_NLS 1
9802 _ACEOF
9803
9804     else
9805             CATOBJEXT=
9806     fi
9807
9808         if test "$XGETTEXT" != ":"; then
9809                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9810         : ;
9811       else
9812         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9813 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9814         XGETTEXT=":"
9815       fi
9816     fi
9817
9818     # We need to process the po/ directory.
9819     POSUB=po
9820
9821     ac_config_commands="$ac_config_commands default-2"
9822
9823
9824                 for lang in $ALL_LINGUAS; do
9825       GMOFILES="$GMOFILES $lang.gmo"
9826       POFILES="$POFILES $lang.po"
9827     done
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841    if test "x$CATOBJEXT" != "x"; then
9842      if test "x$ALL_LINGUAS" = "x"; then
9843        LINGUAS=
9844      else
9845        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9846 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9847        NEW_LINGUAS=
9848        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9849          case "$ALL_LINGUAS" in
9850           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9851          esac
9852        done
9853        LINGUAS=$NEW_LINGUAS
9854        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9855 echo "${ECHO_T}$LINGUAS" >&6; }
9856      fi
9857
9858           if test -n "$LINGUAS"; then
9859        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9860      fi
9861    fi
9862
9863             test -d po || mkdir po
9864    if test "$CATOBJEXT" = ".cat"; then
9865      if test "${ac_cv_header_linux_version_h+set}" = set; then
9866   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9867 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9868 if test "${ac_cv_header_linux_version_h+set}" = set; then
9869   echo $ECHO_N "(cached) $ECHO_C" >&6
9870 fi
9871 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9872 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9873 else
9874   # Is the header compilable?
9875 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9876 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9877 cat >conftest.$ac_ext <<_ACEOF
9878 /* confdefs.h.  */
9879 _ACEOF
9880 cat confdefs.h >>conftest.$ac_ext
9881 cat >>conftest.$ac_ext <<_ACEOF
9882 /* end confdefs.h.  */
9883 $ac_includes_default
9884 #include <linux/version.h>
9885 _ACEOF
9886 rm -rf conftest.$ac_objext
9887 if { (ac_try="$ac_compile"
9888 case "(($ac_try" in
9889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9890   *) ac_try_echo=$ac_try;;
9891 esac
9892 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9893   (eval "$ac_compile") 2>conftest.er1
9894   ac_status=$?
9895   grep -v '^ *+' conftest.er1 >conftest.err
9896   rm -rf conftest.er1
9897   cat conftest.err >&5
9898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899   (exit $ac_status); } && {
9900          test -z "$ac_c_werror_flag" ||
9901          test ! -s conftest.err
9902        } && test -s conftest.$ac_objext; then
9903   ac_header_compiler=yes
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 sed 's/^/| /' conftest.$ac_ext >&5
9907
9908         ac_header_compiler=no
9909 fi
9910
9911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9912 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9913 echo "${ECHO_T}$ac_header_compiler" >&6; }
9914
9915 # Is the header present?
9916 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9917 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9918 cat >conftest.$ac_ext <<_ACEOF
9919 /* confdefs.h.  */
9920 _ACEOF
9921 cat confdefs.h >>conftest.$ac_ext
9922 cat >>conftest.$ac_ext <<_ACEOF
9923 /* end confdefs.h.  */
9924 #include <linux/version.h>
9925 _ACEOF
9926 if { (ac_try="$ac_cpp conftest.$ac_ext"
9927 case "(($ac_try" in
9928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9929   *) ac_try_echo=$ac_try;;
9930 esac
9931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9932   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9933   ac_status=$?
9934   grep -v '^ *+' conftest.er1 >conftest.err
9935   rm -rf conftest.er1
9936   cat conftest.err >&5
9937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938   (exit $ac_status); } >/dev/null && {
9939          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9940          test ! -s conftest.err
9941        }; then
9942   ac_header_preproc=yes
9943 else
9944   echo "$as_me: failed program was:" >&5
9945 sed 's/^/| /' conftest.$ac_ext >&5
9946
9947   ac_header_preproc=no
9948 fi
9949
9950 rm -rf conftest.err conftest.$ac_ext
9951 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9952 echo "${ECHO_T}$ac_header_preproc" >&6; }
9953
9954 # So?  What about this header?
9955 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9956   yes:no: )
9957     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9958 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9959     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9960 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9961     ac_header_preproc=yes
9962     ;;
9963   no:yes:* )
9964     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9965 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9966     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9967 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9968     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9969 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9971 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9972     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9973 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9974     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9975 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9976
9977     ;;
9978 esac
9979 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9980 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9981 if test "${ac_cv_header_linux_version_h+set}" = set; then
9982   echo $ECHO_N "(cached) $ECHO_C" >&6
9983 else
9984   ac_cv_header_linux_version_h=$ac_header_preproc
9985 fi
9986 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9987 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9988
9989 fi
9990 if test $ac_cv_header_linux_version_h = yes; then
9991   msgformat=linux
9992 else
9993   msgformat=xopen
9994 fi
9995
9996
9997
9998                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9999    fi
10000
10001             MKINSTALLDIRS=
10002 #
10003 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10004 #
10005 #   if test -n "$ac_aux_dir"; then
10006 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10007 #   fi
10008    if test -z "$MKINSTALLDIRS"; then
10009      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10010    fi
10011
10012    # jwz: you know what, screw it.  Let's just use the version that I
10013    # already computed in configure.in, instead of this version that came
10014    # with the i18n crud, ok?
10015    MKINSTALLDIRS="$INSTALL_DIRS"
10016
10017
10018
10019
10020          test -d po || mkdir po
10021    if test "x$srcdir" != "x."; then
10022      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10023        posrcprefix="$srcdir/"
10024      else
10025        posrcprefix="../$srcdir/"
10026      fi
10027    else
10028      posrcprefix="../"
10029    fi
10030    rm -f po/POTFILES
10031    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10032         < $srcdir/po/POTFILES.in > po/POTFILES
10033
10034 MKINSTALLDIRS="$INSTALL_DIRS"
10035
10036
10037 ###############################################################################
10038 #
10039 #       Check for -lXmu (some fucked up vendors don't ship it...)
10040 #
10041 ###############################################################################
10042
10043 have_xmu=no
10044
10045   ac_save_CPPFLAGS="$CPPFLAGS"
10046   if test \! -z "$includedir" ; then
10047     CPPFLAGS="$CPPFLAGS -I$includedir"
10048   fi
10049   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10050   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10051   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10052 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10053 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10054   echo $ECHO_N "(cached) $ECHO_C" >&6
10055 else
10056   cat >conftest.$ac_ext <<_ACEOF
10057 /* confdefs.h.  */
10058 _ACEOF
10059 cat confdefs.h >>conftest.$ac_ext
10060 cat >>conftest.$ac_ext <<_ACEOF
10061 /* end confdefs.h.  */
10062 #include <stdlib.h>
10063                    #include <stdio.h>
10064                    #include <X11/Intrinsic.h>
10065
10066 #include <X11/Xmu/Error.h>
10067 _ACEOF
10068 rm -rf conftest.$ac_objext
10069 if { (ac_try="$ac_compile"
10070 case "(($ac_try" in
10071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072   *) ac_try_echo=$ac_try;;
10073 esac
10074 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10075   (eval "$ac_compile") 2>conftest.er1
10076   ac_status=$?
10077   grep -v '^ *+' conftest.er1 >conftest.err
10078   rm -rf conftest.er1
10079   cat conftest.err >&5
10080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081   (exit $ac_status); } && {
10082          test -z "$ac_c_werror_flag" ||
10083          test ! -s conftest.err
10084        } && test -s conftest.$ac_objext; then
10085   ac_cv_header_X11_Xmu_Error_h=yes
10086 else
10087   echo "$as_me: failed program was:" >&5
10088 sed 's/^/| /' conftest.$ac_ext >&5
10089
10090         ac_cv_header_X11_Xmu_Error_h=no
10091 fi
10092
10093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10094 fi
10095 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10096 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10097 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10098   have_xmu=yes
10099 fi
10100
10101
10102   CPPFLAGS="$ac_save_CPPFLAGS"
10103 if test "$have_xmu" = no ; then
10104   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10105   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10106   XMU_LIBS=''
10107 else
10108   XMU_SRCS=''
10109   XMU_OBJS=''
10110   XMU_LIBS='-lXmu'
10111   cat >>confdefs.h <<\_ACEOF
10112 #define HAVE_XMU 1
10113 _ACEOF
10114
10115 fi
10116
10117
10118 ###############################################################################
10119 #
10120 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10121 #       See comp.windows.x FAQ question 124.  The right fix is to
10122 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10123 #
10124 ###############################################################################
10125
10126 if test "$have_xmu" = yes ; then
10127   case "$host" in
10128     *-sunos4*)
10129     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10130 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10131 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10132   echo $ECHO_N "(cached) $ECHO_C" >&6
10133 else
10134   ac_save_LDFLAGS="$LDFLAGS"
10135                     if test \! -z "$x_libraries" ; then
10136                       LDFLAGS="$LDFLAGS -L$x_libraries"
10137                     fi
10138                     # Note: this trick never works!  (Generally.)
10139                     # We're only getting away with using AC_TRY_LINK
10140                     # with X libraries because we know it's SunOS.
10141                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10142                     cat >conftest.$ac_ext <<_ACEOF
10143 /* confdefs.h.  */
10144 _ACEOF
10145 cat confdefs.h >>conftest.$ac_ext
10146 cat >>conftest.$ac_ext <<_ACEOF
10147 /* end confdefs.h.  */
10148
10149 int
10150 main ()
10151 {
10152
10153   ;
10154   return 0;
10155 }
10156 _ACEOF
10157 rm -rf conftest.$ac_objext conftest$ac_exeext
10158 if { (ac_try="$ac_link"
10159 case "(($ac_try" in
10160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10161   *) ac_try_echo=$ac_try;;
10162 esac
10163 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10164   (eval "$ac_link") 2>conftest.er1
10165   ac_status=$?
10166   grep -v '^ *+' conftest.er1 >conftest.err
10167   rm -rf conftest.er1
10168   cat conftest.err >&5
10169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10170   (exit $ac_status); } && {
10171          test -z "$ac_c_werror_flag" ||
10172          test ! -s conftest.err
10173        } && test -s conftest$ac_exeext &&
10174        $as_test_x conftest$ac_exeext; then
10175   ac_cv_sunos_xmu_bug=no
10176 else
10177   echo "$as_me: failed program was:" >&5
10178 sed 's/^/| /' conftest.$ac_ext >&5
10179
10180         ac_cv_sunos_xmu_bug=yes
10181 fi
10182
10183 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10184       conftest$ac_exeext conftest.$ac_ext
10185                     LDFLAGS="$ac_save_LDFLAGS"
10186 fi
10187 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10188 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10189     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10190       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10191 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10192 if test "${ac_cv_ld_static+set}" = set; then
10193   echo $ECHO_N "(cached) $ECHO_C" >&6
10194 else
10195   ac_save_LDFLAGS="$LDFLAGS"
10196                       LDFLAGS="$LDFLAGS -static"
10197                       cat >conftest.$ac_ext <<_ACEOF
10198 /* confdefs.h.  */
10199 _ACEOF
10200 cat confdefs.h >>conftest.$ac_ext
10201 cat >>conftest.$ac_ext <<_ACEOF
10202 /* end confdefs.h.  */
10203
10204 int
10205 main ()
10206 {
10207
10208   ;
10209   return 0;
10210 }
10211 _ACEOF
10212 rm -rf conftest.$ac_objext conftest$ac_exeext
10213 if { (ac_try="$ac_link"
10214 case "(($ac_try" in
10215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10216   *) ac_try_echo=$ac_try;;
10217 esac
10218 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10219   (eval "$ac_link") 2>conftest.er1
10220   ac_status=$?
10221   grep -v '^ *+' conftest.er1 >conftest.err
10222   rm -rf conftest.er1
10223   cat conftest.err >&5
10224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10225   (exit $ac_status); } && {
10226          test -z "$ac_c_werror_flag" ||
10227          test ! -s conftest.err
10228        } && test -s conftest$ac_exeext &&
10229        $as_test_x conftest$ac_exeext; then
10230   ac_cv_ld_static=yes
10231 else
10232   echo "$as_me: failed program was:" >&5
10233 sed 's/^/| /' conftest.$ac_ext >&5
10234
10235         ac_cv_ld_static=no
10236 fi
10237
10238 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10239       conftest$ac_exeext conftest.$ac_ext
10240                     LDFLAGS="$ac_save_LDFLAGS"
10241 fi
10242 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10243 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10244       if test "$ac_cv_ld_static" = yes ; then
10245         LDFLAGS="$LDFLAGS -static"
10246       else
10247         LDFLAGS="$LDFLAGS -Bstatic"
10248       fi
10249     fi
10250     ;;
10251   esac
10252 fi
10253
10254
10255 ###############################################################################
10256 #
10257 #       Handle the --with-hackdir option
10258 #
10259 ###############################################################################
10260
10261 have_hackdir=yes
10262 with_hackdir_req=unspecified
10263
10264 # Check whether --with-hackdir was given.
10265 if test "${with_hackdir+set}" = set; then
10266   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10267 else
10268   with_hackdir=yes
10269 fi
10270
10271
10272 if test x"$with_hackdir" = xyes; then
10273   HACKDIR='${libexecdir}/xscreensaver'
10274 elif test x"$with_hackdir" = xno; then
10275   HACKDIR='${bindir}'
10276 else
10277   HACKDIR=$with_hackdir
10278 fi
10279
10280 # canonicalize slashes.
10281 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10282
10283 # Expand HACKDIR as HACKDIR_FULL
10284 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10285
10286 # This option used to be called --enable-subdir; make sure that is no longer
10287 # used, since configure brain-damagedly ignores unknown --enable options.
10288
10289 obsolete_enable=
10290 # Check whether --enable-subdir was given.
10291 if test "${enable_subdir+set}" = set; then
10292   enableval=$enable_subdir; obsolete_enable=yes
10293 fi
10294
10295 if test -n "$obsolete_enable"; then
10296   echo "error: the --enable-subdir option has been replaced with"
10297   echo "       the new --with-hackdir option; see \`configure --help'"
10298   echo "       for more information."
10299   exit 1
10300 fi
10301
10302
10303 ###############################################################################
10304 #
10305 #       Handle the --with-configdir option
10306 #       Help for --with-x-app-defaults option added..
10307 #
10308 ###############################################################################
10309
10310 have_configdir=yes
10311 with_configdir_req=unspecified
10312
10313 # Check whether --with-configdir was given.
10314 if test "${with_configdir+set}" = set; then
10315   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10316 else
10317   with_configdir=yes
10318 fi
10319
10320
10321 if test x"$with_configdir" = xyes; then
10322   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10323 elif test x"$with_configdir" = xno; then
10324   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10325   exit 1
10326 else
10327   # there must be a better way than this...
10328   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10329     # absolute path
10330     HACK_CONF_DIR=$with_configdir
10331   else
10332     # relative path
10333     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10334   fi
10335 fi
10336
10337
10338
10339
10340 ###############################################################################
10341 #
10342 #       Check for the SGI SCREEN_SAVER server extension.
10343 #
10344 ###############################################################################
10345
10346 have_sgi=no
10347 with_sgi_req=unspecified
10348
10349 # Check whether --with-sgi-ext was given.
10350 if test "${with_sgi_ext+set}" = set; then
10351   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10352 else
10353   with_sgi=yes
10354 fi
10355
10356
10357
10358    case "$with_sgi" in
10359     yes) ;;
10360     no)  ;;
10361
10362     /*)
10363      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10364 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10365      d=$with_sgi/include
10366      if test -d $d; then
10367        X_CFLAGS="-I$d $X_CFLAGS"
10368        { echo "$as_me:$LINENO: result: $d" >&5
10369 echo "${ECHO_T}$d" >&6; }
10370      else
10371        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10372 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10373      fi
10374
10375      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10376 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10377      d=$with_sgi/lib
10378      if test -d $d; then
10379        X_LIBS="-L$d $X_LIBS"
10380        { echo "$as_me:$LINENO: result: $d" >&5
10381 echo "${ECHO_T}$d" >&6; }
10382      else
10383        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10384 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10385      fi
10386
10387      # replace the directory string with "yes".
10388      with_sgi_req="yes"
10389      with_sgi=$with_sgi_req
10390      ;;
10391
10392     *)
10393      echo ""
10394      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10395      echo "       If it is a directory, then \`DIR/include' will be added to"
10396      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10397      exit 1
10398      ;;
10399    esac
10400
10401
10402 if test "$with_sgi" = yes; then
10403
10404   ac_save_CPPFLAGS="$CPPFLAGS"
10405   if test \! -z "$includedir" ; then
10406     CPPFLAGS="$CPPFLAGS -I$includedir"
10407   fi
10408   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10409   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10410   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10411 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10412 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10413   echo $ECHO_N "(cached) $ECHO_C" >&6
10414 else
10415   cat >conftest.$ac_ext <<_ACEOF
10416 /* confdefs.h.  */
10417 _ACEOF
10418 cat confdefs.h >>conftest.$ac_ext
10419 cat >>conftest.$ac_ext <<_ACEOF
10420 /* end confdefs.h.  */
10421 #include <X11/Xlib.h>
10422
10423 #include <X11/extensions/XScreenSaver.h>
10424 _ACEOF
10425 rm -rf conftest.$ac_objext
10426 if { (ac_try="$ac_compile"
10427 case "(($ac_try" in
10428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10429   *) ac_try_echo=$ac_try;;
10430 esac
10431 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10432   (eval "$ac_compile") 2>conftest.er1
10433   ac_status=$?
10434   grep -v '^ *+' conftest.er1 >conftest.err
10435   rm -rf conftest.er1
10436   cat conftest.err >&5
10437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438   (exit $ac_status); } && {
10439          test -z "$ac_c_werror_flag" ||
10440          test ! -s conftest.err
10441        } && test -s conftest.$ac_objext; then
10442   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10443 else
10444   echo "$as_me: failed program was:" >&5
10445 sed 's/^/| /' conftest.$ac_ext >&5
10446
10447         ac_cv_header_X11_extensions_XScreenSaver_h=no
10448 fi
10449
10450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10451 fi
10452 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10453 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10454 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10455   have_sgi=yes
10456                      cat >>confdefs.h <<\_ACEOF
10457 #define HAVE_SGI_SAVER_EXTENSION 1
10458 _ACEOF
10459
10460 fi
10461
10462
10463   CPPFLAGS="$ac_save_CPPFLAGS"
10464
10465 elif test "$with_sgi" != no; then
10466   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10467   exit 1
10468 fi
10469
10470
10471 ###############################################################################
10472 #
10473 #       Check for the XIDLE server extension.
10474 #
10475 ###############################################################################
10476
10477 have_xidle=no
10478 with_xidle_req=unspecified
10479
10480 # Check whether --with-xidle-ext was given.
10481 if test "${with_xidle_ext+set}" = set; then
10482   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10483 else
10484   with_xidle=yes
10485 fi
10486
10487
10488
10489    case "$with_xidle" in
10490     yes) ;;
10491     no)  ;;
10492
10493     /*)
10494      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10495 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10496      d=$with_xidle/include
10497      if test -d $d; then
10498        X_CFLAGS="-I$d $X_CFLAGS"
10499        { echo "$as_me:$LINENO: result: $d" >&5
10500 echo "${ECHO_T}$d" >&6; }
10501      else
10502        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10503 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10504      fi
10505
10506      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10507 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10508      d=$with_xidle/lib
10509      if test -d $d; then
10510        X_LIBS="-L$d $X_LIBS"
10511        { echo "$as_me:$LINENO: result: $d" >&5
10512 echo "${ECHO_T}$d" >&6; }
10513      else
10514        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10515 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10516      fi
10517
10518      # replace the directory string with "yes".
10519      with_xidle_req="yes"
10520      with_xidle=$with_xidle_req
10521      ;;
10522
10523     *)
10524      echo ""
10525      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10526      echo "       If it is a directory, then \`DIR/include' will be added to"
10527      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10528      exit 1
10529      ;;
10530    esac
10531
10532
10533 if test "$with_xidle" = yes; then
10534
10535   ac_save_CPPFLAGS="$CPPFLAGS"
10536   if test \! -z "$includedir" ; then
10537     CPPFLAGS="$CPPFLAGS -I$includedir"
10538   fi
10539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10540   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10541   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10542 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10543 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10544   echo $ECHO_N "(cached) $ECHO_C" >&6
10545 else
10546   cat >conftest.$ac_ext <<_ACEOF
10547 /* confdefs.h.  */
10548 _ACEOF
10549 cat confdefs.h >>conftest.$ac_ext
10550 cat >>conftest.$ac_ext <<_ACEOF
10551 /* end confdefs.h.  */
10552 #include <X11/Xlib.h>
10553
10554 #include <X11/extensions/xidle.h>
10555 _ACEOF
10556 rm -rf conftest.$ac_objext
10557 if { (ac_try="$ac_compile"
10558 case "(($ac_try" in
10559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10560   *) ac_try_echo=$ac_try;;
10561 esac
10562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10563   (eval "$ac_compile") 2>conftest.er1
10564   ac_status=$?
10565   grep -v '^ *+' conftest.er1 >conftest.err
10566   rm -rf conftest.er1
10567   cat conftest.err >&5
10568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10569   (exit $ac_status); } && {
10570          test -z "$ac_c_werror_flag" ||
10571          test ! -s conftest.err
10572        } && test -s conftest.$ac_objext; then
10573   ac_cv_header_X11_extensions_xidle_h=yes
10574 else
10575   echo "$as_me: failed program was:" >&5
10576 sed 's/^/| /' conftest.$ac_ext >&5
10577
10578         ac_cv_header_X11_extensions_xidle_h=no
10579 fi
10580
10581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10582 fi
10583 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10584 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10585 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10586   have_xidle=yes
10587                      cat >>confdefs.h <<\_ACEOF
10588 #define HAVE_XIDLE_EXTENSION 1
10589 _ACEOF
10590
10591 fi
10592
10593
10594   CPPFLAGS="$ac_save_CPPFLAGS"
10595 elif test "$with_xidle" != no; then
10596   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10597   exit 1
10598 fi
10599
10600
10601 ###############################################################################
10602 #
10603 #       Check for the SGI-VIDEO-CONTROL server extension.
10604 #
10605 ###############################################################################
10606
10607 have_sgivc=no
10608 with_sgivc_req=unspecified
10609
10610 # Check whether --with-sgivc-ext was given.
10611 if test "${with_sgivc_ext+set}" = set; then
10612   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10613 else
10614   with_sgivc=yes
10615 fi
10616
10617
10618
10619    case "$with_sgivc" in
10620     yes) ;;
10621     no)  ;;
10622
10623     /*)
10624      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10625 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10626      d=$with_sgivc/include
10627      if test -d $d; then
10628        X_CFLAGS="-I$d $X_CFLAGS"
10629        { echo "$as_me:$LINENO: result: $d" >&5
10630 echo "${ECHO_T}$d" >&6; }
10631      else
10632        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10633 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10634      fi
10635
10636      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10637 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10638      d=$with_sgivc/lib
10639      if test -d $d; then
10640        X_LIBS="-L$d $X_LIBS"
10641        { echo "$as_me:$LINENO: result: $d" >&5
10642 echo "${ECHO_T}$d" >&6; }
10643      else
10644        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10645 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10646      fi
10647
10648      # replace the directory string with "yes".
10649      with_sgivc_req="yes"
10650      with_sgivc=$with_sgivc_req
10651      ;;
10652
10653     *)
10654      echo ""
10655      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10656      echo "       If it is a directory, then \`DIR/include' will be added to"
10657      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10658      exit 1
10659      ;;
10660    esac
10661
10662
10663 if test "$with_sgivc" = yes; then
10664
10665   # first check for XSGIvc.h
10666
10667   ac_save_CPPFLAGS="$CPPFLAGS"
10668   if test \! -z "$includedir" ; then
10669     CPPFLAGS="$CPPFLAGS -I$includedir"
10670   fi
10671   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10672   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10673   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10674 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10675 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10676   echo $ECHO_N "(cached) $ECHO_C" >&6
10677 else
10678   cat >conftest.$ac_ext <<_ACEOF
10679 /* confdefs.h.  */
10680 _ACEOF
10681 cat confdefs.h >>conftest.$ac_ext
10682 cat >>conftest.$ac_ext <<_ACEOF
10683 /* end confdefs.h.  */
10684 #include <X11/Xlib.h>
10685
10686 #include <X11/extensions/XSGIvc.h>
10687 _ACEOF
10688 rm -rf conftest.$ac_objext
10689 if { (ac_try="$ac_compile"
10690 case "(($ac_try" in
10691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10692   *) ac_try_echo=$ac_try;;
10693 esac
10694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10695   (eval "$ac_compile") 2>conftest.er1
10696   ac_status=$?
10697   grep -v '^ *+' conftest.er1 >conftest.err
10698   rm -rf conftest.er1
10699   cat conftest.err >&5
10700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10701   (exit $ac_status); } && {
10702          test -z "$ac_c_werror_flag" ||
10703          test ! -s conftest.err
10704        } && test -s conftest.$ac_objext; then
10705   ac_cv_header_X11_extensions_XSGIvc_h=yes
10706 else
10707   echo "$as_me: failed program was:" >&5
10708 sed 's/^/| /' conftest.$ac_ext >&5
10709
10710         ac_cv_header_X11_extensions_XSGIvc_h=no
10711 fi
10712
10713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10714 fi
10715 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10716 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10717 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10718   have_sgivc=yes
10719 fi
10720
10721
10722   CPPFLAGS="$ac_save_CPPFLAGS"
10723
10724   # if that succeeded, then check for the -lXsgivc
10725   if test "$have_sgivc" = yes; then
10726     have_sgivc=no
10727
10728   ac_save_CPPFLAGS="$CPPFLAGS"
10729   ac_save_LDFLAGS="$LDFLAGS"
10730 #  ac_save_LIBS="$LIBS"
10731
10732   if test \! -z "$includedir" ; then
10733     CPPFLAGS="$CPPFLAGS -I$includedir"
10734   fi
10735   # note: $X_CFLAGS includes $x_includes
10736   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10737
10738   if test \! -z "$libdir" ; then
10739     LDFLAGS="$LDFLAGS -L$libdir"
10740   fi
10741   # note: $X_LIBS includes $x_libraries
10742   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10743
10744   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10745   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10746   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10747 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10748 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10749   echo $ECHO_N "(cached) $ECHO_C" >&6
10750 else
10751   ac_check_lib_save_LIBS=$LIBS
10752 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10753 cat >conftest.$ac_ext <<_ACEOF
10754 /* confdefs.h.  */
10755 _ACEOF
10756 cat confdefs.h >>conftest.$ac_ext
10757 cat >>conftest.$ac_ext <<_ACEOF
10758 /* end confdefs.h.  */
10759
10760 /* Override any GCC internal prototype to avoid an error.
10761    Use char because int might match the return type of a GCC
10762    builtin and then its argument prototype would still apply.  */
10763 #ifdef __cplusplus
10764 extern "C"
10765 #endif
10766 char XSGIvcQueryGammaMap ();
10767 int
10768 main ()
10769 {
10770 return XSGIvcQueryGammaMap ();
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 rm -rf conftest.$ac_objext conftest$ac_exeext
10776 if { (ac_try="$ac_link"
10777 case "(($ac_try" in
10778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779   *) ac_try_echo=$ac_try;;
10780 esac
10781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10782   (eval "$ac_link") 2>conftest.er1
10783   ac_status=$?
10784   grep -v '^ *+' conftest.er1 >conftest.err
10785   rm -rf conftest.er1
10786   cat conftest.err >&5
10787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788   (exit $ac_status); } && {
10789          test -z "$ac_c_werror_flag" ||
10790          test ! -s conftest.err
10791        } && test -s conftest$ac_exeext &&
10792        $as_test_x conftest$ac_exeext; then
10793   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10794 else
10795   echo "$as_me: failed program was:" >&5
10796 sed 's/^/| /' conftest.$ac_ext >&5
10797
10798         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10799 fi
10800
10801 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10802       conftest$ac_exeext conftest.$ac_ext
10803 LIBS=$ac_check_lib_save_LIBS
10804 fi
10805 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10806 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10807 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10808   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10809 else
10810   true
10811 fi
10812
10813   CPPFLAGS="$ac_save_CPPFLAGS"
10814   LDFLAGS="$ac_save_LDFLAGS"
10815 #  LIBS="$ac_save_LIBS"
10816
10817   fi
10818
10819   # if that succeeded, then we've really got it.
10820   if test "$have_sgivc" = yes; then
10821     cat >>confdefs.h <<\_ACEOF
10822 #define HAVE_SGI_VC_EXTENSION 1
10823 _ACEOF
10824
10825   fi
10826
10827 elif test "$with_sgivc" != no; then
10828   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10829   exit 1
10830 fi
10831
10832
10833 ###############################################################################
10834 #
10835 #       Check for the DPMS server extension.
10836 #
10837 ###############################################################################
10838
10839 have_dpms=no
10840 with_dpms_req=unspecified
10841
10842 # Check whether --with-dpms-ext was given.
10843 if test "${with_dpms_ext+set}" = set; then
10844   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10845 else
10846   with_dpms=yes
10847 fi
10848
10849
10850
10851    case "$with_dpms" in
10852     yes) ;;
10853     no)  ;;
10854
10855     /*)
10856      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10857 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10858      d=$with_dpms/include
10859      if test -d $d; then
10860        X_CFLAGS="-I$d $X_CFLAGS"
10861        { echo "$as_me:$LINENO: result: $d" >&5
10862 echo "${ECHO_T}$d" >&6; }
10863      else
10864        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10865 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10866      fi
10867
10868      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10869 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10870      d=$with_dpms/lib
10871      if test -d $d; then
10872        X_LIBS="-L$d $X_LIBS"
10873        { echo "$as_me:$LINENO: result: $d" >&5
10874 echo "${ECHO_T}$d" >&6; }
10875      else
10876        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10877 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10878      fi
10879
10880      # replace the directory string with "yes".
10881      with_dpms_req="yes"
10882      with_dpms=$with_dpms_req
10883      ;;
10884
10885     *)
10886      echo ""
10887      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10888      echo "       If it is a directory, then \`DIR/include' will be added to"
10889      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10890      exit 1
10891      ;;
10892    esac
10893
10894
10895 if test "$with_dpms" = yes; then
10896
10897   # first check for dpms.h
10898
10899   ac_save_CPPFLAGS="$CPPFLAGS"
10900   if test \! -z "$includedir" ; then
10901     CPPFLAGS="$CPPFLAGS -I$includedir"
10902   fi
10903   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10904   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10905   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10906 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10907 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10908   echo $ECHO_N "(cached) $ECHO_C" >&6
10909 else
10910   cat >conftest.$ac_ext <<_ACEOF
10911 /* confdefs.h.  */
10912 _ACEOF
10913 cat confdefs.h >>conftest.$ac_ext
10914 cat >>conftest.$ac_ext <<_ACEOF
10915 /* end confdefs.h.  */
10916 #include <X11/Xlib.h>
10917                      #include <X11/Xmd.h>
10918
10919 #include <X11/extensions/dpms.h>
10920 _ACEOF
10921 rm -rf conftest.$ac_objext
10922 if { (ac_try="$ac_compile"
10923 case "(($ac_try" in
10924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10925   *) ac_try_echo=$ac_try;;
10926 esac
10927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10928   (eval "$ac_compile") 2>conftest.er1
10929   ac_status=$?
10930   grep -v '^ *+' conftest.er1 >conftest.err
10931   rm -rf conftest.er1
10932   cat conftest.err >&5
10933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934   (exit $ac_status); } && {
10935          test -z "$ac_c_werror_flag" ||
10936          test ! -s conftest.err
10937        } && test -s conftest.$ac_objext; then
10938   ac_cv_header_X11_extensions_dpms_h=yes
10939 else
10940   echo "$as_me: failed program was:" >&5
10941 sed 's/^/| /' conftest.$ac_ext >&5
10942
10943         ac_cv_header_X11_extensions_dpms_h=no
10944 fi
10945
10946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947 fi
10948 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10949 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10950 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10951   have_dpms=yes
10952 fi
10953
10954
10955   CPPFLAGS="$ac_save_CPPFLAGS"
10956
10957   # if that succeeded, then check for the DPMS code in the libraries
10958   if test "$have_dpms" = yes; then
10959
10960     # first look in -lXext (this is where it is with XFree86 4.0)
10961     have_dpms=no
10962
10963   ac_save_CPPFLAGS="$CPPFLAGS"
10964   ac_save_LDFLAGS="$LDFLAGS"
10965 #  ac_save_LIBS="$LIBS"
10966
10967   if test \! -z "$includedir" ; then
10968     CPPFLAGS="$CPPFLAGS -I$includedir"
10969   fi
10970   # note: $X_CFLAGS includes $x_includes
10971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10972
10973   if test \! -z "$libdir" ; then
10974     LDFLAGS="$LDFLAGS -L$libdir"
10975   fi
10976   # note: $X_LIBS includes $x_libraries
10977   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10978
10979   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10980   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10981   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10982 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10983 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10984   echo $ECHO_N "(cached) $ECHO_C" >&6
10985 else
10986   ac_check_lib_save_LIBS=$LIBS
10987 LIBS="-lXext -lXext -lX11 $LIBS"
10988 cat >conftest.$ac_ext <<_ACEOF
10989 /* confdefs.h.  */
10990 _ACEOF
10991 cat confdefs.h >>conftest.$ac_ext
10992 cat >>conftest.$ac_ext <<_ACEOF
10993 /* end confdefs.h.  */
10994
10995 /* Override any GCC internal prototype to avoid an error.
10996    Use char because int might match the return type of a GCC
10997    builtin and then its argument prototype would still apply.  */
10998 #ifdef __cplusplus
10999 extern "C"
11000 #endif
11001 char DPMSInfo ();
11002 int
11003 main ()
11004 {
11005 return DPMSInfo ();
11006   ;
11007   return 0;
11008 }
11009 _ACEOF
11010 rm -rf conftest.$ac_objext conftest$ac_exeext
11011 if { (ac_try="$ac_link"
11012 case "(($ac_try" in
11013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11014   *) ac_try_echo=$ac_try;;
11015 esac
11016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11017   (eval "$ac_link") 2>conftest.er1
11018   ac_status=$?
11019   grep -v '^ *+' conftest.er1 >conftest.err
11020   rm -rf conftest.er1
11021   cat conftest.err >&5
11022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023   (exit $ac_status); } && {
11024          test -z "$ac_c_werror_flag" ||
11025          test ! -s conftest.err
11026        } && test -s conftest$ac_exeext &&
11027        $as_test_x conftest$ac_exeext; then
11028   ac_cv_lib_Xext_DPMSInfo=yes
11029 else
11030   echo "$as_me: failed program was:" >&5
11031 sed 's/^/| /' conftest.$ac_ext >&5
11032
11033         ac_cv_lib_Xext_DPMSInfo=no
11034 fi
11035
11036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11037       conftest$ac_exeext conftest.$ac_ext
11038 LIBS=$ac_check_lib_save_LIBS
11039 fi
11040 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11041 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11042 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11043   have_dpms=yes
11044 else
11045   true
11046 fi
11047
11048   CPPFLAGS="$ac_save_CPPFLAGS"
11049   LDFLAGS="$ac_save_LDFLAGS"
11050 #  LIBS="$ac_save_LIBS"
11051
11052
11053     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11054     if test "$have_dpms" = no; then
11055
11056   ac_save_CPPFLAGS="$CPPFLAGS"
11057   ac_save_LDFLAGS="$LDFLAGS"
11058 #  ac_save_LIBS="$LIBS"
11059
11060   if test \! -z "$includedir" ; then
11061     CPPFLAGS="$CPPFLAGS -I$includedir"
11062   fi
11063   # note: $X_CFLAGS includes $x_includes
11064   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11065
11066   if test \! -z "$libdir" ; then
11067     LDFLAGS="$LDFLAGS -L$libdir"
11068   fi
11069   # note: $X_LIBS includes $x_libraries
11070   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11071
11072   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11073   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11074   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11075 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11076 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11077   echo $ECHO_N "(cached) $ECHO_C" >&6
11078 else
11079   ac_check_lib_save_LIBS=$LIBS
11080 LIBS="-lXdpms -lXext -lX11 $LIBS"
11081 cat >conftest.$ac_ext <<_ACEOF
11082 /* confdefs.h.  */
11083 _ACEOF
11084 cat confdefs.h >>conftest.$ac_ext
11085 cat >>conftest.$ac_ext <<_ACEOF
11086 /* end confdefs.h.  */
11087
11088 /* Override any GCC internal prototype to avoid an error.
11089    Use char because int might match the return type of a GCC
11090    builtin and then its argument prototype would still apply.  */
11091 #ifdef __cplusplus
11092 extern "C"
11093 #endif
11094 char DPMSInfo ();
11095 int
11096 main ()
11097 {
11098 return DPMSInfo ();
11099   ;
11100   return 0;
11101 }
11102 _ACEOF
11103 rm -rf conftest.$ac_objext conftest$ac_exeext
11104 if { (ac_try="$ac_link"
11105 case "(($ac_try" in
11106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11107   *) ac_try_echo=$ac_try;;
11108 esac
11109 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11110   (eval "$ac_link") 2>conftest.er1
11111   ac_status=$?
11112   grep -v '^ *+' conftest.er1 >conftest.err
11113   rm -rf conftest.er1
11114   cat conftest.err >&5
11115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11116   (exit $ac_status); } && {
11117          test -z "$ac_c_werror_flag" ||
11118          test ! -s conftest.err
11119        } && test -s conftest$ac_exeext &&
11120        $as_test_x conftest$ac_exeext; then
11121   ac_cv_lib_Xdpms_DPMSInfo=yes
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 sed 's/^/| /' conftest.$ac_ext >&5
11125
11126         ac_cv_lib_Xdpms_DPMSInfo=no
11127 fi
11128
11129 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11130       conftest$ac_exeext conftest.$ac_ext
11131 LIBS=$ac_check_lib_save_LIBS
11132 fi
11133 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11134 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11135 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11136   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11137 else
11138   true
11139 fi
11140
11141   CPPFLAGS="$ac_save_CPPFLAGS"
11142   LDFLAGS="$ac_save_LDFLAGS"
11143 #  LIBS="$ac_save_LIBS"
11144
11145     fi
11146   fi
11147
11148
11149   # if that succeeded, then we've really got it.
11150   if test "$have_dpms" = yes; then
11151     cat >>confdefs.h <<\_ACEOF
11152 #define HAVE_DPMS_EXTENSION 1
11153 _ACEOF
11154
11155   fi
11156
11157 elif test "$with_dpms" != no; then
11158   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11159   exit 1
11160 fi
11161
11162
11163 ###############################################################################
11164 #
11165 #       Check for the XINERAMA server extension.
11166 #
11167 ###############################################################################
11168
11169 have_xinerama=no
11170 with_xinerama_req=unspecified
11171
11172 # Check whether --with-xinerama-ext was given.
11173 if test "${with_xinerama_ext+set}" = set; then
11174   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11175 else
11176   with_xinerama=yes
11177 fi
11178
11179
11180
11181    case "$with_xinerama" in
11182     yes) ;;
11183     no)  ;;
11184
11185     /*)
11186      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11187 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11188      d=$with_xinerama/include
11189      if test -d $d; then
11190        X_CFLAGS="-I$d $X_CFLAGS"
11191        { echo "$as_me:$LINENO: result: $d" >&5
11192 echo "${ECHO_T}$d" >&6; }
11193      else
11194        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11195 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11196      fi
11197
11198      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11199 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11200      d=$with_xinerama/lib
11201      if test -d $d; then
11202        X_LIBS="-L$d $X_LIBS"
11203        { echo "$as_me:$LINENO: result: $d" >&5
11204 echo "${ECHO_T}$d" >&6; }
11205      else
11206        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11207 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11208      fi
11209
11210      # replace the directory string with "yes".
11211      with_xinerama_req="yes"
11212      with_xinerama=$with_xinerama_req
11213      ;;
11214
11215     *)
11216      echo ""
11217      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11218      echo "       If it is a directory, then \`DIR/include' will be added to"
11219      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11220      exit 1
11221      ;;
11222    esac
11223
11224
11225 if test "$with_xinerama" = yes; then
11226
11227   # first check for Xinerama.h
11228
11229   ac_save_CPPFLAGS="$CPPFLAGS"
11230   if test \! -z "$includedir" ; then
11231     CPPFLAGS="$CPPFLAGS -I$includedir"
11232   fi
11233   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11234   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11235   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11236 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11237 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11238   echo $ECHO_N "(cached) $ECHO_C" >&6
11239 else
11240   cat >conftest.$ac_ext <<_ACEOF
11241 /* confdefs.h.  */
11242 _ACEOF
11243 cat confdefs.h >>conftest.$ac_ext
11244 cat >>conftest.$ac_ext <<_ACEOF
11245 /* end confdefs.h.  */
11246 #include <X11/Xlib.h>
11247
11248 #include <X11/extensions/Xinerama.h>
11249 _ACEOF
11250 rm -rf conftest.$ac_objext
11251 if { (ac_try="$ac_compile"
11252 case "(($ac_try" in
11253   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11254   *) ac_try_echo=$ac_try;;
11255 esac
11256 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11257   (eval "$ac_compile") 2>conftest.er1
11258   ac_status=$?
11259   grep -v '^ *+' conftest.er1 >conftest.err
11260   rm -rf conftest.er1
11261   cat conftest.err >&5
11262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263   (exit $ac_status); } && {
11264          test -z "$ac_c_werror_flag" ||
11265          test ! -s conftest.err
11266        } && test -s conftest.$ac_objext; then
11267   ac_cv_header_X11_extensions_Xinerama_h=yes
11268 else
11269   echo "$as_me: failed program was:" >&5
11270 sed 's/^/| /' conftest.$ac_ext >&5
11271
11272         ac_cv_header_X11_extensions_Xinerama_h=no
11273 fi
11274
11275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276 fi
11277 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11278 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11279 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11280   have_xinerama=yes
11281 fi
11282
11283
11284   CPPFLAGS="$ac_save_CPPFLAGS"
11285
11286   # if that succeeded, then check for the XINERAMA code in the libraries
11287   if test "$have_xinerama" = yes; then
11288
11289     # first look in -lXext
11290     have_xinerama=no
11291
11292   ac_save_CPPFLAGS="$CPPFLAGS"
11293   ac_save_LDFLAGS="$LDFLAGS"
11294 #  ac_save_LIBS="$LIBS"
11295
11296   if test \! -z "$includedir" ; then
11297     CPPFLAGS="$CPPFLAGS -I$includedir"
11298   fi
11299   # note: $X_CFLAGS includes $x_includes
11300   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11301
11302   if test \! -z "$libdir" ; then
11303     LDFLAGS="$LDFLAGS -L$libdir"
11304   fi
11305   # note: $X_LIBS includes $x_libraries
11306   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11307
11308   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11309   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11310   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11311 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11312 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11313   echo $ECHO_N "(cached) $ECHO_C" >&6
11314 else
11315   ac_check_lib_save_LIBS=$LIBS
11316 LIBS="-lXext -lXext -lX11 $LIBS"
11317 cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323
11324 /* Override any GCC internal prototype to avoid an error.
11325    Use char because int might match the return type of a GCC
11326    builtin and then its argument prototype would still apply.  */
11327 #ifdef __cplusplus
11328 extern "C"
11329 #endif
11330 char XineramaQueryScreens ();
11331 int
11332 main ()
11333 {
11334 return XineramaQueryScreens ();
11335   ;
11336   return 0;
11337 }
11338 _ACEOF
11339 rm -rf conftest.$ac_objext conftest$ac_exeext
11340 if { (ac_try="$ac_link"
11341 case "(($ac_try" in
11342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11343   *) ac_try_echo=$ac_try;;
11344 esac
11345 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11346   (eval "$ac_link") 2>conftest.er1
11347   ac_status=$?
11348   grep -v '^ *+' conftest.er1 >conftest.err
11349   rm -rf conftest.er1
11350   cat conftest.err >&5
11351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352   (exit $ac_status); } && {
11353          test -z "$ac_c_werror_flag" ||
11354          test ! -s conftest.err
11355        } && test -s conftest$ac_exeext &&
11356        $as_test_x conftest$ac_exeext; then
11357   ac_cv_lib_Xext_XineramaQueryScreens=yes
11358 else
11359   echo "$as_me: failed program was:" >&5
11360 sed 's/^/| /' conftest.$ac_ext >&5
11361
11362         ac_cv_lib_Xext_XineramaQueryScreens=no
11363 fi
11364
11365 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11366       conftest$ac_exeext conftest.$ac_ext
11367 LIBS=$ac_check_lib_save_LIBS
11368 fi
11369 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11370 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11371 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11372   have_xinerama=yes
11373 else
11374   true
11375 fi
11376
11377   CPPFLAGS="$ac_save_CPPFLAGS"
11378   LDFLAGS="$ac_save_LDFLAGS"
11379 #  LIBS="$ac_save_LIBS"
11380
11381
11382     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11383     if test "$have_xinerama" = no; then
11384
11385   ac_save_CPPFLAGS="$CPPFLAGS"
11386   ac_save_LDFLAGS="$LDFLAGS"
11387 #  ac_save_LIBS="$LIBS"
11388
11389   if test \! -z "$includedir" ; then
11390     CPPFLAGS="$CPPFLAGS -I$includedir"
11391   fi
11392   # note: $X_CFLAGS includes $x_includes
11393   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11394
11395   if test \! -z "$libdir" ; then
11396     LDFLAGS="$LDFLAGS -L$libdir"
11397   fi
11398   # note: $X_LIBS includes $x_libraries
11399   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11400
11401   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11402   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11403   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11404 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11405 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11406   echo $ECHO_N "(cached) $ECHO_C" >&6
11407 else
11408   ac_check_lib_save_LIBS=$LIBS
11409 LIBS="-lXinerama -lXext -lX11 $LIBS"
11410 cat >conftest.$ac_ext <<_ACEOF
11411 /* confdefs.h.  */
11412 _ACEOF
11413 cat confdefs.h >>conftest.$ac_ext
11414 cat >>conftest.$ac_ext <<_ACEOF
11415 /* end confdefs.h.  */
11416
11417 /* Override any GCC internal prototype to avoid an error.
11418    Use char because int might match the return type of a GCC
11419    builtin and then its argument prototype would still apply.  */
11420 #ifdef __cplusplus
11421 extern "C"
11422 #endif
11423 char XineramaQueryScreens ();
11424 int
11425 main ()
11426 {
11427 return XineramaQueryScreens ();
11428   ;
11429   return 0;
11430 }
11431 _ACEOF
11432 rm -rf conftest.$ac_objext conftest$ac_exeext
11433 if { (ac_try="$ac_link"
11434 case "(($ac_try" in
11435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11436   *) ac_try_echo=$ac_try;;
11437 esac
11438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11439   (eval "$ac_link") 2>conftest.er1
11440   ac_status=$?
11441   grep -v '^ *+' conftest.er1 >conftest.err
11442   rm -rf conftest.er1
11443   cat conftest.err >&5
11444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445   (exit $ac_status); } && {
11446          test -z "$ac_c_werror_flag" ||
11447          test ! -s conftest.err
11448        } && test -s conftest$ac_exeext &&
11449        $as_test_x conftest$ac_exeext; then
11450   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11451 else
11452   echo "$as_me: failed program was:" >&5
11453 sed 's/^/| /' conftest.$ac_ext >&5
11454
11455         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11456 fi
11457
11458 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11459       conftest$ac_exeext conftest.$ac_ext
11460 LIBS=$ac_check_lib_save_LIBS
11461 fi
11462 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11463 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11464 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11465   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11466 else
11467   true
11468 fi
11469
11470   CPPFLAGS="$ac_save_CPPFLAGS"
11471   LDFLAGS="$ac_save_LDFLAGS"
11472 #  LIBS="$ac_save_LIBS"
11473
11474     fi
11475   fi
11476
11477   # if that succeeded, then we've really got it.
11478   if test "$have_xinerama" = yes; then
11479     cat >>confdefs.h <<\_ACEOF
11480 #define HAVE_XINERAMA 1
11481 _ACEOF
11482
11483   fi
11484
11485 elif test "$with_xinerama" != no; then
11486   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11487   exit 1
11488 fi
11489
11490
11491 ###############################################################################
11492 #
11493 #       Check for the XF86VMODE server extension (for virtual screens.)
11494 #
11495 ###############################################################################
11496
11497 have_xf86vmode=no
11498 with_xf86vmode_req=unspecified
11499
11500 # Check whether --with-xf86vmode-ext was given.
11501 if test "${with_xf86vmode_ext+set}" = set; then
11502   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11503 else
11504   with_xf86vmode=yes
11505 fi
11506
11507
11508
11509    case "$with_xf86vmode" in
11510     yes) ;;
11511     no)  ;;
11512
11513     /*)
11514      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11515 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11516      d=$with_xf86vmode/include
11517      if test -d $d; then
11518        X_CFLAGS="-I$d $X_CFLAGS"
11519        { echo "$as_me:$LINENO: result: $d" >&5
11520 echo "${ECHO_T}$d" >&6; }
11521      else
11522        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11523 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11524      fi
11525
11526      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11527 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11528      d=$with_xf86vmode/lib
11529      if test -d $d; then
11530        X_LIBS="-L$d $X_LIBS"
11531        { echo "$as_me:$LINENO: result: $d" >&5
11532 echo "${ECHO_T}$d" >&6; }
11533      else
11534        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11535 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11536      fi
11537
11538      # replace the directory string with "yes".
11539      with_xf86vmode_req="yes"
11540      with_xf86vmode=$with_xf86vmode_req
11541      ;;
11542
11543     *)
11544      echo ""
11545      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11546      echo "       If it is a directory, then \`DIR/include' will be added to"
11547      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11548      exit 1
11549      ;;
11550    esac
11551
11552
11553 VIDMODE_LIBS=""
11554
11555 if test "$with_xf86vmode" = yes; then
11556
11557   # first check for xf86vmode.h
11558
11559   ac_save_CPPFLAGS="$CPPFLAGS"
11560   if test \! -z "$includedir" ; then
11561     CPPFLAGS="$CPPFLAGS -I$includedir"
11562   fi
11563   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11564   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11565   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11566 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11567 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570   cat >conftest.$ac_ext <<_ACEOF
11571 /* confdefs.h.  */
11572 _ACEOF
11573 cat confdefs.h >>conftest.$ac_ext
11574 cat >>conftest.$ac_ext <<_ACEOF
11575 /* end confdefs.h.  */
11576 #include <X11/Xlib.h>
11577
11578 #include <X11/extensions/xf86vmode.h>
11579 _ACEOF
11580 rm -rf conftest.$ac_objext
11581 if { (ac_try="$ac_compile"
11582 case "(($ac_try" in
11583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584   *) ac_try_echo=$ac_try;;
11585 esac
11586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11587   (eval "$ac_compile") 2>conftest.er1
11588   ac_status=$?
11589   grep -v '^ *+' conftest.er1 >conftest.err
11590   rm -rf conftest.er1
11591   cat conftest.err >&5
11592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593   (exit $ac_status); } && {
11594          test -z "$ac_c_werror_flag" ||
11595          test ! -s conftest.err
11596        } && test -s conftest.$ac_objext; then
11597   ac_cv_header_X11_extensions_xf86vmode_h=yes
11598 else
11599   echo "$as_me: failed program was:" >&5
11600 sed 's/^/| /' conftest.$ac_ext >&5
11601
11602         ac_cv_header_X11_extensions_xf86vmode_h=no
11603 fi
11604
11605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606 fi
11607 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11608 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11609 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11610   have_xf86vmode=yes
11611 fi
11612
11613
11614   CPPFLAGS="$ac_save_CPPFLAGS"
11615
11616   # if that succeeded, then check for the -lXxf86vm
11617   if test "$have_xf86vmode" = yes; then
11618     have_xf86vmode=no
11619
11620   ac_save_CPPFLAGS="$CPPFLAGS"
11621   ac_save_LDFLAGS="$LDFLAGS"
11622 #  ac_save_LIBS="$LIBS"
11623
11624   if test \! -z "$includedir" ; then
11625     CPPFLAGS="$CPPFLAGS -I$includedir"
11626   fi
11627   # note: $X_CFLAGS includes $x_includes
11628   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11629
11630   if test \! -z "$libdir" ; then
11631     LDFLAGS="$LDFLAGS -L$libdir"
11632   fi
11633   # note: $X_LIBS includes $x_libraries
11634   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11635
11636   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11637   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11638   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11639 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11640 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11641   echo $ECHO_N "(cached) $ECHO_C" >&6
11642 else
11643   ac_check_lib_save_LIBS=$LIBS
11644 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11645 cat >conftest.$ac_ext <<_ACEOF
11646 /* confdefs.h.  */
11647 _ACEOF
11648 cat confdefs.h >>conftest.$ac_ext
11649 cat >>conftest.$ac_ext <<_ACEOF
11650 /* end confdefs.h.  */
11651
11652 /* Override any GCC internal prototype to avoid an error.
11653    Use char because int might match the return type of a GCC
11654    builtin and then its argument prototype would still apply.  */
11655 #ifdef __cplusplus
11656 extern "C"
11657 #endif
11658 char XF86VidModeGetViewPort ();
11659 int
11660 main ()
11661 {
11662 return XF86VidModeGetViewPort ();
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 rm -rf conftest.$ac_objext conftest$ac_exeext
11668 if { (ac_try="$ac_link"
11669 case "(($ac_try" in
11670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11671   *) ac_try_echo=$ac_try;;
11672 esac
11673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11674   (eval "$ac_link") 2>conftest.er1
11675   ac_status=$?
11676   grep -v '^ *+' conftest.er1 >conftest.err
11677   rm -rf conftest.er1
11678   cat conftest.err >&5
11679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11680   (exit $ac_status); } && {
11681          test -z "$ac_c_werror_flag" ||
11682          test ! -s conftest.err
11683        } && test -s conftest$ac_exeext &&
11684        $as_test_x conftest$ac_exeext; then
11685   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11686 else
11687   echo "$as_me: failed program was:" >&5
11688 sed 's/^/| /' conftest.$ac_ext >&5
11689
11690         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11691 fi
11692
11693 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11694       conftest$ac_exeext conftest.$ac_ext
11695 LIBS=$ac_check_lib_save_LIBS
11696 fi
11697 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11698 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11699 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11700   have_xf86vmode=yes;
11701                    VIDMODE_LIBS="-lXxf86vm";
11702                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11703 else
11704   true
11705 fi
11706
11707   CPPFLAGS="$ac_save_CPPFLAGS"
11708   LDFLAGS="$ac_save_LDFLAGS"
11709 #  LIBS="$ac_save_LIBS"
11710
11711   fi
11712
11713   # if that succeeded, then we've really got it.
11714   if test "$have_xf86vmode" = yes; then
11715     cat >>confdefs.h <<\_ACEOF
11716 #define HAVE_XF86VMODE 1
11717 _ACEOF
11718
11719   fi
11720
11721 elif test "$with_xf86vmode" != no; then
11722   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11723   exit 1
11724 fi
11725
11726
11727 ###############################################################################
11728 #
11729 #       Check for the XF86VMODE server extension (for gamma fading.)
11730 #
11731 ###############################################################################
11732
11733 have_xf86gamma=no
11734 have_xf86gamma_ramp=no
11735 with_xf86gamma_req=unspecified
11736
11737 # Check whether --with-xf86gamma-ext was given.
11738 if test "${with_xf86gamma_ext+set}" = set; then
11739   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11740 else
11741   with_xf86gamma=yes
11742 fi
11743
11744
11745
11746    case "$with_xf86gamma" in
11747     yes) ;;
11748     no)  ;;
11749
11750     /*)
11751      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11752 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11753      d=$with_xf86gamma/include
11754      if test -d $d; then
11755        X_CFLAGS="-I$d $X_CFLAGS"
11756        { echo "$as_me:$LINENO: result: $d" >&5
11757 echo "${ECHO_T}$d" >&6; }
11758      else
11759        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11760 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11761      fi
11762
11763      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11764 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11765      d=$with_xf86gamma/lib
11766      if test -d $d; then
11767        X_LIBS="-L$d $X_LIBS"
11768        { echo "$as_me:$LINENO: result: $d" >&5
11769 echo "${ECHO_T}$d" >&6; }
11770      else
11771        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11772 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11773      fi
11774
11775      # replace the directory string with "yes".
11776      with_xf86gamma_req="yes"
11777      with_xf86gamma=$with_xf86gamma_req
11778      ;;
11779
11780     *)
11781      echo ""
11782      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11783      echo "       If it is a directory, then \`DIR/include' will be added to"
11784      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11785      exit 1
11786      ;;
11787    esac
11788
11789
11790 if test "$with_xf86gamma" = yes; then
11791
11792   # first check for xf86vmode.h, if we haven't already
11793   if test "$have_xf86vmode" = yes; then
11794     have_xf86gamma=yes
11795   else
11796
11797   ac_save_CPPFLAGS="$CPPFLAGS"
11798   if test \! -z "$includedir" ; then
11799     CPPFLAGS="$CPPFLAGS -I$includedir"
11800   fi
11801   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11802   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11803   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11804 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11805 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11806   echo $ECHO_N "(cached) $ECHO_C" >&6
11807 else
11808   cat >conftest.$ac_ext <<_ACEOF
11809 /* confdefs.h.  */
11810 _ACEOF
11811 cat confdefs.h >>conftest.$ac_ext
11812 cat >>conftest.$ac_ext <<_ACEOF
11813 /* end confdefs.h.  */
11814 #include <X11/Xlib.h>
11815
11816 #include <X11/extensions/xf86vmode.h>
11817 _ACEOF
11818 rm -rf conftest.$ac_objext
11819 if { (ac_try="$ac_compile"
11820 case "(($ac_try" in
11821   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11822   *) ac_try_echo=$ac_try;;
11823 esac
11824 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11825   (eval "$ac_compile") 2>conftest.er1
11826   ac_status=$?
11827   grep -v '^ *+' conftest.er1 >conftest.err
11828   rm -rf conftest.er1
11829   cat conftest.err >&5
11830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831   (exit $ac_status); } && {
11832          test -z "$ac_c_werror_flag" ||
11833          test ! -s conftest.err
11834        } && test -s conftest.$ac_objext; then
11835   ac_cv_header_X11_extensions_xf86vmode_h=yes
11836 else
11837   echo "$as_me: failed program was:" >&5
11838 sed 's/^/| /' conftest.$ac_ext >&5
11839
11840         ac_cv_header_X11_extensions_xf86vmode_h=no
11841 fi
11842
11843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11844 fi
11845 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11846 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11847 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11848   have_xf86gamma=yes
11849 fi
11850
11851
11852   CPPFLAGS="$ac_save_CPPFLAGS"
11853   fi
11854
11855   # if that succeeded, then check for the -lXxf86vm
11856   if test "$have_xf86gamma" = yes; then
11857     have_xf86gamma=no
11858
11859   ac_save_CPPFLAGS="$CPPFLAGS"
11860   ac_save_LDFLAGS="$LDFLAGS"
11861 #  ac_save_LIBS="$LIBS"
11862
11863   if test \! -z "$includedir" ; then
11864     CPPFLAGS="$CPPFLAGS -I$includedir"
11865   fi
11866   # note: $X_CFLAGS includes $x_includes
11867   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11868
11869   if test \! -z "$libdir" ; then
11870     LDFLAGS="$LDFLAGS -L$libdir"
11871   fi
11872   # note: $X_LIBS includes $x_libraries
11873   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11874
11875   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11876   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11877   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11878 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11879 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11880   echo $ECHO_N "(cached) $ECHO_C" >&6
11881 else
11882   ac_check_lib_save_LIBS=$LIBS
11883 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11884 cat >conftest.$ac_ext <<_ACEOF
11885 /* confdefs.h.  */
11886 _ACEOF
11887 cat confdefs.h >>conftest.$ac_ext
11888 cat >>conftest.$ac_ext <<_ACEOF
11889 /* end confdefs.h.  */
11890
11891 /* Override any GCC internal prototype to avoid an error.
11892    Use char because int might match the return type of a GCC
11893    builtin and then its argument prototype would still apply.  */
11894 #ifdef __cplusplus
11895 extern "C"
11896 #endif
11897 char XF86VidModeSetGamma ();
11898 int
11899 main ()
11900 {
11901 return XF86VidModeSetGamma ();
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 rm -rf conftest.$ac_objext conftest$ac_exeext
11907 if { (ac_try="$ac_link"
11908 case "(($ac_try" in
11909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11910   *) ac_try_echo=$ac_try;;
11911 esac
11912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11913   (eval "$ac_link") 2>conftest.er1
11914   ac_status=$?
11915   grep -v '^ *+' conftest.er1 >conftest.err
11916   rm -rf conftest.er1
11917   cat conftest.err >&5
11918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919   (exit $ac_status); } && {
11920          test -z "$ac_c_werror_flag" ||
11921          test ! -s conftest.err
11922        } && test -s conftest$ac_exeext &&
11923        $as_test_x conftest$ac_exeext; then
11924   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11925 else
11926   echo "$as_me: failed program was:" >&5
11927 sed 's/^/| /' conftest.$ac_ext >&5
11928
11929         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11930 fi
11931
11932 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11933       conftest$ac_exeext conftest.$ac_ext
11934 LIBS=$ac_check_lib_save_LIBS
11935 fi
11936 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11937 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11938 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11939   have_xf86gamma=yes
11940 else
11941   true
11942 fi
11943
11944   CPPFLAGS="$ac_save_CPPFLAGS"
11945   LDFLAGS="$ac_save_LDFLAGS"
11946 #  LIBS="$ac_save_LIBS"
11947
11948   fi
11949
11950   # check for the Ramp versions of the functions too.
11951   if test "$have_xf86gamma" = yes; then
11952     have_xf86gamma_ramp=no
11953
11954   ac_save_CPPFLAGS="$CPPFLAGS"
11955   ac_save_LDFLAGS="$LDFLAGS"
11956 #  ac_save_LIBS="$LIBS"
11957
11958   if test \! -z "$includedir" ; then
11959     CPPFLAGS="$CPPFLAGS -I$includedir"
11960   fi
11961   # note: $X_CFLAGS includes $x_includes
11962   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11963
11964   if test \! -z "$libdir" ; then
11965     LDFLAGS="$LDFLAGS -L$libdir"
11966   fi
11967   # note: $X_LIBS includes $x_libraries
11968   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11969
11970   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11971   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11972   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11973 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11974 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11975   echo $ECHO_N "(cached) $ECHO_C" >&6
11976 else
11977   ac_check_lib_save_LIBS=$LIBS
11978 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11979 cat >conftest.$ac_ext <<_ACEOF
11980 /* confdefs.h.  */
11981 _ACEOF
11982 cat confdefs.h >>conftest.$ac_ext
11983 cat >>conftest.$ac_ext <<_ACEOF
11984 /* end confdefs.h.  */
11985
11986 /* Override any GCC internal prototype to avoid an error.
11987    Use char because int might match the return type of a GCC
11988    builtin and then its argument prototype would still apply.  */
11989 #ifdef __cplusplus
11990 extern "C"
11991 #endif
11992 char XF86VidModeSetGammaRamp ();
11993 int
11994 main ()
11995 {
11996 return XF86VidModeSetGammaRamp ();
11997   ;
11998   return 0;
11999 }
12000 _ACEOF
12001 rm -rf conftest.$ac_objext conftest$ac_exeext
12002 if { (ac_try="$ac_link"
12003 case "(($ac_try" in
12004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12005   *) ac_try_echo=$ac_try;;
12006 esac
12007 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12008   (eval "$ac_link") 2>conftest.er1
12009   ac_status=$?
12010   grep -v '^ *+' conftest.er1 >conftest.err
12011   rm -rf conftest.er1
12012   cat conftest.err >&5
12013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014   (exit $ac_status); } && {
12015          test -z "$ac_c_werror_flag" ||
12016          test ! -s conftest.err
12017        } && test -s conftest$ac_exeext &&
12018        $as_test_x conftest$ac_exeext; then
12019   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12020 else
12021   echo "$as_me: failed program was:" >&5
12022 sed 's/^/| /' conftest.$ac_ext >&5
12023
12024         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12025 fi
12026
12027 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12028       conftest$ac_exeext conftest.$ac_ext
12029 LIBS=$ac_check_lib_save_LIBS
12030 fi
12031 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12032 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12033 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12034   have_xf86gamma_ramp=yes
12035 else
12036   true
12037 fi
12038
12039   CPPFLAGS="$ac_save_CPPFLAGS"
12040   LDFLAGS="$ac_save_LDFLAGS"
12041 #  LIBS="$ac_save_LIBS"
12042
12043   fi
12044
12045   # if those tests succeeded, then we've really got the functions.
12046   if test "$have_xf86gamma" = yes; then
12047     cat >>confdefs.h <<\_ACEOF
12048 #define HAVE_XF86VMODE_GAMMA 1
12049 _ACEOF
12050
12051   fi
12052
12053   if test "$have_xf86gamma_ramp" = yes; then
12054     cat >>confdefs.h <<\_ACEOF
12055 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12056 _ACEOF
12057
12058   fi
12059
12060   # pull in the lib, if we haven't already
12061   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12062     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12063   fi
12064
12065 elif test "$with_xf86gamma" != no; then
12066   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12067   exit 1
12068 fi
12069
12070
12071 ###############################################################################
12072 #
12073 #       Check for the RANDR (Resize and Rotate) server extension.
12074 #
12075 #       We need this to detect when the resolution of the desktop
12076 #       has changed out from under us (this is a newer, different
12077 #       mechanism than the XF86VMODE virtual viewports.)
12078 #
12079 ###############################################################################
12080
12081 have_randr=no
12082 with_randr_req=unspecified
12083
12084 # Check whether --with-randr-ext was given.
12085 if test "${with_randr_ext+set}" = set; then
12086   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12087 else
12088   with_randr=yes
12089 fi
12090
12091
12092
12093    case "$with_randr" in
12094     yes) ;;
12095     no)  ;;
12096
12097     /*)
12098      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12099 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12100      d=$with_randr/include
12101      if test -d $d; then
12102        X_CFLAGS="-I$d $X_CFLAGS"
12103        { echo "$as_me:$LINENO: result: $d" >&5
12104 echo "${ECHO_T}$d" >&6; }
12105      else
12106        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12107 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12108      fi
12109
12110      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12111 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12112      d=$with_randr/lib
12113      if test -d $d; then
12114        X_LIBS="-L$d $X_LIBS"
12115        { echo "$as_me:$LINENO: result: $d" >&5
12116 echo "${ECHO_T}$d" >&6; }
12117      else
12118        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12119 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12120      fi
12121
12122      # replace the directory string with "yes".
12123      with_randr_req="yes"
12124      with_randr=$with_randr_req
12125      ;;
12126
12127     *)
12128      echo ""
12129      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12130      echo "       If it is a directory, then \`DIR/include' will be added to"
12131      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12132      exit 1
12133      ;;
12134    esac
12135
12136
12137 if test "$with_randr" = yes; then
12138
12139   # first check for Xrandr.h
12140
12141   ac_save_CPPFLAGS="$CPPFLAGS"
12142   if test \! -z "$includedir" ; then
12143     CPPFLAGS="$CPPFLAGS -I$includedir"
12144   fi
12145   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12146   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12147   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12148 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12149 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12150   echo $ECHO_N "(cached) $ECHO_C" >&6
12151 else
12152   cat >conftest.$ac_ext <<_ACEOF
12153 /* confdefs.h.  */
12154 _ACEOF
12155 cat confdefs.h >>conftest.$ac_ext
12156 cat >>conftest.$ac_ext <<_ACEOF
12157 /* end confdefs.h.  */
12158 #include <X11/Xlib.h>
12159
12160 #include <X11/extensions/Xrandr.h>
12161 _ACEOF
12162 rm -rf conftest.$ac_objext
12163 if { (ac_try="$ac_compile"
12164 case "(($ac_try" in
12165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12166   *) ac_try_echo=$ac_try;;
12167 esac
12168 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12169   (eval "$ac_compile") 2>conftest.er1
12170   ac_status=$?
12171   grep -v '^ *+' conftest.er1 >conftest.err
12172   rm -rf conftest.er1
12173   cat conftest.err >&5
12174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175   (exit $ac_status); } && {
12176          test -z "$ac_c_werror_flag" ||
12177          test ! -s conftest.err
12178        } && test -s conftest.$ac_objext; then
12179   ac_cv_header_X11_extensions_Xrandr_h=yes
12180 else
12181   echo "$as_me: failed program was:" >&5
12182 sed 's/^/| /' conftest.$ac_ext >&5
12183
12184         ac_cv_header_X11_extensions_Xrandr_h=no
12185 fi
12186
12187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188 fi
12189 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12190 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12191 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12192   have_randr=yes
12193 fi
12194
12195
12196   CPPFLAGS="$ac_save_CPPFLAGS"
12197
12198   # if that succeeded, then check for the XRR code in the libraries
12199   if test "$have_randr" = yes; then
12200
12201     # RANDR probably needs -lXrender
12202     xrender_libs=
12203
12204   ac_save_CPPFLAGS="$CPPFLAGS"
12205   ac_save_LDFLAGS="$LDFLAGS"
12206 #  ac_save_LIBS="$LIBS"
12207
12208   if test \! -z "$includedir" ; then
12209     CPPFLAGS="$CPPFLAGS -I$includedir"
12210   fi
12211   # note: $X_CFLAGS includes $x_includes
12212   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12213
12214   if test \! -z "$libdir" ; then
12215     LDFLAGS="$LDFLAGS -L$libdir"
12216   fi
12217   # note: $X_LIBS includes $x_libraries
12218   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12219
12220   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12221   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12222   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12223 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12224 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12225   echo $ECHO_N "(cached) $ECHO_C" >&6
12226 else
12227   ac_check_lib_save_LIBS=$LIBS
12228 LIBS="-lXrender -lXext -lX11 $LIBS"
12229 cat >conftest.$ac_ext <<_ACEOF
12230 /* confdefs.h.  */
12231 _ACEOF
12232 cat confdefs.h >>conftest.$ac_ext
12233 cat >>conftest.$ac_ext <<_ACEOF
12234 /* end confdefs.h.  */
12235
12236 /* Override any GCC internal prototype to avoid an error.
12237    Use char because int might match the return type of a GCC
12238    builtin and then its argument prototype would still apply.  */
12239 #ifdef __cplusplus
12240 extern "C"
12241 #endif
12242 char XRenderSetSubpixelOrder ();
12243 int
12244 main ()
12245 {
12246 return XRenderSetSubpixelOrder ();
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 rm -rf conftest.$ac_objext conftest$ac_exeext
12252 if { (ac_try="$ac_link"
12253 case "(($ac_try" in
12254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12255   *) ac_try_echo=$ac_try;;
12256 esac
12257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12258   (eval "$ac_link") 2>conftest.er1
12259   ac_status=$?
12260   grep -v '^ *+' conftest.er1 >conftest.err
12261   rm -rf conftest.er1
12262   cat conftest.err >&5
12263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12264   (exit $ac_status); } && {
12265          test -z "$ac_c_werror_flag" ||
12266          test ! -s conftest.err
12267        } && test -s conftest$ac_exeext &&
12268        $as_test_x conftest$ac_exeext; then
12269   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12270 else
12271   echo "$as_me: failed program was:" >&5
12272 sed 's/^/| /' conftest.$ac_ext >&5
12273
12274         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12275 fi
12276
12277 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12278       conftest$ac_exeext conftest.$ac_ext
12279 LIBS=$ac_check_lib_save_LIBS
12280 fi
12281 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12282 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12283 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12284   xrender_libs="-lXrender"
12285 else
12286   true
12287 fi
12288
12289   CPPFLAGS="$ac_save_CPPFLAGS"
12290   LDFLAGS="$ac_save_LDFLAGS"
12291 #  LIBS="$ac_save_LIBS"
12292
12293
12294     # first look for RANDR in -lXext
12295     have_randr=no
12296
12297   ac_save_CPPFLAGS="$CPPFLAGS"
12298   ac_save_LDFLAGS="$LDFLAGS"
12299 #  ac_save_LIBS="$LIBS"
12300
12301   if test \! -z "$includedir" ; then
12302     CPPFLAGS="$CPPFLAGS -I$includedir"
12303   fi
12304   # note: $X_CFLAGS includes $x_includes
12305   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12306
12307   if test \! -z "$libdir" ; then
12308     LDFLAGS="$LDFLAGS -L$libdir"
12309   fi
12310   # note: $X_LIBS includes $x_libraries
12311   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12312
12313   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12314   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12315   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12316 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12317 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12318   echo $ECHO_N "(cached) $ECHO_C" >&6
12319 else
12320   ac_check_lib_save_LIBS=$LIBS
12321 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12322 cat >conftest.$ac_ext <<_ACEOF
12323 /* confdefs.h.  */
12324 _ACEOF
12325 cat confdefs.h >>conftest.$ac_ext
12326 cat >>conftest.$ac_ext <<_ACEOF
12327 /* end confdefs.h.  */
12328
12329 /* Override any GCC internal prototype to avoid an error.
12330    Use char because int might match the return type of a GCC
12331    builtin and then its argument prototype would still apply.  */
12332 #ifdef __cplusplus
12333 extern "C"
12334 #endif
12335 char XRRGetScreenInfo ();
12336 int
12337 main ()
12338 {
12339 return XRRGetScreenInfo ();
12340   ;
12341   return 0;
12342 }
12343 _ACEOF
12344 rm -rf conftest.$ac_objext conftest$ac_exeext
12345 if { (ac_try="$ac_link"
12346 case "(($ac_try" in
12347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12348   *) ac_try_echo=$ac_try;;
12349 esac
12350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12351   (eval "$ac_link") 2>conftest.er1
12352   ac_status=$?
12353   grep -v '^ *+' conftest.er1 >conftest.err
12354   rm -rf conftest.er1
12355   cat conftest.err >&5
12356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357   (exit $ac_status); } && {
12358          test -z "$ac_c_werror_flag" ||
12359          test ! -s conftest.err
12360        } && test -s conftest$ac_exeext &&
12361        $as_test_x conftest$ac_exeext; then
12362   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12363 else
12364   echo "$as_me: failed program was:" >&5
12365 sed 's/^/| /' conftest.$ac_ext >&5
12366
12367         ac_cv_lib_Xext_XRRGetScreenInfo=no
12368 fi
12369
12370 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12371       conftest$ac_exeext conftest.$ac_ext
12372 LIBS=$ac_check_lib_save_LIBS
12373 fi
12374 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12375 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12376 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12377   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12378 else
12379   true
12380 fi
12381
12382   CPPFLAGS="$ac_save_CPPFLAGS"
12383   LDFLAGS="$ac_save_LDFLAGS"
12384 #  LIBS="$ac_save_LIBS"
12385
12386
12387     # if that failed, look in -lXrandr
12388     if test "$have_randr" = no; then
12389
12390   ac_save_CPPFLAGS="$CPPFLAGS"
12391   ac_save_LDFLAGS="$LDFLAGS"
12392 #  ac_save_LIBS="$LIBS"
12393
12394   if test \! -z "$includedir" ; then
12395     CPPFLAGS="$CPPFLAGS -I$includedir"
12396   fi
12397   # note: $X_CFLAGS includes $x_includes
12398   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12399
12400   if test \! -z "$libdir" ; then
12401     LDFLAGS="$LDFLAGS -L$libdir"
12402   fi
12403   # note: $X_LIBS includes $x_libraries
12404   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12405
12406   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12407   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12408   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12409 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12410 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413   ac_check_lib_save_LIBS=$LIBS
12414 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12415 cat >conftest.$ac_ext <<_ACEOF
12416 /* confdefs.h.  */
12417 _ACEOF
12418 cat confdefs.h >>conftest.$ac_ext
12419 cat >>conftest.$ac_ext <<_ACEOF
12420 /* end confdefs.h.  */
12421
12422 /* Override any GCC internal prototype to avoid an error.
12423    Use char because int might match the return type of a GCC
12424    builtin and then its argument prototype would still apply.  */
12425 #ifdef __cplusplus
12426 extern "C"
12427 #endif
12428 char XRRGetScreenInfo ();
12429 int
12430 main ()
12431 {
12432 return XRRGetScreenInfo ();
12433   ;
12434   return 0;
12435 }
12436 _ACEOF
12437 rm -rf conftest.$ac_objext conftest$ac_exeext
12438 if { (ac_try="$ac_link"
12439 case "(($ac_try" in
12440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12441   *) ac_try_echo=$ac_try;;
12442 esac
12443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12444   (eval "$ac_link") 2>conftest.er1
12445   ac_status=$?
12446   grep -v '^ *+' conftest.er1 >conftest.err
12447   rm -rf conftest.er1
12448   cat conftest.err >&5
12449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450   (exit $ac_status); } && {
12451          test -z "$ac_c_werror_flag" ||
12452          test ! -s conftest.err
12453        } && test -s conftest$ac_exeext &&
12454        $as_test_x conftest$ac_exeext; then
12455   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12456 else
12457   echo "$as_me: failed program was:" >&5
12458 sed 's/^/| /' conftest.$ac_ext >&5
12459
12460         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12461 fi
12462
12463 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12464       conftest$ac_exeext conftest.$ac_ext
12465 LIBS=$ac_check_lib_save_LIBS
12466 fi
12467 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12468 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12469 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12470   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12471 else
12472   true
12473 fi
12474
12475   CPPFLAGS="$ac_save_CPPFLAGS"
12476   LDFLAGS="$ac_save_LDFLAGS"
12477 #  LIBS="$ac_save_LIBS"
12478
12479     fi
12480   fi
12481
12482   # if that succeeded, then we've really got it.
12483   if test "$have_randr" = yes; then
12484     cat >>confdefs.h <<\_ACEOF
12485 #define HAVE_RANDR 1
12486 _ACEOF
12487
12488
12489     # Now check for version 1.2 in the same libs.
12490
12491   ac_save_CPPFLAGS="$CPPFLAGS"
12492   ac_save_LDFLAGS="$LDFLAGS"
12493 #  ac_save_LIBS="$LIBS"
12494
12495   if test \! -z "$includedir" ; then
12496     CPPFLAGS="$CPPFLAGS -I$includedir"
12497   fi
12498   # note: $X_CFLAGS includes $x_includes
12499   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12500
12501   if test \! -z "$libdir" ; then
12502     LDFLAGS="$LDFLAGS -L$libdir"
12503   fi
12504   # note: $X_LIBS includes $x_libraries
12505   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12506
12507   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12508   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12509   { echo "$as_me:$LINENO: checking for XRRGetOutputInfo in -lc" >&5
12510 echo $ECHO_N "checking for XRRGetOutputInfo in -lc... $ECHO_C" >&6; }
12511 if test "${ac_cv_lib_c_XRRGetOutputInfo+set}" = set; then
12512   echo $ECHO_N "(cached) $ECHO_C" >&6
12513 else
12514   ac_check_lib_save_LIBS=$LIBS
12515 LIBS="-lc $SAVER_LIBS $LIBS"
12516 cat >conftest.$ac_ext <<_ACEOF
12517 /* confdefs.h.  */
12518 _ACEOF
12519 cat confdefs.h >>conftest.$ac_ext
12520 cat >>conftest.$ac_ext <<_ACEOF
12521 /* end confdefs.h.  */
12522
12523 /* Override any GCC internal prototype to avoid an error.
12524    Use char because int might match the return type of a GCC
12525    builtin and then its argument prototype would still apply.  */
12526 #ifdef __cplusplus
12527 extern "C"
12528 #endif
12529 char XRRGetOutputInfo ();
12530 int
12531 main ()
12532 {
12533 return XRRGetOutputInfo ();
12534   ;
12535   return 0;
12536 }
12537 _ACEOF
12538 rm -rf conftest.$ac_objext conftest$ac_exeext
12539 if { (ac_try="$ac_link"
12540 case "(($ac_try" in
12541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12542   *) ac_try_echo=$ac_try;;
12543 esac
12544 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12545   (eval "$ac_link") 2>conftest.er1
12546   ac_status=$?
12547   grep -v '^ *+' conftest.er1 >conftest.err
12548   rm -rf conftest.er1
12549   cat conftest.err >&5
12550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551   (exit $ac_status); } && {
12552          test -z "$ac_c_werror_flag" ||
12553          test ! -s conftest.err
12554        } && test -s conftest$ac_exeext &&
12555        $as_test_x conftest$ac_exeext; then
12556   ac_cv_lib_c_XRRGetOutputInfo=yes
12557 else
12558   echo "$as_me: failed program was:" >&5
12559 sed 's/^/| /' conftest.$ac_ext >&5
12560
12561         ac_cv_lib_c_XRRGetOutputInfo=no
12562 fi
12563
12564 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12565       conftest$ac_exeext conftest.$ac_ext
12566 LIBS=$ac_check_lib_save_LIBS
12567 fi
12568 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_XRRGetOutputInfo" >&5
12569 echo "${ECHO_T}$ac_cv_lib_c_XRRGetOutputInfo" >&6; }
12570 if test $ac_cv_lib_c_XRRGetOutputInfo = yes; then
12571   cat >>confdefs.h <<\_ACEOF
12572 #define HAVE_RANDR_12 1
12573 _ACEOF
12574
12575 else
12576   true
12577 fi
12578
12579   CPPFLAGS="$ac_save_CPPFLAGS"
12580   LDFLAGS="$ac_save_LDFLAGS"
12581 #  LIBS="$ac_save_LIBS"
12582
12583   fi
12584
12585
12586 elif test "$with_randr" != no; then
12587   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12588   exit 1
12589 fi
12590
12591
12592 ###############################################################################
12593 #
12594 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12595 #       using other XF86 stuff.)
12596 #
12597 ###############################################################################
12598
12599 have_xf86miscsetgrabkeysstate=no
12600 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12601
12602   ac_save_CPPFLAGS="$CPPFLAGS"
12603   ac_save_LDFLAGS="$LDFLAGS"
12604 #  ac_save_LIBS="$LIBS"
12605
12606   if test \! -z "$includedir" ; then
12607     CPPFLAGS="$CPPFLAGS -I$includedir"
12608   fi
12609   # note: $X_CFLAGS includes $x_includes
12610   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12611
12612   if test \! -z "$libdir" ; then
12613     LDFLAGS="$LDFLAGS -L$libdir"
12614   fi
12615   # note: $X_LIBS includes $x_libraries
12616   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12617
12618   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12619   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12620   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12621 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12622 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12623   echo $ECHO_N "(cached) $ECHO_C" >&6
12624 else
12625   ac_check_lib_save_LIBS=$LIBS
12626 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12627 cat >conftest.$ac_ext <<_ACEOF
12628 /* confdefs.h.  */
12629 _ACEOF
12630 cat confdefs.h >>conftest.$ac_ext
12631 cat >>conftest.$ac_ext <<_ACEOF
12632 /* end confdefs.h.  */
12633
12634 /* Override any GCC internal prototype to avoid an error.
12635    Use char because int might match the return type of a GCC
12636    builtin and then its argument prototype would still apply.  */
12637 #ifdef __cplusplus
12638 extern "C"
12639 #endif
12640 char XF86MiscSetGrabKeysState ();
12641 int
12642 main ()
12643 {
12644 return XF86MiscSetGrabKeysState ();
12645   ;
12646   return 0;
12647 }
12648 _ACEOF
12649 rm -rf conftest.$ac_objext conftest$ac_exeext
12650 if { (ac_try="$ac_link"
12651 case "(($ac_try" in
12652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12653   *) ac_try_echo=$ac_try;;
12654 esac
12655 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12656   (eval "$ac_link") 2>conftest.er1
12657   ac_status=$?
12658   grep -v '^ *+' conftest.er1 >conftest.err
12659   rm -rf conftest.er1
12660   cat conftest.err >&5
12661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12662   (exit $ac_status); } && {
12663          test -z "$ac_c_werror_flag" ||
12664          test ! -s conftest.err
12665        } && test -s conftest$ac_exeext &&
12666        $as_test_x conftest$ac_exeext; then
12667   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12668 else
12669   echo "$as_me: failed program was:" >&5
12670 sed 's/^/| /' conftest.$ac_ext >&5
12671
12672         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12673 fi
12674
12675 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12676       conftest$ac_exeext conftest.$ac_ext
12677 LIBS=$ac_check_lib_save_LIBS
12678 fi
12679 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12680 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12681 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12682   have_xf86miscsetgrabkeysstate=yes
12683 else
12684   true
12685 fi
12686
12687   CPPFLAGS="$ac_save_CPPFLAGS"
12688   LDFLAGS="$ac_save_LDFLAGS"
12689 #  LIBS="$ac_save_LIBS"
12690
12691   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12692     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12693     cat >>confdefs.h <<\_ACEOF
12694 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12695 _ACEOF
12696
12697   fi
12698 fi
12699
12700
12701 ###############################################################################
12702 #
12703 #       Check for HP XHPDisableReset and XHPEnableReset.
12704 #
12705 ###############################################################################
12706
12707 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12708 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12709
12710   ac_save_CPPFLAGS="$CPPFLAGS"
12711   if test \! -z "$includedir" ; then
12712     CPPFLAGS="$CPPFLAGS -I$includedir"
12713   fi
12714   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12715   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12716   cat >conftest.$ac_ext <<_ACEOF
12717 /* confdefs.h.  */
12718 _ACEOF
12719 cat confdefs.h >>conftest.$ac_ext
12720 cat >>conftest.$ac_ext <<_ACEOF
12721 /* end confdefs.h.  */
12722 #include <X11/XHPlib.h>
12723
12724 _ACEOF
12725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12726   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12727   cat >>confdefs.h <<\_ACEOF
12728 #define HAVE_XHPDISABLERESET 1
12729 _ACEOF
12730
12731                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12732                    { echo "$as_me:$LINENO: result: yes" >&5
12733 echo "${ECHO_T}yes" >&6; }
12734 else
12735   { echo "$as_me:$LINENO: result: no" >&5
12736 echo "${ECHO_T}no" >&6; }
12737 fi
12738 rm -rf conftest*
12739
12740   CPPFLAGS="$ac_save_CPPFLAGS"
12741
12742
12743 ###############################################################################
12744 #
12745 #       Check for /proc/interrupts.
12746 #
12747 ###############################################################################
12748
12749 have_proc_interrupts=no
12750 with_proc_interrupts_req=unspecified
12751
12752 # Check whether --with-proc-interrupts was given.
12753 if test "${with_proc_interrupts+set}" = set; then
12754   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12755 else
12756   with_proc_interrupts=yes
12757 fi
12758
12759
12760 if test "$with_proc_interrupts" = yes; then
12761
12762   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12763   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12764   # check that it has the bits we need, but otherwise we'll just go on faith.
12765   #
12766   have_proc_interrupts=yes
12767
12768   if test -f /proc/interrupts; then
12769    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12770 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12771 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12772   echo $ECHO_N "(cached) $ECHO_C" >&6
12773 else
12774   ac_cv_have_proc_interrupts=no
12775      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12776        ac_cv_have_proc_interrupts=yes
12777      fi
12778
12779 fi
12780 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12781 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12782    have_proc_interrupts=$ac_cv_have_proc_interrupts
12783   fi
12784
12785   if test "$have_proc_interrupts" = yes; then
12786     cat >>confdefs.h <<\_ACEOF
12787 #define HAVE_PROC_INTERRUPTS 1
12788 _ACEOF
12789
12790   fi
12791
12792 elif test "$with_proc_interrupts" != no; then
12793   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12794   exit 1
12795 fi
12796
12797
12798 ###############################################################################
12799 #
12800 #       The --enable-locking option
12801 #
12802 ###############################################################################
12803
12804 # Check whether --enable-locking was given.
12805 if test "${enable_locking+set}" = set; then
12806   enableval=$enable_locking; enable_locking="$enableval"
12807 else
12808   if test "$ac_macosx" = yes; then
12809     # We can't lock on MacOS X, so default to not compiling in support for it.
12810     # But allow --enable-locking to override that, so I can debug Linux locking
12811     # under MacOS X11.
12812     enable_locking=no
12813    else
12814     enable_locking=yes
12815    fi
12816 fi
12817
12818 if test "$enable_locking" = yes; then
12819   true
12820 elif test "$enable_locking" = no; then
12821   cat >>confdefs.h <<\_ACEOF
12822 #define NO_LOCKING 1
12823 _ACEOF
12824
12825 else
12826   echo "error: must be yes or no: --enable-locking=$enable_locking"
12827   exit 1
12828 fi
12829
12830
12831 ###############################################################################
12832 #
12833 #       Whether to allow root password to unblank.
12834 #
12835 ###############################################################################
12836 # Check whether --enable-root-passwd was given.
12837 if test "${enable_root_passwd+set}" = set; then
12838   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12839 else
12840   enable_root_passwd=yes
12841 fi
12842
12843 if test "$enable_root_passwd" = yes; then
12844   cat >>confdefs.h <<\_ACEOF
12845 #define ALLOW_ROOT_PASSWD 1
12846 _ACEOF
12847
12848   true
12849 elif test "$enable_root_passwd" != no; then
12850   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12851   exit 1
12852 fi
12853
12854 ###############################################################################
12855 #
12856 #       Check for PAM.
12857 #
12858 ###############################################################################
12859
12860 case "$host" in
12861   *-solaris*)
12862    # Solaris systems tend to come with PAM misconfigured.
12863    #  Don't build it by default, even if the headers exist.
12864    with_pam_default=no
12865    ;;
12866   *)
12867    # Default to building PAM support on all other systems, if it exists.
12868    with_pam_default=yes
12869   ;;
12870 esac
12871
12872 have_pam=no
12873 with_pam_req=unspecified
12874
12875
12876 # Check whether --with-pam was given.
12877 if test "${with_pam+set}" = set; then
12878   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12879 else
12880   with_pam=$with_pam_default
12881 fi
12882
12883
12884
12885 # Check whether --with-pam_service_name was given.
12886 if test "${with_pam_service_name+set}" = set; then
12887   withval=$with_pam_service_name; pam_service_name="$withval"
12888 else
12889   pam_service_name="xscreensaver"
12890 fi
12891
12892
12893
12894    case "$with_pam" in
12895     yes) ;;
12896     no)  ;;
12897
12898     /*)
12899      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12900 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12901      d=$with_pam/include
12902      if test -d $d; then
12903        X_CFLAGS="-I$d $X_CFLAGS"
12904        { echo "$as_me:$LINENO: result: $d" >&5
12905 echo "${ECHO_T}$d" >&6; }
12906      else
12907        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12908 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12909      fi
12910
12911      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12912 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12913      d=$with_pam/lib
12914      if test -d $d; then
12915        X_LIBS="-L$d $X_LIBS"
12916        { echo "$as_me:$LINENO: result: $d" >&5
12917 echo "${ECHO_T}$d" >&6; }
12918      else
12919        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12920 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12921      fi
12922
12923      # replace the directory string with "yes".
12924      with_pam_req="yes"
12925      with_pam=$with_pam_req
12926      ;;
12927
12928     *)
12929      echo ""
12930      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12931      echo "       If it is a directory, then \`DIR/include' will be added to"
12932      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12933      exit 1
12934      ;;
12935    esac
12936
12937
12938 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12939   { echo "$as_me:$LINENO: checking for PAM" >&5
12940 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12941 if test "${ac_cv_pam+set}" = set; then
12942   echo $ECHO_N "(cached) $ECHO_C" >&6
12943 else
12944
12945   ac_save_CPPFLAGS="$CPPFLAGS"
12946   if test \! -z "$includedir" ; then
12947     CPPFLAGS="$CPPFLAGS -I$includedir"
12948   fi
12949   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12950   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12951   cat >conftest.$ac_ext <<_ACEOF
12952 /* confdefs.h.  */
12953 _ACEOF
12954 cat confdefs.h >>conftest.$ac_ext
12955 cat >>conftest.$ac_ext <<_ACEOF
12956 /* end confdefs.h.  */
12957 #include <security/pam_appl.h>
12958 int
12959 main ()
12960 {
12961
12962   ;
12963   return 0;
12964 }
12965 _ACEOF
12966 rm -rf conftest.$ac_objext
12967 if { (ac_try="$ac_compile"
12968 case "(($ac_try" in
12969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12970   *) ac_try_echo=$ac_try;;
12971 esac
12972 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12973   (eval "$ac_compile") 2>conftest.er1
12974   ac_status=$?
12975   grep -v '^ *+' conftest.er1 >conftest.err
12976   rm -rf conftest.er1
12977   cat conftest.err >&5
12978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979   (exit $ac_status); } && {
12980          test -z "$ac_c_werror_flag" ||
12981          test ! -s conftest.err
12982        } && test -s conftest.$ac_objext; then
12983   ac_cv_pam=yes
12984 else
12985   echo "$as_me: failed program was:" >&5
12986 sed 's/^/| /' conftest.$ac_ext >&5
12987
12988         ac_cv_pam=no
12989 fi
12990
12991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12992   CPPFLAGS="$ac_save_CPPFLAGS"
12993 fi
12994 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12995 echo "${ECHO_T}$ac_cv_pam" >&6; }
12996   if test "$ac_cv_pam" = yes ; then
12997     have_pam=yes
12998     cat >>confdefs.h <<\_ACEOF
12999 #define HAVE_PAM 1
13000 _ACEOF
13001
13002     cat >>confdefs.h <<_ACEOF
13003 #define PAM_SERVICE_NAME "$pam_service_name"
13004 _ACEOF
13005
13006
13007     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13008
13009     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13010     # those are in libc.  On Linux and Solaris, they're in libdl.
13011     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13012 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13013 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13014   echo $ECHO_N "(cached) $ECHO_C" >&6
13015 else
13016   ac_check_lib_save_LIBS=$LIBS
13017 LIBS="-ldl  $LIBS"
13018 cat >conftest.$ac_ext <<_ACEOF
13019 /* confdefs.h.  */
13020 _ACEOF
13021 cat confdefs.h >>conftest.$ac_ext
13022 cat >>conftest.$ac_ext <<_ACEOF
13023 /* end confdefs.h.  */
13024
13025 /* Override any GCC internal prototype to avoid an error.
13026    Use char because int might match the return type of a GCC
13027    builtin and then its argument prototype would still apply.  */
13028 #ifdef __cplusplus
13029 extern "C"
13030 #endif
13031 char dlopen ();
13032 int
13033 main ()
13034 {
13035 return dlopen ();
13036   ;
13037   return 0;
13038 }
13039 _ACEOF
13040 rm -rf conftest.$ac_objext conftest$ac_exeext
13041 if { (ac_try="$ac_link"
13042 case "(($ac_try" in
13043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13044   *) ac_try_echo=$ac_try;;
13045 esac
13046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13047   (eval "$ac_link") 2>conftest.er1
13048   ac_status=$?
13049   grep -v '^ *+' conftest.er1 >conftest.err
13050   rm -rf conftest.er1
13051   cat conftest.err >&5
13052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053   (exit $ac_status); } && {
13054          test -z "$ac_c_werror_flag" ||
13055          test ! -s conftest.err
13056        } && test -s conftest$ac_exeext &&
13057        $as_test_x conftest$ac_exeext; then
13058   ac_cv_lib_dl_dlopen=yes
13059 else
13060   echo "$as_me: failed program was:" >&5
13061 sed 's/^/| /' conftest.$ac_ext >&5
13062
13063         ac_cv_lib_dl_dlopen=no
13064 fi
13065
13066 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13067       conftest$ac_exeext conftest.$ac_ext
13068 LIBS=$ac_check_lib_save_LIBS
13069 fi
13070 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13071 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13072 if test $ac_cv_lib_dl_dlopen = yes; then
13073   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13074 fi
13075
13076
13077     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13078     have_timedwait=no
13079     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13080 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13081 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13082   echo $ECHO_N "(cached) $ECHO_C" >&6
13083 else
13084   ac_check_lib_save_LIBS=$LIBS
13085 LIBS="-lc  $LIBS"
13086 cat >conftest.$ac_ext <<_ACEOF
13087 /* confdefs.h.  */
13088 _ACEOF
13089 cat confdefs.h >>conftest.$ac_ext
13090 cat >>conftest.$ac_ext <<_ACEOF
13091 /* end confdefs.h.  */
13092
13093 /* Override any GCC internal prototype to avoid an error.
13094    Use char because int might match the return type of a GCC
13095    builtin and then its argument prototype would still apply.  */
13096 #ifdef __cplusplus
13097 extern "C"
13098 #endif
13099 char sigtimedwait ();
13100 int
13101 main ()
13102 {
13103 return sigtimedwait ();
13104   ;
13105   return 0;
13106 }
13107 _ACEOF
13108 rm -rf conftest.$ac_objext conftest$ac_exeext
13109 if { (ac_try="$ac_link"
13110 case "(($ac_try" in
13111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13112   *) ac_try_echo=$ac_try;;
13113 esac
13114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13115   (eval "$ac_link") 2>conftest.er1
13116   ac_status=$?
13117   grep -v '^ *+' conftest.er1 >conftest.err
13118   rm -rf conftest.er1
13119   cat conftest.err >&5
13120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13121   (exit $ac_status); } && {
13122          test -z "$ac_c_werror_flag" ||
13123          test ! -s conftest.err
13124        } && test -s conftest$ac_exeext &&
13125        $as_test_x conftest$ac_exeext; then
13126   ac_cv_lib_c_sigtimedwait=yes
13127 else
13128   echo "$as_me: failed program was:" >&5
13129 sed 's/^/| /' conftest.$ac_ext >&5
13130
13131         ac_cv_lib_c_sigtimedwait=no
13132 fi
13133
13134 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13135       conftest$ac_exeext conftest.$ac_ext
13136 LIBS=$ac_check_lib_save_LIBS
13137 fi
13138 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13139 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13140 if test $ac_cv_lib_c_sigtimedwait = yes; then
13141   have_timedwait=yes
13142                   cat >>confdefs.h <<\_ACEOF
13143 #define HAVE_SIGTIMEDWAIT 1
13144 _ACEOF
13145
13146 fi
13147
13148     if test "$have_timedwait" = no ; then
13149       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13150 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13151 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13152   echo $ECHO_N "(cached) $ECHO_C" >&6
13153 else
13154   ac_check_lib_save_LIBS=$LIBS
13155 LIBS="-lrt  $LIBS"
13156 cat >conftest.$ac_ext <<_ACEOF
13157 /* confdefs.h.  */
13158 _ACEOF
13159 cat confdefs.h >>conftest.$ac_ext
13160 cat >>conftest.$ac_ext <<_ACEOF
13161 /* end confdefs.h.  */
13162
13163 /* Override any GCC internal prototype to avoid an error.
13164    Use char because int might match the return type of a GCC
13165    builtin and then its argument prototype would still apply.  */
13166 #ifdef __cplusplus
13167 extern "C"
13168 #endif
13169 char sigtimedwait ();
13170 int
13171 main ()
13172 {
13173 return sigtimedwait ();
13174   ;
13175   return 0;
13176 }
13177 _ACEOF
13178 rm -rf conftest.$ac_objext conftest$ac_exeext
13179 if { (ac_try="$ac_link"
13180 case "(($ac_try" in
13181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13182   *) ac_try_echo=$ac_try;;
13183 esac
13184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13185   (eval "$ac_link") 2>conftest.er1
13186   ac_status=$?
13187   grep -v '^ *+' conftest.er1 >conftest.err
13188   rm -rf conftest.er1
13189   cat conftest.err >&5
13190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191   (exit $ac_status); } && {
13192          test -z "$ac_c_werror_flag" ||
13193          test ! -s conftest.err
13194        } && test -s conftest$ac_exeext &&
13195        $as_test_x conftest$ac_exeext; then
13196   ac_cv_lib_rt_sigtimedwait=yes
13197 else
13198   echo "$as_me: failed program was:" >&5
13199 sed 's/^/| /' conftest.$ac_ext >&5
13200
13201         ac_cv_lib_rt_sigtimedwait=no
13202 fi
13203
13204 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13205       conftest$ac_exeext conftest.$ac_ext
13206 LIBS=$ac_check_lib_save_LIBS
13207 fi
13208 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13209 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13210 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13211   have_timedwait=yes
13212                                       cat >>confdefs.h <<\_ACEOF
13213 #define HAVE_SIGTIMEDWAIT 1
13214 _ACEOF
13215
13216                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13217 fi
13218
13219     fi
13220
13221     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13222 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13223     if test "${ac_cv_pam_strerror_args+set}" = set; then
13224   echo $ECHO_N "(cached) $ECHO_C" >&6
13225 else
13226
13227   ac_save_CPPFLAGS="$CPPFLAGS"
13228   if test \! -z "$includedir" ; then
13229     CPPFLAGS="$CPPFLAGS -I$includedir"
13230   fi
13231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13232   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13233   cat >conftest.$ac_ext <<_ACEOF
13234 /* confdefs.h.  */
13235 _ACEOF
13236 cat confdefs.h >>conftest.$ac_ext
13237 cat >>conftest.$ac_ext <<_ACEOF
13238 /* end confdefs.h.  */
13239 #include <stdio.h>
13240                         #include <stdlib.h>
13241                         #include <security/pam_appl.h>
13242 int
13243 main ()
13244 {
13245 pam_handle_t *pamh = 0;
13246                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13247   ;
13248   return 0;
13249 }
13250 _ACEOF
13251 rm -rf conftest.$ac_objext
13252 if { (ac_try="$ac_compile"
13253 case "(($ac_try" in
13254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13255   *) ac_try_echo=$ac_try;;
13256 esac
13257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13258   (eval "$ac_compile") 2>conftest.er1
13259   ac_status=$?
13260   grep -v '^ *+' conftest.er1 >conftest.err
13261   rm -rf conftest.er1
13262   cat conftest.err >&5
13263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13264   (exit $ac_status); } && {
13265          test -z "$ac_c_werror_flag" ||
13266          test ! -s conftest.err
13267        } && test -s conftest.$ac_objext; then
13268   ac_pam_strerror_args=2
13269 else
13270   echo "$as_me: failed program was:" >&5
13271 sed 's/^/| /' conftest.$ac_ext >&5
13272
13273
13274   ac_save_CPPFLAGS="$CPPFLAGS"
13275   if test \! -z "$includedir" ; then
13276     CPPFLAGS="$CPPFLAGS -I$includedir"
13277   fi
13278   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13279   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13280   cat >conftest.$ac_ext <<_ACEOF
13281 /* confdefs.h.  */
13282 _ACEOF
13283 cat confdefs.h >>conftest.$ac_ext
13284 cat >>conftest.$ac_ext <<_ACEOF
13285 /* end confdefs.h.  */
13286 #include <stdio.h>
13287                                           #include <stdlib.h>
13288                                           #include <security/pam_appl.h>
13289 int
13290 main ()
13291 {
13292 char *s =
13293                                            pam_strerror(PAM_SUCCESS);
13294   ;
13295   return 0;
13296 }
13297 _ACEOF
13298 rm -rf conftest.$ac_objext
13299 if { (ac_try="$ac_compile"
13300 case "(($ac_try" in
13301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13302   *) ac_try_echo=$ac_try;;
13303 esac
13304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13305   (eval "$ac_compile") 2>conftest.er1
13306   ac_status=$?
13307   grep -v '^ *+' conftest.er1 >conftest.err
13308   rm -rf conftest.er1
13309   cat conftest.err >&5
13310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311   (exit $ac_status); } && {
13312          test -z "$ac_c_werror_flag" ||
13313          test ! -s conftest.err
13314        } && test -s conftest.$ac_objext; then
13315   ac_pam_strerror_args=1
13316 else
13317   echo "$as_me: failed program was:" >&5
13318 sed 's/^/| /' conftest.$ac_ext >&5
13319
13320         ac_pam_strerror_args=0
13321 fi
13322
13323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13324   CPPFLAGS="$ac_save_CPPFLAGS"
13325 fi
13326
13327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13328   CPPFLAGS="$ac_save_CPPFLAGS"
13329       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13330 fi
13331
13332     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13333     if test "$ac_pam_strerror_args" = 1 ; then
13334       { echo "$as_me:$LINENO: result: one argument" >&5
13335 echo "${ECHO_T}one argument" >&6; }
13336     elif test "$ac_pam_strerror_args" = 2 ; then
13337       cat >>confdefs.h <<\_ACEOF
13338 #define PAM_STRERROR_TWO_ARGS 1
13339 _ACEOF
13340
13341       { echo "$as_me:$LINENO: result: two arguments" >&5
13342 echo "${ECHO_T}two arguments" >&6; }
13343     else
13344       { echo "$as_me:$LINENO: result: unknown" >&5
13345 echo "${ECHO_T}unknown" >&6; }
13346     fi
13347
13348 # Check pam_fail_delay
13349     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13350 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13351     if test "${ac_cv_pam_fail_delay+set}" = set; then
13352   echo $ECHO_N "(cached) $ECHO_C" >&6
13353 else
13354   ac_save_LDFLAGS="$LDFLAGS"
13355       LDFLAGS="-lpam"
13356       cat >conftest.$ac_ext <<_ACEOF
13357 /* confdefs.h.  */
13358 _ACEOF
13359 cat confdefs.h >>conftest.$ac_ext
13360 cat >>conftest.$ac_ext <<_ACEOF
13361 /* end confdefs.h.  */
13362 #include <security/pam_appl.h>
13363 int
13364 main ()
13365 {
13366 pam_handle_t *pamh = 0;
13367                    unsigned int usec = 1;
13368                    int status = pam_fail_delay (pamh, usec);
13369   ;
13370   return 0;
13371 }
13372 _ACEOF
13373 rm -rf conftest.$ac_objext conftest$ac_exeext
13374 if { (ac_try="$ac_link"
13375 case "(($ac_try" in
13376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13377   *) ac_try_echo=$ac_try;;
13378 esac
13379 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13380   (eval "$ac_link") 2>conftest.er1
13381   ac_status=$?
13382   grep -v '^ *+' conftest.er1 >conftest.err
13383   rm -rf conftest.er1
13384   cat conftest.err >&5
13385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386   (exit $ac_status); } && {
13387          test -z "$ac_c_werror_flag" ||
13388          test ! -s conftest.err
13389        } && test -s conftest$ac_exeext &&
13390        $as_test_x conftest$ac_exeext; then
13391   ac_pam_fail_delay=yes
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 sed 's/^/| /' conftest.$ac_ext >&5
13395
13396         ac_pam_fail_delay=no
13397 fi
13398
13399 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13400       conftest$ac_exeext conftest.$ac_ext
13401       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13402       LDFLAGS=$ac_save_LDFLAGS
13403 fi
13404
13405
13406       if test "$ac_pam_fail_delay" = yes ; then
13407         { echo "$as_me:$LINENO: result: yes" >&5
13408 echo "${ECHO_T}yes" >&6; }
13409         cat >>confdefs.h <<\_ACEOF
13410 #define HAVE_PAM_FAIL_DELAY 1
13411 _ACEOF
13412
13413       else
13414         { echo "$as_me:$LINENO: result: no" >&5
13415 echo "${ECHO_T}no" >&6; }
13416       fi
13417
13418   fi
13419 fi
13420
13421
13422 ###############################################################################
13423 #
13424 #       Check for Kerberos.
13425 #
13426 ###############################################################################
13427
13428 have_kerberos=no
13429 have_kerberos5=no
13430 with_kerberos_req=unspecified
13431
13432
13433 # Check whether --with-kerberos was given.
13434 if test "${with_kerberos+set}" = set; then
13435   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13436 else
13437   with_kerberos=yes
13438 fi
13439
13440
13441
13442    case "$with_kerberos" in
13443     yes) ;;
13444     no)  ;;
13445
13446     /*)
13447      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13448 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13449      d=$with_kerberos/include
13450      if test -d $d; then
13451        X_CFLAGS="-I$d $X_CFLAGS"
13452        { echo "$as_me:$LINENO: result: $d" >&5
13453 echo "${ECHO_T}$d" >&6; }
13454      else
13455        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13456 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13457      fi
13458
13459      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13460 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13461      d=$with_kerberos/lib
13462      if test -d $d; then
13463        X_LIBS="-L$d $X_LIBS"
13464        { echo "$as_me:$LINENO: result: $d" >&5
13465 echo "${ECHO_T}$d" >&6; }
13466      else
13467        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13468 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13469      fi
13470
13471      # replace the directory string with "yes".
13472      with_kerberos_req="yes"
13473      with_kerberos=$with_kerberos_req
13474      ;;
13475
13476     *)
13477      echo ""
13478      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13479      echo "       If it is a directory, then \`DIR/include' will be added to"
13480      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13481      exit 1
13482      ;;
13483    esac
13484
13485
13486 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13487   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13488 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13489 if test "${ac_cv_kerberos+set}" = set; then
13490   echo $ECHO_N "(cached) $ECHO_C" >&6
13491 else
13492
13493   ac_save_CPPFLAGS="$CPPFLAGS"
13494   if test \! -z "$includedir" ; then
13495     CPPFLAGS="$CPPFLAGS -I$includedir"
13496   fi
13497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13498   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13499   cat >conftest.$ac_ext <<_ACEOF
13500 /* confdefs.h.  */
13501 _ACEOF
13502 cat confdefs.h >>conftest.$ac_ext
13503 cat >>conftest.$ac_ext <<_ACEOF
13504 /* end confdefs.h.  */
13505 #include <krb.h>
13506 int
13507 main ()
13508 {
13509
13510   ;
13511   return 0;
13512 }
13513 _ACEOF
13514 rm -rf conftest.$ac_objext
13515 if { (ac_try="$ac_compile"
13516 case "(($ac_try" in
13517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13518   *) ac_try_echo=$ac_try;;
13519 esac
13520 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13521   (eval "$ac_compile") 2>conftest.er1
13522   ac_status=$?
13523   grep -v '^ *+' conftest.er1 >conftest.err
13524   rm -rf conftest.er1
13525   cat conftest.err >&5
13526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13527   (exit $ac_status); } && {
13528          test -z "$ac_c_werror_flag" ||
13529          test ! -s conftest.err
13530        } && test -s conftest.$ac_objext; then
13531   ac_cv_kerberos=yes
13532 else
13533   echo "$as_me: failed program was:" >&5
13534 sed 's/^/| /' conftest.$ac_ext >&5
13535
13536         ac_cv_kerberos=no
13537 fi
13538
13539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540   CPPFLAGS="$ac_save_CPPFLAGS"
13541 fi
13542 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13543 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13544   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13545 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13546 if test "${ac_cv_kerberos5+set}" = set; then
13547   echo $ECHO_N "(cached) $ECHO_C" >&6
13548 else
13549
13550   ac_save_CPPFLAGS="$CPPFLAGS"
13551   if test \! -z "$includedir" ; then
13552     CPPFLAGS="$CPPFLAGS -I$includedir"
13553   fi
13554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13555   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13556   cat >conftest.$ac_ext <<_ACEOF
13557 /* confdefs.h.  */
13558 _ACEOF
13559 cat confdefs.h >>conftest.$ac_ext
13560 cat >>conftest.$ac_ext <<_ACEOF
13561 /* end confdefs.h.  */
13562 #include <kerberosIV/krb.h>
13563 int
13564 main ()
13565 {
13566
13567   ;
13568   return 0;
13569 }
13570 _ACEOF
13571 rm -rf conftest.$ac_objext
13572 if { (ac_try="$ac_compile"
13573 case "(($ac_try" in
13574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13575   *) ac_try_echo=$ac_try;;
13576 esac
13577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13578   (eval "$ac_compile") 2>conftest.er1
13579   ac_status=$?
13580   grep -v '^ *+' conftest.er1 >conftest.err
13581   rm -rf conftest.er1
13582   cat conftest.err >&5
13583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13584   (exit $ac_status); } && {
13585          test -z "$ac_c_werror_flag" ||
13586          test ! -s conftest.err
13587        } && test -s conftest.$ac_objext; then
13588   ac_cv_kerberos5=yes
13589 else
13590   echo "$as_me: failed program was:" >&5
13591 sed 's/^/| /' conftest.$ac_ext >&5
13592
13593         ac_cv_kerberos5=no
13594 fi
13595
13596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13597   CPPFLAGS="$ac_save_CPPFLAGS"
13598 fi
13599 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13600 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13601
13602   if test "$ac_cv_kerberos" = yes ; then
13603     have_kerberos=yes
13604     cat >>confdefs.h <<\_ACEOF
13605 #define HAVE_KERBEROS 1
13606 _ACEOF
13607
13608   fi
13609
13610   if test "$ac_cv_kerberos5" = yes ; then
13611
13612     # Andrew Snare <ajs@pigpond.com> wrote:
13613     #
13614     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13615     # (krb4) was also available.  This turns out not to be the case with
13616     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13617     # is optional.
13618     #
13619     # So, disable kerberosV support if libkrb4 can't be found.
13620     # This is not the best solution, but it makes the compile not fail.
13621     #
13622
13623   ac_save_CPPFLAGS="$CPPFLAGS"
13624   ac_save_LDFLAGS="$LDFLAGS"
13625 #  ac_save_LIBS="$LIBS"
13626
13627   if test \! -z "$includedir" ; then
13628     CPPFLAGS="$CPPFLAGS -I$includedir"
13629   fi
13630   # note: $X_CFLAGS includes $x_includes
13631   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13632
13633   if test \! -z "$libdir" ; then
13634     LDFLAGS="$LDFLAGS -L$libdir"
13635   fi
13636   # note: $X_LIBS includes $x_libraries
13637   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13638
13639   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13640   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13641   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13642 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13643 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13644   echo $ECHO_N "(cached) $ECHO_C" >&6
13645 else
13646   ac_check_lib_save_LIBS=$LIBS
13647 LIBS="-lkrb4  $LIBS"
13648 cat >conftest.$ac_ext <<_ACEOF
13649 /* confdefs.h.  */
13650 _ACEOF
13651 cat confdefs.h >>conftest.$ac_ext
13652 cat >>conftest.$ac_ext <<_ACEOF
13653 /* end confdefs.h.  */
13654
13655 /* Override any GCC internal prototype to avoid an error.
13656    Use char because int might match the return type of a GCC
13657    builtin and then its argument prototype would still apply.  */
13658 #ifdef __cplusplus
13659 extern "C"
13660 #endif
13661 char krb_get_tf_realm ();
13662 int
13663 main ()
13664 {
13665 return krb_get_tf_realm ();
13666   ;
13667   return 0;
13668 }
13669 _ACEOF
13670 rm -rf conftest.$ac_objext conftest$ac_exeext
13671 if { (ac_try="$ac_link"
13672 case "(($ac_try" in
13673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13674   *) ac_try_echo=$ac_try;;
13675 esac
13676 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13677   (eval "$ac_link") 2>conftest.er1
13678   ac_status=$?
13679   grep -v '^ *+' conftest.er1 >conftest.err
13680   rm -rf conftest.er1
13681   cat conftest.err >&5
13682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683   (exit $ac_status); } && {
13684          test -z "$ac_c_werror_flag" ||
13685          test ! -s conftest.err
13686        } && test -s conftest$ac_exeext &&
13687        $as_test_x conftest$ac_exeext; then
13688   ac_cv_lib_krb4_krb_get_tf_realm=yes
13689 else
13690   echo "$as_me: failed program was:" >&5
13691 sed 's/^/| /' conftest.$ac_ext >&5
13692
13693         ac_cv_lib_krb4_krb_get_tf_realm=no
13694 fi
13695
13696 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13697       conftest$ac_exeext conftest.$ac_ext
13698 LIBS=$ac_check_lib_save_LIBS
13699 fi
13700 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13701 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13702 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13703   have_kerberos=yes
13704 else
13705   have_kerberos=no
13706 fi
13707
13708   CPPFLAGS="$ac_save_CPPFLAGS"
13709   LDFLAGS="$ac_save_LDFLAGS"
13710 #  LIBS="$ac_save_LIBS"
13711
13712     if test "$have_kerberos" = yes ; then
13713       have_kerberos5=yes
13714       cat >>confdefs.h <<\_ACEOF
13715 #define HAVE_KERBEROS 1
13716 _ACEOF
13717
13718       cat >>confdefs.h <<\_ACEOF
13719 #define HAVE_KERBEROS5 1
13720 _ACEOF
13721
13722     else
13723       have_kerberos5=no
13724       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13725 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13726     fi
13727
13728   fi
13729
13730   if test "$have_kerberos5" = yes ; then
13731     # from Matt Knopp <mhat@infocalypse.netlag.com>
13732     # (who got it from amu@mit.edu)
13733
13734     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13735
13736     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13737
13738   ac_save_CPPFLAGS="$CPPFLAGS"
13739   ac_save_LDFLAGS="$LDFLAGS"
13740 #  ac_save_LIBS="$LIBS"
13741
13742   if test \! -z "$includedir" ; then
13743     CPPFLAGS="$CPPFLAGS -I$includedir"
13744   fi
13745   # note: $X_CFLAGS includes $x_includes
13746   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13747
13748   if test \! -z "$libdir" ; then
13749     LDFLAGS="$LDFLAGS -L$libdir"
13750   fi
13751   # note: $X_LIBS includes $x_libraries
13752   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13753
13754   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13755   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13756   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13757 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13758 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13759   echo $ECHO_N "(cached) $ECHO_C" >&6
13760 else
13761   ac_check_lib_save_LIBS=$LIBS
13762 LIBS="-lcrypt  $LIBS"
13763 cat >conftest.$ac_ext <<_ACEOF
13764 /* confdefs.h.  */
13765 _ACEOF
13766 cat confdefs.h >>conftest.$ac_ext
13767 cat >>conftest.$ac_ext <<_ACEOF
13768 /* end confdefs.h.  */
13769
13770 /* Override any GCC internal prototype to avoid an error.
13771    Use char because int might match the return type of a GCC
13772    builtin and then its argument prototype would still apply.  */
13773 #ifdef __cplusplus
13774 extern "C"
13775 #endif
13776 char crypt ();
13777 int
13778 main ()
13779 {
13780 return crypt ();
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -rf conftest.$ac_objext conftest$ac_exeext
13786 if { (ac_try="$ac_link"
13787 case "(($ac_try" in
13788   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13789   *) ac_try_echo=$ac_try;;
13790 esac
13791 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13792   (eval "$ac_link") 2>conftest.er1
13793   ac_status=$?
13794   grep -v '^ *+' conftest.er1 >conftest.err
13795   rm -rf conftest.er1
13796   cat conftest.err >&5
13797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13798   (exit $ac_status); } && {
13799          test -z "$ac_c_werror_flag" ||
13800          test ! -s conftest.err
13801        } && test -s conftest$ac_exeext &&
13802        $as_test_x conftest$ac_exeext; then
13803   ac_cv_lib_crypt_crypt=yes
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 sed 's/^/| /' conftest.$ac_ext >&5
13807
13808         ac_cv_lib_crypt_crypt=no
13809 fi
13810
13811 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13812       conftest$ac_exeext conftest.$ac_ext
13813 LIBS=$ac_check_lib_save_LIBS
13814 fi
13815 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13816 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13817 if test $ac_cv_lib_crypt_crypt = yes; then
13818   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13819 fi
13820
13821   CPPFLAGS="$ac_save_CPPFLAGS"
13822   LDFLAGS="$ac_save_LDFLAGS"
13823 #  LIBS="$ac_save_LIBS"
13824
13825
13826   elif test "$have_kerberos" = yes ; then
13827     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13828     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13829   fi
13830
13831   if test "$have_kerberos" = yes ; then
13832     { echo "$as_me:$LINENO: checking for res_search" >&5
13833 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13834 if test "${ac_cv_func_res_search+set}" = set; then
13835   echo $ECHO_N "(cached) $ECHO_C" >&6
13836 else
13837   cat >conftest.$ac_ext <<_ACEOF
13838 /* confdefs.h.  */
13839 _ACEOF
13840 cat confdefs.h >>conftest.$ac_ext
13841 cat >>conftest.$ac_ext <<_ACEOF
13842 /* end confdefs.h.  */
13843 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13844    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13845 #define res_search innocuous_res_search
13846
13847 /* System header to define __stub macros and hopefully few prototypes,
13848     which can conflict with char res_search (); below.
13849     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13850     <limits.h> exists even on freestanding compilers.  */
13851
13852 #ifdef __STDC__
13853 # include <limits.h>
13854 #else
13855 # include <assert.h>
13856 #endif
13857
13858 #undef res_search
13859
13860 /* Override any GCC internal prototype to avoid an error.
13861    Use char because int might match the return type of a GCC
13862    builtin and then its argument prototype would still apply.  */
13863 #ifdef __cplusplus
13864 extern "C"
13865 #endif
13866 char res_search ();
13867 /* The GNU C library defines this for functions which it implements
13868     to always fail with ENOSYS.  Some functions are actually named
13869     something starting with __ and the normal name is an alias.  */
13870 #if defined __stub_res_search || defined __stub___res_search
13871 choke me
13872 #endif
13873
13874 int
13875 main ()
13876 {
13877 return res_search ();
13878   ;
13879   return 0;
13880 }
13881 _ACEOF
13882 rm -rf conftest.$ac_objext conftest$ac_exeext
13883 if { (ac_try="$ac_link"
13884 case "(($ac_try" in
13885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13886   *) ac_try_echo=$ac_try;;
13887 esac
13888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13889   (eval "$ac_link") 2>conftest.er1
13890   ac_status=$?
13891   grep -v '^ *+' conftest.er1 >conftest.err
13892   rm -rf conftest.er1
13893   cat conftest.err >&5
13894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895   (exit $ac_status); } && {
13896          test -z "$ac_c_werror_flag" ||
13897          test ! -s conftest.err
13898        } && test -s conftest$ac_exeext &&
13899        $as_test_x conftest$ac_exeext; then
13900   ac_cv_func_res_search=yes
13901 else
13902   echo "$as_me: failed program was:" >&5
13903 sed 's/^/| /' conftest.$ac_ext >&5
13904
13905         ac_cv_func_res_search=no
13906 fi
13907
13908 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13909       conftest$ac_exeext conftest.$ac_ext
13910 fi
13911 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13912 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13913 if test $ac_cv_func_res_search = yes; then
13914   :
13915 else
13916   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13917 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13918 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13919   echo $ECHO_N "(cached) $ECHO_C" >&6
13920 else
13921   ac_check_lib_save_LIBS=$LIBS
13922 LIBS="-lresolv  $LIBS"
13923 cat >conftest.$ac_ext <<_ACEOF
13924 /* confdefs.h.  */
13925 _ACEOF
13926 cat confdefs.h >>conftest.$ac_ext
13927 cat >>conftest.$ac_ext <<_ACEOF
13928 /* end confdefs.h.  */
13929
13930 /* Override any GCC internal prototype to avoid an error.
13931    Use char because int might match the return type of a GCC
13932    builtin and then its argument prototype would still apply.  */
13933 #ifdef __cplusplus
13934 extern "C"
13935 #endif
13936 char res_search ();
13937 int
13938 main ()
13939 {
13940 return res_search ();
13941   ;
13942   return 0;
13943 }
13944 _ACEOF
13945 rm -rf conftest.$ac_objext conftest$ac_exeext
13946 if { (ac_try="$ac_link"
13947 case "(($ac_try" in
13948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13949   *) ac_try_echo=$ac_try;;
13950 esac
13951 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13952   (eval "$ac_link") 2>conftest.er1
13953   ac_status=$?
13954   grep -v '^ *+' conftest.er1 >conftest.err
13955   rm -rf conftest.er1
13956   cat conftest.err >&5
13957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958   (exit $ac_status); } && {
13959          test -z "$ac_c_werror_flag" ||
13960          test ! -s conftest.err
13961        } && test -s conftest$ac_exeext &&
13962        $as_test_x conftest$ac_exeext; then
13963   ac_cv_lib_resolv_res_search=yes
13964 else
13965   echo "$as_me: failed program was:" >&5
13966 sed 's/^/| /' conftest.$ac_ext >&5
13967
13968         ac_cv_lib_resolv_res_search=no
13969 fi
13970
13971 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13972       conftest$ac_exeext conftest.$ac_ext
13973 LIBS=$ac_check_lib_save_LIBS
13974 fi
13975 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13976 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13977 if test $ac_cv_lib_resolv_res_search = yes; then
13978   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13979 else
13980   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13981 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13982
13983 fi
13984
13985 fi
13986
13987   fi
13988 fi
13989
13990
13991 ###############################################################################
13992 #
13993 #       Check for the nine billion variants of shadow passwords...
13994 #
13995 ###############################################################################
13996
13997 need_setuid=no
13998
13999 have_shadow=no
14000 with_shadow_req=unspecified
14001
14002
14003 # Check whether --with-shadow was given.
14004 if test "${with_shadow+set}" = set; then
14005   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
14006 else
14007   with_shadow=yes
14008 fi
14009
14010
14011
14012    case "$with_shadow" in
14013     yes) ;;
14014     no)  ;;
14015
14016     /*)
14017      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14018 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14019      d=$with_shadow/include
14020      if test -d $d; then
14021        X_CFLAGS="-I$d $X_CFLAGS"
14022        { echo "$as_me:$LINENO: result: $d" >&5
14023 echo "${ECHO_T}$d" >&6; }
14024      else
14025        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14026 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14027      fi
14028
14029      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14030 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14031      d=$with_shadow/lib
14032      if test -d $d; then
14033        X_LIBS="-L$d $X_LIBS"
14034        { echo "$as_me:$LINENO: result: $d" >&5
14035 echo "${ECHO_T}$d" >&6; }
14036      else
14037        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14038 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14039      fi
14040
14041      # replace the directory string with "yes".
14042      with_shadow_req="yes"
14043      with_shadow=$with_shadow_req
14044      ;;
14045
14046     *)
14047      echo ""
14048      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14049      echo "       If it is a directory, then \`DIR/include' will be added to"
14050      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14051      exit 1
14052      ;;
14053    esac
14054
14055
14056 if test "$enable_locking" = no ; then
14057   with_shadow_req=no
14058   with_shadow=no
14059 fi
14060
14061
14062 ###############################################################################
14063 #
14064 #       Check for Sun "adjunct" passwords.
14065 #
14066 ###############################################################################
14067
14068 if test "$with_shadow" = yes ; then
14069   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14070 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14071 if test "${ac_cv_sun_adjunct+set}" = set; then
14072   echo $ECHO_N "(cached) $ECHO_C" >&6
14073 else
14074
14075   ac_save_CPPFLAGS="$CPPFLAGS"
14076   if test \! -z "$includedir" ; then
14077     CPPFLAGS="$CPPFLAGS -I$includedir"
14078   fi
14079   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14080   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14081   cat >conftest.$ac_ext <<_ACEOF
14082 /* confdefs.h.  */
14083 _ACEOF
14084 cat confdefs.h >>conftest.$ac_ext
14085 cat >>conftest.$ac_ext <<_ACEOF
14086 /* end confdefs.h.  */
14087 #include <stdlib.h>
14088                                     #include <unistd.h>
14089                                     #include <sys/types.h>
14090                                     #include <sys/label.h>
14091                                     #include <sys/audit.h>
14092                                     #include <pwdadj.h>
14093 int
14094 main ()
14095 {
14096 struct passwd_adjunct *p = getpwanam("nobody");
14097                        const char *pw = p->pwa_passwd;
14098   ;
14099   return 0;
14100 }
14101 _ACEOF
14102 rm -rf conftest.$ac_objext
14103 if { (ac_try="$ac_compile"
14104 case "(($ac_try" in
14105   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14106   *) ac_try_echo=$ac_try;;
14107 esac
14108 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14109   (eval "$ac_compile") 2>conftest.er1
14110   ac_status=$?
14111   grep -v '^ *+' conftest.er1 >conftest.err
14112   rm -rf conftest.er1
14113   cat conftest.err >&5
14114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115   (exit $ac_status); } && {
14116          test -z "$ac_c_werror_flag" ||
14117          test ! -s conftest.err
14118        } && test -s conftest.$ac_objext; then
14119   ac_cv_sun_adjunct=yes
14120 else
14121   echo "$as_me: failed program was:" >&5
14122 sed 's/^/| /' conftest.$ac_ext >&5
14123
14124         ac_cv_sun_adjunct=no
14125 fi
14126
14127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14128   CPPFLAGS="$ac_save_CPPFLAGS"
14129 fi
14130 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14131 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14132   if test "$ac_cv_sun_adjunct" = yes; then
14133     have_shadow_adjunct=yes
14134     have_shadow=yes
14135     need_setuid=yes
14136   fi
14137 fi
14138
14139
14140 ###############################################################################
14141 #
14142 #       Check for DEC and SCO so-called "enhanced" security.
14143 #
14144 ###############################################################################
14145
14146 if test "$with_shadow" = yes ; then
14147   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14148 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14149 if test "${ac_cv_enhanced_passwd+set}" = set; then
14150   echo $ECHO_N "(cached) $ECHO_C" >&6
14151 else
14152
14153   ac_save_CPPFLAGS="$CPPFLAGS"
14154   if test \! -z "$includedir" ; then
14155     CPPFLAGS="$CPPFLAGS -I$includedir"
14156   fi
14157   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14158   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14159   cat >conftest.$ac_ext <<_ACEOF
14160 /* confdefs.h.  */
14161 _ACEOF
14162 cat confdefs.h >>conftest.$ac_ext
14163 cat >>conftest.$ac_ext <<_ACEOF
14164 /* end confdefs.h.  */
14165 #include <stdlib.h>
14166                                     #include <unistd.h>
14167                                     #include <sys/types.h>
14168                                     #include <pwd.h>
14169                                     #include <sys/security.h>
14170                                     #include <prot.h>
14171 int
14172 main ()
14173 {
14174 struct pr_passwd *p;
14175                        const char *pw;
14176                        set_auth_parameters(0, 0);
14177                        check_auth_parameters();
14178                        p = getprpwnam("nobody");
14179                        pw = p->ufld.fd_encrypt;
14180   ;
14181   return 0;
14182 }
14183 _ACEOF
14184 rm -rf conftest.$ac_objext
14185 if { (ac_try="$ac_compile"
14186 case "(($ac_try" in
14187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14188   *) ac_try_echo=$ac_try;;
14189 esac
14190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14191   (eval "$ac_compile") 2>conftest.er1
14192   ac_status=$?
14193   grep -v '^ *+' conftest.er1 >conftest.err
14194   rm -rf conftest.er1
14195   cat conftest.err >&5
14196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14197   (exit $ac_status); } && {
14198          test -z "$ac_c_werror_flag" ||
14199          test ! -s conftest.err
14200        } && test -s conftest.$ac_objext; then
14201   ac_cv_enhanced_passwd=yes
14202 else
14203   echo "$as_me: failed program was:" >&5
14204 sed 's/^/| /' conftest.$ac_ext >&5
14205
14206         ac_cv_enhanced_passwd=no
14207 fi
14208
14209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210   CPPFLAGS="$ac_save_CPPFLAGS"
14211 fi
14212 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14213 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14214   if test $ac_cv_enhanced_passwd = yes; then
14215     have_shadow_enhanced=yes
14216     have_shadow=yes
14217     need_setuid=yes
14218
14219     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14220     # (I'm told it needs -lcurses too, but I don't understand why.)
14221     # But on DEC, it's in -lsecurity.
14222     #
14223     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14224 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14225 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14226   echo $ECHO_N "(cached) $ECHO_C" >&6
14227 else
14228   ac_check_lib_save_LIBS=$LIBS
14229 LIBS="-lprot -lx $LIBS"
14230 cat >conftest.$ac_ext <<_ACEOF
14231 /* confdefs.h.  */
14232 _ACEOF
14233 cat confdefs.h >>conftest.$ac_ext
14234 cat >>conftest.$ac_ext <<_ACEOF
14235 /* end confdefs.h.  */
14236
14237 /* Override any GCC internal prototype to avoid an error.
14238    Use char because int might match the return type of a GCC
14239    builtin and then its argument prototype would still apply.  */
14240 #ifdef __cplusplus
14241 extern "C"
14242 #endif
14243 char getprpwnam ();
14244 int
14245 main ()
14246 {
14247 return getprpwnam ();
14248   ;
14249   return 0;
14250 }
14251 _ACEOF
14252 rm -rf conftest.$ac_objext conftest$ac_exeext
14253 if { (ac_try="$ac_link"
14254 case "(($ac_try" in
14255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256   *) ac_try_echo=$ac_try;;
14257 esac
14258 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14259   (eval "$ac_link") 2>conftest.er1
14260   ac_status=$?
14261   grep -v '^ *+' conftest.er1 >conftest.err
14262   rm -rf conftest.er1
14263   cat conftest.err >&5
14264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265   (exit $ac_status); } && {
14266          test -z "$ac_c_werror_flag" ||
14267          test ! -s conftest.err
14268        } && test -s conftest$ac_exeext &&
14269        $as_test_x conftest$ac_exeext; then
14270   ac_cv_lib_prot_getprpwnam=yes
14271 else
14272   echo "$as_me: failed program was:" >&5
14273 sed 's/^/| /' conftest.$ac_ext >&5
14274
14275         ac_cv_lib_prot_getprpwnam=no
14276 fi
14277
14278 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14279       conftest$ac_exeext conftest.$ac_ext
14280 LIBS=$ac_check_lib_save_LIBS
14281 fi
14282 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14283 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14284 if test $ac_cv_lib_prot_getprpwnam = yes; then
14285   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14286 else
14287   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14288 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14289 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14290   echo $ECHO_N "(cached) $ECHO_C" >&6
14291 else
14292   ac_check_lib_save_LIBS=$LIBS
14293 LIBS="-lsecurity  $LIBS"
14294 cat >conftest.$ac_ext <<_ACEOF
14295 /* confdefs.h.  */
14296 _ACEOF
14297 cat confdefs.h >>conftest.$ac_ext
14298 cat >>conftest.$ac_ext <<_ACEOF
14299 /* end confdefs.h.  */
14300
14301 /* Override any GCC internal prototype to avoid an error.
14302    Use char because int might match the return type of a GCC
14303    builtin and then its argument prototype would still apply.  */
14304 #ifdef __cplusplus
14305 extern "C"
14306 #endif
14307 char getprpwnam ();
14308 int
14309 main ()
14310 {
14311 return getprpwnam ();
14312   ;
14313   return 0;
14314 }
14315 _ACEOF
14316 rm -rf conftest.$ac_objext conftest$ac_exeext
14317 if { (ac_try="$ac_link"
14318 case "(($ac_try" in
14319   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14320   *) ac_try_echo=$ac_try;;
14321 esac
14322 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14323   (eval "$ac_link") 2>conftest.er1
14324   ac_status=$?
14325   grep -v '^ *+' conftest.er1 >conftest.err
14326   rm -rf conftest.er1
14327   cat conftest.err >&5
14328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329   (exit $ac_status); } && {
14330          test -z "$ac_c_werror_flag" ||
14331          test ! -s conftest.err
14332        } && test -s conftest$ac_exeext &&
14333        $as_test_x conftest$ac_exeext; then
14334   ac_cv_lib_security_getprpwnam=yes
14335 else
14336   echo "$as_me: failed program was:" >&5
14337 sed 's/^/| /' conftest.$ac_ext >&5
14338
14339         ac_cv_lib_security_getprpwnam=no
14340 fi
14341
14342 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14343       conftest$ac_exeext conftest.$ac_ext
14344 LIBS=$ac_check_lib_save_LIBS
14345 fi
14346 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14347 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14348 if test $ac_cv_lib_security_getprpwnam = yes; then
14349   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14350 fi
14351
14352 fi
14353
14354   fi
14355 fi
14356
14357 ###############################################################################
14358 #
14359 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14360 #
14361 ###############################################################################
14362
14363 if test "$with_shadow" = yes ; then
14364   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14365 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14366 if test "${ac_cv_hpux_passwd+set}" = set; then
14367   echo $ECHO_N "(cached) $ECHO_C" >&6
14368 else
14369
14370   ac_save_CPPFLAGS="$CPPFLAGS"
14371   if test \! -z "$includedir" ; then
14372     CPPFLAGS="$CPPFLAGS -I$includedir"
14373   fi
14374   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14375   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14376   cat >conftest.$ac_ext <<_ACEOF
14377 /* confdefs.h.  */
14378 _ACEOF
14379 cat confdefs.h >>conftest.$ac_ext
14380 cat >>conftest.$ac_ext <<_ACEOF
14381 /* end confdefs.h.  */
14382 #include <stdlib.h>
14383                                     #include <unistd.h>
14384                                     #include <sys/types.h>
14385                                     #include <pwd.h>
14386                                     #include <hpsecurity.h>
14387                                     #include <prot.h>
14388 int
14389 main ()
14390 {
14391 struct s_passwd *p = getspwnam("nobody");
14392                        const char *pw = p->pw_passwd;
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 rm -rf conftest.$ac_objext
14398 if { (ac_try="$ac_compile"
14399 case "(($ac_try" in
14400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14401   *) ac_try_echo=$ac_try;;
14402 esac
14403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14404   (eval "$ac_compile") 2>conftest.er1
14405   ac_status=$?
14406   grep -v '^ *+' conftest.er1 >conftest.err
14407   rm -rf conftest.er1
14408   cat conftest.err >&5
14409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410   (exit $ac_status); } && {
14411          test -z "$ac_c_werror_flag" ||
14412          test ! -s conftest.err
14413        } && test -s conftest.$ac_objext; then
14414   ac_cv_hpux_passwd=yes
14415 else
14416   echo "$as_me: failed program was:" >&5
14417 sed 's/^/| /' conftest.$ac_ext >&5
14418
14419         ac_cv_hpux_passwd=no
14420 fi
14421
14422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14423   CPPFLAGS="$ac_save_CPPFLAGS"
14424 fi
14425 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14426 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14427   if test "$ac_cv_hpux_passwd" = yes; then
14428     have_shadow_hpux=yes
14429     have_shadow=yes
14430     need_setuid=yes
14431
14432     # on HPUX, bigcrypt is in -lsec
14433     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14434 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14435 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14436   echo $ECHO_N "(cached) $ECHO_C" >&6
14437 else
14438   ac_check_lib_save_LIBS=$LIBS
14439 LIBS="-lsec  $LIBS"
14440 cat >conftest.$ac_ext <<_ACEOF
14441 /* confdefs.h.  */
14442 _ACEOF
14443 cat confdefs.h >>conftest.$ac_ext
14444 cat >>conftest.$ac_ext <<_ACEOF
14445 /* end confdefs.h.  */
14446
14447 /* Override any GCC internal prototype to avoid an error.
14448    Use char because int might match the return type of a GCC
14449    builtin and then its argument prototype would still apply.  */
14450 #ifdef __cplusplus
14451 extern "C"
14452 #endif
14453 char bigcrypt ();
14454 int
14455 main ()
14456 {
14457 return bigcrypt ();
14458   ;
14459   return 0;
14460 }
14461 _ACEOF
14462 rm -rf conftest.$ac_objext conftest$ac_exeext
14463 if { (ac_try="$ac_link"
14464 case "(($ac_try" in
14465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14466   *) ac_try_echo=$ac_try;;
14467 esac
14468 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14469   (eval "$ac_link") 2>conftest.er1
14470   ac_status=$?
14471   grep -v '^ *+' conftest.er1 >conftest.err
14472   rm -rf conftest.er1
14473   cat conftest.err >&5
14474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14475   (exit $ac_status); } && {
14476          test -z "$ac_c_werror_flag" ||
14477          test ! -s conftest.err
14478        } && test -s conftest$ac_exeext &&
14479        $as_test_x conftest$ac_exeext; then
14480   ac_cv_lib_sec_bigcrypt=yes
14481 else
14482   echo "$as_me: failed program was:" >&5
14483 sed 's/^/| /' conftest.$ac_ext >&5
14484
14485         ac_cv_lib_sec_bigcrypt=no
14486 fi
14487
14488 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14489       conftest$ac_exeext conftest.$ac_ext
14490 LIBS=$ac_check_lib_save_LIBS
14491 fi
14492 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14493 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14494 if test $ac_cv_lib_sec_bigcrypt = yes; then
14495   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14496 fi
14497
14498   fi
14499 fi
14500
14501
14502 ###############################################################################
14503 #
14504 #       Check for FreeBSD-style shadow passwords.
14505 #
14506 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14507 #       password systems -- except you only get stuff in the pw_passwd field
14508 #       if the running program is setuid.  So, guess that we've got this
14509 #       lossage to contend with if /etc/master.passwd exists, and default to
14510 #       a setuid installation.
14511 #
14512 ###############################################################################
14513
14514 if test "$with_shadow" = yes ; then
14515   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14516 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14517 if test "${ac_cv_master_passwd+set}" = set; then
14518   echo $ECHO_N "(cached) $ECHO_C" >&6
14519 else
14520   if test -f /etc/master.passwd ; then
14521                     ac_cv_master_passwd=yes
14522                   else
14523                     ac_cv_master_passwd=no
14524                   fi
14525 fi
14526 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14527 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14528   if test "$ac_cv_master_passwd" = yes; then
14529     need_setuid=yes
14530   fi
14531 fi
14532
14533
14534 ###############################################################################
14535 #
14536 #       Check for traditional (ha!) shadow passwords.
14537 #
14538 ###############################################################################
14539
14540 if test "$with_shadow" = yes ; then
14541   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14542 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14543 if test "${ac_cv_shadow+set}" = set; then
14544   echo $ECHO_N "(cached) $ECHO_C" >&6
14545 else
14546
14547   ac_save_CPPFLAGS="$CPPFLAGS"
14548   if test \! -z "$includedir" ; then
14549     CPPFLAGS="$CPPFLAGS -I$includedir"
14550   fi
14551   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14552   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14553   cat >conftest.$ac_ext <<_ACEOF
14554 /* confdefs.h.  */
14555 _ACEOF
14556 cat confdefs.h >>conftest.$ac_ext
14557 cat >>conftest.$ac_ext <<_ACEOF
14558 /* end confdefs.h.  */
14559 #include <stdlib.h>
14560                                     #include <unistd.h>
14561                                     #include <sys/types.h>
14562                                     #include <pwd.h>
14563                                     #include <shadow.h>
14564 int
14565 main ()
14566 {
14567 struct spwd *p = getspnam("nobody");
14568                        const char *pw = p->sp_pwdp;
14569   ;
14570   return 0;
14571 }
14572 _ACEOF
14573 rm -rf conftest.$ac_objext
14574 if { (ac_try="$ac_compile"
14575 case "(($ac_try" in
14576   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14577   *) ac_try_echo=$ac_try;;
14578 esac
14579 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14580   (eval "$ac_compile") 2>conftest.er1
14581   ac_status=$?
14582   grep -v '^ *+' conftest.er1 >conftest.err
14583   rm -rf conftest.er1
14584   cat conftest.err >&5
14585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14586   (exit $ac_status); } && {
14587          test -z "$ac_c_werror_flag" ||
14588          test ! -s conftest.err
14589        } && test -s conftest.$ac_objext; then
14590   ac_cv_shadow=yes
14591 else
14592   echo "$as_me: failed program was:" >&5
14593 sed 's/^/| /' conftest.$ac_ext >&5
14594
14595         ac_cv_shadow=no
14596 fi
14597
14598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14599   CPPFLAGS="$ac_save_CPPFLAGS"
14600 fi
14601 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14602 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14603   if test "$ac_cv_shadow" = yes; then
14604     have_shadow=yes
14605     need_setuid=yes
14606
14607     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14608     have_getspnam=no
14609     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14610 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14611 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14612   echo $ECHO_N "(cached) $ECHO_C" >&6
14613 else
14614   ac_check_lib_save_LIBS=$LIBS
14615 LIBS="-lc  $LIBS"
14616 cat >conftest.$ac_ext <<_ACEOF
14617 /* confdefs.h.  */
14618 _ACEOF
14619 cat confdefs.h >>conftest.$ac_ext
14620 cat >>conftest.$ac_ext <<_ACEOF
14621 /* end confdefs.h.  */
14622
14623 /* Override any GCC internal prototype to avoid an error.
14624    Use char because int might match the return type of a GCC
14625    builtin and then its argument prototype would still apply.  */
14626 #ifdef __cplusplus
14627 extern "C"
14628 #endif
14629 char getspnam ();
14630 int
14631 main ()
14632 {
14633 return getspnam ();
14634   ;
14635   return 0;
14636 }
14637 _ACEOF
14638 rm -rf conftest.$ac_objext conftest$ac_exeext
14639 if { (ac_try="$ac_link"
14640 case "(($ac_try" in
14641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14642   *) ac_try_echo=$ac_try;;
14643 esac
14644 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14645   (eval "$ac_link") 2>conftest.er1
14646   ac_status=$?
14647   grep -v '^ *+' conftest.er1 >conftest.err
14648   rm -rf conftest.er1
14649   cat conftest.err >&5
14650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651   (exit $ac_status); } && {
14652          test -z "$ac_c_werror_flag" ||
14653          test ! -s conftest.err
14654        } && test -s conftest$ac_exeext &&
14655        $as_test_x conftest$ac_exeext; then
14656   ac_cv_lib_c_getspnam=yes
14657 else
14658   echo "$as_me: failed program was:" >&5
14659 sed 's/^/| /' conftest.$ac_ext >&5
14660
14661         ac_cv_lib_c_getspnam=no
14662 fi
14663
14664 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14665       conftest$ac_exeext conftest.$ac_ext
14666 LIBS=$ac_check_lib_save_LIBS
14667 fi
14668 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14669 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14670 if test $ac_cv_lib_c_getspnam = yes; then
14671   have_getspnam=yes
14672 fi
14673
14674     if test "$have_getspnam" = no ; then
14675       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14676 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14677 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14678   echo $ECHO_N "(cached) $ECHO_C" >&6
14679 else
14680   ac_check_lib_save_LIBS=$LIBS
14681 LIBS="-lgen  $LIBS"
14682 cat >conftest.$ac_ext <<_ACEOF
14683 /* confdefs.h.  */
14684 _ACEOF
14685 cat confdefs.h >>conftest.$ac_ext
14686 cat >>conftest.$ac_ext <<_ACEOF
14687 /* end confdefs.h.  */
14688
14689 /* Override any GCC internal prototype to avoid an error.
14690    Use char because int might match the return type of a GCC
14691    builtin and then its argument prototype would still apply.  */
14692 #ifdef __cplusplus
14693 extern "C"
14694 #endif
14695 char getspnam ();
14696 int
14697 main ()
14698 {
14699 return getspnam ();
14700   ;
14701   return 0;
14702 }
14703 _ACEOF
14704 rm -rf conftest.$ac_objext conftest$ac_exeext
14705 if { (ac_try="$ac_link"
14706 case "(($ac_try" in
14707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14708   *) ac_try_echo=$ac_try;;
14709 esac
14710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14711   (eval "$ac_link") 2>conftest.er1
14712   ac_status=$?
14713   grep -v '^ *+' conftest.er1 >conftest.err
14714   rm -rf conftest.er1
14715   cat conftest.err >&5
14716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717   (exit $ac_status); } && {
14718          test -z "$ac_c_werror_flag" ||
14719          test ! -s conftest.err
14720        } && test -s conftest$ac_exeext &&
14721        $as_test_x conftest$ac_exeext; then
14722   ac_cv_lib_gen_getspnam=yes
14723 else
14724   echo "$as_me: failed program was:" >&5
14725 sed 's/^/| /' conftest.$ac_ext >&5
14726
14727         ac_cv_lib_gen_getspnam=no
14728 fi
14729
14730 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14731       conftest$ac_exeext conftest.$ac_ext
14732 LIBS=$ac_check_lib_save_LIBS
14733 fi
14734 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14735 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14736 if test $ac_cv_lib_gen_getspnam = yes; then
14737   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14738 fi
14739
14740     fi
14741   fi
14742 fi
14743
14744
14745 ###############################################################################
14746 #
14747 #       Check for other libraries needed for non-shadow passwords.
14748 #
14749 ###############################################################################
14750
14751 if test "$enable_locking" = yes ; then
14752
14753   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14754   have_crypt=no
14755   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14756 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14757 if test "${ac_cv_lib_c_crypt+set}" = set; then
14758   echo $ECHO_N "(cached) $ECHO_C" >&6
14759 else
14760   ac_check_lib_save_LIBS=$LIBS
14761 LIBS="-lc  $LIBS"
14762 cat >conftest.$ac_ext <<_ACEOF
14763 /* confdefs.h.  */
14764 _ACEOF
14765 cat confdefs.h >>conftest.$ac_ext
14766 cat >>conftest.$ac_ext <<_ACEOF
14767 /* end confdefs.h.  */
14768
14769 /* Override any GCC internal prototype to avoid an error.
14770    Use char because int might match the return type of a GCC
14771    builtin and then its argument prototype would still apply.  */
14772 #ifdef __cplusplus
14773 extern "C"
14774 #endif
14775 char crypt ();
14776 int
14777 main ()
14778 {
14779 return crypt ();
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -rf conftest.$ac_objext conftest$ac_exeext
14785 if { (ac_try="$ac_link"
14786 case "(($ac_try" in
14787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14788   *) ac_try_echo=$ac_try;;
14789 esac
14790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14791   (eval "$ac_link") 2>conftest.er1
14792   ac_status=$?
14793   grep -v '^ *+' conftest.er1 >conftest.err
14794   rm -rf conftest.er1
14795   cat conftest.err >&5
14796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797   (exit $ac_status); } && {
14798          test -z "$ac_c_werror_flag" ||
14799          test ! -s conftest.err
14800        } && test -s conftest$ac_exeext &&
14801        $as_test_x conftest$ac_exeext; then
14802   ac_cv_lib_c_crypt=yes
14803 else
14804   echo "$as_me: failed program was:" >&5
14805 sed 's/^/| /' conftest.$ac_ext >&5
14806
14807         ac_cv_lib_c_crypt=no
14808 fi
14809
14810 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14811       conftest$ac_exeext conftest.$ac_ext
14812 LIBS=$ac_check_lib_save_LIBS
14813 fi
14814 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14815 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14816 if test $ac_cv_lib_c_crypt = yes; then
14817   have_crypt=yes
14818 fi
14819
14820   if test "$have_crypt" = no ; then
14821     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14822 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14823 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14824   echo $ECHO_N "(cached) $ECHO_C" >&6
14825 else
14826   ac_check_lib_save_LIBS=$LIBS
14827 LIBS="-lcrypt  $LIBS"
14828 cat >conftest.$ac_ext <<_ACEOF
14829 /* confdefs.h.  */
14830 _ACEOF
14831 cat confdefs.h >>conftest.$ac_ext
14832 cat >>conftest.$ac_ext <<_ACEOF
14833 /* end confdefs.h.  */
14834
14835 /* Override any GCC internal prototype to avoid an error.
14836    Use char because int might match the return type of a GCC
14837    builtin and then its argument prototype would still apply.  */
14838 #ifdef __cplusplus
14839 extern "C"
14840 #endif
14841 char crypt ();
14842 int
14843 main ()
14844 {
14845 return crypt ();
14846   ;
14847   return 0;
14848 }
14849 _ACEOF
14850 rm -rf conftest.$ac_objext conftest$ac_exeext
14851 if { (ac_try="$ac_link"
14852 case "(($ac_try" in
14853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14854   *) ac_try_echo=$ac_try;;
14855 esac
14856 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14857   (eval "$ac_link") 2>conftest.er1
14858   ac_status=$?
14859   grep -v '^ *+' conftest.er1 >conftest.err
14860   rm -rf conftest.er1
14861   cat conftest.err >&5
14862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14863   (exit $ac_status); } && {
14864          test -z "$ac_c_werror_flag" ||
14865          test ! -s conftest.err
14866        } && test -s conftest$ac_exeext &&
14867        $as_test_x conftest$ac_exeext; then
14868   ac_cv_lib_crypt_crypt=yes
14869 else
14870   echo "$as_me: failed program was:" >&5
14871 sed 's/^/| /' conftest.$ac_ext >&5
14872
14873         ac_cv_lib_crypt_crypt=no
14874 fi
14875
14876 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14877       conftest$ac_exeext conftest.$ac_ext
14878 LIBS=$ac_check_lib_save_LIBS
14879 fi
14880 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14881 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14882 if test $ac_cv_lib_crypt_crypt = yes; then
14883   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14884 fi
14885
14886   fi
14887 fi
14888
14889
14890 # Most of the above shadow mechanisms will have set need_setuid to yes,
14891 # if they were found.  But, on some systems, we need setuid even when
14892 # using plain old vanilla passwords.
14893 #
14894 if test "$enable_locking" = yes ; then
14895   case "$host" in
14896     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14897       need_setuid=yes
14898     ;;
14899   esac
14900 fi
14901
14902
14903 if test "$have_shadow_adjunct" = yes ; then
14904   cat >>confdefs.h <<\_ACEOF
14905 #define HAVE_ADJUNCT_PASSWD 1
14906 _ACEOF
14907
14908 elif test "$have_shadow_enhanced" = yes ; then
14909   cat >>confdefs.h <<\_ACEOF
14910 #define HAVE_ENHANCED_PASSWD 1
14911 _ACEOF
14912
14913 elif test "$have_shadow_hpux" = yes ; then
14914   cat >>confdefs.h <<\_ACEOF
14915 #define HAVE_HPUX_PASSWD 1
14916 _ACEOF
14917
14918 elif test "$have_shadow" = yes ; then
14919   cat >>confdefs.h <<\_ACEOF
14920 #define HAVE_SHADOW_PASSWD 1
14921 _ACEOF
14922
14923 fi
14924
14925
14926 ###############################################################################
14927 #
14928 #       Check for external password helper
14929 #       On SuSE, instead of having xscreensaver be a setuid program, they
14930 #       fork an external program that takes the password on stdin, and
14931 #       returns true if that password is a valid one.  Then only that
14932 #       smaller program needs to be setuid.
14933 #
14934 #       (Note that this external program is not a GUI: the GUI is still
14935 #       all in xscreensaver itself; the external program just does auth.)
14936 #
14937 ###############################################################################
14938
14939 have_passwd_helper=no
14940 with_passwd_helper_req=unspecified
14941
14942
14943 # Check whether --with-passwd-helper was given.
14944 if test "${with_passwd_helper+set}" = set; then
14945   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14946 else
14947   with_passwd_helper=no
14948 fi
14949
14950 # no HANDLE_X_PATH_ARG for this one
14951
14952 if test "$enable_locking" = no ; then
14953   with_passwd_helper_req=no
14954   with_passwd_helper=no
14955 fi
14956
14957 case "$with_passwd_helper" in
14958   ""|no) : ;;
14959   /*)
14960     cat >>confdefs.h <<_ACEOF
14961 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14962 _ACEOF
14963
14964     have_passwd_helper=yes;;
14965   *)
14966     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14967     exit 1
14968 esac
14969
14970
14971 ###############################################################################
14972 #
14973 #       Check for a login manager for a "New Login" button on the lock dialog.
14974 #       Usually this will be "/usr/bin/gdmflexiserver".
14975 #
14976 ###############################################################################
14977
14978 have_login_manager=no
14979 with_login_manager_req=unspecified
14980 default_login_manager='gdmflexiserver -ls'
14981
14982
14983 # Check whether --with-login-manager was given.
14984 if test "${with_login_manager+set}" = set; then
14985   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14986 else
14987   with_login_manager=no
14988 fi
14989
14990 # no HANDLE_X_PATH_ARG for this one
14991
14992 if test "$enable_locking" = no ; then
14993   with_login_manager_req=no
14994   with_login_manager=no
14995 fi
14996
14997 if test -n "$with_login_manager_req" ; then
14998   ac_cv_login_manager_program=""
14999
15000  if test "$with_login_manager_req" = "yes" ; then
15001    with_login_manager_req=$default_login_manager
15002  fi
15003
15004   case "$with_login_manager_req" in
15005     no)
15006       with_login_manager=""
15007     ;;
15008     /*)
15009       # absolute path
15010       set dummy $with_login_manager_req ; login_manager_tmp=$2
15011       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15012 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15013       if test -x "$login_manager_tmp" ; then
15014         { echo "$as_me:$LINENO: result: yes" >&5
15015 echo "${ECHO_T}yes" >&6; }
15016       else
15017         { echo "$as_me:$LINENO: result: no" >&5
15018 echo "${ECHO_T}no" >&6; }
15019         with_login_manager=""
15020       fi
15021     ;;
15022     *)
15023       # relative path
15024       set dummy $with_login_manager_req ; login_manager_tmp=$2
15025       # don't cache
15026       unset ac_cv_path_login_manager_tmp
15027       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15028 set dummy $login_manager_tmp; ac_word=$2
15029 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15031 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15032   echo $ECHO_N "(cached) $ECHO_C" >&6
15033 else
15034   case $login_manager_tmp in
15035   [\\/]* | ?:[\\/]*)
15036   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15037   ;;
15038   *)
15039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15040 for as_dir in $PATH
15041 do
15042   IFS=$as_save_IFS
15043   test -z "$as_dir" && as_dir=.
15044   for ac_exec_ext in '' $ac_executable_extensions; do
15045   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15046     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15047     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15048     break 2
15049   fi
15050 done
15051 done
15052 IFS=$as_save_IFS
15053
15054   ;;
15055 esac
15056 fi
15057 login_manager_tmp=$ac_cv_path_login_manager_tmp
15058 if test -n "$login_manager_tmp"; then
15059   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15060 echo "${ECHO_T}$login_manager_tmp" >&6; }
15061 else
15062   { echo "$as_me:$LINENO: result: no" >&5
15063 echo "${ECHO_T}no" >&6; }
15064 fi
15065
15066
15067       if test -z "$login_manager_tmp" ; then
15068         with_login_manager=""
15069       else
15070         with_login_manager="$login_manager_tmp"
15071       fi
15072     ;;
15073   esac
15074   ac_cv_login_manager_program="$with_login_manager"
15075
15076 elif test -n "$ac_cv_login_manager_program"; then
15077   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15078 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15079 fi
15080
15081 NEW_LOGIN_COMMAND_P=''
15082 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15083
15084 if test -z "$NEW_LOGIN_COMMAND" ; then
15085   NEW_LOGIN_COMMAND="$default_login_manager"
15086   NEW_LOGIN_COMMAND_P='! '
15087 fi
15088
15089
15090
15091 ###############################################################################
15092 #
15093 #       Check for -lgtk (and Gnome stuff)
15094 #
15095 ###############################################################################
15096
15097 have_gtk=no
15098 with_gtk_req=unspecified
15099
15100 # Check whether --with-gtk was given.
15101 if test "${with_gtk+set}" = set; then
15102   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15103 else
15104   with_gtk=yes
15105 fi
15106
15107
15108 # if --with-gtk=/directory/ was specified, remember that directory so that
15109 # we can also look for the `gtk-config' program in that directory.
15110 case "$with_gtk" in
15111   /*)
15112     gtk_dir="$with_gtk"
15113     ;;
15114   *)
15115     gtk_dir=""
15116     ;;
15117 esac
15118
15119
15120    case "$with_gtk" in
15121     yes) ;;
15122     no)  ;;
15123
15124     /*)
15125      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15126 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15127      d=$with_gtk/include
15128      if test -d $d; then
15129        X_CFLAGS="-I$d $X_CFLAGS"
15130        { echo "$as_me:$LINENO: result: $d" >&5
15131 echo "${ECHO_T}$d" >&6; }
15132      else
15133        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15134 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15135      fi
15136
15137      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15138 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15139      d=$with_gtk/lib
15140      if test -d $d; then
15141        X_LIBS="-L$d $X_LIBS"
15142        { echo "$as_me:$LINENO: result: $d" >&5
15143 echo "${ECHO_T}$d" >&6; }
15144      else
15145        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15146 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15147      fi
15148
15149      # replace the directory string with "yes".
15150      with_gtk_req="yes"
15151      with_gtk=$with_gtk_req
15152      ;;
15153
15154     *)
15155      echo ""
15156      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15157      echo "       If it is a directory, then \`DIR/include' will be added to"
15158      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15159      exit 1
15160      ;;
15161    esac
15162
15163
15164 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15165   echo "error: must be yes or no: --with-gtk=$with_gtk"
15166   exit 1
15167 fi
15168
15169
15170 parse_gtk_version_string() {
15171   # M4 sucks!!
15172
15173   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15174   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15175
15176   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15177   if test -z "$ac_gtk_version"; then
15178     ac_gtk_version=unknown
15179     ac_gtk_version_string=unknown
15180   fi
15181 }
15182
15183 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15184 # if the user specified --with-gtk=/foo/ then look there.
15185 #
15186 gtk_path="$PATH"
15187 if test ! -z "$gtk_dir"; then
15188   # canonicalize slashes.
15189   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15190   gtk_path="$foo:$gtk_path"
15191 fi
15192
15193 for ac_prog in pkg-config
15194 do
15195   # Extract the first word of "$ac_prog", so it can be a program name with args.
15196 set dummy $ac_prog; ac_word=$2
15197 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15199 if test "${ac_cv_path_pkg_config+set}" = set; then
15200   echo $ECHO_N "(cached) $ECHO_C" >&6
15201 else
15202   case $pkg_config in
15203   [\\/]* | ?:[\\/]*)
15204   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15205   ;;
15206   *)
15207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15208 for as_dir in $gtk_path
15209 do
15210   IFS=$as_save_IFS
15211   test -z "$as_dir" && as_dir=.
15212   for ac_exec_ext in '' $ac_executable_extensions; do
15213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15214     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15215     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15216     break 2
15217   fi
15218 done
15219 done
15220 IFS=$as_save_IFS
15221
15222   ;;
15223 esac
15224 fi
15225 pkg_config=$ac_cv_path_pkg_config
15226 if test -n "$pkg_config"; then
15227   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15228 echo "${ECHO_T}$pkg_config" >&6; }
15229 else
15230   { echo "$as_me:$LINENO: result: no" >&5
15231 echo "${ECHO_T}no" >&6; }
15232 fi
15233
15234
15235   test -n "$pkg_config" && break
15236 done
15237
15238
15239 if test -z "$pkg_config" ; then
15240   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15241 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15242   pkg_config="false"
15243 fi
15244
15245
15246 # Utility function for running pkg-config-based tests...
15247 #
15248 pkgs=''
15249 pkg_check_version() {
15250   if test "$ok" = yes ; then
15251     req="$1"
15252     min="$2"
15253     { echo "$as_me:$LINENO: checking for $req" >&5
15254 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15255     if $pkg_config --exists "$req" ; then
15256       vers=`$pkg_config --modversion "$req"`
15257       if $pkg_config --exists "$req >= $min" ; then
15258         { echo "$as_me:$LINENO: result: $vers" >&5
15259 echo "${ECHO_T}$vers" >&6; }
15260         pkgs="$pkgs $req"
15261         return 1
15262       else
15263         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15264 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15265         ok=no
15266         return 0
15267       fi
15268     else
15269       { echo "$as_me:$LINENO: result: no" >&5
15270 echo "${ECHO_T}no" >&6; }
15271       ok=no
15272       return 0
15273     fi
15274   fi
15275 }
15276
15277
15278 jurassic_gtk=no
15279 gtk_halfassed=no
15280
15281 if test "$with_gtk" = yes; then
15282   have_gtk=no
15283
15284   ok="yes"
15285   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15286   pkg_check_version         gmodule-2.0  2.0.0
15287   pkg_check_version          libxml-2.0  2.4.6
15288   pkg_check_version        libglade-2.0  1.99.0
15289   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15290   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15291   have_gtk="$ok"
15292
15293   if test "$have_gtk" = no; then
15294     if test -n "$ac_gtk_version_string" ; then
15295       gtk_halfassed="$ac_gtk_version_string"
15296       gtk_halfassed_lib="$req"
15297     fi
15298   fi
15299
15300   if test "$have_gtk" = yes; then
15301     parse_gtk_version_string
15302     jurassic_gtk=no
15303   fi
15304
15305   if test "$have_gtk" = yes; then
15306     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15307 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15308 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15309   echo $ECHO_N "(cached) $ECHO_C" >&6
15310 else
15311   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15312 fi
15313 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15314 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15315     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15316 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15317 if test "${ac_cv_gtk_config_libs+set}" = set; then
15318   echo $ECHO_N "(cached) $ECHO_C" >&6
15319 else
15320   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15321 fi
15322 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15323 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15324   fi
15325
15326   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15327   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15328
15329   GTK_EXTRA_OBJS=""
15330   GTK_DATADIR=""
15331   if test "$have_gtk" = yes; then
15332     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15333     GTK_DATADIR="$GTK_DATADIR/share"
15334   fi
15335
15336   if test "$have_gtk" = yes; then
15337     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15338     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15339     cat >>confdefs.h <<\_ACEOF
15340 #define HAVE_GTK 1
15341 _ACEOF
15342
15343     cat >>confdefs.h <<\_ACEOF
15344 #define HAVE_GTK2 1
15345 _ACEOF
15346
15347     cat >>confdefs.h <<\_ACEOF
15348 #define HAVE_XML 1
15349 _ACEOF
15350
15351   fi
15352
15353 fi
15354
15355
15356 # Check for the various Gnome help and URL loading programs.
15357 #
15358 WITH_BROWSER=gnome-open
15359 if test "$have_gtk" = yes; then
15360   for ac_prog in gnome-open
15361 do
15362   # Extract the first word of "$ac_prog", so it can be a program name with args.
15363 set dummy $ac_prog; ac_word=$2
15364 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15366 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15367   echo $ECHO_N "(cached) $ECHO_C" >&6
15368 else
15369   if test -n "$gnome_open_program"; then
15370   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15371 else
15372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15373 for as_dir in $PATH
15374 do
15375   IFS=$as_save_IFS
15376   test -z "$as_dir" && as_dir=.
15377   for ac_exec_ext in '' $ac_executable_extensions; do
15378   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15379     ac_cv_prog_gnome_open_program="$ac_prog"
15380     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15381     break 2
15382   fi
15383 done
15384 done
15385 IFS=$as_save_IFS
15386
15387 fi
15388 fi
15389 gnome_open_program=$ac_cv_prog_gnome_open_program
15390 if test -n "$gnome_open_program"; then
15391   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15392 echo "${ECHO_T}$gnome_open_program" >&6; }
15393 else
15394   { echo "$as_me:$LINENO: result: no" >&5
15395 echo "${ECHO_T}no" >&6; }
15396 fi
15397
15398
15399   test -n "$gnome_open_program" && break
15400 done
15401
15402   for ac_prog in gnome-url-show
15403 do
15404   # Extract the first word of "$ac_prog", so it can be a program name with args.
15405 set dummy $ac_prog; ac_word=$2
15406 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15408 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15409   echo $ECHO_N "(cached) $ECHO_C" >&6
15410 else
15411   if test -n "$gnome_url_show_program"; then
15412   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15413 else
15414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15415 for as_dir in $PATH
15416 do
15417   IFS=$as_save_IFS
15418   test -z "$as_dir" && as_dir=.
15419   for ac_exec_ext in '' $ac_executable_extensions; do
15420   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15421     ac_cv_prog_gnome_url_show_program="$ac_prog"
15422     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15423     break 2
15424   fi
15425 done
15426 done
15427 IFS=$as_save_IFS
15428
15429 fi
15430 fi
15431 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15432 if test -n "$gnome_url_show_program"; then
15433   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15434 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15435 else
15436   { echo "$as_me:$LINENO: result: no" >&5
15437 echo "${ECHO_T}no" >&6; }
15438 fi
15439
15440
15441   test -n "$gnome_url_show_program" && break
15442 done
15443
15444 fi
15445
15446
15447 ###############################################################################
15448 #
15449 #       Check for -lXm.
15450 #
15451 ###############################################################################
15452
15453 have_motif=no
15454 with_motif_req=unspecified
15455
15456 # Check whether --with-motif was given.
15457 if test "${with_motif+set}" = set; then
15458   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15459 else
15460   with_motif=no
15461 fi
15462
15463
15464
15465    case "$with_motif" in
15466     yes) ;;
15467     no)  ;;
15468
15469     /*)
15470      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15471 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15472      d=$with_motif/include
15473      if test -d $d; then
15474        X_CFLAGS="-I$d $X_CFLAGS"
15475        { echo "$as_me:$LINENO: result: $d" >&5
15476 echo "${ECHO_T}$d" >&6; }
15477      else
15478        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15479 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15480      fi
15481
15482      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15483 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15484      d=$with_motif/lib
15485      if test -d $d; then
15486        X_LIBS="-L$d $X_LIBS"
15487        { echo "$as_me:$LINENO: result: $d" >&5
15488 echo "${ECHO_T}$d" >&6; }
15489      else
15490        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15491 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15492      fi
15493
15494      # replace the directory string with "yes".
15495      with_motif_req="yes"
15496      with_motif=$with_motif_req
15497      ;;
15498
15499     *)
15500      echo ""
15501      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15502      echo "       If it is a directory, then \`DIR/include' will be added to"
15503      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15504      exit 1
15505      ;;
15506    esac
15507
15508
15509 if test "$with_motif" != yes -a "$with_motif" != no ; then
15510   echo "error: must be yes or no: --with-motif=$with_motif"
15511   exit 1
15512 fi
15513
15514 if test "$with_motif" = yes; then
15515   have_motif=no
15516
15517   ac_save_CPPFLAGS="$CPPFLAGS"
15518   if test \! -z "$includedir" ; then
15519     CPPFLAGS="$CPPFLAGS -I$includedir"
15520   fi
15521   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15522   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15523   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15524 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15525 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15526   echo $ECHO_N "(cached) $ECHO_C" >&6
15527 else
15528   cat >conftest.$ac_ext <<_ACEOF
15529 /* confdefs.h.  */
15530 _ACEOF
15531 cat confdefs.h >>conftest.$ac_ext
15532 cat >>conftest.$ac_ext <<_ACEOF
15533 /* end confdefs.h.  */
15534 #include <stdlib.h>
15535                      #include <stdio.h>
15536                      #include <X11/Intrinsic.h>
15537
15538 #include <Xm/Xm.h>
15539 _ACEOF
15540 rm -rf conftest.$ac_objext
15541 if { (ac_try="$ac_compile"
15542 case "(($ac_try" in
15543   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15544   *) ac_try_echo=$ac_try;;
15545 esac
15546 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15547   (eval "$ac_compile") 2>conftest.er1
15548   ac_status=$?
15549   grep -v '^ *+' conftest.er1 >conftest.err
15550   rm -rf conftest.er1
15551   cat conftest.err >&5
15552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15553   (exit $ac_status); } && {
15554          test -z "$ac_c_werror_flag" ||
15555          test ! -s conftest.err
15556        } && test -s conftest.$ac_objext; then
15557   ac_cv_header_Xm_Xm_h=yes
15558 else
15559   echo "$as_me: failed program was:" >&5
15560 sed 's/^/| /' conftest.$ac_ext >&5
15561
15562         ac_cv_header_Xm_Xm_h=no
15563 fi
15564
15565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15566 fi
15567 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15568 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15569 if test $ac_cv_header_Xm_Xm_h = yes; then
15570   have_motif=yes
15571                      cat >>confdefs.h <<\_ACEOF
15572 #define HAVE_MOTIF 1
15573 _ACEOF
15574
15575                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15576 fi
15577
15578
15579   CPPFLAGS="$ac_save_CPPFLAGS"
15580 fi
15581
15582
15583 if test "$have_motif" = yes; then
15584
15585   ac_save_CPPFLAGS="$CPPFLAGS"
15586   if test \! -z "$includedir" ; then
15587     CPPFLAGS="$CPPFLAGS -I$includedir"
15588   fi
15589   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15590   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15591   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15592 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15593 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15594   echo $ECHO_N "(cached) $ECHO_C" >&6
15595 else
15596   cat >conftest.$ac_ext <<_ACEOF
15597 /* confdefs.h.  */
15598 _ACEOF
15599 cat confdefs.h >>conftest.$ac_ext
15600 cat >>conftest.$ac_ext <<_ACEOF
15601 /* end confdefs.h.  */
15602 #include <stdlib.h>
15603                      #include <stdio.h>
15604                      #include <X11/Intrinsic.h>
15605
15606 #include <Xm/ComboBox.h>
15607 _ACEOF
15608 rm -rf conftest.$ac_objext
15609 if { (ac_try="$ac_compile"
15610 case "(($ac_try" in
15611   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15612   *) ac_try_echo=$ac_try;;
15613 esac
15614 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15615   (eval "$ac_compile") 2>conftest.er1
15616   ac_status=$?
15617   grep -v '^ *+' conftest.er1 >conftest.err
15618   rm -rf conftest.er1
15619   cat conftest.err >&5
15620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621   (exit $ac_status); } && {
15622          test -z "$ac_c_werror_flag" ||
15623          test ! -s conftest.err
15624        } && test -s conftest.$ac_objext; then
15625   ac_cv_header_Xm_ComboBox_h=yes
15626 else
15627   echo "$as_me: failed program was:" >&5
15628 sed 's/^/| /' conftest.$ac_ext >&5
15629
15630         ac_cv_header_Xm_ComboBox_h=no
15631 fi
15632
15633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634 fi
15635 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15636 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15637 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15638   cat >>confdefs.h <<\_ACEOF
15639 #define HAVE_XMCOMBOBOX 1
15640 _ACEOF
15641
15642 fi
15643
15644
15645   CPPFLAGS="$ac_save_CPPFLAGS"
15646 fi
15647
15648
15649 ###############################################################################
15650 #
15651 #       Checking whether Motif is really Lesstif.
15652 #
15653 ###############################################################################
15654
15655 have_lesstif=no
15656 if test "$have_motif" = yes ; then
15657   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15658 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15659 if test "${ac_cv_have_lesstif+set}" = set; then
15660   echo $ECHO_N "(cached) $ECHO_C" >&6
15661 else
15662
15663   ac_save_CPPFLAGS="$CPPFLAGS"
15664   if test \! -z "$includedir" ; then
15665     CPPFLAGS="$CPPFLAGS -I$includedir"
15666   fi
15667   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15668   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15669   cat >conftest.$ac_ext <<_ACEOF
15670 /* confdefs.h.  */
15671 _ACEOF
15672 cat confdefs.h >>conftest.$ac_ext
15673 cat >>conftest.$ac_ext <<_ACEOF
15674 /* end confdefs.h.  */
15675 #include <Xm/Xm.h>
15676 int
15677 main ()
15678 {
15679 long vers = LesstifVersion;
15680   ;
15681   return 0;
15682 }
15683 _ACEOF
15684 rm -rf conftest.$ac_objext
15685 if { (ac_try="$ac_compile"
15686 case "(($ac_try" in
15687   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15688   *) ac_try_echo=$ac_try;;
15689 esac
15690 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15691   (eval "$ac_compile") 2>conftest.er1
15692   ac_status=$?
15693   grep -v '^ *+' conftest.er1 >conftest.err
15694   rm -rf conftest.er1
15695   cat conftest.err >&5
15696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697   (exit $ac_status); } && {
15698          test -z "$ac_c_werror_flag" ||
15699          test ! -s conftest.err
15700        } && test -s conftest.$ac_objext; then
15701   ac_cv_have_lesstif=yes
15702 else
15703   echo "$as_me: failed program was:" >&5
15704 sed 's/^/| /' conftest.$ac_ext >&5
15705
15706         ac_cv_have_lesstif=no
15707 fi
15708
15709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15710   CPPFLAGS="$ac_save_CPPFLAGS"
15711 fi
15712 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15713 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15714   have_lesstif=$ac_cv_have_lesstif
15715 fi
15716
15717
15718 lesstif_version=unknown
15719 lesstif_version_string=unknown
15720
15721 if test "$have_lesstif" = yes ; then
15722   ltv=unknown
15723   echo unknown > conftest-lt
15724   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15725 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15726 if test "${ac_cv_lesstif_version_string+set}" = set; then
15727   echo $ECHO_N "(cached) $ECHO_C" >&6
15728 else
15729
15730   ac_save_CPPFLAGS="$CPPFLAGS"
15731   if test \! -z "$includedir" ; then
15732     CPPFLAGS="$CPPFLAGS -I$includedir"
15733   fi
15734   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15735   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15736   if test "$cross_compiling" = yes; then
15737   ac_cv_lesstif_version=unknown
15738                      ac_cv_lesstif_version_string=unknown
15739 else
15740   cat >conftest.$ac_ext <<_ACEOF
15741 /* confdefs.h.  */
15742 _ACEOF
15743 cat confdefs.h >>conftest.$ac_ext
15744 cat >>conftest.$ac_ext <<_ACEOF
15745 /* end confdefs.h.  */
15746 #include <stdio.h>
15747                      #include <Xm/Xm.h>
15748                      int main() {
15749                        FILE *f = fopen("conftest-lt", "w");
15750                        if (!f) exit(1);
15751                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15752                           LESSTIF_VERSION, LESSTIF_REVISION);
15753                        fclose(f);
15754                        exit(0);
15755                      }
15756 _ACEOF
15757 rm -rf conftest$ac_exeext
15758 if { (ac_try="$ac_link"
15759 case "(($ac_try" in
15760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15761   *) ac_try_echo=$ac_try;;
15762 esac
15763 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15764   (eval "$ac_link") 2>&5
15765   ac_status=$?
15766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15768   { (case "(($ac_try" in
15769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15770   *) ac_try_echo=$ac_try;;
15771 esac
15772 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15773   (eval "$ac_try") 2>&5
15774   ac_status=$?
15775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15776   (exit $ac_status); }; }; then
15777   ltv=`cat conftest-lt`
15778                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15779                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15780 else
15781   echo "$as_me: program exited with status $ac_status" >&5
15782 echo "$as_me: failed program was:" >&5
15783 sed 's/^/| /' conftest.$ac_ext >&5
15784
15785 ( exit $ac_status )
15786 ac_cv_lesstif_version=unknown
15787                      ac_cv_lesstif_version_string=unknown
15788 fi
15789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15790 fi
15791
15792
15793   CPPFLAGS="$ac_save_CPPFLAGS"
15794 fi
15795 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15796 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15797   rm -rf conftest-lt
15798   lesstif_version=$ac_cv_lesstif_version
15799   lesstif_version_string=$ac_cv_lesstif_version_string
15800
15801 fi
15802
15803
15804 if test "$have_motif" = yes ; then
15805   mtv=unknown
15806   echo unknown > conftest-mt
15807   { echo "$as_me:$LINENO: checking Motif version number" >&5
15808 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15809 if test "${ac_cv_motif_version_string+set}" = set; then
15810   echo $ECHO_N "(cached) $ECHO_C" >&6
15811 else
15812
15813   ac_save_CPPFLAGS="$CPPFLAGS"
15814   if test \! -z "$includedir" ; then
15815     CPPFLAGS="$CPPFLAGS -I$includedir"
15816   fi
15817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15818   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15819   if test "$cross_compiling" = yes; then
15820   ac_cv_motif_version=unknown
15821                      ac_cv_motif_version_string=unknown
15822 else
15823   cat >conftest.$ac_ext <<_ACEOF
15824 /* confdefs.h.  */
15825 _ACEOF
15826 cat confdefs.h >>conftest.$ac_ext
15827 cat >>conftest.$ac_ext <<_ACEOF
15828 /* end confdefs.h.  */
15829 #include <stdio.h>
15830                      #include <Xm/Xm.h>
15831                      int main() {
15832                        FILE *f = fopen("conftest-mt", "w");
15833                        if (!f) exit(1);
15834                        fprintf(f, "%d %d.%d\n", XmVersion,
15835                           XmVERSION, XmREVISION);
15836                        fclose(f);
15837                        exit(0);
15838                      }
15839 _ACEOF
15840 rm -rf conftest$ac_exeext
15841 if { (ac_try="$ac_link"
15842 case "(($ac_try" in
15843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15844   *) ac_try_echo=$ac_try;;
15845 esac
15846 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15847   (eval "$ac_link") 2>&5
15848   ac_status=$?
15849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15851   { (case "(($ac_try" in
15852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15853   *) ac_try_echo=$ac_try;;
15854 esac
15855 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15856   (eval "$ac_try") 2>&5
15857   ac_status=$?
15858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15859   (exit $ac_status); }; }; then
15860   mtv=`cat conftest-mt`
15861                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15862                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15863 else
15864   echo "$as_me: program exited with status $ac_status" >&5
15865 echo "$as_me: failed program was:" >&5
15866 sed 's/^/| /' conftest.$ac_ext >&5
15867
15868 ( exit $ac_status )
15869 ac_cv_motif_version=unknown
15870                      ac_cv_motif_version_string=unknown
15871 fi
15872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15873 fi
15874
15875
15876   CPPFLAGS="$ac_save_CPPFLAGS"
15877 fi
15878 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15879 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15880   rm -rf conftest-mt
15881   motif_version=$ac_cv_motif_version
15882   motif_version_string=$ac_cv_motif_version_string
15883
15884 fi
15885
15886
15887 ###############################################################################
15888 #
15889 #       Checking whether Motif requires -lXpm.
15890 #
15891 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15892 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15893 #       of the library whether to build the XPM code into libXm, or whether
15894 #       to rely on an external libXm.  So the only way to tell whether XPM is
15895 #       a link-time requirement is to examine libXm.a, which is very
15896 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15897 #       always link against XPM if the XPM lib exists (and this will be a
15898 #       no-op if libXm happens to already have the XPM code in it.)
15899 #
15900 ###############################################################################
15901
15902 motif_requires_xpm=no
15903 if test "$have_motif" = yes ; then
15904    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15905 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15906    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15907    then
15908      motif_requires_xpm=yes
15909      { echo "$as_me:$LINENO: result: maybe" >&5
15910 echo "${ECHO_T}maybe" >&6; }
15911    else
15912      { echo "$as_me:$LINENO: result: no" >&5
15913 echo "${ECHO_T}no" >&6; }
15914    fi
15915 fi
15916
15917
15918 ###############################################################################
15919 #
15920 #       Checking whether Motif requires -lXp.
15921 #
15922 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15923 #       Extension".   Why this extension isn't in -lXext with all the others,
15924 #       I have no idea.
15925 #
15926 ###############################################################################
15927
15928 have_xp_ext=no
15929 if test "$have_motif" = yes ; then
15930    have_xp_ext=no
15931
15932   ac_save_CPPFLAGS="$CPPFLAGS"
15933   ac_save_LDFLAGS="$LDFLAGS"
15934 #  ac_save_LIBS="$LIBS"
15935
15936   if test \! -z "$includedir" ; then
15937     CPPFLAGS="$CPPFLAGS -I$includedir"
15938   fi
15939   # note: $X_CFLAGS includes $x_includes
15940   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15941
15942   if test \! -z "$libdir" ; then
15943     LDFLAGS="$LDFLAGS -L$libdir"
15944   fi
15945   # note: $X_LIBS includes $x_libraries
15946   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15947
15948   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15949   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15950   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15951 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15952 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15953   echo $ECHO_N "(cached) $ECHO_C" >&6
15954 else
15955   ac_check_lib_save_LIBS=$LIBS
15956 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15957 cat >conftest.$ac_ext <<_ACEOF
15958 /* confdefs.h.  */
15959 _ACEOF
15960 cat confdefs.h >>conftest.$ac_ext
15961 cat >>conftest.$ac_ext <<_ACEOF
15962 /* end confdefs.h.  */
15963
15964 /* Override any GCC internal prototype to avoid an error.
15965    Use char because int might match the return type of a GCC
15966    builtin and then its argument prototype would still apply.  */
15967 #ifdef __cplusplus
15968 extern "C"
15969 #endif
15970 char XpQueryExtension ();
15971 int
15972 main ()
15973 {
15974 return XpQueryExtension ();
15975   ;
15976   return 0;
15977 }
15978 _ACEOF
15979 rm -rf conftest.$ac_objext conftest$ac_exeext
15980 if { (ac_try="$ac_link"
15981 case "(($ac_try" in
15982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15983   *) ac_try_echo=$ac_try;;
15984 esac
15985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15986   (eval "$ac_link") 2>conftest.er1
15987   ac_status=$?
15988   grep -v '^ *+' conftest.er1 >conftest.err
15989   rm -rf conftest.er1
15990   cat conftest.err >&5
15991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15992   (exit $ac_status); } && {
15993          test -z "$ac_c_werror_flag" ||
15994          test ! -s conftest.err
15995        } && test -s conftest$ac_exeext &&
15996        $as_test_x conftest$ac_exeext; then
15997   ac_cv_lib_Xp_XpQueryExtension=yes
15998 else
15999   echo "$as_me: failed program was:" >&5
16000 sed 's/^/| /' conftest.$ac_ext >&5
16001
16002         ac_cv_lib_Xp_XpQueryExtension=no
16003 fi
16004
16005 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16006       conftest$ac_exeext conftest.$ac_ext
16007 LIBS=$ac_check_lib_save_LIBS
16008 fi
16009 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16010 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16011 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16012   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16013 else
16014   true
16015 fi
16016
16017   CPPFLAGS="$ac_save_CPPFLAGS"
16018   LDFLAGS="$ac_save_LDFLAGS"
16019 #  LIBS="$ac_save_LIBS"
16020
16021 fi
16022
16023
16024 ###############################################################################
16025 #
16026 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16027 #
16028 ###############################################################################
16029
16030 have_xintl=no
16031 if test "$have_motif" = yes ; then
16032
16033   ac_save_CPPFLAGS="$CPPFLAGS"
16034   ac_save_LDFLAGS="$LDFLAGS"
16035 #  ac_save_LIBS="$LIBS"
16036
16037   if test \! -z "$includedir" ; then
16038     CPPFLAGS="$CPPFLAGS -I$includedir"
16039   fi
16040   # note: $X_CFLAGS includes $x_includes
16041   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16042
16043   if test \! -z "$libdir" ; then
16044     LDFLAGS="$LDFLAGS -L$libdir"
16045   fi
16046   # note: $X_LIBS includes $x_libraries
16047   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16048
16049   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16050   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16051   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16052 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16053 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16054   echo $ECHO_N "(cached) $ECHO_C" >&6
16055 else
16056   ac_check_lib_save_LIBS=$LIBS
16057 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16058 cat >conftest.$ac_ext <<_ACEOF
16059 /* confdefs.h.  */
16060 _ACEOF
16061 cat confdefs.h >>conftest.$ac_ext
16062 cat >>conftest.$ac_ext <<_ACEOF
16063 /* end confdefs.h.  */
16064
16065 /* Override any GCC internal prototype to avoid an error.
16066    Use char because int might match the return type of a GCC
16067    builtin and then its argument prototype would still apply.  */
16068 #ifdef __cplusplus
16069 extern "C"
16070 #endif
16071 char _Xsetlocale ();
16072 int
16073 main ()
16074 {
16075 return _Xsetlocale ();
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 rm -rf conftest.$ac_objext conftest$ac_exeext
16081 if { (ac_try="$ac_link"
16082 case "(($ac_try" in
16083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16084   *) ac_try_echo=$ac_try;;
16085 esac
16086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16087   (eval "$ac_link") 2>conftest.er1
16088   ac_status=$?
16089   grep -v '^ *+' conftest.er1 >conftest.err
16090   rm -rf conftest.er1
16091   cat conftest.err >&5
16092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16093   (exit $ac_status); } && {
16094          test -z "$ac_c_werror_flag" ||
16095          test ! -s conftest.err
16096        } && test -s conftest$ac_exeext &&
16097        $as_test_x conftest$ac_exeext; then
16098   ac_cv_lib_Xintl__Xsetlocale=yes
16099 else
16100   echo "$as_me: failed program was:" >&5
16101 sed 's/^/| /' conftest.$ac_ext >&5
16102
16103         ac_cv_lib_Xintl__Xsetlocale=no
16104 fi
16105
16106 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16107       conftest$ac_exeext conftest.$ac_ext
16108 LIBS=$ac_check_lib_save_LIBS
16109 fi
16110 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16111 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16112 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16113   have_xintl=yes
16114 else
16115   have_xintl=no
16116 fi
16117
16118   CPPFLAGS="$ac_save_CPPFLAGS"
16119   LDFLAGS="$ac_save_LDFLAGS"
16120 #  LIBS="$ac_save_LIBS"
16121
16122   if test "$have_xintl" = yes; then
16123     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16124   fi
16125 fi
16126
16127
16128 ###############################################################################
16129 #
16130 #       Check for -lGL or -lMesaGL.
16131 #
16132 ###############################################################################
16133
16134 have_gl=no
16135 ac_have_mesa_gl=no
16136 with_gl_req=unspecified
16137 gl_halfassed=no
16138
16139 # Check whether --with-gl was given.
16140 if test "${with_gl+set}" = set; then
16141   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16142 else
16143   with_gl=yes
16144 fi
16145
16146
16147
16148    case "$with_gl" in
16149     yes) ;;
16150     no)  ;;
16151
16152     /*)
16153      { echo "$as_me:$LINENO: checking for GL headers" >&5
16154 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16155      d=$with_gl/include
16156      if test -d $d; then
16157        X_CFLAGS="-I$d $X_CFLAGS"
16158        { echo "$as_me:$LINENO: result: $d" >&5
16159 echo "${ECHO_T}$d" >&6; }
16160      else
16161        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16162 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16163      fi
16164
16165      { echo "$as_me:$LINENO: checking for GL libs" >&5
16166 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16167      d=$with_gl/lib
16168      if test -d $d; then
16169        X_LIBS="-L$d $X_LIBS"
16170        { echo "$as_me:$LINENO: result: $d" >&5
16171 echo "${ECHO_T}$d" >&6; }
16172      else
16173        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16174 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16175      fi
16176
16177      # replace the directory string with "yes".
16178      with_gl_req="yes"
16179      with_gl=$with_gl_req
16180      ;;
16181
16182     *)
16183      echo ""
16184      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16185      echo "       If it is a directory, then \`DIR/include' will be added to"
16186      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16187      exit 1
16188      ;;
16189    esac
16190
16191
16192 ac_mesagl_version=unknown
16193 ac_mesagl_version_string=unknown
16194
16195 if test "$with_gl" = yes; then
16196
16197   ac_save_CPPFLAGS="$CPPFLAGS"
16198   if test \! -z "$includedir" ; then
16199     CPPFLAGS="$CPPFLAGS -I$includedir"
16200   fi
16201   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16202   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16203   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16204   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16205 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16206 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16207   echo $ECHO_N "(cached) $ECHO_C" >&6
16208 fi
16209 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16210 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16211 else
16212   # Is the header compilable?
16213 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16214 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16215 cat >conftest.$ac_ext <<_ACEOF
16216 /* confdefs.h.  */
16217 _ACEOF
16218 cat confdefs.h >>conftest.$ac_ext
16219 cat >>conftest.$ac_ext <<_ACEOF
16220 /* end confdefs.h.  */
16221 $ac_includes_default
16222 #include <GL/gl.h>
16223 _ACEOF
16224 rm -rf conftest.$ac_objext
16225 if { (ac_try="$ac_compile"
16226 case "(($ac_try" in
16227   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16228   *) ac_try_echo=$ac_try;;
16229 esac
16230 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16231   (eval "$ac_compile") 2>conftest.er1
16232   ac_status=$?
16233   grep -v '^ *+' conftest.er1 >conftest.err
16234   rm -rf conftest.er1
16235   cat conftest.err >&5
16236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237   (exit $ac_status); } && {
16238          test -z "$ac_c_werror_flag" ||
16239          test ! -s conftest.err
16240        } && test -s conftest.$ac_objext; then
16241   ac_header_compiler=yes
16242 else
16243   echo "$as_me: failed program was:" >&5
16244 sed 's/^/| /' conftest.$ac_ext >&5
16245
16246         ac_header_compiler=no
16247 fi
16248
16249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16250 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16251 echo "${ECHO_T}$ac_header_compiler" >&6; }
16252
16253 # Is the header present?
16254 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16255 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16256 cat >conftest.$ac_ext <<_ACEOF
16257 /* confdefs.h.  */
16258 _ACEOF
16259 cat confdefs.h >>conftest.$ac_ext
16260 cat >>conftest.$ac_ext <<_ACEOF
16261 /* end confdefs.h.  */
16262 #include <GL/gl.h>
16263 _ACEOF
16264 if { (ac_try="$ac_cpp conftest.$ac_ext"
16265 case "(($ac_try" in
16266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16267   *) ac_try_echo=$ac_try;;
16268 esac
16269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16270   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16271   ac_status=$?
16272   grep -v '^ *+' conftest.er1 >conftest.err
16273   rm -rf conftest.er1
16274   cat conftest.err >&5
16275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276   (exit $ac_status); } >/dev/null && {
16277          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16278          test ! -s conftest.err
16279        }; then
16280   ac_header_preproc=yes
16281 else
16282   echo "$as_me: failed program was:" >&5
16283 sed 's/^/| /' conftest.$ac_ext >&5
16284
16285   ac_header_preproc=no
16286 fi
16287
16288 rm -rf conftest.err conftest.$ac_ext
16289 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16290 echo "${ECHO_T}$ac_header_preproc" >&6; }
16291
16292 # So?  What about this header?
16293 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16294   yes:no: )
16295     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16296 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16297     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16298 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16299     ac_header_preproc=yes
16300     ;;
16301   no:yes:* )
16302     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16303 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16304     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16305 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16306     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16307 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16308     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16309 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16310     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16311 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16312     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16313 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16314
16315     ;;
16316 esac
16317 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16318 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16319 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16320   echo $ECHO_N "(cached) $ECHO_C" >&6
16321 else
16322   ac_cv_header_GL_gl_h=$ac_header_preproc
16323 fi
16324 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16325 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16326
16327 fi
16328 if test $ac_cv_header_GL_gl_h = yes; then
16329   have_gl=yes
16330 else
16331   have_gl=no
16332 fi
16333
16334
16335   CPPFLAGS="$ac_save_CPPFLAGS"
16336   if test "$have_gl" = yes ; then
16337
16338   ac_save_CPPFLAGS="$CPPFLAGS"
16339   if test \! -z "$includedir" ; then
16340     CPPFLAGS="$CPPFLAGS -I$includedir"
16341   fi
16342   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16343   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16344   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16345 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16346 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16347   echo $ECHO_N "(cached) $ECHO_C" >&6
16348 else
16349   cat >conftest.$ac_ext <<_ACEOF
16350 /* confdefs.h.  */
16351 _ACEOF
16352 cat confdefs.h >>conftest.$ac_ext
16353 cat >>conftest.$ac_ext <<_ACEOF
16354 /* end confdefs.h.  */
16355 #include <GL/gl.h>
16356
16357 #include <GL/glx.h>
16358 _ACEOF
16359 rm -rf conftest.$ac_objext
16360 if { (ac_try="$ac_compile"
16361 case "(($ac_try" in
16362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16363   *) ac_try_echo=$ac_try;;
16364 esac
16365 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16366   (eval "$ac_compile") 2>conftest.er1
16367   ac_status=$?
16368   grep -v '^ *+' conftest.er1 >conftest.err
16369   rm -rf conftest.er1
16370   cat conftest.err >&5
16371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16372   (exit $ac_status); } && {
16373          test -z "$ac_c_werror_flag" ||
16374          test ! -s conftest.err
16375        } && test -s conftest.$ac_objext; then
16376   ac_cv_header_GL_glx_h=yes
16377 else
16378   echo "$as_me: failed program was:" >&5
16379 sed 's/^/| /' conftest.$ac_ext >&5
16380
16381         ac_cv_header_GL_glx_h=no
16382 fi
16383
16384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16385 fi
16386 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16387 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16388 if test $ac_cv_header_GL_glx_h = yes; then
16389   have_gl=yes
16390 else
16391   have_gl=no
16392 fi
16393
16394
16395   CPPFLAGS="$ac_save_CPPFLAGS"
16396   fi
16397
16398   # If we have the headers, try and figure out which vendor it's from.
16399   #
16400   if test "$have_gl" = yes ; then
16401
16402     # We need to know whether it's MesaGL so that we know which libraries
16403     # to link against.
16404     #
16405     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16406 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16407 if test "${ac_cv_have_mesa_gl+set}" = set; then
16408   echo $ECHO_N "(cached) $ECHO_C" >&6
16409 else
16410   ac_cv_have_mesa_gl=no
16411        if test "$ac_macosx" = no; then
16412          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16413          # It's not really Mesa, is it?
16414
16415   ac_save_CPPFLAGS="$CPPFLAGS"
16416   if test \! -z "$includedir" ; then
16417     CPPFLAGS="$CPPFLAGS -I$includedir"
16418   fi
16419   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16420   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16421   cat >conftest.$ac_ext <<_ACEOF
16422 /* confdefs.h.  */
16423 _ACEOF
16424 cat confdefs.h >>conftest.$ac_ext
16425 cat >>conftest.$ac_ext <<_ACEOF
16426 /* end confdefs.h.  */
16427 #include <GL/glx.h>
16428
16429 _ACEOF
16430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16431   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16432   ac_cv_have_mesa_gl=yes
16433 fi
16434 rm -rf conftest*
16435
16436   CPPFLAGS="$ac_save_CPPFLAGS"
16437        fi
16438 fi
16439 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16440 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16441     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16442
16443     gl_lib_1=""
16444     GL_LIBS=""
16445
16446     if test "$ac_macosx" = yes; then
16447
16448       # Without these, every link against libGL gets a bunch of useless
16449       # warnings.
16450       #
16451       osx_crud="-bind_at_load -multiply_defined suppress"
16452       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16453 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16454       GL_LIBS="$GL_LIBS $osx_crud"
16455       unset osx_crud
16456
16457       # New lossage in 10.5.0: without this, we get:
16458       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16459       #
16460       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16461       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16462
16463       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16464 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16465       GL_LIBS="$GL_LIBS $osx_crud"
16466       unset osx_crud
16467     fi
16468
16469
16470     # Some versions of MesaGL are compiled to require -lpthread.
16471     # So if the Mesa headers exist, and -lpthread exists, then always
16472     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16473     #
16474     if test "$ac_have_mesa_gl" = yes; then
16475       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16476 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16477 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16478   echo $ECHO_N "(cached) $ECHO_C" >&6
16479 else
16480   ac_check_lib_save_LIBS=$LIBS
16481 LIBS="-lpthread  $LIBS"
16482 cat >conftest.$ac_ext <<_ACEOF
16483 /* confdefs.h.  */
16484 _ACEOF
16485 cat confdefs.h >>conftest.$ac_ext
16486 cat >>conftest.$ac_ext <<_ACEOF
16487 /* end confdefs.h.  */
16488
16489 /* Override any GCC internal prototype to avoid an error.
16490    Use char because int might match the return type of a GCC
16491    builtin and then its argument prototype would still apply.  */
16492 #ifdef __cplusplus
16493 extern "C"
16494 #endif
16495 char pthread_create ();
16496 int
16497 main ()
16498 {
16499 return pthread_create ();
16500   ;
16501   return 0;
16502 }
16503 _ACEOF
16504 rm -rf conftest.$ac_objext conftest$ac_exeext
16505 if { (ac_try="$ac_link"
16506 case "(($ac_try" in
16507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16508   *) ac_try_echo=$ac_try;;
16509 esac
16510 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16511   (eval "$ac_link") 2>conftest.er1
16512   ac_status=$?
16513   grep -v '^ *+' conftest.er1 >conftest.err
16514   rm -rf conftest.er1
16515   cat conftest.err >&5
16516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16517   (exit $ac_status); } && {
16518          test -z "$ac_c_werror_flag" ||
16519          test ! -s conftest.err
16520        } && test -s conftest$ac_exeext &&
16521        $as_test_x conftest$ac_exeext; then
16522   ac_cv_lib_pthread_pthread_create=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 sed 's/^/| /' conftest.$ac_ext >&5
16526
16527         ac_cv_lib_pthread_pthread_create=no
16528 fi
16529
16530 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16531       conftest$ac_exeext conftest.$ac_ext
16532 LIBS=$ac_check_lib_save_LIBS
16533 fi
16534 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16535 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16536 if test $ac_cv_lib_pthread_pthread_create = yes; then
16537   GL_LIBS="-lpthread"
16538 fi
16539
16540     fi
16541
16542
16543     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16544     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16545     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16546     #
16547
16548     if test "$ac_have_mesa_gl" = yes ; then
16549
16550   ac_save_CPPFLAGS="$CPPFLAGS"
16551   ac_save_LDFLAGS="$LDFLAGS"
16552 #  ac_save_LIBS="$LIBS"
16553
16554   if test \! -z "$includedir" ; then
16555     CPPFLAGS="$CPPFLAGS -I$includedir"
16556   fi
16557   # note: $X_CFLAGS includes $x_includes
16558   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16559
16560   if test \! -z "$libdir" ; then
16561     LDFLAGS="$LDFLAGS -L$libdir"
16562   fi
16563   # note: $X_LIBS includes $x_libraries
16564   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16565
16566   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16567   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16568   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16569 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16570 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16571   echo $ECHO_N "(cached) $ECHO_C" >&6
16572 else
16573   ac_check_lib_save_LIBS=$LIBS
16574 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16575 cat >conftest.$ac_ext <<_ACEOF
16576 /* confdefs.h.  */
16577 _ACEOF
16578 cat confdefs.h >>conftest.$ac_ext
16579 cat >>conftest.$ac_ext <<_ACEOF
16580 /* end confdefs.h.  */
16581
16582 /* Override any GCC internal prototype to avoid an error.
16583    Use char because int might match the return type of a GCC
16584    builtin and then its argument prototype would still apply.  */
16585 #ifdef __cplusplus
16586 extern "C"
16587 #endif
16588 char glXCreateContext ();
16589 int
16590 main ()
16591 {
16592 return glXCreateContext ();
16593   ;
16594   return 0;
16595 }
16596 _ACEOF
16597 rm -rf conftest.$ac_objext conftest$ac_exeext
16598 if { (ac_try="$ac_link"
16599 case "(($ac_try" in
16600   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16601   *) ac_try_echo=$ac_try;;
16602 esac
16603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16604   (eval "$ac_link") 2>conftest.er1
16605   ac_status=$?
16606   grep -v '^ *+' conftest.er1 >conftest.err
16607   rm -rf conftest.er1
16608   cat conftest.err >&5
16609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610   (exit $ac_status); } && {
16611          test -z "$ac_c_werror_flag" ||
16612          test ! -s conftest.err
16613        } && test -s conftest$ac_exeext &&
16614        $as_test_x conftest$ac_exeext; then
16615   ac_cv_lib_MesaGL_glXCreateContext=yes
16616 else
16617   echo "$as_me: failed program was:" >&5
16618 sed 's/^/| /' conftest.$ac_ext >&5
16619
16620         ac_cv_lib_MesaGL_glXCreateContext=no
16621 fi
16622
16623 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16624       conftest$ac_exeext conftest.$ac_ext
16625 LIBS=$ac_check_lib_save_LIBS
16626 fi
16627 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16628 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16629 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16630   gl_lib_1="MesaGL"
16631                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16632 fi
16633
16634   CPPFLAGS="$ac_save_CPPFLAGS"
16635   LDFLAGS="$ac_save_LDFLAGS"
16636 #  LIBS="$ac_save_LIBS"
16637
16638     fi
16639
16640     if test "$gl_lib_1" = "" ; then
16641
16642   ac_save_CPPFLAGS="$CPPFLAGS"
16643   ac_save_LDFLAGS="$LDFLAGS"
16644 #  ac_save_LIBS="$LIBS"
16645
16646   if test \! -z "$includedir" ; then
16647     CPPFLAGS="$CPPFLAGS -I$includedir"
16648   fi
16649   # note: $X_CFLAGS includes $x_includes
16650   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16651
16652   if test \! -z "$libdir" ; then
16653     LDFLAGS="$LDFLAGS -L$libdir"
16654   fi
16655   # note: $X_LIBS includes $x_libraries
16656   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16657
16658   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16659   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16660   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16661 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16662 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16663   echo $ECHO_N "(cached) $ECHO_C" >&6
16664 else
16665   ac_check_lib_save_LIBS=$LIBS
16666 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16667 cat >conftest.$ac_ext <<_ACEOF
16668 /* confdefs.h.  */
16669 _ACEOF
16670 cat confdefs.h >>conftest.$ac_ext
16671 cat >>conftest.$ac_ext <<_ACEOF
16672 /* end confdefs.h.  */
16673
16674 /* Override any GCC internal prototype to avoid an error.
16675    Use char because int might match the return type of a GCC
16676    builtin and then its argument prototype would still apply.  */
16677 #ifdef __cplusplus
16678 extern "C"
16679 #endif
16680 char glXCreateContext ();
16681 int
16682 main ()
16683 {
16684 return glXCreateContext ();
16685   ;
16686   return 0;
16687 }
16688 _ACEOF
16689 rm -rf conftest.$ac_objext conftest$ac_exeext
16690 if { (ac_try="$ac_link"
16691 case "(($ac_try" in
16692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16693   *) ac_try_echo=$ac_try;;
16694 esac
16695 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16696   (eval "$ac_link") 2>conftest.er1
16697   ac_status=$?
16698   grep -v '^ *+' conftest.er1 >conftest.err
16699   rm -rf conftest.er1
16700   cat conftest.err >&5
16701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16702   (exit $ac_status); } && {
16703          test -z "$ac_c_werror_flag" ||
16704          test ! -s conftest.err
16705        } && test -s conftest$ac_exeext &&
16706        $as_test_x conftest$ac_exeext; then
16707   ac_cv_lib_GL_glXCreateContext=yes
16708 else
16709   echo "$as_me: failed program was:" >&5
16710 sed 's/^/| /' conftest.$ac_ext >&5
16711
16712         ac_cv_lib_GL_glXCreateContext=no
16713 fi
16714
16715 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16716       conftest$ac_exeext conftest.$ac_ext
16717 LIBS=$ac_check_lib_save_LIBS
16718 fi
16719 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16720 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16721 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16722   gl_lib_1="GL"
16723                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16724 fi
16725
16726   CPPFLAGS="$ac_save_CPPFLAGS"
16727   LDFLAGS="$ac_save_LDFLAGS"
16728 #  LIBS="$ac_save_LIBS"
16729
16730     fi
16731
16732     if test "$gl_lib_1" = "" ; then
16733       # we have headers, but no libs -- bail.
16734       have_gl=no
16735       ac_have_mesa_gl=no
16736       gl_halfassed=yes
16737     else
16738       # linking works -- we can build the GL hacks.
16739       cat >>confdefs.h <<\_ACEOF
16740 #define HAVE_GL 1
16741 _ACEOF
16742
16743       if test "$ac_have_mesa_gl" = yes ; then
16744         cat >>confdefs.h <<\_ACEOF
16745 #define HAVE_MESA_GL 1
16746 _ACEOF
16747
16748       fi
16749     fi
16750   fi
16751
16752
16753   # Now that we know we have GL headers and libs, do some more GL testing.
16754   #
16755
16756   if test "$have_gl" = yes ; then
16757     # If it's MesaGL, we'd like to issue a warning if the version number
16758     # is less than or equal to 2.6, because that version had a security bug.
16759     #
16760     if test "$ac_have_mesa_gl" = yes; then
16761
16762       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16763 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16764 if test "${ac_cv_mesagl_version_string+set}" = set; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 else
16767   cat > conftest.$ac_ext <<EOF
16768 #line 16772 "configure"
16769 #include "confdefs.h"
16770 #include <GL/gl.h>
16771 #ifndef MESA_MAJOR_VERSION
16772 # include <GL/xmesa.h>
16773 # ifdef XMESA_MAJOR_VERSION
16774    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16775       we have to check the XMesa version number (the number of the X protocol
16776       support, which seems to be the same as the Mesa version number.)
16777     */
16778 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16779 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16780 # else
16781    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16782       so we have no way of telling what version of Mesa this is at all.
16783       So, we'll guess that the osmesa version (the "offscreen protocol")
16784       is less than or equal to the real mesa version number.  Except that
16785       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16786       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16787     */
16788 # include <GL/osmesa.h>
16789 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16790 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16791 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16792 #   undef MESA_MINOR_VERSION
16793 #   define MESA_MINOR_VERSION 4 or newer, probably?
16794 #  endif
16795 # endif
16796 #endif
16797 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16798 EOF
16799
16800          ac_save_CPPFLAGS="$CPPFLAGS"
16801          if test \! -z "$includedir" ; then
16802            CPPFLAGS="$CPPFLAGS -I$includedir"
16803          fi
16804          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16805
16806          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16807
16808          # M4 sucks!!
16809
16810           mglv=`echo "$mglv" | sed -n \
16811              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16812
16813
16814          rm -rf conftest.$ac_ext
16815
16816          CPPFLAGS="$ac_save_CPPFLAGS"
16817
16818          if test "$mglv" = ""; then
16819            ac_mesagl_version=unknown
16820            ac_mesagl_version_string=unknown
16821          else
16822            ac_mesagl_version_string="$mglv"
16823            # M4 sucks!!
16824
16825            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16826            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16827
16828            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16829            if test -z "$ac_mesagl_version"; then
16830              ac_mesagl_version=unknown
16831              ac_mesagl_version_string=unknown
16832            fi
16833          fi
16834          ac_cv_mesagl_version=$ac_mesagl_version
16835          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16836
16837 fi
16838 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16839 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16840       ac_mesagl_version=$ac_cv_mesagl_version
16841       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16842     fi
16843
16844
16845     # Check for OpenGL 1.1 features.
16846     #
16847
16848   ac_save_CPPFLAGS="$CPPFLAGS"
16849   ac_save_LDFLAGS="$LDFLAGS"
16850 #  ac_save_LIBS="$LIBS"
16851
16852   if test \! -z "$includedir" ; then
16853     CPPFLAGS="$CPPFLAGS -I$includedir"
16854   fi
16855   # note: $X_CFLAGS includes $x_includes
16856   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16857
16858   if test \! -z "$libdir" ; then
16859     LDFLAGS="$LDFLAGS -L$libdir"
16860   fi
16861   # note: $X_LIBS includes $x_libraries
16862   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16863
16864   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16865   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16866   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16867 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16868 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16869 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16870   echo $ECHO_N "(cached) $ECHO_C" >&6
16871 else
16872   ac_check_lib_save_LIBS=$LIBS
16873 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16874 cat >conftest.$ac_ext <<_ACEOF
16875 /* confdefs.h.  */
16876 _ACEOF
16877 cat confdefs.h >>conftest.$ac_ext
16878 cat >>conftest.$ac_ext <<_ACEOF
16879 /* end confdefs.h.  */
16880
16881 /* Override any GCC internal prototype to avoid an error.
16882    Use char because int might match the return type of a GCC
16883    builtin and then its argument prototype would still apply.  */
16884 #ifdef __cplusplus
16885 extern "C"
16886 #endif
16887 char glBindTexture ();
16888 int
16889 main ()
16890 {
16891 return glBindTexture ();
16892   ;
16893   return 0;
16894 }
16895 _ACEOF
16896 rm -rf conftest.$ac_objext conftest$ac_exeext
16897 if { (ac_try="$ac_link"
16898 case "(($ac_try" in
16899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16900   *) ac_try_echo=$ac_try;;
16901 esac
16902 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16903   (eval "$ac_link") 2>conftest.er1
16904   ac_status=$?
16905   grep -v '^ *+' conftest.er1 >conftest.err
16906   rm -rf conftest.er1
16907   cat conftest.err >&5
16908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909   (exit $ac_status); } && {
16910          test -z "$ac_c_werror_flag" ||
16911          test ! -s conftest.err
16912        } && test -s conftest$ac_exeext &&
16913        $as_test_x conftest$ac_exeext; then
16914   eval "$as_ac_Lib=yes"
16915 else
16916   echo "$as_me: failed program was:" >&5
16917 sed 's/^/| /' conftest.$ac_ext >&5
16918
16919         eval "$as_ac_Lib=no"
16920 fi
16921
16922 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16923       conftest$ac_exeext conftest.$ac_ext
16924 LIBS=$ac_check_lib_save_LIBS
16925 fi
16926 ac_res=`eval echo '${'$as_ac_Lib'}'`
16927                { echo "$as_me:$LINENO: result: $ac_res" >&5
16928 echo "${ECHO_T}$ac_res" >&6; }
16929 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16930   cat >>confdefs.h <<\_ACEOF
16931 #define HAVE_GLBINDTEXTURE 1
16932 _ACEOF
16933
16934 else
16935   true
16936 fi
16937
16938   CPPFLAGS="$ac_save_CPPFLAGS"
16939   LDFLAGS="$ac_save_LDFLAGS"
16940 #  LIBS="$ac_save_LIBS"
16941
16942   fi
16943
16944 elif test "$with_gl" != no; then
16945   echo "error: must be yes or no: --with-gl=$with_gl"
16946   exit 1
16947 fi
16948
16949
16950 ###############################################################################
16951 #
16952 #       Check for -lgle.
16953 #
16954 ###############################################################################
16955
16956 have_gle=no
16957 with_gle_req=unspecified
16958 gle_halfassed=no
16959
16960 # Check whether --with-gle was given.
16961 if test "${with_gle+set}" = set; then
16962   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
16963 else
16964   with_gle=yes
16965 fi
16966
16967
16968
16969    case "$with_gle" in
16970     yes) ;;
16971     no)  ;;
16972
16973     /*)
16974      { echo "$as_me:$LINENO: checking for GLE headers" >&5
16975 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
16976      d=$with_gle/include
16977      if test -d $d; then
16978        X_CFLAGS="-I$d $X_CFLAGS"
16979        { echo "$as_me:$LINENO: result: $d" >&5
16980 echo "${ECHO_T}$d" >&6; }
16981      else
16982        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16983 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16984      fi
16985
16986      { echo "$as_me:$LINENO: checking for GLE libs" >&5
16987 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
16988      d=$with_gle/lib
16989      if test -d $d; then
16990        X_LIBS="-L$d $X_LIBS"
16991        { echo "$as_me:$LINENO: result: $d" >&5
16992 echo "${ECHO_T}$d" >&6; }
16993      else
16994        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16995 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16996      fi
16997
16998      # replace the directory string with "yes".
16999      with_gle_req="yes"
17000      with_gle=$with_gle_req
17001      ;;
17002
17003     *)
17004      echo ""
17005      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17006      echo "       If it is a directory, then \`DIR/include' will be added to"
17007      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17008      exit 1
17009      ;;
17010    esac
17011
17012
17013 GLE_LIBS=""
17014
17015 if test "$have_gl" = no ; then
17016  true
17017 elif test "$with_gle" = yes; then
17018
17019
17020   ac_save_CPPFLAGS="$CPPFLAGS"
17021   if test \! -z "$includedir" ; then
17022     CPPFLAGS="$CPPFLAGS -I$includedir"
17023   fi
17024   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17025   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17026   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17027 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17028 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17029   echo $ECHO_N "(cached) $ECHO_C" >&6
17030 else
17031   cat >conftest.$ac_ext <<_ACEOF
17032 /* confdefs.h.  */
17033 _ACEOF
17034 cat confdefs.h >>conftest.$ac_ext
17035 cat >>conftest.$ac_ext <<_ACEOF
17036 /* end confdefs.h.  */
17037 #include <GL/gl.h>
17038
17039 #include <GL/gle.h>
17040 _ACEOF
17041 rm -rf conftest.$ac_objext
17042 if { (ac_try="$ac_compile"
17043 case "(($ac_try" in
17044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17045   *) ac_try_echo=$ac_try;;
17046 esac
17047 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17048   (eval "$ac_compile") 2>conftest.er1
17049   ac_status=$?
17050   grep -v '^ *+' conftest.er1 >conftest.err
17051   rm -rf conftest.er1
17052   cat conftest.err >&5
17053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17054   (exit $ac_status); } && {
17055          test -z "$ac_c_werror_flag" ||
17056          test ! -s conftest.err
17057        } && test -s conftest.$ac_objext; then
17058   ac_cv_header_GL_gle_h=yes
17059 else
17060   echo "$as_me: failed program was:" >&5
17061 sed 's/^/| /' conftest.$ac_ext >&5
17062
17063         ac_cv_header_GL_gle_h=no
17064 fi
17065
17066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17067 fi
17068 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17069 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17070 if test $ac_cv_header_GL_gle_h = yes; then
17071   have_gle3=yes
17072 else
17073   have_gle3=no
17074 fi
17075
17076
17077   CPPFLAGS="$ac_save_CPPFLAGS"
17078   if test "$have_gle3" = yes ; then
17079     have_gle=yes;
17080   else
17081
17082   ac_save_CPPFLAGS="$CPPFLAGS"
17083   if test \! -z "$includedir" ; then
17084     CPPFLAGS="$CPPFLAGS -I$includedir"
17085   fi
17086   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17087   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17088   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17089 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17090 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17091   echo $ECHO_N "(cached) $ECHO_C" >&6
17092 else
17093   cat >conftest.$ac_ext <<_ACEOF
17094 /* confdefs.h.  */
17095 _ACEOF
17096 cat confdefs.h >>conftest.$ac_ext
17097 cat >>conftest.$ac_ext <<_ACEOF
17098 /* end confdefs.h.  */
17099 #include <GL/gl.h>
17100
17101 #include <GL/gutil.h>
17102 _ACEOF
17103 rm -rf conftest.$ac_objext
17104 if { (ac_try="$ac_compile"
17105 case "(($ac_try" in
17106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17107   *) ac_try_echo=$ac_try;;
17108 esac
17109 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17110   (eval "$ac_compile") 2>conftest.er1
17111   ac_status=$?
17112   grep -v '^ *+' conftest.er1 >conftest.err
17113   rm -rf conftest.er1
17114   cat conftest.err >&5
17115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116   (exit $ac_status); } && {
17117          test -z "$ac_c_werror_flag" ||
17118          test ! -s conftest.err
17119        } && test -s conftest.$ac_objext; then
17120   ac_cv_header_GL_gutil_h=yes
17121 else
17122   echo "$as_me: failed program was:" >&5
17123 sed 's/^/| /' conftest.$ac_ext >&5
17124
17125         ac_cv_header_GL_gutil_h=no
17126 fi
17127
17128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17129 fi
17130 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17131 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17132 if test $ac_cv_header_GL_gutil_h = yes; then
17133   have_gle=yes
17134 else
17135   have_gle=no
17136 fi
17137
17138
17139   CPPFLAGS="$ac_save_CPPFLAGS"
17140     if test "$have_gle" = yes ; then
17141
17142   ac_save_CPPFLAGS="$CPPFLAGS"
17143   if test \! -z "$includedir" ; then
17144     CPPFLAGS="$CPPFLAGS -I$includedir"
17145   fi
17146   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17147   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17148   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17149 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17150 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17151   echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153   cat >conftest.$ac_ext <<_ACEOF
17154 /* confdefs.h.  */
17155 _ACEOF
17156 cat confdefs.h >>conftest.$ac_ext
17157 cat >>conftest.$ac_ext <<_ACEOF
17158 /* end confdefs.h.  */
17159 #include <GL/gl.h>
17160
17161 #include <GL/tube.h>
17162 _ACEOF
17163 rm -rf conftest.$ac_objext
17164 if { (ac_try="$ac_compile"
17165 case "(($ac_try" in
17166   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17167   *) ac_try_echo=$ac_try;;
17168 esac
17169 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17170   (eval "$ac_compile") 2>conftest.er1
17171   ac_status=$?
17172   grep -v '^ *+' conftest.er1 >conftest.err
17173   rm -rf conftest.er1
17174   cat conftest.err >&5
17175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176   (exit $ac_status); } && {
17177          test -z "$ac_c_werror_flag" ||
17178          test ! -s conftest.err
17179        } && test -s conftest.$ac_objext; then
17180   ac_cv_header_GL_tube_h=yes
17181 else
17182   echo "$as_me: failed program was:" >&5
17183 sed 's/^/| /' conftest.$ac_ext >&5
17184
17185         ac_cv_header_GL_tube_h=no
17186 fi
17187
17188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17189 fi
17190 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17191 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17192 if test $ac_cv_header_GL_tube_h = yes; then
17193   have_gle=yes
17194 else
17195   have_gle=no
17196 fi
17197
17198
17199   CPPFLAGS="$ac_save_CPPFLAGS"
17200     fi
17201   fi
17202
17203   if test "$have_gle" = yes ; then
17204     have_gle=no
17205     gle_halfassed=yes
17206
17207   ac_save_CPPFLAGS="$CPPFLAGS"
17208   ac_save_LDFLAGS="$LDFLAGS"
17209 #  ac_save_LIBS="$LIBS"
17210
17211   if test \! -z "$includedir" ; then
17212     CPPFLAGS="$CPPFLAGS -I$includedir"
17213   fi
17214   # note: $X_CFLAGS includes $x_includes
17215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17216
17217   if test \! -z "$libdir" ; then
17218     LDFLAGS="$LDFLAGS -L$libdir"
17219   fi
17220   # note: $X_LIBS includes $x_libraries
17221   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17222
17223   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17224   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17225   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17226 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17227 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17228   echo $ECHO_N "(cached) $ECHO_C" >&6
17229 else
17230   ac_check_lib_save_LIBS=$LIBS
17231 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17232 cat >conftest.$ac_ext <<_ACEOF
17233 /* confdefs.h.  */
17234 _ACEOF
17235 cat confdefs.h >>conftest.$ac_ext
17236 cat >>conftest.$ac_ext <<_ACEOF
17237 /* end confdefs.h.  */
17238
17239 /* Override any GCC internal prototype to avoid an error.
17240    Use char because int might match the return type of a GCC
17241    builtin and then its argument prototype would still apply.  */
17242 #ifdef __cplusplus
17243 extern "C"
17244 #endif
17245 char gleCreateGC ();
17246 int
17247 main ()
17248 {
17249 return gleCreateGC ();
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 rm -rf conftest.$ac_objext conftest$ac_exeext
17255 if { (ac_try="$ac_link"
17256 case "(($ac_try" in
17257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17258   *) ac_try_echo=$ac_try;;
17259 esac
17260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17261   (eval "$ac_link") 2>conftest.er1
17262   ac_status=$?
17263   grep -v '^ *+' conftest.er1 >conftest.err
17264   rm -rf conftest.er1
17265   cat conftest.err >&5
17266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17267   (exit $ac_status); } && {
17268          test -z "$ac_c_werror_flag" ||
17269          test ! -s conftest.err
17270        } && test -s conftest$ac_exeext &&
17271        $as_test_x conftest$ac_exeext; then
17272   ac_cv_lib_gle_gleCreateGC=yes
17273 else
17274   echo "$as_me: failed program was:" >&5
17275 sed 's/^/| /' conftest.$ac_ext >&5
17276
17277         ac_cv_lib_gle_gleCreateGC=no
17278 fi
17279
17280 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17281       conftest$ac_exeext conftest.$ac_ext
17282 LIBS=$ac_check_lib_save_LIBS
17283 fi
17284 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17285 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17286 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17287   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17288 fi
17289
17290   CPPFLAGS="$ac_save_CPPFLAGS"
17291   LDFLAGS="$ac_save_LDFLAGS"
17292 #  LIBS="$ac_save_LIBS"
17293
17294   fi
17295   if test "$have_gle" = yes ; then
17296     have_gle=no
17297     gle_halfassed=yes
17298
17299     # sometimes the libmatrix stuff is included in libgle.  look there first.
17300 #
17301 # I don't get it.  For some reason, this test passes on SGI, as if
17302 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17303 # Yet the link is succeeding.  Why???
17304 #
17305 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17306 #                   [have_gle=yes; gle_halfassed=no],
17307 #                   [], $GL_LIBS -lX11 -lXext -lm)
17308
17309     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17310     # *sigh*
17311     if test "$have_gle3" = yes ; then
17312
17313   ac_save_CPPFLAGS="$CPPFLAGS"
17314   ac_save_LDFLAGS="$LDFLAGS"
17315 #  ac_save_LIBS="$LIBS"
17316
17317   if test \! -z "$includedir" ; then
17318     CPPFLAGS="$CPPFLAGS -I$includedir"
17319   fi
17320   # note: $X_CFLAGS includes $x_includes
17321   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17322
17323   if test \! -z "$libdir" ; then
17324     LDFLAGS="$LDFLAGS -L$libdir"
17325   fi
17326   # note: $X_LIBS includes $x_libraries
17327   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17328
17329   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17330   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17331   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17332 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17333 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17334   echo $ECHO_N "(cached) $ECHO_C" >&6
17335 else
17336   ac_check_lib_save_LIBS=$LIBS
17337 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17338 cat >conftest.$ac_ext <<_ACEOF
17339 /* confdefs.h.  */
17340 _ACEOF
17341 cat confdefs.h >>conftest.$ac_ext
17342 cat >>conftest.$ac_ext <<_ACEOF
17343 /* end confdefs.h.  */
17344
17345 /* Override any GCC internal prototype to avoid an error.
17346    Use char because int might match the return type of a GCC
17347    builtin and then its argument prototype would still apply.  */
17348 #ifdef __cplusplus
17349 extern "C"
17350 #endif
17351 char uview_direction ();
17352 int
17353 main ()
17354 {
17355 return uview_direction ();
17356   ;
17357   return 0;
17358 }
17359 _ACEOF
17360 rm -rf conftest.$ac_objext conftest$ac_exeext
17361 if { (ac_try="$ac_link"
17362 case "(($ac_try" in
17363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17364   *) ac_try_echo=$ac_try;;
17365 esac
17366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17367   (eval "$ac_link") 2>conftest.er1
17368   ac_status=$?
17369   grep -v '^ *+' conftest.er1 >conftest.err
17370   rm -rf conftest.er1
17371   cat conftest.err >&5
17372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17373   (exit $ac_status); } && {
17374          test -z "$ac_c_werror_flag" ||
17375          test ! -s conftest.err
17376        } && test -s conftest$ac_exeext &&
17377        $as_test_x conftest$ac_exeext; then
17378   ac_cv_lib_gle_uview_direction=yes
17379 else
17380   echo "$as_me: failed program was:" >&5
17381 sed 's/^/| /' conftest.$ac_ext >&5
17382
17383         ac_cv_lib_gle_uview_direction=no
17384 fi
17385
17386 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17387       conftest$ac_exeext conftest.$ac_ext
17388 LIBS=$ac_check_lib_save_LIBS
17389 fi
17390 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17391 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17392 if test $ac_cv_lib_gle_uview_direction = yes; then
17393   have_gle=yes; gle_halfassed=no
17394 fi
17395
17396   CPPFLAGS="$ac_save_CPPFLAGS"
17397   LDFLAGS="$ac_save_LDFLAGS"
17398 #  LIBS="$ac_save_LIBS"
17399
17400     fi
17401     # if it wasn't in libgle, then look in libmatrix.
17402     if test "$have_gle" = no ; then
17403
17404   ac_save_CPPFLAGS="$CPPFLAGS"
17405   ac_save_LDFLAGS="$LDFLAGS"
17406 #  ac_save_LIBS="$LIBS"
17407
17408   if test \! -z "$includedir" ; then
17409     CPPFLAGS="$CPPFLAGS -I$includedir"
17410   fi
17411   # note: $X_CFLAGS includes $x_includes
17412   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17413
17414   if test \! -z "$libdir" ; then
17415     LDFLAGS="$LDFLAGS -L$libdir"
17416   fi
17417   # note: $X_LIBS includes $x_libraries
17418   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17419
17420   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17421   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17422   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17423 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17424 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17425   echo $ECHO_N "(cached) $ECHO_C" >&6
17426 else
17427   ac_check_lib_save_LIBS=$LIBS
17428 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17429 cat >conftest.$ac_ext <<_ACEOF
17430 /* confdefs.h.  */
17431 _ACEOF
17432 cat confdefs.h >>conftest.$ac_ext
17433 cat >>conftest.$ac_ext <<_ACEOF
17434 /* end confdefs.h.  */
17435
17436 /* Override any GCC internal prototype to avoid an error.
17437    Use char because int might match the return type of a GCC
17438    builtin and then its argument prototype would still apply.  */
17439 #ifdef __cplusplus
17440 extern "C"
17441 #endif
17442 char uview_direction_d ();
17443 int
17444 main ()
17445 {
17446 return uview_direction_d ();
17447   ;
17448   return 0;
17449 }
17450 _ACEOF
17451 rm -rf conftest.$ac_objext conftest$ac_exeext
17452 if { (ac_try="$ac_link"
17453 case "(($ac_try" in
17454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17455   *) ac_try_echo=$ac_try;;
17456 esac
17457 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17458   (eval "$ac_link") 2>conftest.er1
17459   ac_status=$?
17460   grep -v '^ *+' conftest.er1 >conftest.err
17461   rm -rf conftest.er1
17462   cat conftest.err >&5
17463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17464   (exit $ac_status); } && {
17465          test -z "$ac_c_werror_flag" ||
17466          test ! -s conftest.err
17467        } && test -s conftest$ac_exeext &&
17468        $as_test_x conftest$ac_exeext; then
17469   ac_cv_lib_matrix_uview_direction_d=yes
17470 else
17471   echo "$as_me: failed program was:" >&5
17472 sed 's/^/| /' conftest.$ac_ext >&5
17473
17474         ac_cv_lib_matrix_uview_direction_d=no
17475 fi
17476
17477 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17478       conftest$ac_exeext conftest.$ac_ext
17479 LIBS=$ac_check_lib_save_LIBS
17480 fi
17481 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17482 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17483 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17484   have_gle=yes; gle_halfassed=no;
17485                       GLE_LIBS="$GLE_LIBS -lmatrix"
17486 fi
17487
17488   CPPFLAGS="$ac_save_CPPFLAGS"
17489   LDFLAGS="$ac_save_LDFLAGS"
17490 #  LIBS="$ac_save_LIBS"
17491
17492     fi
17493   fi
17494
17495   if test "$have_gle" = yes ; then
17496     cat >>confdefs.h <<\_ACEOF
17497 #define HAVE_GLE 1
17498 _ACEOF
17499
17500     if test "$have_gle3" = yes ; then
17501       cat >>confdefs.h <<\_ACEOF
17502 #define HAVE_GLE3 1
17503 _ACEOF
17504
17505     fi
17506   fi
17507
17508 elif test "$with_gle" != no; then
17509   echo "error: must be yes or no: --with-gle=$with_gle"
17510   exit 1
17511
17512 fi
17513
17514
17515 ###############################################################################
17516 #
17517 #       Check for -lgdk_pixbuf.
17518 #       These tests are for gdk_pixbuf usage of the hacks,
17519 #       not xscreensaver-demo (thus we have to test again to get
17520 #       the libraries right: don't want to pull in all of GTK
17521 #       for the hacks.)
17522 #
17523 ###############################################################################
17524
17525 have_gdk_pixbuf=no
17526 with_gdk_pixbuf_req=unspecified
17527
17528 # Check whether --with-pixbuf was given.
17529 if test "${with_pixbuf+set}" = set; then
17530   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17531 else
17532   with_gdk_pixbuf=yes
17533 fi
17534
17535
17536 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17537 # we can also look for the `gdk-pixbuf-config' program in that directory.
17538 case "$with_gdk_pixbuf" in
17539   /*)
17540     gdk_pixbuf_dir="$with_gdk_pixbuf"
17541     ;;
17542   *)
17543     gdk_pixbuf_dir=""
17544     ;;
17545 esac
17546
17547
17548    case "$with_gdk_pixbuf" in
17549     yes) ;;
17550     no)  ;;
17551
17552     /*)
17553      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17554 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17555      d=$with_gdk_pixbuf/include
17556      if test -d $d; then
17557        X_CFLAGS="-I$d $X_CFLAGS"
17558        { echo "$as_me:$LINENO: result: $d" >&5
17559 echo "${ECHO_T}$d" >&6; }
17560      else
17561        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17562 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17563      fi
17564
17565      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17566 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17567      d=$with_gdk_pixbuf/lib
17568      if test -d $d; then
17569        X_LIBS="-L$d $X_LIBS"
17570        { echo "$as_me:$LINENO: result: $d" >&5
17571 echo "${ECHO_T}$d" >&6; }
17572      else
17573        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17574 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17575      fi
17576
17577      # replace the directory string with "yes".
17578      with_gdk_pixbuf_req="yes"
17579      with_gdk_pixbuf=$with_gdk_pixbuf_req
17580      ;;
17581
17582     *)
17583      echo ""
17584      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17585      echo "       If it is a directory, then \`DIR/include' will be added to"
17586      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17587      exit 1
17588      ;;
17589    esac
17590
17591
17592 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17593   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17594   exit 1
17595 fi
17596
17597 if test "$with_gdk_pixbuf" = yes; then
17598   have_gdk_pixbuf=no
17599
17600   pkgs=''
17601   ok="yes"
17602
17603   pkg_check_version gdk-pixbuf-2.0      2.0.0
17604   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17605   have_gdk_pixbuf="$ok"
17606
17607   if test "$have_gdk_pixbuf" = yes; then
17608     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17609 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17610 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17611   echo $ECHO_N "(cached) $ECHO_C" >&6
17612 else
17613   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17614 fi
17615 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17616 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17617     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17618 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17619 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17620   echo $ECHO_N "(cached) $ECHO_C" >&6
17621 else
17622   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17623 fi
17624 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17625 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17626   fi
17627
17628   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17629   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17630
17631
17632   if test "$have_gdk_pixbuf" = yes; then
17633     #
17634     # we appear to have pixbuf; check for headers/libs to be sure.
17635     #
17636     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17637     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17638
17639     have_gdk_pixbuf=no
17640
17641     # check for header A...
17642
17643   ac_save_CPPFLAGS="$CPPFLAGS"
17644   if test \! -z "$includedir" ; then
17645     CPPFLAGS="$CPPFLAGS -I$includedir"
17646   fi
17647   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17648   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17649   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17650   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17651 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17652 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17653   echo $ECHO_N "(cached) $ECHO_C" >&6
17654 fi
17655 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17656 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17657 else
17658   # Is the header compilable?
17659 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17660 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17661 cat >conftest.$ac_ext <<_ACEOF
17662 /* confdefs.h.  */
17663 _ACEOF
17664 cat confdefs.h >>conftest.$ac_ext
17665 cat >>conftest.$ac_ext <<_ACEOF
17666 /* end confdefs.h.  */
17667 $ac_includes_default
17668 #include <gdk-pixbuf/gdk-pixbuf.h>
17669 _ACEOF
17670 rm -rf conftest.$ac_objext
17671 if { (ac_try="$ac_compile"
17672 case "(($ac_try" in
17673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17674   *) ac_try_echo=$ac_try;;
17675 esac
17676 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17677   (eval "$ac_compile") 2>conftest.er1
17678   ac_status=$?
17679   grep -v '^ *+' conftest.er1 >conftest.err
17680   rm -rf conftest.er1
17681   cat conftest.err >&5
17682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683   (exit $ac_status); } && {
17684          test -z "$ac_c_werror_flag" ||
17685          test ! -s conftest.err
17686        } && test -s conftest.$ac_objext; then
17687   ac_header_compiler=yes
17688 else
17689   echo "$as_me: failed program was:" >&5
17690 sed 's/^/| /' conftest.$ac_ext >&5
17691
17692         ac_header_compiler=no
17693 fi
17694
17695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17696 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17697 echo "${ECHO_T}$ac_header_compiler" >&6; }
17698
17699 # Is the header present?
17700 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17701 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17702 cat >conftest.$ac_ext <<_ACEOF
17703 /* confdefs.h.  */
17704 _ACEOF
17705 cat confdefs.h >>conftest.$ac_ext
17706 cat >>conftest.$ac_ext <<_ACEOF
17707 /* end confdefs.h.  */
17708 #include <gdk-pixbuf/gdk-pixbuf.h>
17709 _ACEOF
17710 if { (ac_try="$ac_cpp conftest.$ac_ext"
17711 case "(($ac_try" in
17712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17713   *) ac_try_echo=$ac_try;;
17714 esac
17715 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17716   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17717   ac_status=$?
17718   grep -v '^ *+' conftest.er1 >conftest.err
17719   rm -rf conftest.er1
17720   cat conftest.err >&5
17721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); } >/dev/null && {
17723          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17724          test ! -s conftest.err
17725        }; then
17726   ac_header_preproc=yes
17727 else
17728   echo "$as_me: failed program was:" >&5
17729 sed 's/^/| /' conftest.$ac_ext >&5
17730
17731   ac_header_preproc=no
17732 fi
17733
17734 rm -rf conftest.err conftest.$ac_ext
17735 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17736 echo "${ECHO_T}$ac_header_preproc" >&6; }
17737
17738 # So?  What about this header?
17739 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17740   yes:no: )
17741     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17742 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17743     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17744 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17745     ac_header_preproc=yes
17746     ;;
17747   no:yes:* )
17748     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17749 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17750     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17751 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17752     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17753 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17754     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17755 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17756     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17757 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17758     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17759 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17760
17761     ;;
17762 esac
17763 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17764 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17765 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17766   echo $ECHO_N "(cached) $ECHO_C" >&6
17767 else
17768   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17769 fi
17770 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17771 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17772
17773 fi
17774 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17775   have_gdk_pixbuf=yes
17776 fi
17777
17778
17779   CPPFLAGS="$ac_save_CPPFLAGS"
17780
17781     # if that worked, check for header B...
17782     if test "$have_gdk_pixbuf" = yes; then
17783       have_gdk_pixbuf=no
17784       gdk_pixbuf_halfassed=yes
17785
17786   ac_save_CPPFLAGS="$CPPFLAGS"
17787   if test \! -z "$includedir" ; then
17788     CPPFLAGS="$CPPFLAGS -I$includedir"
17789   fi
17790   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17791   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17792   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17793   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17794 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17795 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17796   echo $ECHO_N "(cached) $ECHO_C" >&6
17797 fi
17798 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17799 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17800 else
17801   # Is the header compilable?
17802 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17803 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17804 cat >conftest.$ac_ext <<_ACEOF
17805 /* confdefs.h.  */
17806 _ACEOF
17807 cat confdefs.h >>conftest.$ac_ext
17808 cat >>conftest.$ac_ext <<_ACEOF
17809 /* end confdefs.h.  */
17810 $ac_includes_default
17811 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17812 _ACEOF
17813 rm -rf conftest.$ac_objext
17814 if { (ac_try="$ac_compile"
17815 case "(($ac_try" in
17816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17817   *) ac_try_echo=$ac_try;;
17818 esac
17819 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17820   (eval "$ac_compile") 2>conftest.er1
17821   ac_status=$?
17822   grep -v '^ *+' conftest.er1 >conftest.err
17823   rm -rf conftest.er1
17824   cat conftest.err >&5
17825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826   (exit $ac_status); } && {
17827          test -z "$ac_c_werror_flag" ||
17828          test ! -s conftest.err
17829        } && test -s conftest.$ac_objext; then
17830   ac_header_compiler=yes
17831 else
17832   echo "$as_me: failed program was:" >&5
17833 sed 's/^/| /' conftest.$ac_ext >&5
17834
17835         ac_header_compiler=no
17836 fi
17837
17838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17839 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17840 echo "${ECHO_T}$ac_header_compiler" >&6; }
17841
17842 # Is the header present?
17843 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17844 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17845 cat >conftest.$ac_ext <<_ACEOF
17846 /* confdefs.h.  */
17847 _ACEOF
17848 cat confdefs.h >>conftest.$ac_ext
17849 cat >>conftest.$ac_ext <<_ACEOF
17850 /* end confdefs.h.  */
17851 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17852 _ACEOF
17853 if { (ac_try="$ac_cpp conftest.$ac_ext"
17854 case "(($ac_try" in
17855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17856   *) ac_try_echo=$ac_try;;
17857 esac
17858 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17859   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17860   ac_status=$?
17861   grep -v '^ *+' conftest.er1 >conftest.err
17862   rm -rf conftest.er1
17863   cat conftest.err >&5
17864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17865   (exit $ac_status); } >/dev/null && {
17866          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17867          test ! -s conftest.err
17868        }; then
17869   ac_header_preproc=yes
17870 else
17871   echo "$as_me: failed program was:" >&5
17872 sed 's/^/| /' conftest.$ac_ext >&5
17873
17874   ac_header_preproc=no
17875 fi
17876
17877 rm -rf conftest.err conftest.$ac_ext
17878 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17879 echo "${ECHO_T}$ac_header_preproc" >&6; }
17880
17881 # So?  What about this header?
17882 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17883   yes:no: )
17884     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17885 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17886     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17887 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17888     ac_header_preproc=yes
17889     ;;
17890   no:yes:* )
17891     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17892 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17893     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17894 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17895     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17896 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17897     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17898 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17899     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17900 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17901     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17902 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17903
17904     ;;
17905 esac
17906 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17907 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17908 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17909   echo $ECHO_N "(cached) $ECHO_C" >&6
17910 else
17911   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17912 fi
17913 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17914 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17915
17916 fi
17917 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17918   have_gdk_pixbuf=yes
17919                          gdk_pixbuf_halfassed=no
17920 fi
17921
17922
17923   CPPFLAGS="$ac_save_CPPFLAGS"
17924
17925       # yay, it has a new name in Gtk 2.x...
17926       if test "$have_gdk_pixbuf" = no; then
17927         have_gdk_pixbuf=no
17928         gdk_pixbuf_halfassed=yes
17929
17930   ac_save_CPPFLAGS="$CPPFLAGS"
17931   if test \! -z "$includedir" ; then
17932     CPPFLAGS="$CPPFLAGS -I$includedir"
17933   fi
17934   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17935   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17936   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17937   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17938 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17939 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17940   echo $ECHO_N "(cached) $ECHO_C" >&6
17941 fi
17942 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17943 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17944 else
17945   # Is the header compilable?
17946 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17947 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17948 cat >conftest.$ac_ext <<_ACEOF
17949 /* confdefs.h.  */
17950 _ACEOF
17951 cat confdefs.h >>conftest.$ac_ext
17952 cat >>conftest.$ac_ext <<_ACEOF
17953 /* end confdefs.h.  */
17954 $ac_includes_default
17955 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17956 _ACEOF
17957 rm -rf conftest.$ac_objext
17958 if { (ac_try="$ac_compile"
17959 case "(($ac_try" in
17960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17961   *) ac_try_echo=$ac_try;;
17962 esac
17963 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17964   (eval "$ac_compile") 2>conftest.er1
17965   ac_status=$?
17966   grep -v '^ *+' conftest.er1 >conftest.err
17967   rm -rf conftest.er1
17968   cat conftest.err >&5
17969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17970   (exit $ac_status); } && {
17971          test -z "$ac_c_werror_flag" ||
17972          test ! -s conftest.err
17973        } && test -s conftest.$ac_objext; then
17974   ac_header_compiler=yes
17975 else
17976   echo "$as_me: failed program was:" >&5
17977 sed 's/^/| /' conftest.$ac_ext >&5
17978
17979         ac_header_compiler=no
17980 fi
17981
17982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17983 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17984 echo "${ECHO_T}$ac_header_compiler" >&6; }
17985
17986 # Is the header present?
17987 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17988 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17989 cat >conftest.$ac_ext <<_ACEOF
17990 /* confdefs.h.  */
17991 _ACEOF
17992 cat confdefs.h >>conftest.$ac_ext
17993 cat >>conftest.$ac_ext <<_ACEOF
17994 /* end confdefs.h.  */
17995 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17996 _ACEOF
17997 if { (ac_try="$ac_cpp conftest.$ac_ext"
17998 case "(($ac_try" in
17999   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18000   *) ac_try_echo=$ac_try;;
18001 esac
18002 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18003   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18004   ac_status=$?
18005   grep -v '^ *+' conftest.er1 >conftest.err
18006   rm -rf conftest.er1
18007   cat conftest.err >&5
18008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18009   (exit $ac_status); } >/dev/null && {
18010          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18011          test ! -s conftest.err
18012        }; then
18013   ac_header_preproc=yes
18014 else
18015   echo "$as_me: failed program was:" >&5
18016 sed 's/^/| /' conftest.$ac_ext >&5
18017
18018   ac_header_preproc=no
18019 fi
18020
18021 rm -rf conftest.err conftest.$ac_ext
18022 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18023 echo "${ECHO_T}$ac_header_preproc" >&6; }
18024
18025 # So?  What about this header?
18026 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18027   yes:no: )
18028     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18029 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18030     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18031 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18032     ac_header_preproc=yes
18033     ;;
18034   no:yes:* )
18035     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18036 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18037     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18038 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18039     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18040 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18041     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18042 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18043     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18044 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18045     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18046 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18047
18048     ;;
18049 esac
18050 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18051 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18052 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18053   echo $ECHO_N "(cached) $ECHO_C" >&6
18054 else
18055   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18056 fi
18057 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18058 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18059
18060 fi
18061 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18062   have_gdk_pixbuf=yes
18063                            gdk_pixbuf_halfassed=no
18064 fi
18065
18066
18067   CPPFLAGS="$ac_save_CPPFLAGS"
18068       fi
18069     fi
18070     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18071   fi
18072
18073   if test "$have_gdk_pixbuf" = yes; then
18074     # we have the headers, now check for the libraries
18075     have_gdk_pixbuf=no
18076     gdk_pixbuf_halfassed=yes
18077
18078     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18079 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18080
18081     # library A...
18082
18083   ac_save_CPPFLAGS="$CPPFLAGS"
18084   ac_save_LDFLAGS="$LDFLAGS"
18085 #  ac_save_LIBS="$LIBS"
18086
18087   if test \! -z "$includedir" ; then
18088     CPPFLAGS="$CPPFLAGS -I$includedir"
18089   fi
18090   # note: $X_CFLAGS includes $x_includes
18091   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18092
18093   if test \! -z "$libdir" ; then
18094     LDFLAGS="$LDFLAGS -L$libdir"
18095   fi
18096   # note: $X_LIBS includes $x_libraries
18097   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18098
18099   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18100   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18101   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18102 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18103 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18104   echo $ECHO_N "(cached) $ECHO_C" >&6
18105 else
18106   ac_check_lib_save_LIBS=$LIBS
18107 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18108 cat >conftest.$ac_ext <<_ACEOF
18109 /* confdefs.h.  */
18110 _ACEOF
18111 cat confdefs.h >>conftest.$ac_ext
18112 cat >>conftest.$ac_ext <<_ACEOF
18113 /* end confdefs.h.  */
18114
18115 /* Override any GCC internal prototype to avoid an error.
18116    Use char because int might match the return type of a GCC
18117    builtin and then its argument prototype would still apply.  */
18118 #ifdef __cplusplus
18119 extern "C"
18120 #endif
18121 char gdk_pixbuf_new_from_file ();
18122 int
18123 main ()
18124 {
18125 return gdk_pixbuf_new_from_file ();
18126   ;
18127   return 0;
18128 }
18129 _ACEOF
18130 rm -rf conftest.$ac_objext conftest$ac_exeext
18131 if { (ac_try="$ac_link"
18132 case "(($ac_try" in
18133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18134   *) ac_try_echo=$ac_try;;
18135 esac
18136 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18137   (eval "$ac_link") 2>conftest.er1
18138   ac_status=$?
18139   grep -v '^ *+' conftest.er1 >conftest.err
18140   rm -rf conftest.er1
18141   cat conftest.err >&5
18142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18143   (exit $ac_status); } && {
18144          test -z "$ac_c_werror_flag" ||
18145          test ! -s conftest.err
18146        } && test -s conftest$ac_exeext &&
18147        $as_test_x conftest$ac_exeext; then
18148   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18149 else
18150   echo "$as_me: failed program was:" >&5
18151 sed 's/^/| /' conftest.$ac_ext >&5
18152
18153         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18154 fi
18155
18156 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18157       conftest$ac_exeext conftest.$ac_ext
18158 LIBS=$ac_check_lib_save_LIBS
18159 fi
18160 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18161 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18162 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18163   have_gdk_pixbuf=yes
18164 fi
18165
18166   CPPFLAGS="$ac_save_CPPFLAGS"
18167   LDFLAGS="$ac_save_LDFLAGS"
18168 #  LIBS="$ac_save_LIBS"
18169
18170     # library B...
18171     if test "$have_gdk_pixbuf" = yes; then
18172       have_gdk_pixbuf=no
18173
18174   ac_save_CPPFLAGS="$CPPFLAGS"
18175   ac_save_LDFLAGS="$LDFLAGS"
18176 #  ac_save_LIBS="$LIBS"
18177
18178   if test \! -z "$includedir" ; then
18179     CPPFLAGS="$CPPFLAGS -I$includedir"
18180   fi
18181   # note: $X_CFLAGS includes $x_includes
18182   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18183
18184   if test \! -z "$libdir" ; then
18185     LDFLAGS="$LDFLAGS -L$libdir"
18186   fi
18187   # note: $X_LIBS includes $x_libraries
18188   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18189
18190   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18191   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18192   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18193 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18194 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18195   echo $ECHO_N "(cached) $ECHO_C" >&6
18196 else
18197   ac_check_lib_save_LIBS=$LIBS
18198 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18199 cat >conftest.$ac_ext <<_ACEOF
18200 /* confdefs.h.  */
18201 _ACEOF
18202 cat confdefs.h >>conftest.$ac_ext
18203 cat >>conftest.$ac_ext <<_ACEOF
18204 /* end confdefs.h.  */
18205
18206 /* Override any GCC internal prototype to avoid an error.
18207    Use char because int might match the return type of a GCC
18208    builtin and then its argument prototype would still apply.  */
18209 #ifdef __cplusplus
18210 extern "C"
18211 #endif
18212 char gdk_pixbuf_xlib_init ();
18213 int
18214 main ()
18215 {
18216 return gdk_pixbuf_xlib_init ();
18217   ;
18218   return 0;
18219 }
18220 _ACEOF
18221 rm -rf conftest.$ac_objext conftest$ac_exeext
18222 if { (ac_try="$ac_link"
18223 case "(($ac_try" in
18224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18225   *) ac_try_echo=$ac_try;;
18226 esac
18227 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18228   (eval "$ac_link") 2>conftest.er1
18229   ac_status=$?
18230   grep -v '^ *+' conftest.er1 >conftest.err
18231   rm -rf conftest.er1
18232   cat conftest.err >&5
18233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18234   (exit $ac_status); } && {
18235          test -z "$ac_c_werror_flag" ||
18236          test ! -s conftest.err
18237        } && test -s conftest$ac_exeext &&
18238        $as_test_x conftest$ac_exeext; then
18239   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18240 else
18241   echo "$as_me: failed program was:" >&5
18242 sed 's/^/| /' conftest.$ac_ext >&5
18243
18244         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18245 fi
18246
18247 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18248       conftest$ac_exeext conftest.$ac_ext
18249 LIBS=$ac_check_lib_save_LIBS
18250 fi
18251 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18252 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18253 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18254   have_gdk_pixbuf=yes
18255                       gdk_pixbuf_halfassed=no
18256 fi
18257
18258   CPPFLAGS="$ac_save_CPPFLAGS"
18259   LDFLAGS="$ac_save_LDFLAGS"
18260 #  LIBS="$ac_save_LIBS"
18261
18262     fi
18263   fi
18264
18265   if test "$have_gdk_pixbuf" = yes; then
18266     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18267     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18268     cat >>confdefs.h <<\_ACEOF
18269 #define HAVE_GDK_PIXBUF 1
18270 _ACEOF
18271
18272   else
18273     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18274 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18275   fi
18276
18277   if test "$have_gdk_pixbuf" = yes; then
18278
18279   ac_save_CPPFLAGS="$CPPFLAGS"
18280   ac_save_LDFLAGS="$LDFLAGS"
18281 #  ac_save_LIBS="$LIBS"
18282
18283   if test \! -z "$includedir" ; then
18284     CPPFLAGS="$CPPFLAGS -I$includedir"
18285   fi
18286   # note: $X_CFLAGS includes $x_includes
18287   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18288
18289   if test \! -z "$libdir" ; then
18290     LDFLAGS="$LDFLAGS -L$libdir"
18291   fi
18292   # note: $X_LIBS includes $x_libraries
18293   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18294
18295   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18296   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18297   { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18298 echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
18299 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18300   echo $ECHO_N "(cached) $ECHO_C" >&6
18301 else
18302   ac_check_lib_save_LIBS=$LIBS
18303 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18304 cat >conftest.$ac_ext <<_ACEOF
18305 /* confdefs.h.  */
18306 _ACEOF
18307 cat confdefs.h >>conftest.$ac_ext
18308 cat >>conftest.$ac_ext <<_ACEOF
18309 /* end confdefs.h.  */
18310
18311 /* Override any GCC internal prototype to avoid an error.
18312    Use char because int might match the return type of a GCC
18313    builtin and then its argument prototype would still apply.  */
18314 #ifdef __cplusplus
18315 extern "C"
18316 #endif
18317 char gdk_pixbuf_apply_embedded_orientation ();
18318 int
18319 main ()
18320 {
18321 return gdk_pixbuf_apply_embedded_orientation ();
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -rf conftest.$ac_objext conftest$ac_exeext
18327 if { (ac_try="$ac_link"
18328 case "(($ac_try" in
18329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18330   *) ac_try_echo=$ac_try;;
18331 esac
18332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18333   (eval "$ac_link") 2>conftest.er1
18334   ac_status=$?
18335   grep -v '^ *+' conftest.er1 >conftest.err
18336   rm -rf conftest.er1
18337   cat conftest.err >&5
18338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18339   (exit $ac_status); } && {
18340          test -z "$ac_c_werror_flag" ||
18341          test ! -s conftest.err
18342        } && test -s conftest$ac_exeext &&
18343        $as_test_x conftest$ac_exeext; then
18344   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18345 else
18346   echo "$as_me: failed program was:" >&5
18347 sed 's/^/| /' conftest.$ac_ext >&5
18348
18349         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18350 fi
18351
18352 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18353       conftest$ac_exeext conftest.$ac_ext
18354 LIBS=$ac_check_lib_save_LIBS
18355 fi
18356 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18357 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18358 if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
18359   cat >>confdefs.h <<\_ACEOF
18360 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18361 _ACEOF
18362
18363 fi
18364
18365   CPPFLAGS="$ac_save_CPPFLAGS"
18366   LDFLAGS="$ac_save_LDFLAGS"
18367 #  LIBS="$ac_save_LIBS"
18368
18369   fi
18370 fi
18371
18372
18373 ###############################################################################
18374 #
18375 #       Check for -lXpm.
18376 #
18377 ###############################################################################
18378
18379 have_xpm=no
18380 with_xpm_req=unspecified
18381
18382 # Check whether --with-xpm was given.
18383 if test "${with_xpm+set}" = set; then
18384   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18385 else
18386   with_xpm=yes
18387 fi
18388
18389
18390
18391    case "$with_xpm" in
18392     yes) ;;
18393     no)  ;;
18394
18395     /*)
18396      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18397 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18398      d=$with_xpm/include
18399      if test -d $d; then
18400        X_CFLAGS="-I$d $X_CFLAGS"
18401        { echo "$as_me:$LINENO: result: $d" >&5
18402 echo "${ECHO_T}$d" >&6; }
18403      else
18404        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18405 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18406      fi
18407
18408      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18409 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18410      d=$with_xpm/lib
18411      if test -d $d; then
18412        X_LIBS="-L$d $X_LIBS"
18413        { echo "$as_me:$LINENO: result: $d" >&5
18414 echo "${ECHO_T}$d" >&6; }
18415      else
18416        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18417 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18418      fi
18419
18420      # replace the directory string with "yes".
18421      with_xpm_req="yes"
18422      with_xpm=$with_xpm_req
18423      ;;
18424
18425     *)
18426      echo ""
18427      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18428      echo "       If it is a directory, then \`DIR/include' will be added to"
18429      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18430      exit 1
18431      ;;
18432    esac
18433
18434
18435 if test "$with_xpm" = yes; then
18436
18437   ac_save_CPPFLAGS="$CPPFLAGS"
18438   if test \! -z "$includedir" ; then
18439     CPPFLAGS="$CPPFLAGS -I$includedir"
18440   fi
18441   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18442   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18443   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18444 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18445 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18446   echo $ECHO_N "(cached) $ECHO_C" >&6
18447 else
18448   cat >conftest.$ac_ext <<_ACEOF
18449 /* confdefs.h.  */
18450 _ACEOF
18451 cat confdefs.h >>conftest.$ac_ext
18452 cat >>conftest.$ac_ext <<_ACEOF
18453 /* end confdefs.h.  */
18454 #include <X11/Xlib.h>
18455
18456 #include <X11/xpm.h>
18457 _ACEOF
18458 rm -rf conftest.$ac_objext
18459 if { (ac_try="$ac_compile"
18460 case "(($ac_try" in
18461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18462   *) ac_try_echo=$ac_try;;
18463 esac
18464 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18465   (eval "$ac_compile") 2>conftest.er1
18466   ac_status=$?
18467   grep -v '^ *+' conftest.er1 >conftest.err
18468   rm -rf conftest.er1
18469   cat conftest.err >&5
18470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18471   (exit $ac_status); } && {
18472          test -z "$ac_c_werror_flag" ||
18473          test ! -s conftest.err
18474        } && test -s conftest.$ac_objext; then
18475   ac_cv_header_X11_xpm_h=yes
18476 else
18477   echo "$as_me: failed program was:" >&5
18478 sed 's/^/| /' conftest.$ac_ext >&5
18479
18480         ac_cv_header_X11_xpm_h=no
18481 fi
18482
18483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18484 fi
18485 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18486 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18487 if test $ac_cv_header_X11_xpm_h = yes; then
18488   have_xpm=yes
18489                     cat >>confdefs.h <<\_ACEOF
18490 #define HAVE_XPM 1
18491 _ACEOF
18492
18493                     XPM_LIBS="-lXpm $XPM_LIBS"
18494 fi
18495
18496
18497   CPPFLAGS="$ac_save_CPPFLAGS"
18498 elif test "$with_xpm" != no; then
18499   echo "error: must be yes or no: --with-xpm=$with_xpm"
18500   exit 1
18501 fi
18502
18503 # See comment near $motif_requires_xpm, above.
18504 # Need to do this here, after both Motif and XPM have been checked for.
18505 #
18506 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18507   if test "$motif_requires_xpm" = yes ; then
18508     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18509   fi
18510 fi
18511
18512 if test "$XPM_LIBS" = "" ; then
18513   XPM_LIBS=$(MINIXPM)
18514 fi
18515
18516
18517 ###############################################################################
18518 #
18519 #       Check for -ljpeg
18520 #
18521 ###############################################################################
18522
18523 have_jpeg=no
18524 with_jpeg_req=unspecified
18525 jpeg_halfassed=no
18526
18527 # Check whether --with-jpeg was given.
18528 if test "${with_jpeg+set}" = set; then
18529   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18530 else
18531   with_jpeg=yes
18532 fi
18533
18534
18535
18536    case "$with_jpeg" in
18537     yes) ;;
18538     no)  ;;
18539
18540     /*)
18541      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18542 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18543      d=$with_jpeg/include
18544      if test -d $d; then
18545        X_CFLAGS="-I$d $X_CFLAGS"
18546        { echo "$as_me:$LINENO: result: $d" >&5
18547 echo "${ECHO_T}$d" >&6; }
18548      else
18549        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18550 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18551      fi
18552
18553      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18554 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18555      d=$with_jpeg/lib
18556      if test -d $d; then
18557        X_LIBS="-L$d $X_LIBS"
18558        { echo "$as_me:$LINENO: result: $d" >&5
18559 echo "${ECHO_T}$d" >&6; }
18560      else
18561        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18562 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18563      fi
18564
18565      # replace the directory string with "yes".
18566      with_jpeg_req="yes"
18567      with_jpeg=$with_jpeg_req
18568      ;;
18569
18570     *)
18571      echo ""
18572      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18573      echo "       If it is a directory, then \`DIR/include' will be added to"
18574      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18575      exit 1
18576      ;;
18577    esac
18578
18579
18580 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18581   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18582   exit 1
18583 fi
18584
18585 if test "$with_jpeg" = yes; then
18586
18587   have_jpeg=no
18588
18589   ac_save_CPPFLAGS="$CPPFLAGS"
18590   if test \! -z "$includedir" ; then
18591     CPPFLAGS="$CPPFLAGS -I$includedir"
18592   fi
18593   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18594   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18595   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18596   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18597 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18598 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18599   echo $ECHO_N "(cached) $ECHO_C" >&6
18600 fi
18601 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18602 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18603 else
18604   # Is the header compilable?
18605 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18606 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18607 cat >conftest.$ac_ext <<_ACEOF
18608 /* confdefs.h.  */
18609 _ACEOF
18610 cat confdefs.h >>conftest.$ac_ext
18611 cat >>conftest.$ac_ext <<_ACEOF
18612 /* end confdefs.h.  */
18613 $ac_includes_default
18614 #include <jpeglib.h>
18615 _ACEOF
18616 rm -rf conftest.$ac_objext
18617 if { (ac_try="$ac_compile"
18618 case "(($ac_try" in
18619   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18620   *) ac_try_echo=$ac_try;;
18621 esac
18622 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18623   (eval "$ac_compile") 2>conftest.er1
18624   ac_status=$?
18625   grep -v '^ *+' conftest.er1 >conftest.err
18626   rm -rf conftest.er1
18627   cat conftest.err >&5
18628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18629   (exit $ac_status); } && {
18630          test -z "$ac_c_werror_flag" ||
18631          test ! -s conftest.err
18632        } && test -s conftest.$ac_objext; then
18633   ac_header_compiler=yes
18634 else
18635   echo "$as_me: failed program was:" >&5
18636 sed 's/^/| /' conftest.$ac_ext >&5
18637
18638         ac_header_compiler=no
18639 fi
18640
18641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18642 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18643 echo "${ECHO_T}$ac_header_compiler" >&6; }
18644
18645 # Is the header present?
18646 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18647 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18648 cat >conftest.$ac_ext <<_ACEOF
18649 /* confdefs.h.  */
18650 _ACEOF
18651 cat confdefs.h >>conftest.$ac_ext
18652 cat >>conftest.$ac_ext <<_ACEOF
18653 /* end confdefs.h.  */
18654 #include <jpeglib.h>
18655 _ACEOF
18656 if { (ac_try="$ac_cpp conftest.$ac_ext"
18657 case "(($ac_try" in
18658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18659   *) ac_try_echo=$ac_try;;
18660 esac
18661 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18662   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18663   ac_status=$?
18664   grep -v '^ *+' conftest.er1 >conftest.err
18665   rm -rf conftest.er1
18666   cat conftest.err >&5
18667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18668   (exit $ac_status); } >/dev/null && {
18669          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18670          test ! -s conftest.err
18671        }; then
18672   ac_header_preproc=yes
18673 else
18674   echo "$as_me: failed program was:" >&5
18675 sed 's/^/| /' conftest.$ac_ext >&5
18676
18677   ac_header_preproc=no
18678 fi
18679
18680 rm -rf conftest.err conftest.$ac_ext
18681 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18682 echo "${ECHO_T}$ac_header_preproc" >&6; }
18683
18684 # So?  What about this header?
18685 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18686   yes:no: )
18687     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18688 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18689     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18690 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18691     ac_header_preproc=yes
18692     ;;
18693   no:yes:* )
18694     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18695 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18696     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18697 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18698     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18699 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18700     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18701 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18702     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18703 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18704     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18705 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18706
18707     ;;
18708 esac
18709 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18710 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18711 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18712   echo $ECHO_N "(cached) $ECHO_C" >&6
18713 else
18714   ac_cv_header_jpeglib_h=$ac_header_preproc
18715 fi
18716 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18717 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18718
18719 fi
18720 if test $ac_cv_header_jpeglib_h = yes; then
18721   have_jpeg=yes
18722 fi
18723
18724
18725   CPPFLAGS="$ac_save_CPPFLAGS"
18726
18727   if test "$have_jpeg" = yes; then
18728     # we have the header, now check for the library
18729     have_jpeg=no
18730     jpeg_halfassed=yes
18731
18732   ac_save_CPPFLAGS="$CPPFLAGS"
18733   ac_save_LDFLAGS="$LDFLAGS"
18734 #  ac_save_LIBS="$LIBS"
18735
18736   if test \! -z "$includedir" ; then
18737     CPPFLAGS="$CPPFLAGS -I$includedir"
18738   fi
18739   # note: $X_CFLAGS includes $x_includes
18740   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18741
18742   if test \! -z "$libdir" ; then
18743     LDFLAGS="$LDFLAGS -L$libdir"
18744   fi
18745   # note: $X_LIBS includes $x_libraries
18746   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18747
18748   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18749   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18750   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18751 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18752 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18753   echo $ECHO_N "(cached) $ECHO_C" >&6
18754 else
18755   ac_check_lib_save_LIBS=$LIBS
18756 LIBS="-ljpeg  $LIBS"
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
18764 /* Override any GCC internal prototype to avoid an error.
18765    Use char because int might match the return type of a GCC
18766    builtin and then its argument prototype would still apply.  */
18767 #ifdef __cplusplus
18768 extern "C"
18769 #endif
18770 char jpeg_start_compress ();
18771 int
18772 main ()
18773 {
18774 return jpeg_start_compress ();
18775   ;
18776   return 0;
18777 }
18778 _ACEOF
18779 rm -rf conftest.$ac_objext conftest$ac_exeext
18780 if { (ac_try="$ac_link"
18781 case "(($ac_try" in
18782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18783   *) ac_try_echo=$ac_try;;
18784 esac
18785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18786   (eval "$ac_link") 2>conftest.er1
18787   ac_status=$?
18788   grep -v '^ *+' conftest.er1 >conftest.err
18789   rm -rf conftest.er1
18790   cat conftest.err >&5
18791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18792   (exit $ac_status); } && {
18793          test -z "$ac_c_werror_flag" ||
18794          test ! -s conftest.err
18795        } && test -s conftest$ac_exeext &&
18796        $as_test_x conftest$ac_exeext; then
18797   ac_cv_lib_jpeg_jpeg_start_compress=yes
18798 else
18799   echo "$as_me: failed program was:" >&5
18800 sed 's/^/| /' conftest.$ac_ext >&5
18801
18802         ac_cv_lib_jpeg_jpeg_start_compress=no
18803 fi
18804
18805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18806       conftest$ac_exeext conftest.$ac_ext
18807 LIBS=$ac_check_lib_save_LIBS
18808 fi
18809 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18810 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18811 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18812   have_jpeg=yes
18813                     jpeg_halfassed=no
18814                     JPEG_LIBS="-ljpeg"
18815                     cat >>confdefs.h <<\_ACEOF
18816 #define HAVE_JPEGLIB 1
18817 _ACEOF
18818
18819 fi
18820
18821   CPPFLAGS="$ac_save_CPPFLAGS"
18822   LDFLAGS="$ac_save_LDFLAGS"
18823 #  LIBS="$ac_save_LIBS"
18824
18825   fi
18826 fi
18827
18828
18829 ###############################################################################
18830 #
18831 #       Check for pty support: this allows 'phosphor' and 'apple2'
18832 #       to run curses-based programs, or be used as terminal windows.
18833 #
18834 ###############################################################################
18835
18836 PTY_LIBS=
18837
18838
18839 for ac_header in pty.h util.h
18840 do
18841 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18842 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18843   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18844 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18845 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18846   echo $ECHO_N "(cached) $ECHO_C" >&6
18847 fi
18848 ac_res=`eval echo '${'$as_ac_Header'}'`
18849                { echo "$as_me:$LINENO: result: $ac_res" >&5
18850 echo "${ECHO_T}$ac_res" >&6; }
18851 else
18852   # Is the header compilable?
18853 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18854 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18855 cat >conftest.$ac_ext <<_ACEOF
18856 /* confdefs.h.  */
18857 _ACEOF
18858 cat confdefs.h >>conftest.$ac_ext
18859 cat >>conftest.$ac_ext <<_ACEOF
18860 /* end confdefs.h.  */
18861 $ac_includes_default
18862 #include <$ac_header>
18863 _ACEOF
18864 rm -rf conftest.$ac_objext
18865 if { (ac_try="$ac_compile"
18866 case "(($ac_try" in
18867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18868   *) ac_try_echo=$ac_try;;
18869 esac
18870 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18871   (eval "$ac_compile") 2>conftest.er1
18872   ac_status=$?
18873   grep -v '^ *+' conftest.er1 >conftest.err
18874   rm -rf conftest.er1
18875   cat conftest.err >&5
18876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18877   (exit $ac_status); } && {
18878          test -z "$ac_c_werror_flag" ||
18879          test ! -s conftest.err
18880        } && test -s conftest.$ac_objext; then
18881   ac_header_compiler=yes
18882 else
18883   echo "$as_me: failed program was:" >&5
18884 sed 's/^/| /' conftest.$ac_ext >&5
18885
18886         ac_header_compiler=no
18887 fi
18888
18889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18890 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18891 echo "${ECHO_T}$ac_header_compiler" >&6; }
18892
18893 # Is the header present?
18894 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18895 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18896 cat >conftest.$ac_ext <<_ACEOF
18897 /* confdefs.h.  */
18898 _ACEOF
18899 cat confdefs.h >>conftest.$ac_ext
18900 cat >>conftest.$ac_ext <<_ACEOF
18901 /* end confdefs.h.  */
18902 #include <$ac_header>
18903 _ACEOF
18904 if { (ac_try="$ac_cpp conftest.$ac_ext"
18905 case "(($ac_try" in
18906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18907   *) ac_try_echo=$ac_try;;
18908 esac
18909 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18910   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18911   ac_status=$?
18912   grep -v '^ *+' conftest.er1 >conftest.err
18913   rm -rf conftest.er1
18914   cat conftest.err >&5
18915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18916   (exit $ac_status); } >/dev/null && {
18917          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18918          test ! -s conftest.err
18919        }; then
18920   ac_header_preproc=yes
18921 else
18922   echo "$as_me: failed program was:" >&5
18923 sed 's/^/| /' conftest.$ac_ext >&5
18924
18925   ac_header_preproc=no
18926 fi
18927
18928 rm -rf conftest.err conftest.$ac_ext
18929 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18930 echo "${ECHO_T}$ac_header_preproc" >&6; }
18931
18932 # So?  What about this header?
18933 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18934   yes:no: )
18935     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18936 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18937     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18938 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18939     ac_header_preproc=yes
18940     ;;
18941   no:yes:* )
18942     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18943 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18944     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18945 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18946     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18947 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18948     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18949 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18950     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18951 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18952     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18953 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18954
18955     ;;
18956 esac
18957 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18959 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18960   echo $ECHO_N "(cached) $ECHO_C" >&6
18961 else
18962   eval "$as_ac_Header=\$ac_header_preproc"
18963 fi
18964 ac_res=`eval echo '${'$as_ac_Header'}'`
18965                { echo "$as_me:$LINENO: result: $ac_res" >&5
18966 echo "${ECHO_T}$ac_res" >&6; }
18967
18968 fi
18969 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18970   cat >>confdefs.h <<_ACEOF
18971 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18972 _ACEOF
18973
18974 fi
18975
18976 done
18977
18978
18979   ac_save_CPPFLAGS="$CPPFLAGS"
18980   ac_save_LDFLAGS="$LDFLAGS"
18981 #  ac_save_LIBS="$LIBS"
18982
18983   if test \! -z "$includedir" ; then
18984     CPPFLAGS="$CPPFLAGS -I$includedir"
18985   fi
18986   # note: $X_CFLAGS includes $x_includes
18987   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18988
18989   if test \! -z "$libdir" ; then
18990     LDFLAGS="$LDFLAGS -L$libdir"
18991   fi
18992   # note: $X_LIBS includes $x_libraries
18993   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18994
18995   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18996   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18997   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18998 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
18999 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19000   echo $ECHO_N "(cached) $ECHO_C" >&6
19001 else
19002   ac_check_lib_save_LIBS=$LIBS
19003 LIBS="-lutil  $LIBS"
19004 cat >conftest.$ac_ext <<_ACEOF
19005 /* confdefs.h.  */
19006 _ACEOF
19007 cat confdefs.h >>conftest.$ac_ext
19008 cat >>conftest.$ac_ext <<_ACEOF
19009 /* end confdefs.h.  */
19010
19011 /* Override any GCC internal prototype to avoid an error.
19012    Use char because int might match the return type of a GCC
19013    builtin and then its argument prototype would still apply.  */
19014 #ifdef __cplusplus
19015 extern "C"
19016 #endif
19017 char forkpty ();
19018 int
19019 main ()
19020 {
19021 return forkpty ();
19022   ;
19023   return 0;
19024 }
19025 _ACEOF
19026 rm -rf conftest.$ac_objext conftest$ac_exeext
19027 if { (ac_try="$ac_link"
19028 case "(($ac_try" in
19029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19030   *) ac_try_echo=$ac_try;;
19031 esac
19032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19033   (eval "$ac_link") 2>conftest.er1
19034   ac_status=$?
19035   grep -v '^ *+' conftest.er1 >conftest.err
19036   rm -rf conftest.er1
19037   cat conftest.err >&5
19038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19039   (exit $ac_status); } && {
19040          test -z "$ac_c_werror_flag" ||
19041          test ! -s conftest.err
19042        } && test -s conftest$ac_exeext &&
19043        $as_test_x conftest$ac_exeext; then
19044   ac_cv_lib_util_forkpty=yes
19045 else
19046   echo "$as_me: failed program was:" >&5
19047 sed 's/^/| /' conftest.$ac_ext >&5
19048
19049         ac_cv_lib_util_forkpty=no
19050 fi
19051
19052 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19053       conftest$ac_exeext conftest.$ac_ext
19054 LIBS=$ac_check_lib_save_LIBS
19055 fi
19056 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19057 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19058 if test $ac_cv_lib_util_forkpty = yes; then
19059   PTY_LIBS="-lutil"
19060                 ac_have_forkpty=yes
19061                 cat >>confdefs.h <<\_ACEOF
19062 #define HAVE_FORKPTY 1
19063 _ACEOF
19064
19065 fi
19066
19067   CPPFLAGS="$ac_save_CPPFLAGS"
19068   LDFLAGS="$ac_save_LDFLAGS"
19069 #  LIBS="$ac_save_LIBS"
19070
19071
19072 if test "$ac_have_forkpty" != yes ; then
19073   # we don't need (or have) -lutil on MacOS 10.4.2...
19074
19075   ac_save_CPPFLAGS="$CPPFLAGS"
19076   ac_save_LDFLAGS="$LDFLAGS"
19077 #  ac_save_LIBS="$LIBS"
19078
19079   if test \! -z "$includedir" ; then
19080     CPPFLAGS="$CPPFLAGS -I$includedir"
19081   fi
19082   # note: $X_CFLAGS includes $x_includes
19083   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19084
19085   if test \! -z "$libdir" ; then
19086     LDFLAGS="$LDFLAGS -L$libdir"
19087   fi
19088   # note: $X_LIBS includes $x_libraries
19089   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19090
19091   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19092   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19093   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19094 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
19095 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19096   echo $ECHO_N "(cached) $ECHO_C" >&6
19097 else
19098   ac_check_lib_save_LIBS=$LIBS
19099 LIBS="-lc  $LIBS"
19100 cat >conftest.$ac_ext <<_ACEOF
19101 /* confdefs.h.  */
19102 _ACEOF
19103 cat confdefs.h >>conftest.$ac_ext
19104 cat >>conftest.$ac_ext <<_ACEOF
19105 /* end confdefs.h.  */
19106
19107 /* Override any GCC internal prototype to avoid an error.
19108    Use char because int might match the return type of a GCC
19109    builtin and then its argument prototype would still apply.  */
19110 #ifdef __cplusplus
19111 extern "C"
19112 #endif
19113 char forkpty ();
19114 int
19115 main ()
19116 {
19117 return forkpty ();
19118   ;
19119   return 0;
19120 }
19121 _ACEOF
19122 rm -rf conftest.$ac_objext conftest$ac_exeext
19123 if { (ac_try="$ac_link"
19124 case "(($ac_try" in
19125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19126   *) ac_try_echo=$ac_try;;
19127 esac
19128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19129   (eval "$ac_link") 2>conftest.er1
19130   ac_status=$?
19131   grep -v '^ *+' conftest.er1 >conftest.err
19132   rm -rf conftest.er1
19133   cat conftest.err >&5
19134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19135   (exit $ac_status); } && {
19136          test -z "$ac_c_werror_flag" ||
19137          test ! -s conftest.err
19138        } && test -s conftest$ac_exeext &&
19139        $as_test_x conftest$ac_exeext; then
19140   ac_cv_lib_c_forkpty=yes
19141 else
19142   echo "$as_me: failed program was:" >&5
19143 sed 's/^/| /' conftest.$ac_ext >&5
19144
19145         ac_cv_lib_c_forkpty=no
19146 fi
19147
19148 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19149       conftest$ac_exeext conftest.$ac_ext
19150 LIBS=$ac_check_lib_save_LIBS
19151 fi
19152 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19153 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19154 if test $ac_cv_lib_c_forkpty = yes; then
19155   PTY_LIBS=""
19156                   cat >>confdefs.h <<\_ACEOF
19157 #define HAVE_FORKPTY 1
19158 _ACEOF
19159
19160 fi
19161
19162   CPPFLAGS="$ac_save_CPPFLAGS"
19163   LDFLAGS="$ac_save_LDFLAGS"
19164 #  LIBS="$ac_save_LIBS"
19165
19166 fi
19167
19168 ###############################################################################
19169 #
19170 #       Check for the XSHM server extension.
19171 #
19172 ###############################################################################
19173
19174 have_xshm=no
19175 with_xshm_req=unspecified
19176
19177 # Check whether --with-xshm-ext was given.
19178 if test "${with_xshm_ext+set}" = set; then
19179   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19180 else
19181   with_xshm=yes
19182 fi
19183
19184
19185
19186    case "$with_xshm" in
19187     yes) ;;
19188     no)  ;;
19189
19190     /*)
19191      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19192 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19193      d=$with_xshm/include
19194      if test -d $d; then
19195        X_CFLAGS="-I$d $X_CFLAGS"
19196        { echo "$as_me:$LINENO: result: $d" >&5
19197 echo "${ECHO_T}$d" >&6; }
19198      else
19199        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19200 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19201      fi
19202
19203      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19204 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19205      d=$with_xshm/lib
19206      if test -d $d; then
19207        X_LIBS="-L$d $X_LIBS"
19208        { echo "$as_me:$LINENO: result: $d" >&5
19209 echo "${ECHO_T}$d" >&6; }
19210      else
19211        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19212 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19213      fi
19214
19215      # replace the directory string with "yes".
19216      with_xshm_req="yes"
19217      with_xshm=$with_xshm_req
19218      ;;
19219
19220     *)
19221      echo ""
19222      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19223      echo "       If it is a directory, then \`DIR/include' will be added to"
19224      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19225      exit 1
19226      ;;
19227    esac
19228
19229
19230 if test "$with_xshm" = yes; then
19231
19232   # first check for Xshm.h.
19233
19234   ac_save_CPPFLAGS="$CPPFLAGS"
19235   if test \! -z "$includedir" ; then
19236     CPPFLAGS="$CPPFLAGS -I$includedir"
19237   fi
19238   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19239   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19240   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19241 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19242 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19243   echo $ECHO_N "(cached) $ECHO_C" >&6
19244 else
19245   cat >conftest.$ac_ext <<_ACEOF
19246 /* confdefs.h.  */
19247 _ACEOF
19248 cat confdefs.h >>conftest.$ac_ext
19249 cat >>conftest.$ac_ext <<_ACEOF
19250 /* end confdefs.h.  */
19251 #include <X11/Xlib.h>
19252
19253 #include <X11/extensions/XShm.h>
19254 _ACEOF
19255 rm -rf conftest.$ac_objext
19256 if { (ac_try="$ac_compile"
19257 case "(($ac_try" in
19258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19259   *) ac_try_echo=$ac_try;;
19260 esac
19261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19262   (eval "$ac_compile") 2>conftest.er1
19263   ac_status=$?
19264   grep -v '^ *+' conftest.er1 >conftest.err
19265   rm -rf conftest.er1
19266   cat conftest.err >&5
19267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19268   (exit $ac_status); } && {
19269          test -z "$ac_c_werror_flag" ||
19270          test ! -s conftest.err
19271        } && test -s conftest.$ac_objext; then
19272   ac_cv_header_X11_extensions_XShm_h=yes
19273 else
19274   echo "$as_me: failed program was:" >&5
19275 sed 's/^/| /' conftest.$ac_ext >&5
19276
19277         ac_cv_header_X11_extensions_XShm_h=no
19278 fi
19279
19280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19281 fi
19282 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19283 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19284 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19285   have_xshm=yes
19286 fi
19287
19288
19289   CPPFLAGS="$ac_save_CPPFLAGS"
19290
19291   # if that succeeded, then check for sys/ipc.h.
19292   if test "$have_xshm" = yes; then
19293     have_xshm=no
19294
19295   ac_save_CPPFLAGS="$CPPFLAGS"
19296   if test \! -z "$includedir" ; then
19297     CPPFLAGS="$CPPFLAGS -I$includedir"
19298   fi
19299   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19300   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19301   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19302   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19303 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19304 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19305   echo $ECHO_N "(cached) $ECHO_C" >&6
19306 fi
19307 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19308 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19309 else
19310   # Is the header compilable?
19311 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19312 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19313 cat >conftest.$ac_ext <<_ACEOF
19314 /* confdefs.h.  */
19315 _ACEOF
19316 cat confdefs.h >>conftest.$ac_ext
19317 cat >>conftest.$ac_ext <<_ACEOF
19318 /* end confdefs.h.  */
19319 $ac_includes_default
19320 #include <sys/ipc.h>
19321 _ACEOF
19322 rm -rf conftest.$ac_objext
19323 if { (ac_try="$ac_compile"
19324 case "(($ac_try" in
19325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326   *) ac_try_echo=$ac_try;;
19327 esac
19328 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19329   (eval "$ac_compile") 2>conftest.er1
19330   ac_status=$?
19331   grep -v '^ *+' conftest.er1 >conftest.err
19332   rm -rf conftest.er1
19333   cat conftest.err >&5
19334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335   (exit $ac_status); } && {
19336          test -z "$ac_c_werror_flag" ||
19337          test ! -s conftest.err
19338        } && test -s conftest.$ac_objext; then
19339   ac_header_compiler=yes
19340 else
19341   echo "$as_me: failed program was:" >&5
19342 sed 's/^/| /' conftest.$ac_ext >&5
19343
19344         ac_header_compiler=no
19345 fi
19346
19347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19348 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19349 echo "${ECHO_T}$ac_header_compiler" >&6; }
19350
19351 # Is the header present?
19352 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19353 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19354 cat >conftest.$ac_ext <<_ACEOF
19355 /* confdefs.h.  */
19356 _ACEOF
19357 cat confdefs.h >>conftest.$ac_ext
19358 cat >>conftest.$ac_ext <<_ACEOF
19359 /* end confdefs.h.  */
19360 #include <sys/ipc.h>
19361 _ACEOF
19362 if { (ac_try="$ac_cpp conftest.$ac_ext"
19363 case "(($ac_try" in
19364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19365   *) ac_try_echo=$ac_try;;
19366 esac
19367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19368   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19369   ac_status=$?
19370   grep -v '^ *+' conftest.er1 >conftest.err
19371   rm -rf conftest.er1
19372   cat conftest.err >&5
19373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19374   (exit $ac_status); } >/dev/null && {
19375          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19376          test ! -s conftest.err
19377        }; then
19378   ac_header_preproc=yes
19379 else
19380   echo "$as_me: failed program was:" >&5
19381 sed 's/^/| /' conftest.$ac_ext >&5
19382
19383   ac_header_preproc=no
19384 fi
19385
19386 rm -rf conftest.err conftest.$ac_ext
19387 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19388 echo "${ECHO_T}$ac_header_preproc" >&6; }
19389
19390 # So?  What about this header?
19391 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19392   yes:no: )
19393     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19394 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19395     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19396 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19397     ac_header_preproc=yes
19398     ;;
19399   no:yes:* )
19400     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19401 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19402     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19403 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19404     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19405 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19406     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19407 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19408     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19409 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19410     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19411 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19412
19413     ;;
19414 esac
19415 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19416 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19417 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19418   echo $ECHO_N "(cached) $ECHO_C" >&6
19419 else
19420   ac_cv_header_sys_ipc_h=$ac_header_preproc
19421 fi
19422 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19423 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19424
19425 fi
19426 if test $ac_cv_header_sys_ipc_h = yes; then
19427   have_xshm=yes
19428 fi
19429
19430
19431   CPPFLAGS="$ac_save_CPPFLAGS"
19432   fi
19433
19434   # if that succeeded, then check for sys/shm.h.
19435   if test "$have_xshm" = yes; then
19436     have_xshm=no
19437
19438   ac_save_CPPFLAGS="$CPPFLAGS"
19439   if test \! -z "$includedir" ; then
19440     CPPFLAGS="$CPPFLAGS -I$includedir"
19441   fi
19442   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19443   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19444   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19445   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19446 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19447 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19448   echo $ECHO_N "(cached) $ECHO_C" >&6
19449 fi
19450 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19451 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19452 else
19453   # Is the header compilable?
19454 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19455 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19456 cat >conftest.$ac_ext <<_ACEOF
19457 /* confdefs.h.  */
19458 _ACEOF
19459 cat confdefs.h >>conftest.$ac_ext
19460 cat >>conftest.$ac_ext <<_ACEOF
19461 /* end confdefs.h.  */
19462 $ac_includes_default
19463 #include <sys/shm.h>
19464 _ACEOF
19465 rm -rf conftest.$ac_objext
19466 if { (ac_try="$ac_compile"
19467 case "(($ac_try" in
19468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19469   *) ac_try_echo=$ac_try;;
19470 esac
19471 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19472   (eval "$ac_compile") 2>conftest.er1
19473   ac_status=$?
19474   grep -v '^ *+' conftest.er1 >conftest.err
19475   rm -rf conftest.er1
19476   cat conftest.err >&5
19477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478   (exit $ac_status); } && {
19479          test -z "$ac_c_werror_flag" ||
19480          test ! -s conftest.err
19481        } && test -s conftest.$ac_objext; then
19482   ac_header_compiler=yes
19483 else
19484   echo "$as_me: failed program was:" >&5
19485 sed 's/^/| /' conftest.$ac_ext >&5
19486
19487         ac_header_compiler=no
19488 fi
19489
19490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19491 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19492 echo "${ECHO_T}$ac_header_compiler" >&6; }
19493
19494 # Is the header present?
19495 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19496 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19497 cat >conftest.$ac_ext <<_ACEOF
19498 /* confdefs.h.  */
19499 _ACEOF
19500 cat confdefs.h >>conftest.$ac_ext
19501 cat >>conftest.$ac_ext <<_ACEOF
19502 /* end confdefs.h.  */
19503 #include <sys/shm.h>
19504 _ACEOF
19505 if { (ac_try="$ac_cpp conftest.$ac_ext"
19506 case "(($ac_try" in
19507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19508   *) ac_try_echo=$ac_try;;
19509 esac
19510 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19511   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19512   ac_status=$?
19513   grep -v '^ *+' conftest.er1 >conftest.err
19514   rm -rf conftest.er1
19515   cat conftest.err >&5
19516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19517   (exit $ac_status); } >/dev/null && {
19518          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19519          test ! -s conftest.err
19520        }; then
19521   ac_header_preproc=yes
19522 else
19523   echo "$as_me: failed program was:" >&5
19524 sed 's/^/| /' conftest.$ac_ext >&5
19525
19526   ac_header_preproc=no
19527 fi
19528
19529 rm -rf conftest.err conftest.$ac_ext
19530 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19531 echo "${ECHO_T}$ac_header_preproc" >&6; }
19532
19533 # So?  What about this header?
19534 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19535   yes:no: )
19536     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19537 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19538     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19539 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19540     ac_header_preproc=yes
19541     ;;
19542   no:yes:* )
19543     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19544 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19545     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19546 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19547     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19548 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19549     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19550 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19551     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19552 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19553     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19554 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19555
19556     ;;
19557 esac
19558 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19559 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19560 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19561   echo $ECHO_N "(cached) $ECHO_C" >&6
19562 else
19563   ac_cv_header_sys_shm_h=$ac_header_preproc
19564 fi
19565 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19566 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19567
19568 fi
19569 if test $ac_cv_header_sys_shm_h = yes; then
19570   have_xshm=yes
19571 fi
19572
19573
19574   CPPFLAGS="$ac_save_CPPFLAGS"
19575   fi
19576
19577   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19578   # to exist, but the library code to not exist.  And even better, the library
19579   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19580   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19581   # that's not quite right, but close enough.)
19582   #
19583   case "$host" in
19584     *-aix*)
19585       if  `uname -v` -eq 3 ; then
19586         have_xshm=no
19587
19588   ac_save_CPPFLAGS="$CPPFLAGS"
19589   ac_save_LDFLAGS="$LDFLAGS"
19590 #  ac_save_LIBS="$LIBS"
19591
19592   if test \! -z "$includedir" ; then
19593     CPPFLAGS="$CPPFLAGS -I$includedir"
19594   fi
19595   # note: $X_CFLAGS includes $x_includes
19596   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19597
19598   if test \! -z "$libdir" ; then
19599     LDFLAGS="$LDFLAGS -L$libdir"
19600   fi
19601   # note: $X_LIBS includes $x_libraries
19602   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19603
19604   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19605   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19606   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19607 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19608 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19609   echo $ECHO_N "(cached) $ECHO_C" >&6
19610 else
19611   ac_check_lib_save_LIBS=$LIBS
19612 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19613 cat >conftest.$ac_ext <<_ACEOF
19614 /* confdefs.h.  */
19615 _ACEOF
19616 cat confdefs.h >>conftest.$ac_ext
19617 cat >>conftest.$ac_ext <<_ACEOF
19618 /* end confdefs.h.  */
19619
19620 /* Override any GCC internal prototype to avoid an error.
19621    Use char because int might match the return type of a GCC
19622    builtin and then its argument prototype would still apply.  */
19623 #ifdef __cplusplus
19624 extern "C"
19625 #endif
19626 char XShmQueryExtension ();
19627 int
19628 main ()
19629 {
19630 return XShmQueryExtension ();
19631   ;
19632   return 0;
19633 }
19634 _ACEOF
19635 rm -rf conftest.$ac_objext conftest$ac_exeext
19636 if { (ac_try="$ac_link"
19637 case "(($ac_try" in
19638   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19639   *) ac_try_echo=$ac_try;;
19640 esac
19641 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19642   (eval "$ac_link") 2>conftest.er1
19643   ac_status=$?
19644   grep -v '^ *+' conftest.er1 >conftest.err
19645   rm -rf conftest.er1
19646   cat conftest.err >&5
19647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19648   (exit $ac_status); } && {
19649          test -z "$ac_c_werror_flag" ||
19650          test ! -s conftest.err
19651        } && test -s conftest$ac_exeext &&
19652        $as_test_x conftest$ac_exeext; then
19653   ac_cv_lib_XextSam_XShmQueryExtension=yes
19654 else
19655   echo "$as_me: failed program was:" >&5
19656 sed 's/^/| /' conftest.$ac_ext >&5
19657
19658         ac_cv_lib_XextSam_XShmQueryExtension=no
19659 fi
19660
19661 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19662       conftest$ac_exeext conftest.$ac_ext
19663 LIBS=$ac_check_lib_save_LIBS
19664 fi
19665 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19666 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19667 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19668   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19669 else
19670   true
19671 fi
19672
19673   CPPFLAGS="$ac_save_CPPFLAGS"
19674   LDFLAGS="$ac_save_LDFLAGS"
19675 #  LIBS="$ac_save_LIBS"
19676
19677       fi
19678     ;;
19679   esac
19680
19681   # if that succeeded, then we've really got it.
19682   if test "$have_xshm" = yes; then
19683     cat >>confdefs.h <<\_ACEOF
19684 #define HAVE_XSHM_EXTENSION 1
19685 _ACEOF
19686
19687   fi
19688
19689 elif test "$with_xshm" != no; then
19690   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19691   exit 1
19692 fi
19693
19694
19695 ###############################################################################
19696 #
19697 #       Check for the DOUBLE-BUFFER server extension.
19698 #
19699 ###############################################################################
19700
19701 have_xdbe=no
19702 with_xdbe_req=unspecified
19703
19704 # Check whether --with-xdbe-ext was given.
19705 if test "${with_xdbe_ext+set}" = set; then
19706   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19707 else
19708   with_xdbe=yes
19709 fi
19710
19711
19712
19713    case "$with_xdbe" in
19714     yes) ;;
19715     no)  ;;
19716
19717     /*)
19718      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19719 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19720      d=$with_xdbe/include
19721      if test -d $d; then
19722        X_CFLAGS="-I$d $X_CFLAGS"
19723        { echo "$as_me:$LINENO: result: $d" >&5
19724 echo "${ECHO_T}$d" >&6; }
19725      else
19726        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19727 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19728      fi
19729
19730      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19731 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19732      d=$with_xdbe/lib
19733      if test -d $d; then
19734        X_LIBS="-L$d $X_LIBS"
19735        { echo "$as_me:$LINENO: result: $d" >&5
19736 echo "${ECHO_T}$d" >&6; }
19737      else
19738        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19739 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19740      fi
19741
19742      # replace the directory string with "yes".
19743      with_xdbe_req="yes"
19744      with_xdbe=$with_xdbe_req
19745      ;;
19746
19747     *)
19748      echo ""
19749      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19750      echo "       If it is a directory, then \`DIR/include' will be added to"
19751      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19752      exit 1
19753      ;;
19754    esac
19755
19756
19757 if test "$with_xdbe" = yes; then
19758
19759
19760   ac_save_CPPFLAGS="$CPPFLAGS"
19761   if test \! -z "$includedir" ; then
19762     CPPFLAGS="$CPPFLAGS -I$includedir"
19763   fi
19764   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19765   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19766   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19767 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19768 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19769   echo $ECHO_N "(cached) $ECHO_C" >&6
19770 else
19771   cat >conftest.$ac_ext <<_ACEOF
19772 /* confdefs.h.  */
19773 _ACEOF
19774 cat confdefs.h >>conftest.$ac_ext
19775 cat >>conftest.$ac_ext <<_ACEOF
19776 /* end confdefs.h.  */
19777 #include <X11/Xlib.h>
19778
19779 #include <X11/extensions/Xdbe.h>
19780 _ACEOF
19781 rm -rf conftest.$ac_objext
19782 if { (ac_try="$ac_compile"
19783 case "(($ac_try" in
19784   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19785   *) ac_try_echo=$ac_try;;
19786 esac
19787 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19788   (eval "$ac_compile") 2>conftest.er1
19789   ac_status=$?
19790   grep -v '^ *+' conftest.er1 >conftest.err
19791   rm -rf conftest.er1
19792   cat conftest.err >&5
19793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19794   (exit $ac_status); } && {
19795          test -z "$ac_c_werror_flag" ||
19796          test ! -s conftest.err
19797        } && test -s conftest.$ac_objext; then
19798   ac_cv_header_X11_extensions_Xdbe_h=yes
19799 else
19800   echo "$as_me: failed program was:" >&5
19801 sed 's/^/| /' conftest.$ac_ext >&5
19802
19803         ac_cv_header_X11_extensions_Xdbe_h=no
19804 fi
19805
19806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19807 fi
19808 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19809 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19810 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19811   have_xdbe=yes
19812 fi
19813
19814
19815   CPPFLAGS="$ac_save_CPPFLAGS"
19816   if test "$have_xdbe" = yes; then
19817     cat >>confdefs.h <<\_ACEOF
19818 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19819 _ACEOF
19820
19821   fi
19822
19823 elif test "$with_xdbe" != no; then
19824   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19825   exit 1
19826 fi
19827
19828
19829 ###############################################################################
19830 #
19831 #       Check for the SGI XReadDisplay server extension.
19832 #
19833 #       Note: this has to be down here, rather than up with the other server
19834 #       extension tests, so that the output of `configure --help' is in the
19835 #       right order.  Arrgh!
19836 #
19837 ###############################################################################
19838
19839 have_readdisplay=no
19840 with_readdisplay_req=unspecified
19841
19842 # Check whether --with-readdisplay was given.
19843 if test "${with_readdisplay+set}" = set; then
19844   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19845 else
19846   with_readdisplay=yes
19847 fi
19848
19849
19850
19851    case "$with_readdisplay" in
19852     yes) ;;
19853     no)  ;;
19854
19855     /*)
19856      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19857 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19858      d=$with_readdisplay/include
19859      if test -d $d; then
19860        X_CFLAGS="-I$d $X_CFLAGS"
19861        { echo "$as_me:$LINENO: result: $d" >&5
19862 echo "${ECHO_T}$d" >&6; }
19863      else
19864        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19865 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19866      fi
19867
19868      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19869 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19870      d=$with_readdisplay/lib
19871      if test -d $d; then
19872        X_LIBS="-L$d $X_LIBS"
19873        { echo "$as_me:$LINENO: result: $d" >&5
19874 echo "${ECHO_T}$d" >&6; }
19875      else
19876        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19877 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19878      fi
19879
19880      # replace the directory string with "yes".
19881      with_readdisplay_req="yes"
19882      with_readdisplay=$with_readdisplay_req
19883      ;;
19884
19885     *)
19886      echo ""
19887      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19888      echo "       If it is a directory, then \`DIR/include' will be added to"
19889      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19890      exit 1
19891      ;;
19892    esac
19893
19894
19895 if test "$with_readdisplay" = yes; then
19896
19897   ac_save_CPPFLAGS="$CPPFLAGS"
19898   if test \! -z "$includedir" ; then
19899     CPPFLAGS="$CPPFLAGS -I$includedir"
19900   fi
19901   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19902   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19903   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19904 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19905 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19906   echo $ECHO_N "(cached) $ECHO_C" >&6
19907 else
19908   cat >conftest.$ac_ext <<_ACEOF
19909 /* confdefs.h.  */
19910 _ACEOF
19911 cat confdefs.h >>conftest.$ac_ext
19912 cat >>conftest.$ac_ext <<_ACEOF
19913 /* end confdefs.h.  */
19914 #include <X11/Xlib.h>
19915
19916 #include <X11/extensions/readdisplay.h>
19917 _ACEOF
19918 rm -rf conftest.$ac_objext
19919 if { (ac_try="$ac_compile"
19920 case "(($ac_try" in
19921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19922   *) ac_try_echo=$ac_try;;
19923 esac
19924 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19925   (eval "$ac_compile") 2>conftest.er1
19926   ac_status=$?
19927   grep -v '^ *+' conftest.er1 >conftest.err
19928   rm -rf conftest.er1
19929   cat conftest.err >&5
19930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19931   (exit $ac_status); } && {
19932          test -z "$ac_c_werror_flag" ||
19933          test ! -s conftest.err
19934        } && test -s conftest.$ac_objext; then
19935   ac_cv_header_X11_extensions_readdisplay_h=yes
19936 else
19937   echo "$as_me: failed program was:" >&5
19938 sed 's/^/| /' conftest.$ac_ext >&5
19939
19940         ac_cv_header_X11_extensions_readdisplay_h=no
19941 fi
19942
19943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19944 fi
19945 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19946 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19947 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19948   cat >>confdefs.h <<\_ACEOF
19949 #define HAVE_READ_DISPLAY_EXTENSION 1
19950 _ACEOF
19951
19952 fi
19953
19954
19955   CPPFLAGS="$ac_save_CPPFLAGS"
19956 elif test "$with_readdisplay" != no; then
19957   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19958   exit 1
19959 fi
19960
19961
19962 ###############################################################################
19963 #
19964 #       Check for a directory full of images to use as the default value
19965 #       of the "imageDirectory" preference.
19966 #
19967 ###############################################################################
19968
19969 have_imagedir=no
19970 with_imagedir_req=unspecified
19971
19972
19973 # Check whether --with-image-directory was given.
19974 if test "${with_image_directory+set}" = set; then
19975   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
19976 else
19977   with_imagedir=yes
19978 fi
19979
19980 # no HANDLE_X_PATH_ARG for this one
19981
19982 case "$with_imagedir" in
19983   /*)
19984     # absolute path
19985     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19986 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
19987     if test -d "$with_imagedir" ; then
19988       { echo "$as_me:$LINENO: result: yes" >&5
19989 echo "${ECHO_T}yes" >&6; }
19990     else
19991       { echo "$as_me:$LINENO: result: no" >&5
19992 echo "${ECHO_T}no" >&6; }
19993       with_imagedir=""
19994     fi
19995   ;;
19996   yes)
19997     with_imagedir=""
19998
19999     #### Could use some more defaults here...
20000     for dd in \
20001       "/usr/share/backgrounds/images/"          \
20002       "/usr/share/wallpapers/"                  \
20003       "/Library/Desktop Pictures/"              \
20004     ; do
20005       if test -z "$with_imagedir"; then
20006         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
20007 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
20008         if test -d "$dd" ; then
20009           { echo "$as_me:$LINENO: result: yes" >&5
20010 echo "${ECHO_T}yes" >&6; }
20011           with_imagedir="$dd"
20012         else
20013           { echo "$as_me:$LINENO: result: no" >&5
20014 echo "${ECHO_T}no" >&6; }
20015         fi
20016       fi
20017     done
20018
20019   ;;
20020   no)
20021     with_imagedir=""
20022   ;;
20023
20024   *)
20025     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20026     exit 1
20027   ;;
20028 esac
20029 ac_cv_imagedir="$with_imagedir"
20030
20031 DEFAULT_IMAGES_P='True'
20032 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20033
20034 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20035   DEFAULT_IMAGES_P='False'
20036 fi
20037
20038
20039 ###############################################################################
20040 #
20041 #       Pick a text file to use as the default of the "textFile" preference.
20042 #       Any old file will do, but preferably one that will make interesting
20043 #       shapes when displayed by "starwars" and "fontglide".
20044 #
20045 ###############################################################################
20046
20047 have_textfile=no
20048 with_textfile_req=unspecified
20049
20050
20051 # Check whether --with-text-file was given.
20052 if test "${with_text_file+set}" = set; then
20053   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20054 else
20055   with_textfile=yes
20056 fi
20057
20058 # no HANDLE_X_PATH_ARG for this one
20059
20060 case "$with_textfile" in
20061   /*)
20062     # absolute path
20063     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20064 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
20065     if test -f "$with_textfile" ; then
20066       { echo "$as_me:$LINENO: result: yes" >&5
20067 echo "${ECHO_T}yes" >&6; }
20068     else
20069       { echo "$as_me:$LINENO: result: no" >&5
20070 echo "${ECHO_T}no" >&6; }
20071       with_textfile=""
20072     fi
20073   ;;
20074   yes)
20075     with_textfile=""
20076
20077     #### Could use some more defaults here...
20078     for f in \
20079       "/usr/X11R6/lib/X11/doc/README"              \
20080       "/usr/share/doc/xserver-common/copyright"    \
20081       "/usr/share/doc/xserver-xorg-core/copyright" \
20082       "/usr/X11R6/README"                          \
20083       "/usr/share/doc/debian/debian-manifesto"     \
20084     ; do
20085       if test -z "$with_textfile"; then
20086         { echo "$as_me:$LINENO: checking for text file $f" >&5
20087 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
20088         if test -f "$f" ; then
20089           { echo "$as_me:$LINENO: result: yes" >&5
20090 echo "${ECHO_T}yes" >&6; }
20091           with_textfile="$f"
20092         else
20093           { echo "$as_me:$LINENO: result: no" >&5
20094 echo "${ECHO_T}no" >&6; }
20095         fi
20096       fi
20097     done
20098
20099   ;;
20100   no)
20101     with_textfile=""
20102   ;;
20103
20104   *)
20105     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20106     exit 1
20107   ;;
20108 esac
20109 ac_cv_textfile="$with_textfile"
20110
20111 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20112
20113
20114 ###############################################################################
20115 #
20116 #       Check the browser to see help URL
20117 #
20118 ###############################################################################
20119
20120 have_browser=no
20121 with_browser_req=unspecified
20122
20123
20124 # Check whether --with-browser was given.
20125 if test "${with_browser+set}" = set; then
20126   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20127 else
20128   with_browser=no
20129 fi
20130
20131 # no HANDLE_X_PATH_ARG for this one
20132
20133 case "$with_browser" in
20134   no )
20135   ;;
20136   * )
20137     WITH_BROWSER=$with_browser
20138     gnome_open_program=$with_browser
20139     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20140 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20141     with_browser_fullpath=`which $with_browser 2>/dev/null`
20142     case $with_browser_fullpath in
20143          /* )
20144                 { echo "$as_me:$LINENO: result: yes" >&5
20145 echo "${ECHO_T}yes" >&6; }
20146                  have_browser=yes
20147                  ;;
20148         * )
20149                { echo "$as_me:$LINENO: result: no" >&5
20150 echo "${ECHO_T}no" >&6; }
20151 # Only warning: we don't want to install all packages for the
20152 # dependency of the browser in building stage...
20153                echo "WARNING: browser not found: --with-browser=$with_browser"
20154                ;;
20155     esac
20156   ;;
20157 esac
20158 ac_cv_browser="$with_browser"
20159
20160 ###############################################################################
20161 #
20162 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20163 #       This should be safe, but let's give people the option.
20164 #
20165 ###############################################################################
20166
20167 setuid_hacks_default=no
20168 setuid_hacks="$setuid_hacks_default"
20169
20170 # Check whether --with-setuid-hacks was given.
20171 if test "${with_setuid_hacks+set}" = set; then
20172   withval=$with_setuid_hacks; setuid_hacks="$withval"
20173 else
20174   setuid_hacks="$setuid_hacks_default"
20175 fi
20176
20177
20178
20179    case "$setuid_hacks" in
20180     yes) ;;
20181     no)  ;;
20182
20183     /*)
20184      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20185 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20186      d=$setuid_hacks/include
20187      if test -d $d; then
20188        X_CFLAGS="-I$d $X_CFLAGS"
20189        { echo "$as_me:$LINENO: result: $d" >&5
20190 echo "${ECHO_T}$d" >&6; }
20191      else
20192        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20193 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20194      fi
20195
20196      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20197 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20198      d=$setuid_hacks/lib
20199      if test -d $d; then
20200        X_LIBS="-L$d $X_LIBS"
20201        { echo "$as_me:$LINENO: result: $d" >&5
20202 echo "${ECHO_T}$d" >&6; }
20203      else
20204        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20205 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20206      fi
20207
20208      # replace the directory string with "yes".
20209      setuid_hacks_req="yes"
20210      setuid_hacks=$setuid_hacks_req
20211      ;;
20212
20213     *)
20214      echo ""
20215      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20216      echo "       If it is a directory, then \`DIR/include' will be added to"
20217      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20218      exit 1
20219      ;;
20220    esac
20221
20222
20223 if test "$setuid_hacks" = yes; then
20224   true
20225 elif test "$setuid_hacks" != no; then
20226   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20227   exit 1
20228 fi
20229
20230
20231 ###############################################################################
20232 #
20233 #       Done testing.  Now, set up the various -I and -L variables,
20234 #       and decide which GUI program to build by default.
20235 #
20236 ###############################################################################
20237
20238 DEPEND=makedepend
20239 DEPEND_FLAGS=
20240 DEPEND_DEFINES=
20241
20242
20243 if test \! -z "$includedir" ; then
20244   INCLUDES="$INCLUDES -I$includedir"
20245 fi
20246
20247 if test \! -z "$libdir" ; then
20248   LDFLAGS="$LDFLAGS -L$libdir"
20249 fi
20250
20251
20252 PREFERRED_DEMO_PROGRAM=''
20253 ALL_DEMO_PROGRAMS=
20254 if test "$have_motif" = yes; then
20255   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20256   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20257 fi
20258 if test "$have_gtk" = yes; then
20259   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20260   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20261 fi
20262
20263
20264 if test "$have_kerberos" = yes; then
20265   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20266   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20267 fi
20268 if test "$have_pam" = yes; then
20269   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20270   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20271   INSTALL_PAM="install-pam"
20272 fi
20273 if test "$have_passwd_helper" = yes; then
20274   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20275   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20276 fi
20277   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20278   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20279
20280
20281 if test "$enable_locking" = yes; then
20282   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20283   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20284 else
20285   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20286   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20287 fi
20288
20289 if test "$ac_macosx" = yes; then
20290   EXES_OSX='$(EXES_OSX)'
20291   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20292   MEN_OSX='$(MEN_OSX)'
20293 else
20294   EXES_OSX=
20295   SCRIPTS_OSX=
20296   MEN_OSX=
20297 fi
20298
20299
20300 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20301
20302 if test "$need_setuid" = yes; then
20303   NEED_SETUID=yes
20304 else
20305   NEED_SETUID=no
20306 fi
20307
20308 if test "$setuid_hacks" = yes; then
20309   SETUID_HACKS=yes
20310 else
20311   SETUID_HACKS=no
20312 fi
20313
20314 tab='   '
20315 if test "$have_gl" = yes; then
20316   GL_EXES='$(GL_EXES)'
20317   SUID_EXES='$(SUID_EXES)'
20318   RETIRED_GL_EXES='$(RETIRED_EXES)'
20319   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20320   GL_MEN='$(GL_MEN)'
20321   GL_KLUDGE=" "
20322 else
20323   GL_KLUDGE="-"
20324 fi
20325
20326 if test "$have_gle" = yes; then
20327   GLE_EXES='$(GLE_EXES)'
20328   GLE_KLUDGE=" "
20329 else
20330   GLE_KLUDGE="-"
20331 fi
20332
20333 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20334  JPEG_EXES='$(JPEG_EXES)'
20335 fi
20336
20337
20338 # Another substitution in the XScreenSaver.ad.in file:
20339 #
20340 if test "$gnome_open_program" != ''; then
20341   GNOME24=''
20342   GNOME22='!    '
20343   NOGNOME='!    '
20344 elif test "$gnome_url_show_program" != ''; then
20345   GNOME24='!    '
20346   GNOME22=''
20347   NOGNOME='!    '
20348 else
20349   GNOME24='!    '
20350   GNOME22='!    '
20351   NOGNOME=''
20352 fi
20353
20354
20355 # Set PO_DATADIR to something sensible.
20356 #
20357 { echo "$as_me:$LINENO: checking for locale directory" >&5
20358 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20359 if test -n "$GTK_DATADIR" ; then
20360   PO_DATADIR="$GTK_DATADIR"
20361 elif test "$have_gtk" = yes; then
20362   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20363   PO_DATADIR="$PO_DATADIR/share"
20364 fi
20365
20366 if test -z "$PO_DATADIR" ; then
20367   #
20368   # #### Total fucking kludge --
20369   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20370   # but of course we need to expand all the nested variables to do that...
20371   #
20372   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20373   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20374 fi
20375
20376 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20377 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20378
20379
20380 # canonicalize slashes.
20381 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20382
20383 # gcc 3.0 likes to issue this warning for every file:
20384 #
20385 # cc1: warning: changing search order for system directory "/usr/local/include"
20386 # cc1: warning:   as it has already been specified as a non-system directory
20387 #
20388 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20389 # Which *should* be totally redundant, and thus an ok thing to delete?
20390 #
20391 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20392
20393
20394 ###############################################################################
20395 #
20396 #       Perform substitutions and write Makefiles.
20397 #
20398 ###############################################################################
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463 APPDEFAULTS=$ac_x_app_defaults
20464
20465
20466
20467
20468
20469
20470
20471 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20472
20473 cat >confcache <<\_ACEOF
20474 # This file is a shell script that caches the results of configure
20475 # tests run on this system so they can be shared between configure
20476 # scripts and configure runs, see configure's option --config-cache.
20477 # It is not useful on other systems.  If it contains results you don't
20478 # want to keep, you may remove or edit it.
20479 #
20480 # config.status only pays attention to the cache file if you give it
20481 # the --recheck option to rerun configure.
20482 #
20483 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20484 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20485 # following values.
20486
20487 _ACEOF
20488
20489 # The following way of writing the cache mishandles newlines in values,
20490 # but we know of no workaround that is simple, portable, and efficient.
20491 # So, we kill variables containing newlines.
20492 # Ultrix sh set writes to stderr and can't be redirected directly,
20493 # and sets the high bit in the cache file unless we assign to the vars.
20494 (
20495   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20496     eval ac_val=\$$ac_var
20497     case $ac_val in #(
20498     *${as_nl}*)
20499       case $ac_var in #(
20500       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20501 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20502       esac
20503       case $ac_var in #(
20504       _ | IFS | as_nl) ;; #(
20505       *) $as_unset $ac_var ;;
20506       esac ;;
20507     esac
20508   done
20509
20510   (set) 2>&1 |
20511     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20512     *${as_nl}ac_space=\ *)
20513       # `set' does not quote correctly, so add quotes (double-quote
20514       # substitution turns \\\\ into \\, and sed turns \\ into \).
20515       sed -n \
20516         "s/'/'\\\\''/g;
20517           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20518       ;; #(
20519     *)
20520       # `set' quotes correctly as required by POSIX, so do not add quotes.
20521       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20522       ;;
20523     esac |
20524     sort
20525 ) |
20526   sed '
20527      /^ac_cv_env_/b end
20528      t clear
20529      :clear
20530      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20531      t end
20532      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20533      :end' >>confcache
20534 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20535   if test -w "$cache_file"; then
20536     test "x$cache_file" != "x/dev/null" &&
20537       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20538 echo "$as_me: updating cache $cache_file" >&6;}
20539     cat confcache >$cache_file
20540   else
20541     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20542 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20543   fi
20544 fi
20545 rm -f confcache
20546
20547 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20548 # Let make expand exec_prefix.
20549 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20550
20551 DEFS=-DHAVE_CONFIG_H
20552
20553 ac_libobjs=
20554 ac_ltlibobjs=
20555 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20556   # 1. Remove the extension, and $U if already installed.
20557   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20558   ac_i=`echo "$ac_i" | sed "$ac_script"`
20559   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20560   #    will be set to the directory where LIBOBJS objects are built.
20561   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20562   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20563 done
20564 LIBOBJS=$ac_libobjs
20565
20566 LTLIBOBJS=$ac_ltlibobjs
20567
20568
20569
20570
20571         mv -f po/POTFILES po/POTFILES.tmp
20572         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20573         rm -f po/POTFILES.tmp
20574
20575
20576
20577 : ${CONFIG_STATUS=./config.status}
20578 ac_clean_files_save=$ac_clean_files
20579 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20580 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20581 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20582 cat >$CONFIG_STATUS <<_ACEOF
20583 #! $SHELL
20584 # Generated by $as_me.
20585 # Run this file to recreate the current configuration.
20586 # Compiler output produced by configure, useful for debugging
20587 # configure, is in config.log if it exists.
20588
20589 debug=false
20590 ac_cs_recheck=false
20591 ac_cs_silent=false
20592 SHELL=\${CONFIG_SHELL-$SHELL}
20593 _ACEOF
20594
20595 cat >>$CONFIG_STATUS <<\_ACEOF
20596 ## --------------------- ##
20597 ## M4sh Initialization.  ##
20598 ## --------------------- ##
20599
20600 # Be more Bourne compatible
20601 DUALCASE=1; export DUALCASE # for MKS sh
20602 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20603   emulate sh
20604   NULLCMD=:
20605   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20606   # is contrary to our usage.  Disable this feature.
20607   alias -g '${1+"$@"}'='"$@"'
20608   setopt NO_GLOB_SUBST
20609 else
20610   case `(set -o) 2>/dev/null` in
20611   *posix*) set -o posix ;;
20612 esac
20613
20614 fi
20615
20616
20617
20618
20619 # PATH needs CR
20620 # Avoid depending upon Character Ranges.
20621 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20622 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20623 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20624 as_cr_digits='0123456789'
20625 as_cr_alnum=$as_cr_Letters$as_cr_digits
20626
20627 # The user is always right.
20628 if test "${PATH_SEPARATOR+set}" != set; then
20629   echo "#! /bin/sh" >conf$$.sh
20630   echo  "exit 0"   >>conf$$.sh
20631   chmod +x conf$$.sh
20632   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20633     PATH_SEPARATOR=';'
20634   else
20635     PATH_SEPARATOR=:
20636   fi
20637   rm -f conf$$.sh
20638 fi
20639
20640 # Support unset when possible.
20641 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20642   as_unset=unset
20643 else
20644   as_unset=false
20645 fi
20646
20647
20648 # IFS
20649 # We need space, tab and new line, in precisely that order.  Quoting is
20650 # there to prevent editors from complaining about space-tab.
20651 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20652 # splitting by setting IFS to empty value.)
20653 as_nl='
20654 '
20655 IFS=" ""        $as_nl"
20656
20657 # Find who we are.  Look in the path if we contain no directory separator.
20658 case $0 in
20659   *[\\/]* ) as_myself=$0 ;;
20660   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20661 for as_dir in $PATH
20662 do
20663   IFS=$as_save_IFS
20664   test -z "$as_dir" && as_dir=.
20665   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20666 done
20667 IFS=$as_save_IFS
20668
20669      ;;
20670 esac
20671 # We did not find ourselves, most probably we were run as `sh COMMAND'
20672 # in which case we are not to be found in the path.
20673 if test "x$as_myself" = x; then
20674   as_myself=$0
20675 fi
20676 if test ! -f "$as_myself"; then
20677   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20678   { (exit 1); exit 1; }
20679 fi
20680
20681 # Work around bugs in pre-3.0 UWIN ksh.
20682 for as_var in ENV MAIL MAILPATH
20683 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20684 done
20685 PS1='$ '
20686 PS2='> '
20687 PS4='+ '
20688
20689 # NLS nuisances.
20690 for as_var in \
20691   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20692   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20693   LC_TELEPHONE LC_TIME
20694 do
20695   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20696     eval $as_var=C; export $as_var
20697   else
20698     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20699   fi
20700 done
20701
20702 # Required to use basename.
20703 if expr a : '\(a\)' >/dev/null 2>&1 &&
20704    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20705   as_expr=expr
20706 else
20707   as_expr=false
20708 fi
20709
20710 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20711   as_basename=basename
20712 else
20713   as_basename=false
20714 fi
20715
20716
20717 # Name of the executable.
20718 as_me=`$as_basename -- "$0" ||
20719 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20720          X"$0" : 'X\(//\)$' \| \
20721          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20722 echo X/"$0" |
20723     sed '/^.*\/\([^/][^/]*\)\/*$/{
20724             s//\1/
20725             q
20726           }
20727           /^X\/\(\/\/\)$/{
20728             s//\1/
20729             q
20730           }
20731           /^X\/\(\/\).*/{
20732             s//\1/
20733             q
20734           }
20735           s/.*/./; q'`
20736
20737 # CDPATH.
20738 $as_unset CDPATH
20739
20740
20741
20742   as_lineno_1=$LINENO
20743   as_lineno_2=$LINENO
20744   test "x$as_lineno_1" != "x$as_lineno_2" &&
20745   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20746
20747   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20748   # uniformly replaced by the line number.  The first 'sed' inserts a
20749   # line-number line after each line using $LINENO; the second 'sed'
20750   # does the real work.  The second script uses 'N' to pair each
20751   # line-number line with the line containing $LINENO, and appends
20752   # trailing '-' during substitution so that $LINENO is not a special
20753   # case at line end.
20754   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20755   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20756   # E. McMahon (1931-1989) for sed's syntax.  :-)
20757   sed -n '
20758     p
20759     /[$]LINENO/=
20760   ' <$as_myself |
20761     sed '
20762       s/[$]LINENO.*/&-/
20763       t lineno
20764       b
20765       :lineno
20766       N
20767       :loop
20768       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20769       t loop
20770       s/-\n.*//
20771     ' >$as_me.lineno &&
20772   chmod +x "$as_me.lineno" ||
20773     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20774    { (exit 1); exit 1; }; }
20775
20776   # Don't try to exec as it changes $[0], causing all sort of problems
20777   # (the dirname of $[0] is not the place where we might find the
20778   # original and so on.  Autoconf is especially sensitive to this).
20779   . "./$as_me.lineno"
20780   # Exit status is that of the last command.
20781   exit
20782 }
20783
20784
20785 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20786   as_dirname=dirname
20787 else
20788   as_dirname=false
20789 fi
20790
20791 ECHO_C= ECHO_N= ECHO_T=
20792 case `echo -n x` in
20793 -n*)
20794   case `echo 'x\c'` in
20795   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20796   *)   ECHO_C='\c';;
20797   esac;;
20798 *)
20799   ECHO_N='-n';;
20800 esac
20801
20802 if expr a : '\(a\)' >/dev/null 2>&1 &&
20803    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20804   as_expr=expr
20805 else
20806   as_expr=false
20807 fi
20808
20809 rm -f conf$$ conf$$.exe conf$$.file
20810 if test -d conf$$.dir; then
20811   rm -f conf$$.dir/conf$$.file
20812 else
20813   rm -f conf$$.dir
20814   mkdir conf$$.dir
20815 fi
20816 echo >conf$$.file
20817 if ln -s conf$$.file conf$$ 2>/dev/null; then
20818   as_ln_s='ln -s'
20819   # ... but there are two gotchas:
20820   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20821   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20822   # In both cases, we have to default to `cp -p'.
20823   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20824     as_ln_s='cp -p'
20825 elif ln conf$$.file conf$$ 2>/dev/null; then
20826   as_ln_s=ln
20827 else
20828   as_ln_s='cp -p'
20829 fi
20830 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20831 rmdir conf$$.dir 2>/dev/null
20832
20833 if mkdir -p . 2>/dev/null; then
20834   as_mkdir_p=:
20835 else
20836   test -d ./-p && rmdir ./-p
20837   as_mkdir_p=false
20838 fi
20839
20840 if test -x / >/dev/null 2>&1; then
20841   as_test_x='test -x'
20842 else
20843   if ls -dL / >/dev/null 2>&1; then
20844     as_ls_L_option=L
20845   else
20846     as_ls_L_option=
20847   fi
20848   as_test_x='
20849     eval sh -c '\''
20850       if test -d "$1"; then
20851         test -d "$1/.";
20852       else
20853         case $1 in
20854         -*)set "./$1";;
20855         esac;
20856         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20857         ???[sx]*):;;*)false;;esac;fi
20858     '\'' sh
20859   '
20860 fi
20861 as_executable_p=$as_test_x
20862
20863 # Sed expression to map a string onto a valid CPP name.
20864 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20865
20866 # Sed expression to map a string onto a valid variable name.
20867 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20868
20869
20870 exec 6>&1
20871
20872 # Save the log message, to keep $[0] and so on meaningful, and to
20873 # report actual input values of CONFIG_FILES etc. instead of their
20874 # values after options handling.
20875 ac_log="
20876 This file was extended by $as_me, which was
20877 generated by GNU Autoconf 2.61.  Invocation command line was
20878
20879   CONFIG_FILES    = $CONFIG_FILES
20880   CONFIG_HEADERS  = $CONFIG_HEADERS
20881   CONFIG_LINKS    = $CONFIG_LINKS
20882   CONFIG_COMMANDS = $CONFIG_COMMANDS
20883   $ $0 $@
20884
20885 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20886 "
20887
20888 _ACEOF
20889
20890 cat >>$CONFIG_STATUS <<_ACEOF
20891 # Files that config.status was made for.
20892 config_files="$ac_config_files"
20893 config_headers="$ac_config_headers"
20894 config_commands="$ac_config_commands"
20895
20896 _ACEOF
20897
20898 cat >>$CONFIG_STATUS <<\_ACEOF
20899 ac_cs_usage="\
20900 \`$as_me' instantiates files from templates according to the
20901 current configuration.
20902
20903 Usage: $0 [OPTIONS] [FILE]...
20904
20905   -h, --help       print this help, then exit
20906   -V, --version    print version number and configuration settings, then exit
20907   -q, --quiet      do not print progress messages
20908   -d, --debug      don't remove temporary files
20909       --recheck    update $as_me by reconfiguring in the same conditions
20910   --file=FILE[:TEMPLATE]
20911                    instantiate the configuration file FILE
20912   --header=FILE[:TEMPLATE]
20913                    instantiate the configuration header FILE
20914
20915 Configuration files:
20916 $config_files
20917
20918 Configuration headers:
20919 $config_headers
20920
20921 Configuration commands:
20922 $config_commands
20923
20924 Report bugs to <bug-autoconf@gnu.org>."
20925
20926 _ACEOF
20927 cat >>$CONFIG_STATUS <<_ACEOF
20928 ac_cs_version="\\
20929 config.status
20930 configured by $0, generated by GNU Autoconf 2.61,
20931   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20932
20933 Copyright (C) 2006 Free Software Foundation, Inc.
20934 This config.status script is free software; the Free Software Foundation
20935 gives unlimited permission to copy, distribute and modify it."
20936
20937 ac_pwd='$ac_pwd'
20938 srcdir='$srcdir'
20939 INSTALL='$INSTALL'
20940 _ACEOF
20941
20942 cat >>$CONFIG_STATUS <<\_ACEOF
20943 # If no file are specified by the user, then we need to provide default
20944 # value.  By we need to know if files were specified by the user.
20945 ac_need_defaults=:
20946 while test $# != 0
20947 do
20948   case $1 in
20949   --*=*)
20950     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20951     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20952     ac_shift=:
20953     ;;
20954   *)
20955     ac_option=$1
20956     ac_optarg=$2
20957     ac_shift=shift
20958     ;;
20959   esac
20960
20961   case $ac_option in
20962   # Handling of the options.
20963   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20964     ac_cs_recheck=: ;;
20965   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20966     echo "$ac_cs_version"; exit ;;
20967   --debug | --debu | --deb | --de | --d | -d )
20968     debug=: ;;
20969   --file | --fil | --fi | --f )
20970     $ac_shift
20971     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20972     ac_need_defaults=false;;
20973   --header | --heade | --head | --hea )
20974     $ac_shift
20975     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20976     ac_need_defaults=false;;
20977   --he | --h)
20978     # Conflict between --help and --header
20979     { echo "$as_me: error: ambiguous option: $1
20980 Try \`$0 --help' for more information." >&2
20981    { (exit 1); exit 1; }; };;
20982   --help | --hel | -h )
20983     echo "$ac_cs_usage"; exit ;;
20984   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20985   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20986     ac_cs_silent=: ;;
20987
20988   # This is an error.
20989   -*) { echo "$as_me: error: unrecognized option: $1
20990 Try \`$0 --help' for more information." >&2
20991    { (exit 1); exit 1; }; } ;;
20992
20993   *) ac_config_targets="$ac_config_targets $1"
20994      ac_need_defaults=false ;;
20995
20996   esac
20997   shift
20998 done
20999
21000 ac_configure_extra_args=
21001
21002 if $ac_cs_silent; then
21003   exec 6>/dev/null
21004   ac_configure_extra_args="$ac_configure_extra_args --silent"
21005 fi
21006
21007 _ACEOF
21008 cat >>$CONFIG_STATUS <<_ACEOF
21009 if \$ac_cs_recheck; then
21010   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21011   CONFIG_SHELL=$SHELL
21012   export CONFIG_SHELL
21013   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21014 fi
21015
21016 _ACEOF
21017 cat >>$CONFIG_STATUS <<\_ACEOF
21018 exec 5>>config.log
21019 {
21020   echo
21021   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21022 ## Running $as_me. ##
21023 _ASBOX
21024   echo "$ac_log"
21025 } >&5
21026
21027 _ACEOF
21028 cat >>$CONFIG_STATUS <<_ACEOF
21029 #
21030 # INIT-COMMANDS
21031 #
21032 INTLTOOL_PERL=${INTLTOOL_PERL}
21033
21034
21035 _ACEOF
21036
21037 cat >>$CONFIG_STATUS <<\_ACEOF
21038
21039 # Handling of arguments.
21040 for ac_config_target in $ac_config_targets
21041 do
21042   case $ac_config_target in
21043     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21044     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21045     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21046     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21047     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21048     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21049     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21050     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21051     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21052     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21053
21054   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21055 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21056    { (exit 1); exit 1; }; };;
21057   esac
21058 done
21059
21060
21061 # If the user did not use the arguments to specify the items to instantiate,
21062 # then the envvar interface is used.  Set only those that are not.
21063 # We use the long form for the default assignment because of an extremely
21064 # bizarre bug on SunOS 4.1.3.
21065 if $ac_need_defaults; then
21066   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21067   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21068   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21069 fi
21070
21071 # Have a temporary directory for convenience.  Make it in the build tree
21072 # simply because there is no reason against having it here, and in addition,
21073 # creating and moving files from /tmp can sometimes cause problems.
21074 # Hook for its removal unless debugging.
21075 # Note that there is a small window in which the directory will not be cleaned:
21076 # after its creation but before its name has been assigned to `$tmp'.
21077 $debug ||
21078 {
21079   tmp=
21080   trap 'exit_status=$?
21081   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21082 ' 0
21083   trap '{ (exit 1); exit 1; }' 1 2 13 15
21084 }
21085 # Create a (secure) tmp directory for tmp files.
21086
21087 {
21088   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21089   test -n "$tmp" && test -d "$tmp"
21090 }  ||
21091 {
21092   tmp=./conf$$-$RANDOM
21093   (umask 077 && mkdir "$tmp")
21094 } ||
21095 {
21096    echo "$me: cannot create a temporary directory in ." >&2
21097    { (exit 1); exit 1; }
21098 }
21099
21100 #
21101 # Set up the sed scripts for CONFIG_FILES section.
21102 #
21103
21104 # No need to generate the scripts if there are no CONFIG_FILES.
21105 # This happens for instance when ./config.status config.h
21106 if test -n "$CONFIG_FILES"; then
21107
21108 _ACEOF
21109
21110
21111
21112 ac_delim='%!_!# '
21113 for ac_last_try in false false false false false :; do
21114   cat >conf$$subs.sed <<_ACEOF
21115 SHELL!$SHELL$ac_delim
21116 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21117 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21118 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21119 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21120 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21121 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21122 exec_prefix!$exec_prefix$ac_delim
21123 prefix!$prefix$ac_delim
21124 program_transform_name!$program_transform_name$ac_delim
21125 bindir!$bindir$ac_delim
21126 sbindir!$sbindir$ac_delim
21127 libexecdir!$libexecdir$ac_delim
21128 datarootdir!$datarootdir$ac_delim
21129 datadir!$datadir$ac_delim
21130 sysconfdir!$sysconfdir$ac_delim
21131 sharedstatedir!$sharedstatedir$ac_delim
21132 localstatedir!$localstatedir$ac_delim
21133 includedir!$includedir$ac_delim
21134 oldincludedir!$oldincludedir$ac_delim
21135 docdir!$docdir$ac_delim
21136 infodir!$infodir$ac_delim
21137 htmldir!$htmldir$ac_delim
21138 dvidir!$dvidir$ac_delim
21139 pdfdir!$pdfdir$ac_delim
21140 psdir!$psdir$ac_delim
21141 libdir!$libdir$ac_delim
21142 localedir!$localedir$ac_delim
21143 mandir!$mandir$ac_delim
21144 DEFS!$DEFS$ac_delim
21145 ECHO_C!$ECHO_C$ac_delim
21146 ECHO_N!$ECHO_N$ac_delim
21147 ECHO_T!$ECHO_T$ac_delim
21148 LIBS!$LIBS$ac_delim
21149 build_alias!$build_alias$ac_delim
21150 host_alias!$host_alias$ac_delim
21151 target_alias!$target_alias$ac_delim
21152 build!$build$ac_delim
21153 build_cpu!$build_cpu$ac_delim
21154 build_vendor!$build_vendor$ac_delim
21155 build_os!$build_os$ac_delim
21156 host!$host$ac_delim
21157 host_cpu!$host_cpu$ac_delim
21158 host_vendor!$host_vendor$ac_delim
21159 host_os!$host_os$ac_delim
21160 CC!$CC$ac_delim
21161 CFLAGS!$CFLAGS$ac_delim
21162 LDFLAGS!$LDFLAGS$ac_delim
21163 CPPFLAGS!$CPPFLAGS$ac_delim
21164 ac_ct_CC!$ac_ct_CC$ac_delim
21165 EXEEXT!$EXEEXT$ac_delim
21166 OBJEXT!$OBJEXT$ac_delim
21167 CPP!$CPP$ac_delim
21168 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21169 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21170 INSTALL_DATA!$INSTALL_DATA$ac_delim
21171 SET_MAKE!$SET_MAKE$ac_delim
21172 GREP!$GREP$ac_delim
21173 EGREP!$EGREP$ac_delim
21174 PERL!$PERL$ac_delim
21175 XMKMF!$XMKMF$ac_delim
21176 X_CFLAGS!$X_CFLAGS$ac_delim
21177 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21178 X_LIBS!$X_LIBS$ac_delim
21179 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21180 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21181 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21182 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21183 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21184 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21185 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21186 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21187 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21188 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21189 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21190 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21191 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21192 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21193 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21194 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21195 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21196 RANLIB!$RANLIB$ac_delim
21197 ALLOCA!$ALLOCA$ac_delim
21198 USE_NLS!$USE_NLS$ac_delim
21199 MSGFMT!$MSGFMT$ac_delim
21200 GMSGFMT!$GMSGFMT$ac_delim
21201 XGETTEXT!$XGETTEXT$ac_delim
21202 CATALOGS!$CATALOGS$ac_delim
21203 CATOBJEXT!$CATOBJEXT$ac_delim
21204 DATADIRNAME!$DATADIRNAME$ac_delim
21205 GMOFILES!$GMOFILES$ac_delim
21206 INSTOBJEXT!$INSTOBJEXT$ac_delim
21207 INTLDEPS!$INTLDEPS$ac_delim
21208 INTLLIBS!$INTLLIBS$ac_delim
21209 INTLOBJS!$INTLOBJS$ac_delim
21210 POFILES!$POFILES$ac_delim
21211 POSUB!$POSUB$ac_delim
21212 _ACEOF
21213
21214   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21215     break
21216   elif $ac_last_try; then
21217     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21218 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21219    { (exit 1); exit 1; }; }
21220   else
21221     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21222   fi
21223 done
21224
21225 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21226 if test -n "$ac_eof"; then
21227   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21228   ac_eof=`expr $ac_eof + 1`
21229 fi
21230
21231 cat >>$CONFIG_STATUS <<_ACEOF
21232 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21233 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21234 _ACEOF
21235 sed '
21236 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21237 s/^/s,@/; s/!/@,|#_!!_#|/
21238 :n
21239 t n
21240 s/'"$ac_delim"'$/,g/; t
21241 s/$/\\/; p
21242 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21243 ' >>$CONFIG_STATUS <conf$$subs.sed
21244 rm -f conf$$subs.sed
21245 cat >>$CONFIG_STATUS <<_ACEOF
21246 CEOF$ac_eof
21247 _ACEOF
21248
21249
21250 ac_delim='%!_!# '
21251 for ac_last_try in false false false false false :; do
21252   cat >conf$$subs.sed <<_ACEOF
21253 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21254 login_manager_tmp!$login_manager_tmp$ac_delim
21255 pkg_config!$pkg_config$ac_delim
21256 gnome_open_program!$gnome_open_program$ac_delim
21257 gnome_url_show_program!$gnome_url_show_program$ac_delim
21258 INCLUDES!$INCLUDES$ac_delim
21259 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21260 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21261 SAVER_LIBS!$SAVER_LIBS$ac_delim
21262 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21263 GTK_LIBS!$GTK_LIBS$ac_delim
21264 XML_LIBS!$XML_LIBS$ac_delim
21265 JPEG_LIBS!$JPEG_LIBS$ac_delim
21266 HACK_LIBS!$HACK_LIBS$ac_delim
21267 XPM_LIBS!$XPM_LIBS$ac_delim
21268 PTY_LIBS!$PTY_LIBS$ac_delim
21269 GL_LIBS!$GL_LIBS$ac_delim
21270 GLE_LIBS!$GLE_LIBS$ac_delim
21271 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21272 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21273 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21274 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21275 SETUID_HACKS!$SETUID_HACKS$ac_delim
21276 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21277 NEED_SETUID!$NEED_SETUID$ac_delim
21278 INSTALL_PAM!$INSTALL_PAM$ac_delim
21279 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21280 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21281 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21282 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21283 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21284 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21285 WITH_BROWSER!$WITH_BROWSER$ac_delim
21286 OBJCC!$OBJCC$ac_delim
21287 EXES_OSX!$EXES_OSX$ac_delim
21288 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21289 MEN_OSX!$MEN_OSX$ac_delim
21290 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21291 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21292 XMU_SRCS!$XMU_SRCS$ac_delim
21293 XMU_OBJS!$XMU_OBJS$ac_delim
21294 XMU_LIBS!$XMU_LIBS$ac_delim
21295 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21296 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21297 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21298 LOCK_SRCS!$LOCK_SRCS$ac_delim
21299 LOCK_OBJS!$LOCK_OBJS$ac_delim
21300 JPEG_EXES!$JPEG_EXES$ac_delim
21301 GL_EXES!$GL_EXES$ac_delim
21302 SUID_EXES!$SUID_EXES$ac_delim
21303 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21304 GL_MEN!$GL_MEN$ac_delim
21305 GL_KLUDGE!$GL_KLUDGE$ac_delim
21306 GLE_EXES!$GLE_EXES$ac_delim
21307 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21308 GNOME24!$GNOME24$ac_delim
21309 GNOME22!$GNOME22$ac_delim
21310 NOGNOME!$NOGNOME$ac_delim
21311 HACKDIR!$HACKDIR$ac_delim
21312 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21313 GTK_DATADIR!$GTK_DATADIR$ac_delim
21314 PO_DATADIR!$PO_DATADIR$ac_delim
21315 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21316 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21317 APPDEFAULTS!$APPDEFAULTS$ac_delim
21318 DEPEND!$DEPEND$ac_delim
21319 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21320 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21321 LIBOBJS!$LIBOBJS$ac_delim
21322 LTLIBOBJS!$LTLIBOBJS$ac_delim
21323 _ACEOF
21324
21325   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
21326     break
21327   elif $ac_last_try; then
21328     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21329 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21330    { (exit 1); exit 1; }; }
21331   else
21332     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21333   fi
21334 done
21335
21336 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21337 if test -n "$ac_eof"; then
21338   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21339   ac_eof=`expr $ac_eof + 1`
21340 fi
21341
21342 cat >>$CONFIG_STATUS <<_ACEOF
21343 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21344 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21345 _ACEOF
21346 sed '
21347 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21348 s/^/s,@/; s/!/@,|#_!!_#|/
21349 :n
21350 t n
21351 s/'"$ac_delim"'$/,g/; t
21352 s/$/\\/; p
21353 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21354 ' >>$CONFIG_STATUS <conf$$subs.sed
21355 rm -f conf$$subs.sed
21356 cat >>$CONFIG_STATUS <<_ACEOF
21357 :end
21358 s/|#_!!_#|//g
21359 CEOF$ac_eof
21360 _ACEOF
21361
21362
21363 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21364 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21365 # trailing colons and then remove the whole line if VPATH becomes empty
21366 # (actually we leave an empty line to preserve line numbers).
21367 if test "x$srcdir" = x.; then
21368   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21369 s/:*\$(srcdir):*/:/
21370 s/:*\${srcdir}:*/:/
21371 s/:*@srcdir@:*/:/
21372 s/^\([^=]*=[     ]*\):*/\1/
21373 s/:*$//
21374 s/^[^=]*=[       ]*$//
21375 }'
21376 fi
21377
21378 cat >>$CONFIG_STATUS <<\_ACEOF
21379 fi # test -n "$CONFIG_FILES"
21380
21381
21382 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21383 do
21384   case $ac_tag in
21385   :[FHLC]) ac_mode=$ac_tag; continue;;
21386   esac
21387   case $ac_mode$ac_tag in
21388   :[FHL]*:*);;
21389   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21390 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21391    { (exit 1); exit 1; }; };;
21392   :[FH]-) ac_tag=-:-;;
21393   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21394   esac
21395   ac_save_IFS=$IFS
21396   IFS=:
21397   set x $ac_tag
21398   IFS=$ac_save_IFS
21399   shift
21400   ac_file=$1
21401   shift
21402
21403   case $ac_mode in
21404   :L) ac_source=$1;;
21405   :[FH])
21406     ac_file_inputs=
21407     for ac_f
21408     do
21409       case $ac_f in
21410       -) ac_f="$tmp/stdin";;
21411       *) # Look for the file first in the build tree, then in the source tree
21412          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21413          # because $ac_f cannot contain `:'.
21414          test -f "$ac_f" ||
21415            case $ac_f in
21416            [\\/$]*) false;;
21417            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21418            esac ||
21419            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21420 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21421    { (exit 1); exit 1; }; };;
21422       esac
21423       ac_file_inputs="$ac_file_inputs $ac_f"
21424     done
21425
21426     # Let's still pretend it is `configure' which instantiates (i.e., don't
21427     # use $as_me), people would be surprised to read:
21428     #    /* config.h.  Generated by config.status.  */
21429     configure_input="Generated from "`IFS=:
21430           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21431     if test x"$ac_file" != x-; then
21432       configure_input="$ac_file.  $configure_input"
21433       { echo "$as_me:$LINENO: creating $ac_file" >&5
21434 echo "$as_me: creating $ac_file" >&6;}
21435     fi
21436
21437     case $ac_tag in
21438     *:-:* | *:-) cat >"$tmp/stdin";;
21439     esac
21440     ;;
21441   esac
21442
21443   ac_dir=`$as_dirname -- "$ac_file" ||
21444 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21445          X"$ac_file" : 'X\(//\)[^/]' \| \
21446          X"$ac_file" : 'X\(//\)$' \| \
21447          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21448 echo X"$ac_file" |
21449     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21450             s//\1/
21451             q
21452           }
21453           /^X\(\/\/\)[^/].*/{
21454             s//\1/
21455             q
21456           }
21457           /^X\(\/\/\)$/{
21458             s//\1/
21459             q
21460           }
21461           /^X\(\/\).*/{
21462             s//\1/
21463             q
21464           }
21465           s/.*/./; q'`
21466   { as_dir="$ac_dir"
21467   case $as_dir in #(
21468   -*) as_dir=./$as_dir;;
21469   esac
21470   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21471     as_dirs=
21472     while :; do
21473       case $as_dir in #(
21474       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21475       *) as_qdir=$as_dir;;
21476       esac
21477       as_dirs="'$as_qdir' $as_dirs"
21478       as_dir=`$as_dirname -- "$as_dir" ||
21479 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21480          X"$as_dir" : 'X\(//\)[^/]' \| \
21481          X"$as_dir" : 'X\(//\)$' \| \
21482          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21483 echo X"$as_dir" |
21484     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21485             s//\1/
21486             q
21487           }
21488           /^X\(\/\/\)[^/].*/{
21489             s//\1/
21490             q
21491           }
21492           /^X\(\/\/\)$/{
21493             s//\1/
21494             q
21495           }
21496           /^X\(\/\).*/{
21497             s//\1/
21498             q
21499           }
21500           s/.*/./; q'`
21501       test -d "$as_dir" && break
21502     done
21503     test -z "$as_dirs" || eval "mkdir $as_dirs"
21504   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21505 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21506    { (exit 1); exit 1; }; }; }
21507   ac_builddir=.
21508
21509 case "$ac_dir" in
21510 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21511 *)
21512   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21513   # A ".." for each directory in $ac_dir_suffix.
21514   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21515   case $ac_top_builddir_sub in
21516   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21517   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21518   esac ;;
21519 esac
21520 ac_abs_top_builddir=$ac_pwd
21521 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21522 # for backward compatibility:
21523 ac_top_builddir=$ac_top_build_prefix
21524
21525 case $srcdir in
21526   .)  # We are building in place.
21527     ac_srcdir=.
21528     ac_top_srcdir=$ac_top_builddir_sub
21529     ac_abs_top_srcdir=$ac_pwd ;;
21530   [\\/]* | ?:[\\/]* )  # Absolute name.
21531     ac_srcdir=$srcdir$ac_dir_suffix;
21532     ac_top_srcdir=$srcdir
21533     ac_abs_top_srcdir=$srcdir ;;
21534   *) # Relative name.
21535     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21536     ac_top_srcdir=$ac_top_build_prefix$srcdir
21537     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21538 esac
21539 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21540
21541
21542   case $ac_mode in
21543   :F)
21544   #
21545   # CONFIG_FILE
21546   #
21547
21548   case $INSTALL in
21549   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21550   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21551   esac
21552 _ACEOF
21553
21554 cat >>$CONFIG_STATUS <<\_ACEOF
21555 # If the template does not know about datarootdir, expand it.
21556 # FIXME: This hack should be removed a few years after 2.60.
21557 ac_datarootdir_hack=; ac_datarootdir_seen=
21558
21559 case `sed -n '/datarootdir/ {
21560   p
21561   q
21562 }
21563 /@datadir@/p
21564 /@docdir@/p
21565 /@infodir@/p
21566 /@localedir@/p
21567 /@mandir@/p
21568 ' $ac_file_inputs` in
21569 *datarootdir*) ac_datarootdir_seen=yes;;
21570 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21571   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21572 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21573 _ACEOF
21574 cat >>$CONFIG_STATUS <<_ACEOF
21575   ac_datarootdir_hack='
21576   s&@datadir@&$datadir&g
21577   s&@docdir@&$docdir&g
21578   s&@infodir@&$infodir&g
21579   s&@localedir@&$localedir&g
21580   s&@mandir@&$mandir&g
21581     s&\\\${datarootdir}&$datarootdir&g' ;;
21582 esac
21583 _ACEOF
21584
21585 # Neutralize VPATH when `$srcdir' = `.'.
21586 # Shell code in configure.ac might set extrasub.
21587 # FIXME: do we really want to maintain this feature?
21588 cat >>$CONFIG_STATUS <<_ACEOF
21589   sed "$ac_vpsub
21590 $extrasub
21591 _ACEOF
21592 cat >>$CONFIG_STATUS <<\_ACEOF
21593 :t
21594 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21595 s&@configure_input@&$configure_input&;t t
21596 s&@top_builddir@&$ac_top_builddir_sub&;t t
21597 s&@srcdir@&$ac_srcdir&;t t
21598 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21599 s&@top_srcdir@&$ac_top_srcdir&;t t
21600 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21601 s&@builddir@&$ac_builddir&;t t
21602 s&@abs_builddir@&$ac_abs_builddir&;t t
21603 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21604 s&@INSTALL@&$ac_INSTALL&;t t
21605 $ac_datarootdir_hack
21606 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21607
21608 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21609   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21610   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21611   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21612 which seems to be undefined.  Please make sure it is defined." >&5
21613 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21614 which seems to be undefined.  Please make sure it is defined." >&2;}
21615
21616   rm -f "$tmp/stdin"
21617   case $ac_file in
21618   -) cat "$tmp/out"; rm -f "$tmp/out";;
21619   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21620   esac
21621  ;;
21622   :H)
21623   #
21624   # CONFIG_HEADER
21625   #
21626 _ACEOF
21627
21628 # Transform confdefs.h into a sed script `conftest.defines', that
21629 # substitutes the proper values into config.h.in to produce config.h.
21630 rm -rf conftest.defines conftest.tail
21631 # First, append a space to every undef/define line, to ease matching.
21632 echo 's/$/ /' >conftest.defines
21633 # Then, protect against being on the right side of a sed subst, or in
21634 # an unquoted here document, in config.status.  If some macros were
21635 # called several times there might be several #defines for the same
21636 # symbol, which is useless.  But do not sort them, since the last
21637 # AC_DEFINE must be honored.
21638 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21639 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21640 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21641 # PARAMS is the parameter list in the macro definition--in most cases, it's
21642 # just an empty string.
21643 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21644 ac_dB='\\)[      (].*,\\1define\\2'
21645 ac_dC=' '
21646 ac_dD=' ,'
21647
21648 uniq confdefs.h |
21649   sed -n '
21650         t rset
21651         :rset
21652         s/^[     ]*#[    ]*define[       ][      ]*//
21653         t ok
21654         d
21655         :ok
21656         s/[\\&,]/\\&/g
21657         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21658         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21659   ' >>conftest.defines
21660
21661 # Remove the space that was appended to ease matching.
21662 # Then replace #undef with comments.  This is necessary, for
21663 # example, in the case of _POSIX_SOURCE, which is predefined and required
21664 # on some systems where configure will not decide to define it.
21665 # (The regexp can be short, since the line contains either #define or #undef.)
21666 echo 's/ $//
21667 s,^[     #]*u.*,/* & */,' >>conftest.defines
21668
21669 # Break up conftest.defines:
21670 ac_max_sed_lines=50
21671
21672 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21673 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21674 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21675 # et cetera.
21676 ac_in='$ac_file_inputs'
21677 ac_out='"$tmp/out1"'
21678 ac_nxt='"$tmp/out2"'
21679
21680 while :
21681 do
21682   # Write a here document:
21683     cat >>$CONFIG_STATUS <<_ACEOF
21684     # First, check the format of the line:
21685     cat >"\$tmp/defines.sed" <<\\CEOF
21686 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21687 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21688 b
21689 :def
21690 _ACEOF
21691   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21692   echo 'CEOF
21693     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21694   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21695   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21696   grep . conftest.tail >/dev/null || break
21697   rm -rf conftest.defines
21698   mv conftest.tail conftest.defines
21699 done
21700 rm -rf conftest.defines conftest.tail
21701
21702 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21703 cat >>$CONFIG_STATUS <<\_ACEOF
21704   if test x"$ac_file" != x-; then
21705     echo "/* $configure_input  */" >"$tmp/config.h"
21706     cat "$ac_result" >>"$tmp/config.h"
21707     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21708       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21709 echo "$as_me: $ac_file is unchanged" >&6;}
21710     else
21711       rm -f $ac_file
21712       mv "$tmp/config.h" $ac_file
21713     fi
21714   else
21715     echo "/* $configure_input  */"
21716     cat "$ac_result"
21717   fi
21718   rm -f "$tmp/out12"
21719  ;;
21720
21721   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21722 echo "$as_me: executing $ac_file commands" >&6;}
21723  ;;
21724   esac
21725
21726
21727   case $ac_file$ac_mode in
21728     "default-1":C)
21729
21730 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21731 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21732   rm -f intltool-extract.out
21733 else
21734   mv -f intltool-extract.out intltool-extract
21735 fi
21736 chmod ugo+x intltool-extract
21737 chmod u+w intltool-extract
21738
21739 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21740 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21741   rm -f intltool-merge.out
21742 else
21743   mv -f intltool-merge.out intltool-merge
21744 fi
21745 chmod ugo+x intltool-merge
21746 chmod u+w intltool-merge
21747
21748 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21749 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21750   rm -f intltool-update.out
21751 else
21752   mv -f intltool-update.out intltool-update
21753 fi
21754 chmod ugo+x intltool-update
21755 chmod u+w intltool-update
21756
21757  ;;
21758     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21759         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21760       esac ;;
21761
21762   esac
21763 done # for ac_tag
21764
21765
21766 { (exit 0); exit 0; }
21767 _ACEOF
21768 chmod +x $CONFIG_STATUS
21769 ac_clean_files=$ac_clean_files_save
21770
21771
21772 # configure is writing to config.log, and then calls config.status.
21773 # config.status does its own redirection, appending to config.log.
21774 # Unfortunately, on DOS this fails, as config.log is still kept open
21775 # by configure, so config.status won't be able to write to it; its
21776 # output is simply discarded.  So we exec the FD to /dev/null,
21777 # effectively closing config.log, so it can be properly (re)opened and
21778 # appended to by config.status.  When coming back to configure, we
21779 # need to make the FD available again.
21780 if test "$no_create" != yes; then
21781   ac_cs_success=:
21782   ac_config_status_args=
21783   test "$silent" = yes &&
21784     ac_config_status_args="$ac_config_status_args --quiet"
21785   exec 5>/dev/null
21786   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21787   exec 5>>config.log
21788   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21789   # would make configure fail if this is the last instruction.
21790   $ac_cs_success || { (exit 1); exit 1; }
21791 fi
21792
21793
21794 ###############################################################################
21795 #
21796 #       Print some warnings at the end.
21797 #
21798 ###############################################################################
21799
21800 warn_prefix_1="    Warning:"
21801 warn_prefix_2="       Note:"
21802 warn_prefix="$warn_prefix_1"
21803
21804 warning=no
21805 warnsep='    #################################################################'
21806
21807 warnpre() {
21808   if test "$warning" = no ; then
21809     echo '' ; echo "$warnsep" ; echo ''
21810     warning=yes
21811   fi
21812 }
21813
21814 warn() {
21815   warnpre
21816   if test "$warning" = long ; then echo '' ; fi
21817   warning=yes
21818   rest="$@"
21819   echo "$warn_prefix $rest"
21820 }
21821
21822 warnL() {
21823   was=$warning
21824   warnpre
21825   warning=yes
21826   if test "$was" != no ; then echo '' ; fi
21827   rest="$@"
21828   echo "$warn_prefix $rest"
21829 }
21830
21831 warn2() {
21832   rest="$@"
21833   echo "             $rest"
21834   warning=long
21835 }
21836
21837 note() {
21838   warn_prefix="$warn_prefix_2"
21839   warn $@
21840   warn_prefix="$warn_prefix_1"
21841 }
21842
21843 noteL() {
21844   warn_prefix="$warn_prefix_2"
21845   warnL $@
21846   warn_prefix="$warn_prefix_1"
21847 }
21848
21849
21850 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21851   warn 'The SGI saver extension was requested, but was not found.'
21852 fi
21853
21854 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21855   warn 'The XIdle extension was requested, but was not found.'
21856 fi
21857
21858 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21859   warn 'The XSHM extension was requested, but was not found.'
21860 fi
21861
21862 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21863   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21864 fi
21865
21866 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21867   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21868 fi
21869
21870 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21871   warn 'The DPMS extension was requested, but was not found.'
21872 fi
21873
21874 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21875   warn 'The Xinerama extension was requested, but was not found.'
21876 fi
21877
21878 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21879   warn 'The XF86VMODE extension was requested, but was not found.'
21880 fi
21881
21882 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21883   warn 'The RANDR extension was requested, but was not found.'
21884 fi
21885
21886 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21887   warn "Checking of /proc/interrupts was requested, but it's bogus."
21888 fi
21889
21890 if test "$pkg_config" = false ; then
21891   warnL 'The "pkg-config" program was not found.  Without that,'
21892   warn2 "detection of the various GTK libraries won't work."
21893 else
21894   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21895   if test "x$pkgerr" != "x" ; then
21896     warnL 'The "pkg-config" program produces errors.  This often causes'
21897     warn2 "detection of the various GTK libraries to malfunction."
21898     warn2 "The errors are:"
21899     echo ''
21900     echo "$pkgerr" | sed 's/^/             > /g'
21901   fi
21902 fi
21903
21904 if test "$gtk_halfassed" != no ; then
21905   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21906   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21907   warn2 "Perhaps some of the development packages are not installed?"
21908   if test "$have_gtk" = yes ; then
21909     v="$ac_gtk_version_string"
21910     warn2 "GTK $v is also installed, so it will be used instead."
21911     warn2 "Please read the above output and the \`config.log' file"
21912     warn2 "for more details."
21913   fi
21914 fi
21915
21916 motif_warn2() {
21917   warn2 'Though the Motif front-end to xscreensaver is still'
21918   warn2 'maintained, it is no longer being updated with new'
21919   warn2 'features: all new development on the xscreensaver-demo'
21920   warn2 'program is happening in the GTK version, and not in the'
21921   warn2 'Motif version.  It is recommended that you build against'
21922   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21923 }
21924
21925 if test "$have_motif" = no -a "$have_gtk" = no; then
21926
21927   if test "$with_motif" = yes; then
21928     warnL "Neither the GTK nor Motif libraries were found; the"
21929     warn2 "\`xscreensaver-demo' program requires one of these."
21930     echo ''
21931     motif_warn2
21932   else
21933     warnL "The GTK libraries do not seem to be available; the"
21934     warn2 "\`xscreensaver-demo' program requires them."
21935 #   echo ''
21936 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21937 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21938 #   motif_warn2
21939   fi
21940
21941 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21942   warnL "Use of Motif was requested, but it wasn't found;"
21943   warn2 "Gtk will be used instead."
21944
21945 elif test "$jurassic_gtk" = yes ; then
21946
21947   pref_gtk=2.0
21948
21949   v="$ac_gtk_version_string"
21950   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21951     warnL "Use of Gtk was requested, but its version number is unknown;"
21952   elif test "$with_gtk_req" = yes ; then
21953     warnL "Use of Gtk was requested, but it is version $v;"
21954   else
21955     warnL "Gtk was found on this system, but it is version $v;"
21956   fi
21957
21958   warn2 "Gtk $pref_gtk or newer is required."
21959
21960 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21961   warnL "Use of Gtk was requested, but it wasn't found."
21962 fi
21963
21964
21965 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21966   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21967   warn2 "headers were not found.  That can't be good.  Please"
21968   warn2 "install the GDK-Pixbuf development kit and re-configure."
21969 fi
21970
21971 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21972
21973   preferred_lesstif=0.92
21974
21975   if test "$lesstif_version" = unknown; then
21976     warnL "Unable to determine the LessTif version number!"
21977     warn2 "Make sure you are using version $preferred_lesstif or newer."
21978     warn2 "See <http://www.lesstif.org/>."
21979
21980   elif test \! $lesstif_version -gt 82; then
21981     warnL "LessTif version $lesstif_version_string is being used."
21982     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21983     warn2 "use with XScreenSaver; it is strongly recommended"
21984     warn2 "that you upgrade to at least version $preferred_lesstif!"
21985     warn2 "See <http://www.lesstif.org/>."
21986   fi
21987 fi
21988
21989
21990 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21991   warn  'Motif is being used, and GTK is not.'
21992   echo  ''
21993   motif_warn2
21994 fi
21995
21996
21997 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21998   warnL 'Use of XPM was requested, but it was not found.'
21999 fi
22000
22001 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22002   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22003 fi
22004
22005 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22006    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22007
22008   if test "$with_gdk_pixbuf_req" = yes ; then
22009     true
22010   elif test "$with_gdk_pixbuf_req" = no ; then
22011     warnL 'The GDK-Pixbuf library is not being used.'
22012   else
22013     warnL 'The GDK-Pixbuf library was not found.'
22014   fi
22015
22016   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22017     true
22018   elif test "$with_xpm_req" = no ; then
22019     warnL 'The XPM library is not being used.'
22020   else
22021     warnL 'The XPM library was not found.'
22022   fi
22023
22024   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22025     warn2 'The XPM library is being used instead.'
22026   fi
22027
22028   if test "$gdk_pixbuf_halfassed" = yes ; then
22029     echo ''
22030     warn2 'More specifically, we found the headers, but not the'
22031     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22032     warn2 "system, or something else went wrong.  The \`config.log'"
22033     warn2 'file might contain some clues.'
22034   fi
22035
22036   echo ''
22037   warn2 'Some of the demos will not use images as much as they could.'
22038   warn2 'You should consider installing GDK-Pixbuf and re-running'
22039   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22040   warn2 'provides support for more image formats.)'
22041 fi
22042
22043
22044 if test "$have_jpeg" = no ; then
22045   if test "$with_jpeg_req" = yes ; then
22046     warnL 'Use of libjpeg was requested, but it was not found.'
22047   elif test "$with_jpeg_req" = no ; then
22048     noteL 'The JPEG library is not being used.'
22049   else
22050     noteL 'The JPEG library was not found.'
22051   fi
22052
22053   if test "$jpeg_halfassed" = yes ; then
22054     echo ''
22055     warn2 'More specifically, we found the headers, but not the'
22056     warn2 'library; so either JPEG is half-installed on this'
22057     warn2 "system, or something else went wrong.  The \`config.log'"
22058     warn2 'file might contain some clues.'
22059     echo ''
22060   fi
22061
22062   if test "$have_gdk_pixbuf" = no ; then
22063     warn2 "This means that it won't be possible for the image-manipulating"
22064     warn2 "display modes to load files from disk; and it also means that"
22065     warn2 "the \`webcollage' program will be much slower."
22066   else
22067     warn2 "This means the \`webcollage' program will be much slower."
22068   fi
22069 fi
22070
22071
22072 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22073   preferred_mesagl=3.4
22074   mgv="$ac_mesagl_version_string"
22075   pgl="$preferred_mesagl"
22076
22077   if test "$ac_mesagl_version" = unknown; then
22078     true
22079     # warnL "Unable to determine the MesaGL version number!"
22080     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22081
22082   elif test \! "$ac_mesagl_version" -gt 2006; then
22083     warnL "MesaGL version number is $mgv --"
22084     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22085     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22086
22087   elif test \! "$ac_mesagl_version" -gt 3003; then
22088     warnL "MesaGL version number is $mgv --"
22089     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22090     warn2 "that you upgrade to $pgl or newer."
22091   fi
22092 fi
22093
22094 if test "$have_gl" = no ; then
22095   if test "$with_gl_req" = yes ; then
22096     warnL 'Use of GL was requested, but it was not found.'
22097   elif test "$with_gl_req" = no ; then
22098     noteL 'The OpenGL 3D library is not being used.'
22099   else
22100     noteL 'The OpenGL 3D library was not found.'
22101   fi
22102
22103   if test "$gl_halfassed" = yes ; then
22104     echo ''
22105     warn2 'More specifically, we found the headers, but not the'
22106     warn2 'libraries; so either GL is half-installed on this'
22107     warn2 "system, or something else went wrong.  The \`config.log'"
22108     warn2 'file might contain some clues.'
22109   fi
22110
22111   echo ''
22112   warn2 'Those demos which use 3D will not be built or installed.'
22113   warn2 'You might want to consider installing OpenGL and'
22114   warn2 "re-running configure.  If your vendor doesn't ship"
22115   warn2 'their own implementation of OpenGL, you can get a free'
22116   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22117   warn2 'info, see <http://www.opengl.org/>.'
22118
22119 fi
22120
22121
22122 if test "$have_gl" = yes -a "$have_gle" = no ; then
22123
22124  # nobody cares about this; don't print the warning unless it was
22125  # requested and not found, or halfway-found.
22126  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22127
22128   if test "$with_gle_req" = yes ; then
22129     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22130     warn2 'it was not found (though the OpenGL library was found, and'
22131     warn2 'is being used.)'
22132   elif test "$with_gle_req" = no ; then
22133     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22134     warn2 'library is not.'
22135   else
22136     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22137     warn2 'was not.'
22138   fi
22139
22140   if test "$gle_halfassed" = yes ; then
22141     echo ''
22142     warn2 'More specifically, we found the headers, but not the'
22143     warn2 'libraries; so either GLE is half-installed on this'
22144     warn2 "system, or something else went wrong.  The \`config.log'"
22145     warn2 'file might contain some clues.'
22146   fi
22147
22148   echo ''
22149   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22150   warn2 'will not be built or installed.  You might want to consider'
22151   warn2 'installing GLE and re-running configure.  You can find the'
22152   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22153   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22154
22155  fi
22156 fi
22157
22158
22159 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22160   warn 'Use of XReadDisplay was requested, but it was not found.'
22161 fi
22162
22163 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22164   warn 'Use of Kerberos was requested, but it was not found.'
22165 fi
22166
22167 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22168   warn 'Use of PAM was requested, but it was not found.'
22169 fi
22170
22171 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22172   warn 'Use of shadow passwords was requested, but they were not found.'
22173 fi
22174
22175 if test "$ac_macosx" = yes ; then
22176   if test "$enable_locking" = yes ; then
22177     warn  "You have specified --enable-locking on MacOS X."
22178     warn2 "THIS DOES NOT WORK!  Don't do this!"
22179   fi
22180 fi
22181
22182
22183 # You are in a twisty maze of namespaces and syntaxes, all alike.
22184 # Fuck the skull of Unix.
22185 #
22186 bindir=`eval eval eval eval eval eval eval echo $bindir`
22187 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22188 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22189
22190 # canonicalize slashes.
22191 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22192 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22193 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22194
22195
22196 # Sanity check the hackdir
22197 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22198   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22199     echo ""
22200     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22201                    There will be an executable installed with that name, so
22202                    that can't be the name of a directory as well.  Please
22203                    re-configure with a different directory name." >&5
22204 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22205                    There will be an executable installed with that name, so
22206                    that can't be the name of a directory as well.  Please
22207                    re-configure with a different directory name." >&2;}
22208    { (exit 1); exit 1; }; }
22209   fi
22210 done
22211
22212
22213 do_dir_warning=no
22214
22215 # Now let's warn if there's a previous RPM version already installed.
22216 # But don't bother with this test if we are currently *building* an RPM.
22217
22218 if test -z "$RPM_PACKAGE_VERSION" ; then
22219
22220   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22221
22222   # M4 sucks!!
22223
22224   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22225         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22226         head -1`
22227
22228
22229   if test \! -z "$rpmv" ; then
22230     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22231     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22232
22233     warning=no
22234     warnL "There is already an installed RPM of xscreensaver $rpmv"
22235     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22236     warn2 'before running "make install" in this directory.'
22237     echo ""
22238     warn2 "Alternately, you could build this version of xscreensaver"
22239     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22240     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22241     warn2 "See the RPM documentation for more info."
22242     echo ""
22243
22244     if test "$rpmbdir" = "$rpmhdir" ; then
22245       warn2 "The RPM version was installed in $rpmbdir/."
22246       do_dir_warning=yes
22247     else
22248       warn2 "The RPM version was installed in $rpmbdir/,"
22249       warn2 "with demos in $rpmhdir/."
22250     fi
22251   fi
22252 fi
22253
22254 # Also warn if there's a Debian package installed.
22255 #
22256 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22257 debv=''
22258 for dpkg in $debnames ; do
22259   if test -z "$debv"; then
22260     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22261   fi
22262 done
22263
22264 if test \! -z "$debv" ; then
22265   debbdir=`dpkg -L $debnames 2>/dev/null | \
22266             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22267   debhdir=`dpkg -L $debnames 2>/dev/null | \
22268             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22269   if test -z "$debbdir" ; then debbdir='???'; fi
22270   if test -z "$debhdir" ; then debhdir='???'; fi
22271
22272   warning=no
22273   warnL "There is already an installed dpkg of xscreensaver"
22274   warn2 "version \"$debv\" on this system."
22275   echo ""
22276   warn2 "The dpkg was installed in $debbdir,"
22277   warn2 "with demos in $debhdir."
22278 fi
22279
22280
22281 if test "${bindir}" = "${HACKDIR}" ; then
22282   do_dir_warning=yes
22283 fi
22284
22285 if test "$do_dir_warning" = yes; then
22286   echo ""
22287   echo "$warnsep"
22288   echo ""
22289   echo '      When you run "make install", the "xscreensaver",'
22290   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22291   echo "      will be installed in ${bindir}/."
22292   echo ""
22293   echo "      The various graphics demos (190+ different executables) will"
22294   echo "      be installed in ${HACKDIR}/."
22295   echo ""
22296   echo "      If you would prefer the demos to be installed elsewhere,"
22297   echo "      you should re-run configure with the --with-hackdir=DIR"
22298   echo "      option.  For more information, run \`./configure --help'."
22299   warning=yes
22300 fi
22301
22302 if test "$warning" != no; then
22303   echo '' ; echo "$warnsep" ; echo ''
22304 fi
22305
22306 if test "$do_dir_warning" = no; then
22307   if test "$warning" = no; then
22308     echo ''
22309   fi
22310   echo "User programs will be installed in ${bindir}/"
22311   echo "Screen savers will be installed in ${HACKDIR}/"
22312   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22313   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22314   echo ''
22315 fi