e82f066deef065b492ab64703cd68517a045ca74
[xscreensaver] / xscreensaver / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME=
574 PACKAGE_TARNAME=
575 PACKAGE_VERSION=
576 PACKAGE_STRING=
577 PACKAGE_BUGREPORT=
578
579 ac_unique_file="driver/subprocs.c"
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 #  include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 #  include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 build
654 build_cpu
655 build_vendor
656 build_os
657 host
658 host_cpu
659 host_vendor
660 host_os
661 CC
662 CFLAGS
663 LDFLAGS
664 CPPFLAGS
665 ac_ct_CC
666 EXEEXT
667 OBJEXT
668 CPP
669 INSTALL_PROGRAM
670 INSTALL_SCRIPT
671 INSTALL_DATA
672 SET_MAKE
673 GREP
674 EGREP
675 PERL
676 XMKMF
677 X_CFLAGS
678 X_PRE_LIBS
679 X_LIBS
680 X_EXTRA_LIBS
681 INTLTOOL_DESKTOP_RULE
682 INTLTOOL_DIRECTORY_RULE
683 INTLTOOL_KEYS_RULE
684 INTLTOOL_OAF_RULE
685 INTLTOOL_PONG_RULE
686 INTLTOOL_SERVER_RULE
687 INTLTOOL_SHEET_RULE
688 INTLTOOL_SOUNDLIST_RULE
689 INTLTOOL_UI_RULE
690 INTLTOOL_XML_RULE
691 INTLTOOL_CAVES_RULE
692 INTLTOOL_EXTRACT
693 INTLTOOL_MERGE
694 INTLTOOL_UPDATE
695 INTLTOOL_PERL
696 GETTEXT_PACKAGE
697 RANLIB
698 ALLOCA
699 USE_NLS
700 MSGFMT
701 GMSGFMT
702 XGETTEXT
703 CATALOGS
704 CATOBJEXT
705 DATADIRNAME
706 GMOFILES
707 INSTOBJEXT
708 INTLDEPS
709 INTLLIBS
710 INTLOBJS
711 POFILES
712 POSUB
713 MKINSTALLDIRS
714 login_manager_tmp
715 pkg_config
716 gnome_open_program
717 gnome_url_show_program
718 INCLUDES
719 PREFERRED_DEMO_PROGRAM
720 ALL_DEMO_PROGRAMS
721 SAVER_LIBS
722 MOTIF_LIBS
723 GTK_LIBS
724 XML_LIBS
725 JPEG_LIBS
726 HACK_LIBS
727 XPM_LIBS
728 PTY_LIBS
729 GL_LIBS
730 GLE_LIBS
731 XDPMS_LIBS
732 XINERAMA_LIBS
733 PASSWD_LIBS
734 INSTALL_SETUID
735 SETUID_HACKS
736 INSTALL_DIRS
737 NEED_SETUID
738 INSTALL_PAM
739 HAVE_PAM_FAIL_DELAY
740 NEW_LOGIN_COMMAND
741 NEW_LOGIN_COMMAND_P
742 DEFAULT_IMAGES_P
743 DEFAULT_IMAGE_DIRECTORY
744 DEFAULT_TEXT_FILE
745 WITH_BROWSER
746 OBJCC
747 EXES_OSX
748 SCRIPTS_OSX
749 MEN_OSX
750 PASSWD_SRCS
751 PASSWD_OBJS
752 XMU_SRCS
753 XMU_OBJS
754 XMU_LIBS
755 SAVER_GL_SRCS
756 SAVER_GL_OBJS
757 SAVER_GL_LIBS
758 LOCK_SRCS
759 LOCK_OBJS
760 JPEG_EXES
761 GL_EXES
762 RETIRED_GL_EXES
763 SUID_EXES
764 GL_UTIL_EXES
765 GL_MEN
766 GL_KLUDGE
767 GLE_EXES
768 GLE_KLUDGE
769 GNOME24
770 GNOME22
771 NOGNOME
772 HACKDIR
773 HACKDIR_FULL
774 GTK_DATADIR
775 PO_DATADIR
776 HACK_CONF_DIR
777 GTK_EXTRA_OBJS
778 APPDEFAULTS
779 DEPEND
780 DEPEND_FLAGS
781 DEPEND_DEFINES
782 LIBOBJS
783 LTLIBOBJS'
784 ac_subst_files=''
785       ac_precious_vars='build_alias
786 host_alias
787 target_alias
788 CC
789 CFLAGS
790 LDFLAGS
791 LIBS
792 CPPFLAGS
793 CPP
794 XMKMF'
795
796
797 # Initialize some variables set by options.
798 ac_init_help=
799 ac_init_version=false
800 # The variables have the same names as the options, with
801 # dashes changed to underlines.
802 cache_file=/dev/null
803 exec_prefix=NONE
804 no_create=
805 no_recursion=
806 prefix=NONE
807 program_prefix=NONE
808 program_suffix=NONE
809 program_transform_name=s,x,x,
810 silent=
811 site=
812 srcdir=
813 verbose=
814 x_includes=NONE
815 x_libraries=NONE
816
817 # Installation directory options.
818 # These are left unexpanded so users can "make install exec_prefix=/foo"
819 # and all the variables that are supposed to be based on exec_prefix
820 # by default will actually change.
821 # Use braces instead of parens because sh, perl, etc. also accept them.
822 # (The list follows the same order as the GNU Coding Standards.)
823 bindir='${exec_prefix}/bin'
824 sbindir='${exec_prefix}/sbin'
825 libexecdir='${exec_prefix}/libexec'
826 datarootdir='${prefix}/share'
827 datadir='${datarootdir}'
828 sysconfdir='${prefix}/etc'
829 sharedstatedir='${prefix}/com'
830 localstatedir='${prefix}/var'
831 includedir='${prefix}/include'
832 oldincludedir='/usr/include'
833 docdir='${datarootdir}/doc/${PACKAGE}'
834 infodir='${datarootdir}/info'
835 htmldir='${docdir}'
836 dvidir='${docdir}'
837 pdfdir='${docdir}'
838 psdir='${docdir}'
839 libdir='${exec_prefix}/lib'
840 localedir='${datarootdir}/locale'
841 mandir='${datarootdir}/man'
842
843 ac_prev=
844 ac_dashdash=
845 for ac_option
846 do
847   # If the previous option needs an argument, assign it.
848   if test -n "$ac_prev"; then
849     eval $ac_prev=\$ac_option
850     ac_prev=
851     continue
852   fi
853
854   case $ac_option in
855   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
856   *)    ac_optarg=yes ;;
857   esac
858
859   # Accept the important Cygnus configure options, so we can diagnose typos.
860
861   case $ac_dashdash$ac_option in
862   --)
863     ac_dashdash=yes ;;
864
865   -bindir | --bindir | --bindi | --bind | --bin | --bi)
866     ac_prev=bindir ;;
867   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
868     bindir=$ac_optarg ;;
869
870   -build | --build | --buil | --bui | --bu)
871     ac_prev=build_alias ;;
872   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
873     build_alias=$ac_optarg ;;
874
875   -cache-file | --cache-file | --cache-fil | --cache-fi \
876   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
877     ac_prev=cache_file ;;
878   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
879   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
880     cache_file=$ac_optarg ;;
881
882   --config-cache | -C)
883     cache_file=config.cache ;;
884
885   -datadir | --datadir | --datadi | --datad)
886     ac_prev=datadir ;;
887   -datadir=* | --datadir=* | --datadi=* | --datad=*)
888     datadir=$ac_optarg ;;
889
890   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
891   | --dataroo | --dataro | --datar)
892     ac_prev=datarootdir ;;
893   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
894   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
895     datarootdir=$ac_optarg ;;
896
897   -disable-* | --disable-*)
898     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
899     # Reject names that are not valid shell variable names.
900     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
901       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
902    { (exit 1); exit 1; }; }
903     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
904     eval enable_$ac_feature=no ;;
905
906   -docdir | --docdir | --docdi | --doc | --do)
907     ac_prev=docdir ;;
908   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909     docdir=$ac_optarg ;;
910
911   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912     ac_prev=dvidir ;;
913   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914     dvidir=$ac_optarg ;;
915
916   -enable-* | --enable-*)
917     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
918     # Reject names that are not valid shell variable names.
919     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
920       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
921    { (exit 1); exit 1; }; }
922     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
923     eval enable_$ac_feature=\$ac_optarg ;;
924
925   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
926   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
927   | --exec | --exe | --ex)
928     ac_prev=exec_prefix ;;
929   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
930   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
931   | --exec=* | --exe=* | --ex=*)
932     exec_prefix=$ac_optarg ;;
933
934   -gas | --gas | --ga | --g)
935     # Obsolete; use --with-gas.
936     with_gas=yes ;;
937
938   -help | --help | --hel | --he | -h)
939     ac_init_help=long ;;
940   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
941     ac_init_help=recursive ;;
942   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
943     ac_init_help=short ;;
944
945   -host | --host | --hos | --ho)
946     ac_prev=host_alias ;;
947   -host=* | --host=* | --hos=* | --ho=*)
948     host_alias=$ac_optarg ;;
949
950   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
951     ac_prev=htmldir ;;
952   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
953   | --ht=*)
954     htmldir=$ac_optarg ;;
955
956   -includedir | --includedir | --includedi | --included | --include \
957   | --includ | --inclu | --incl | --inc)
958     ac_prev=includedir ;;
959   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
960   | --includ=* | --inclu=* | --incl=* | --inc=*)
961     includedir=$ac_optarg ;;
962
963   -infodir | --infodir | --infodi | --infod | --info | --inf)
964     ac_prev=infodir ;;
965   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
966     infodir=$ac_optarg ;;
967
968   -libdir | --libdir | --libdi | --libd)
969     ac_prev=libdir ;;
970   -libdir=* | --libdir=* | --libdi=* | --libd=*)
971     libdir=$ac_optarg ;;
972
973   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
974   | --libexe | --libex | --libe)
975     ac_prev=libexecdir ;;
976   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
977   | --libexe=* | --libex=* | --libe=*)
978     libexecdir=$ac_optarg ;;
979
980   -localedir | --localedir | --localedi | --localed | --locale)
981     ac_prev=localedir ;;
982   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
983     localedir=$ac_optarg ;;
984
985   -localstatedir | --localstatedir | --localstatedi | --localstated \
986   | --localstate | --localstat | --localsta | --localst | --locals)
987     ac_prev=localstatedir ;;
988   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
989   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
990     localstatedir=$ac_optarg ;;
991
992   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
993     ac_prev=mandir ;;
994   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
995     mandir=$ac_optarg ;;
996
997   -nfp | --nfp | --nf)
998     # Obsolete; use --without-fp.
999     with_fp=no ;;
1000
1001   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1002   | --no-cr | --no-c | -n)
1003     no_create=yes ;;
1004
1005   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007     no_recursion=yes ;;
1008
1009   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1010   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1011   | --oldin | --oldi | --old | --ol | --o)
1012     ac_prev=oldincludedir ;;
1013   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1014   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1015   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1016     oldincludedir=$ac_optarg ;;
1017
1018   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1019     ac_prev=prefix ;;
1020   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1021     prefix=$ac_optarg ;;
1022
1023   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1024   | --program-pre | --program-pr | --program-p)
1025     ac_prev=program_prefix ;;
1026   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1027   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1028     program_prefix=$ac_optarg ;;
1029
1030   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1031   | --program-suf | --program-su | --program-s)
1032     ac_prev=program_suffix ;;
1033   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1034   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1035     program_suffix=$ac_optarg ;;
1036
1037   -program-transform-name | --program-transform-name \
1038   | --program-transform-nam | --program-transform-na \
1039   | --program-transform-n | --program-transform- \
1040   | --program-transform | --program-transfor \
1041   | --program-transfo | --program-transf \
1042   | --program-trans | --program-tran \
1043   | --progr-tra | --program-tr | --program-t)
1044     ac_prev=program_transform_name ;;
1045   -program-transform-name=* | --program-transform-name=* \
1046   | --program-transform-nam=* | --program-transform-na=* \
1047   | --program-transform-n=* | --program-transform-=* \
1048   | --program-transform=* | --program-transfor=* \
1049   | --program-transfo=* | --program-transf=* \
1050   | --program-trans=* | --program-tran=* \
1051   | --progr-tra=* | --program-tr=* | --program-t=*)
1052     program_transform_name=$ac_optarg ;;
1053
1054   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1055     ac_prev=pdfdir ;;
1056   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1057     pdfdir=$ac_optarg ;;
1058
1059   -psdir | --psdir | --psdi | --psd | --ps)
1060     ac_prev=psdir ;;
1061   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1062     psdir=$ac_optarg ;;
1063
1064   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1065   | -silent | --silent | --silen | --sile | --sil)
1066     silent=yes ;;
1067
1068   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1069     ac_prev=sbindir ;;
1070   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1071   | --sbi=* | --sb=*)
1072     sbindir=$ac_optarg ;;
1073
1074   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1075   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1076   | --sharedst | --shareds | --shared | --share | --shar \
1077   | --sha | --sh)
1078     ac_prev=sharedstatedir ;;
1079   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1080   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1081   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1082   | --sha=* | --sh=*)
1083     sharedstatedir=$ac_optarg ;;
1084
1085   -site | --site | --sit)
1086     ac_prev=site ;;
1087   -site=* | --site=* | --sit=*)
1088     site=$ac_optarg ;;
1089
1090   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091     ac_prev=srcdir ;;
1092   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1093     srcdir=$ac_optarg ;;
1094
1095   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1096   | --syscon | --sysco | --sysc | --sys | --sy)
1097     ac_prev=sysconfdir ;;
1098   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1099   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1100     sysconfdir=$ac_optarg ;;
1101
1102   -target | --target | --targe | --targ | --tar | --ta | --t)
1103     ac_prev=target_alias ;;
1104   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1105     target_alias=$ac_optarg ;;
1106
1107   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1108     verbose=yes ;;
1109
1110   -version | --version | --versio | --versi | --vers | -V)
1111     ac_init_version=: ;;
1112
1113   -with-* | --with-*)
1114     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1115     # Reject names that are not valid shell variable names.
1116     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117       { echo "$as_me: error: invalid package name: $ac_package" >&2
1118    { (exit 1); exit 1; }; }
1119     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1120     eval with_$ac_package=\$ac_optarg ;;
1121
1122   -without-* | --without-*)
1123     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1124     # Reject names that are not valid shell variable names.
1125     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1126       { echo "$as_me: error: invalid package name: $ac_package" >&2
1127    { (exit 1); exit 1; }; }
1128     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1129     eval with_$ac_package=no ;;
1130
1131   --x)
1132     # Obsolete; use --with-x.
1133     with_x=yes ;;
1134
1135   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136   | --x-incl | --x-inc | --x-in | --x-i)
1137     ac_prev=x_includes ;;
1138   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1140     x_includes=$ac_optarg ;;
1141
1142   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144     ac_prev=x_libraries ;;
1145   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1147     x_libraries=$ac_optarg ;;
1148
1149   -*) { echo "$as_me: error: unrecognized option: $ac_option
1150 Try \`$0 --help' for more information." >&2
1151    { (exit 1); exit 1; }; }
1152     ;;
1153
1154   *=*)
1155     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156     # Reject names that are not valid shell variable names.
1157     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1158       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1159    { (exit 1); exit 1; }; }
1160     eval $ac_envvar=\$ac_optarg
1161     export $ac_envvar ;;
1162
1163   *)
1164     # FIXME: should be removed in autoconf 3.0.
1165     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1166     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1167       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1168     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1169     ;;
1170
1171   esac
1172 done
1173
1174 if test -n "$ac_prev"; then
1175   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1176   { echo "$as_me: error: missing argument to $ac_option" >&2
1177    { (exit 1); exit 1; }; }
1178 fi
1179
1180 # Be sure to have absolute directory names.
1181 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1182                 datadir sysconfdir sharedstatedir localstatedir includedir \
1183                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1184                 libdir localedir mandir
1185 do
1186   eval ac_val=\$$ac_var
1187   case $ac_val in
1188     [\\/$]* | ?:[\\/]* )  continue;;
1189     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1190   esac
1191   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1192    { (exit 1); exit 1; }; }
1193 done
1194
1195 # There might be people who depend on the old broken behavior: `$host'
1196 # used to hold the argument of --host etc.
1197 # FIXME: To remove some day.
1198 build=$build_alias
1199 host=$host_alias
1200 target=$target_alias
1201
1202 # FIXME: To remove some day.
1203 if test "x$host_alias" != x; then
1204   if test "x$build_alias" = x; then
1205     cross_compiling=maybe
1206     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1207     If a cross compiler is detected then cross compile mode will be used." >&2
1208   elif test "x$build_alias" != "x$host_alias"; then
1209     cross_compiling=yes
1210   fi
1211 fi
1212
1213 ac_tool_prefix=
1214 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1215
1216 test "$silent" = yes && exec 6>/dev/null
1217
1218
1219 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1220 ac_ls_di=`ls -di .` &&
1221 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1222   { echo "$as_me: error: Working directory cannot be determined" >&2
1223    { (exit 1); exit 1; }; }
1224 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1225   { echo "$as_me: error: pwd does not report name of working directory" >&2
1226    { (exit 1); exit 1; }; }
1227
1228
1229 # Find the source files, if location was not specified.
1230 if test -z "$srcdir"; then
1231   ac_srcdir_defaulted=yes
1232   # Try the directory containing this script, then the parent directory.
1233   ac_confdir=`$as_dirname -- "$0" ||
1234 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1235          X"$0" : 'X\(//\)[^/]' \| \
1236          X"$0" : 'X\(//\)$' \| \
1237          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1238 echo X"$0" |
1239     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1240             s//\1/
1241             q
1242           }
1243           /^X\(\/\/\)[^/].*/{
1244             s//\1/
1245             q
1246           }
1247           /^X\(\/\/\)$/{
1248             s//\1/
1249             q
1250           }
1251           /^X\(\/\).*/{
1252             s//\1/
1253             q
1254           }
1255           s/.*/./; q'`
1256   srcdir=$ac_confdir
1257   if test ! -r "$srcdir/$ac_unique_file"; then
1258     srcdir=..
1259   fi
1260 else
1261   ac_srcdir_defaulted=no
1262 fi
1263 if test ! -r "$srcdir/$ac_unique_file"; then
1264   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1265   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1266    { (exit 1); exit 1; }; }
1267 fi
1268 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1269 ac_abs_confdir=`(
1270         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1271    { (exit 1); exit 1; }; }
1272         pwd)`
1273 # When building in place, set srcdir=.
1274 if test "$ac_abs_confdir" = "$ac_pwd"; then
1275   srcdir=.
1276 fi
1277 # Remove unnecessary trailing slashes from srcdir.
1278 # Double slashes in file names in object file debugging info
1279 # mess up M-x gdb in Emacs.
1280 case $srcdir in
1281 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1282 esac
1283 for ac_var in $ac_precious_vars; do
1284   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1285   eval ac_env_${ac_var}_value=\$${ac_var}
1286   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1287   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1288 done
1289
1290 #
1291 # Report the --help message.
1292 #
1293 if test "$ac_init_help" = "long"; then
1294   # Omit some internal or obsolete options to make the list less imposing.
1295   # This message is too long to be a string in the A/UX 3.1 sh.
1296   cat <<_ACEOF
1297 \`configure' configures this package to adapt to many kinds of systems.
1298
1299 Usage: $0 [OPTION]... [VAR=VALUE]...
1300
1301 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1302 VAR=VALUE.  See below for descriptions of some of the useful variables.
1303
1304 Defaults for the options are specified in brackets.
1305
1306 Configuration:
1307   -h, --help              display this help and exit
1308       --help=short        display options specific to this package
1309       --help=recursive    display the short help of all the included packages
1310   -V, --version           display version information and exit
1311   -q, --quiet, --silent   do not print \`checking...' messages
1312       --cache-file=FILE   cache test results in FILE [disabled]
1313   -C, --config-cache      alias for \`--cache-file=config.cache'
1314   -n, --no-create         do not create output files
1315       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1316
1317 Installation directories:
1318   --prefix=PREFIX         install architecture-independent files in PREFIX
1319                           [$ac_default_prefix]
1320   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1321                           [PREFIX]
1322
1323 By default, \`make install' will install all the files in
1324 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1325 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1326 for instance \`--prefix=\$HOME'.
1327
1328 For better control, use the options below.
1329
1330 Fine tuning of the installation directories:
1331   --bindir=DIR           user executables [EPREFIX/bin]
1332   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1333   --libexecdir=DIR       program executables [EPREFIX/libexec]
1334   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1335   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1336   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1337   --libdir=DIR           object code libraries [EPREFIX/lib]
1338   --includedir=DIR       C header files [PREFIX/include]
1339   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1340   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1341   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1342   --infodir=DIR          info documentation [DATAROOTDIR/info]
1343   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1344   --mandir=DIR           man documentation [DATAROOTDIR/man]
1345   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1346   --htmldir=DIR          html documentation [DOCDIR]
1347   --dvidir=DIR           dvi documentation [DOCDIR]
1348   --pdfdir=DIR           pdf documentation [DOCDIR]
1349   --psdir=DIR            ps documentation [DOCDIR]
1350 _ACEOF
1351
1352   cat <<\_ACEOF
1353
1354 X features:
1355   --x-includes=DIR    X include files are in DIR
1356   --x-libraries=DIR   X library files are in DIR
1357
1358 System types:
1359   --build=BUILD     configure for building on BUILD [guessed]
1360   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1361 _ACEOF
1362 fi
1363
1364 if test -n "$ac_init_help"; then
1365
1366   cat <<\_ACEOF
1367
1368 Optional Features:
1369   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1370   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1371
1372 Screen locking options:
1373   --enable-locking        Compile in support for locking the display.
1374   --disable-locking       Do not allow locking at all.
1375
1376   --enable-root-passwd        Allow root passwd to unlock screen.
1377   --disable-root-passwd       Do not allow that.
1378
1379 Optional Packages:
1380   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1381   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1382
1383   --with-x                use the X Window System
1384
1385
1386 Installation options:
1387   --with-hackdir=DIR      Where to install the hundreds of demo executables.
1388                           Default: `PREFIX/libexec/xscreensaver/'
1389   --with-configdir=DIR    Where to install the data files that describe each
1390                           of the display modes to the GUI.
1391                           Default: `PREFIX/share/xscreensaver/config/'
1392   --with-x-app-defaults=DIR
1393                            Where to install xscreensaver configuration file.
1394
1395 Except where noted, all of the --with options below can also take a
1396 directory argument: for example, `--with-motif=/opt/Motif'.  That would
1397 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
1398 to be added to the -L list, assuming those directories exist.
1399
1400 By default, support for each of these options will be built in, if the
1401 relevant library routines exist.  At run time, they will then be used
1402 only if the X server being used supports them.  Each --with option has
1403 a corresponding --without option, to override building support for them
1404 at all.
1405
1406 Screen blanking and idle-detection options:
1407
1408   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
1409   --with-xidle-ext        Include support for the XIDLE extension.
1410   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
1411   --with-dpms-ext         Include support for the DPMS extension.
1412   --with-xinerama-ext     Include support for the XINERAMA extension.
1413   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
1414   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
1415   --with-randr-ext        Include support for the X Resize+Rotate extension.
1416   --with-proc-interrupts  Include support for consulting the /proc/interrupts
1417                           file to notice keyboard activity.
1418   --with-pam              Include support for PAM (Pluggable Auth Modules.)
1419   --with-pam-service-name=NAME
1420                           NAME is the name of the PAM service that
1421                           xscreensaver will authenticate as.
1422   --with-kerberos         Include support for Kerberos authentication.
1423   --with-shadow           Include support for shadow password authentication.
1424   --with-passwd-helper    Include support for an external password
1425                           verification helper program.
1426   --with-login-manager    Put a "New Login" button on the unlock dialog that
1427                           runs a login manager such as gdmflexiserver.
1428
1429 User interface options:
1430
1431   --with-gtk              Use the Gtk toolkit for the user interface.
1432   --with-motif            Use the Motif toolkit for the user interface
1433                           (not recommended.)
1434
1435 Graphics options:
1436
1437   --with-gl               Build those demos which depend on OpenGL.
1438   --with-gle              Build those demos which depend on GLE
1439                           (the OpenGL "extrusion" library.)
1440   --with-pixbuf           Include support for the GDK-Pixbuf library in some
1441                           demos, which will make it possible for them to read
1442                           GIF, JPEG, and PNG files as well.
1443   --with-xpm              Include support for XPM files in some demos.
1444                           (Not needed if Pixbuf is used.)
1445   --with-jpeg             Include support for the JPEG library.
1446   --with-xshm-ext         Include support for the Shared Memory extension.
1447   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
1448   --with-readdisplay      Include support for the XReadDisplay extension.
1449   --with-image-directory=DIR  By default, some demos may display random images
1450                           from this directory.
1451   --with-text-file=FILE   By default, some demos may display this file.
1452   --with-browser=BROWSER   Specify the browser to show help URL.
1453   --with-setuid-hacks     Allow some demos to be installed `setuid root'
1454                           (which is needed in order to ping other hosts.)
1455
1456
1457 Some influential environment variables:
1458   CC          C compiler command
1459   CFLAGS      C compiler flags
1460   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1461               nonstandard directory <lib dir>
1462   LIBS        libraries to pass to the linker, e.g. -l<library>
1463   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1464               you have headers in a nonstandard directory <include dir>
1465   CPP         C preprocessor
1466   XMKMF       Path to xmkmf, Makefile generator for X Window System
1467
1468 Use these variables to override the choices made by `configure' or to help
1469 it to find libraries and programs with nonstandard names/locations.
1470
1471 _ACEOF
1472 ac_status=$?
1473 fi
1474
1475 if test "$ac_init_help" = "recursive"; then
1476   # If there are subdirs, report their specific --help.
1477   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1478     test -d "$ac_dir" || continue
1479     ac_builddir=.
1480
1481 case "$ac_dir" in
1482 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1483 *)
1484   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1485   # A ".." for each directory in $ac_dir_suffix.
1486   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1487   case $ac_top_builddir_sub in
1488   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1489   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1490   esac ;;
1491 esac
1492 ac_abs_top_builddir=$ac_pwd
1493 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1494 # for backward compatibility:
1495 ac_top_builddir=$ac_top_build_prefix
1496
1497 case $srcdir in
1498   .)  # We are building in place.
1499     ac_srcdir=.
1500     ac_top_srcdir=$ac_top_builddir_sub
1501     ac_abs_top_srcdir=$ac_pwd ;;
1502   [\\/]* | ?:[\\/]* )  # Absolute name.
1503     ac_srcdir=$srcdir$ac_dir_suffix;
1504     ac_top_srcdir=$srcdir
1505     ac_abs_top_srcdir=$srcdir ;;
1506   *) # Relative name.
1507     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1508     ac_top_srcdir=$ac_top_build_prefix$srcdir
1509     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1510 esac
1511 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1512
1513     cd "$ac_dir" || { ac_status=$?; continue; }
1514     # Check for guested configure.
1515     if test -f "$ac_srcdir/configure.gnu"; then
1516       echo &&
1517       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1518     elif test -f "$ac_srcdir/configure"; then
1519       echo &&
1520       $SHELL "$ac_srcdir/configure" --help=recursive
1521     else
1522       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1523     fi || ac_status=$?
1524     cd "$ac_pwd" || { ac_status=$?; break; }
1525   done
1526 fi
1527
1528 test -n "$ac_init_help" && exit $ac_status
1529 if $ac_init_version; then
1530   cat <<\_ACEOF
1531 configure
1532 generated by GNU Autoconf 2.61
1533
1534 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1535 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1536 This configure script is free software; the Free Software Foundation
1537 gives unlimited permission to copy, distribute and modify it.
1538 _ACEOF
1539   exit
1540 fi
1541 cat >config.log <<_ACEOF
1542 This file contains any messages produced by compilers while
1543 running configure, to aid debugging if configure makes a mistake.
1544
1545 It was created by $as_me, which was
1546 generated by GNU Autoconf 2.61.  Invocation command line was
1547
1548   $ $0 $@
1549
1550 _ACEOF
1551 exec 5>>config.log
1552 {
1553 cat <<_ASUNAME
1554 ## --------- ##
1555 ## Platform. ##
1556 ## --------- ##
1557
1558 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1559 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1560 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1561 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1562 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1563
1564 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1565 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1566
1567 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1568 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1569 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1570 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1571 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1572 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1573 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1574
1575 _ASUNAME
1576
1577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1578 for as_dir in $PATH
1579 do
1580   IFS=$as_save_IFS
1581   test -z "$as_dir" && as_dir=.
1582   echo "PATH: $as_dir"
1583 done
1584 IFS=$as_save_IFS
1585
1586 } >&5
1587
1588 cat >&5 <<_ACEOF
1589
1590
1591 ## ----------- ##
1592 ## Core tests. ##
1593 ## ----------- ##
1594
1595 _ACEOF
1596
1597
1598 # Keep a trace of the command line.
1599 # Strip out --no-create and --no-recursion so they do not pile up.
1600 # Strip out --silent because we don't want to record it for future runs.
1601 # Also quote any args containing shell meta-characters.
1602 # Make two passes to allow for proper duplicate-argument suppression.
1603 ac_configure_args=
1604 ac_configure_args0=
1605 ac_configure_args1=
1606 ac_must_keep_next=false
1607 for ac_pass in 1 2
1608 do
1609   for ac_arg
1610   do
1611     case $ac_arg in
1612     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1613     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1614     | -silent | --silent | --silen | --sile | --sil)
1615       continue ;;
1616     *\'*)
1617       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1618     esac
1619     case $ac_pass in
1620     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1621     2)
1622       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1623       if test $ac_must_keep_next = true; then
1624         ac_must_keep_next=false # Got value, back to normal.
1625       else
1626         case $ac_arg in
1627           *=* | --config-cache | -C | -disable-* | --disable-* \
1628           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1629           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1630           | -with-* | --with-* | -without-* | --without-* | --x)
1631             case "$ac_configure_args0 " in
1632               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1633             esac
1634             ;;
1635           -* ) ac_must_keep_next=true ;;
1636         esac
1637       fi
1638       ac_configure_args="$ac_configure_args '$ac_arg'"
1639       ;;
1640     esac
1641   done
1642 done
1643 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1644 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1645
1646 # When interrupted or exit'd, cleanup temporary files, and complete
1647 # config.log.  We remove comments because anyway the quotes in there
1648 # would cause problems or look ugly.
1649 # WARNING: Use '\'' to represent an apostrophe within the trap.
1650 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1651 trap 'exit_status=$?
1652   # Save into config.log some information that might help in debugging.
1653   {
1654     echo
1655
1656     cat <<\_ASBOX
1657 ## ---------------- ##
1658 ## Cache variables. ##
1659 ## ---------------- ##
1660 _ASBOX
1661     echo
1662     # The following way of writing the cache mishandles newlines in values,
1663 (
1664   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1665     eval ac_val=\$$ac_var
1666     case $ac_val in #(
1667     *${as_nl}*)
1668       case $ac_var in #(
1669       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1670 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1671       esac
1672       case $ac_var in #(
1673       _ | IFS | as_nl) ;; #(
1674       *) $as_unset $ac_var ;;
1675       esac ;;
1676     esac
1677   done
1678   (set) 2>&1 |
1679     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1680     *${as_nl}ac_space=\ *)
1681       sed -n \
1682         "s/'\''/'\''\\\\'\'''\''/g;
1683           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1684       ;; #(
1685     *)
1686       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1687       ;;
1688     esac |
1689     sort
1690 )
1691     echo
1692
1693     cat <<\_ASBOX
1694 ## ----------------- ##
1695 ## Output variables. ##
1696 ## ----------------- ##
1697 _ASBOX
1698     echo
1699     for ac_var in $ac_subst_vars
1700     do
1701       eval ac_val=\$$ac_var
1702       case $ac_val in
1703       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1704       esac
1705       echo "$ac_var='\''$ac_val'\''"
1706     done | sort
1707     echo
1708
1709     if test -n "$ac_subst_files"; then
1710       cat <<\_ASBOX
1711 ## ------------------- ##
1712 ## File substitutions. ##
1713 ## ------------------- ##
1714 _ASBOX
1715       echo
1716       for ac_var in $ac_subst_files
1717       do
1718         eval ac_val=\$$ac_var
1719         case $ac_val in
1720         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1721         esac
1722         echo "$ac_var='\''$ac_val'\''"
1723       done | sort
1724       echo
1725     fi
1726
1727     if test -s confdefs.h; then
1728       cat <<\_ASBOX
1729 ## ----------- ##
1730 ## confdefs.h. ##
1731 ## ----------- ##
1732 _ASBOX
1733       echo
1734       cat confdefs.h
1735       echo
1736     fi
1737     test "$ac_signal" != 0 &&
1738       echo "$as_me: caught signal $ac_signal"
1739     echo "$as_me: exit $exit_status"
1740   } >&5
1741   rm -f core *.core core.conftest.* &&
1742     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1743     exit $exit_status
1744 ' 0
1745 for ac_signal in 1 2 13 15; do
1746   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1747 done
1748 ac_signal=0
1749
1750 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1751 rm -f -r conftest* confdefs.h
1752
1753 # Predefined preprocessor variables.
1754
1755 cat >>confdefs.h <<_ACEOF
1756 #define PACKAGE_NAME "$PACKAGE_NAME"
1757 _ACEOF
1758
1759
1760 cat >>confdefs.h <<_ACEOF
1761 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1762 _ACEOF
1763
1764
1765 cat >>confdefs.h <<_ACEOF
1766 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1767 _ACEOF
1768
1769
1770 cat >>confdefs.h <<_ACEOF
1771 #define PACKAGE_STRING "$PACKAGE_STRING"
1772 _ACEOF
1773
1774
1775 cat >>confdefs.h <<_ACEOF
1776 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1777 _ACEOF
1778
1779
1780 # Let the site file select an alternate cache file if it wants to.
1781 # Prefer explicitly selected file to automatically selected ones.
1782 if test -n "$CONFIG_SITE"; then
1783   set x "$CONFIG_SITE"
1784 elif test "x$prefix" != xNONE; then
1785   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1786 else
1787   set x "$ac_default_prefix/share/config.site" \
1788         "$ac_default_prefix/etc/config.site"
1789 fi
1790 shift
1791 for ac_site_file
1792 do
1793   if test -r "$ac_site_file"; then
1794     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1795 echo "$as_me: loading site script $ac_site_file" >&6;}
1796     sed 's/^/| /' "$ac_site_file" >&5
1797     . "$ac_site_file"
1798   fi
1799 done
1800
1801 if test -r "$cache_file"; then
1802   # Some versions of bash will fail to source /dev/null (special
1803   # files actually), so we avoid doing that.
1804   if test -f "$cache_file"; then
1805     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1806 echo "$as_me: loading cache $cache_file" >&6;}
1807     case $cache_file in
1808       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1809       *)                      . "./$cache_file";;
1810     esac
1811   fi
1812 else
1813   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1814 echo "$as_me: creating cache $cache_file" >&6;}
1815   >$cache_file
1816 fi
1817
1818 # Check that the precious variables saved in the cache have kept the same
1819 # value.
1820 ac_cache_corrupted=false
1821 for ac_var in $ac_precious_vars; do
1822   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1823   eval ac_new_set=\$ac_env_${ac_var}_set
1824   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1825   eval ac_new_val=\$ac_env_${ac_var}_value
1826   case $ac_old_set,$ac_new_set in
1827     set,)
1828       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1829 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1830       ac_cache_corrupted=: ;;
1831     ,set)
1832       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1833 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1834       ac_cache_corrupted=: ;;
1835     ,);;
1836     *)
1837       if test "x$ac_old_val" != "x$ac_new_val"; then
1838         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1839 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1840         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1841 echo "$as_me:   former value:  $ac_old_val" >&2;}
1842         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1843 echo "$as_me:   current value: $ac_new_val" >&2;}
1844         ac_cache_corrupted=:
1845       fi;;
1846   esac
1847   # Pass precious variables to config.status.
1848   if test "$ac_new_set" = set; then
1849     case $ac_new_val in
1850     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1851     *) ac_arg=$ac_var=$ac_new_val ;;
1852     esac
1853     case " $ac_configure_args " in
1854       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1855       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1856     esac
1857   fi
1858 done
1859 if $ac_cache_corrupted; then
1860   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1861 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1862   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1863 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1864    { (exit 1); exit 1; }; }
1865 fi
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883 ac_ext=c
1884 ac_cpp='$CPP $CPPFLAGS'
1885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1888
1889
1890 ac_config_headers="$ac_config_headers config.h"
1891
1892
1893 echo "current directory: `pwd`"
1894 echo "command line was: $0 $@"
1895
1896 ###############################################################################
1897 #
1898 #       Autoheader stuff
1899 #
1900 ###############################################################################
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075 # After checking to see that --srcdir is correct (which AC_INIT does)
2076 # check for some random other files that come later in the tar file,
2077 # to make sure everything is here.
2078 #
2079 for d in driver utils hacks hacks/glx ; do
2080   f=$srcdir/$d/Makefile.in
2081   if test \! -r $f ; then
2082     echo ""
2083     echo "ERROR: The package is incomplete: $f does not exist."
2084     echo "       This probably means that your download was truncated."
2085     echo ""
2086     exit 1
2087   fi
2088 done
2089
2090 ###############################################################################
2091 #
2092 #       Function to figure out how to run the compiler.
2093 #
2094 ###############################################################################
2095
2096
2097
2098
2099 ###############################################################################
2100 #
2101 #       Check for availability of various gcc command-line options.
2102 #
2103 ###############################################################################
2104
2105
2106
2107
2108
2109
2110
2111 # Need to disable Objective C extensions in ANSI C on MacOS X to work
2112 # around an Apple-specific gcc bug.
2113 #
2114
2115
2116 ###############################################################################
2117 #
2118 #       Function to figure out how to disable // comments in ANSI C code.
2119 #
2120 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
2121 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
2122 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
2123 #       so much for compatibility!)
2124 #
2125 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
2126 #       declarations preceed statements, without resorting to "-pedantic".
2127 #       This means that there is no way to get gcc3 to issue warnings that
2128 #       ensure that your code complies with the ANSI/ISO C89 standard, without
2129 #       also drowning in totally useless warnings.  Thank you master may I
2130 #       have another.
2131 #
2132 #       So, I give up, let's just use -pedantic.
2133 #
2134 ###############################################################################
2135
2136
2137
2138
2139
2140
2141 ###############################################################################
2142 #
2143 #       Function to figure out how to create directory trees.
2144 #
2145 ###############################################################################
2146
2147
2148
2149
2150 ###############################################################################
2151 #
2152 #       Function to check whether gettimeofday() exists, and how to call it.
2153 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
2154 #
2155 ###############################################################################
2156
2157
2158
2159
2160 ###############################################################################
2161 #
2162 #       Function to find perl5 (defines PERL and PERL_VERSION.)
2163 #
2164 ###############################################################################
2165
2166 # M4 sucks!!  perl sucks too!!
2167
2168 perl_version_cmd='print $]'
2169
2170
2171
2172
2173
2174 ###############################################################################
2175 #
2176 #       Function to demand "bc".  Losers.
2177 #
2178 ###############################################################################
2179
2180
2181
2182 ###############################################################################
2183 #
2184 #       Functions to check how to do ICMP PING requests.
2185 #
2186 ###############################################################################
2187
2188
2189
2190
2191
2192
2193 ###############################################################################
2194 #
2195 #       Functions to check for various X11 crap.
2196 #
2197 ###############################################################################
2198
2199 # Try and find the app-defaults directory.
2200 # It sucks that autoconf doesn't do this already...
2201 #
2202
2203
2204 ###############################################################################
2205 #
2206 #       Handle the --with-x-app-defaults option HERE
2207 #
2208 ###############################################################################
2209
2210
2211 # Check whether --with-x-app-defaults was given.
2212 if test "${with_x_app_defaults+set}" = set; then
2213   withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
2214 else
2215   eval ac_x_app_defaults="$withval"
2216 fi
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228 # Random special-cases for X on certain pathological OSes.
2229 # You know who you are.
2230 #
2231
2232
2233
2234
2235 ###############################################################################
2236 #
2237 #       Some utility functions to make checking for X things easier.
2238 #
2239 ###############################################################################
2240
2241 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
2242 #
2243
2244
2245 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
2246 #
2247
2248
2249 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
2250 #
2251
2252
2253
2254 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
2255 # Use this sparingly; it probably doesn't work very well on X programs.
2256 #
2257
2258
2259 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
2260 # (But not the -L directories!)
2261 #
2262
2263
2264
2265
2266 # Usage: HANDLE_X_PATH_ARG([variable_name],
2267 #                          [--command-line-option],
2268 #                          [descriptive string])
2269 #
2270 # All of the --with options take three forms:
2271 #
2272 #   --with-foo (or --with-foo=yes)
2273 #   --without-foo (or --with-foo=no)
2274 #   --with-foo=/DIR
2275 #
2276 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
2277 # a directory (string beginning with a slash) it checks to see whether
2278 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
2279 # as appropriate.
2280 #
2281
2282
2283
2284
2285 ###############################################################################
2286 ###############################################################################
2287 #
2288 #       End of function definitions.  Now start actually executing stuff.
2289 #
2290 ###############################################################################
2291 ###############################################################################
2292
2293 # WTF!  autoconf emits this *way* too late.  Do it earlier.
2294 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2295 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2296
2297
2298 # random compiler setup
2299 ac_aux_dir=
2300 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2301   if test -f "$ac_dir/install-sh"; then
2302     ac_aux_dir=$ac_dir
2303     ac_install_sh="$ac_aux_dir/install-sh -c"
2304     break
2305   elif test -f "$ac_dir/install.sh"; then
2306     ac_aux_dir=$ac_dir
2307     ac_install_sh="$ac_aux_dir/install.sh -c"
2308     break
2309   elif test -f "$ac_dir/shtool"; then
2310     ac_aux_dir=$ac_dir
2311     ac_install_sh="$ac_aux_dir/shtool install -c"
2312     break
2313   fi
2314 done
2315 if test -z "$ac_aux_dir"; then
2316   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2317 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2318    { (exit 1); exit 1; }; }
2319 fi
2320
2321 # These three variables are undocumented and unsupported,
2322 # and are intended to be withdrawn in a future Autoconf release.
2323 # They can cause serious problems if a builder's source tree is in a directory
2324 # whose full name contains unusual characters.
2325 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2326 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2327 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2328
2329
2330 # Make sure we can run config.sub.
2331 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2332   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2333 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2334    { (exit 1); exit 1; }; }
2335
2336 { echo "$as_me:$LINENO: checking build system type" >&5
2337 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2338 if test "${ac_cv_build+set}" = set; then
2339   echo $ECHO_N "(cached) $ECHO_C" >&6
2340 else
2341   ac_build_alias=$build_alias
2342 test "x$ac_build_alias" = x &&
2343   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2344 test "x$ac_build_alias" = x &&
2345   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2346 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2347    { (exit 1); exit 1; }; }
2348 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2349   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2350 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2351    { (exit 1); exit 1; }; }
2352
2353 fi
2354 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2355 echo "${ECHO_T}$ac_cv_build" >&6; }
2356 case $ac_cv_build in
2357 *-*-*) ;;
2358 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2359 echo "$as_me: error: invalid value of canonical build" >&2;}
2360    { (exit 1); exit 1; }; };;
2361 esac
2362 build=$ac_cv_build
2363 ac_save_IFS=$IFS; IFS='-'
2364 set x $ac_cv_build
2365 shift
2366 build_cpu=$1
2367 build_vendor=$2
2368 shift; shift
2369 # Remember, the first character of IFS is used to create $*,
2370 # except with old shells:
2371 build_os=$*
2372 IFS=$ac_save_IFS
2373 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2374
2375
2376 { echo "$as_me:$LINENO: checking host system type" >&5
2377 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2378 if test "${ac_cv_host+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381   if test "x$host_alias" = x; then
2382   ac_cv_host=$ac_cv_build
2383 else
2384   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2385     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2386 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2387    { (exit 1); exit 1; }; }
2388 fi
2389
2390 fi
2391 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2392 echo "${ECHO_T}$ac_cv_host" >&6; }
2393 case $ac_cv_host in
2394 *-*-*) ;;
2395 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2396 echo "$as_me: error: invalid value of canonical host" >&2;}
2397    { (exit 1); exit 1; }; };;
2398 esac
2399 host=$ac_cv_host
2400 ac_save_IFS=$IFS; IFS='-'
2401 set x $ac_cv_host
2402 shift
2403 host_cpu=$1
2404 host_vendor=$2
2405 shift; shift
2406 # Remember, the first character of IFS is used to create $*,
2407 # except with old shells:
2408 host_os=$*
2409 IFS=$ac_save_IFS
2410 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2411
2412
2413
2414 ac_ext=c
2415 ac_cpp='$CPP $CPPFLAGS'
2416 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2417 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2418 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2419 if test -n "$ac_tool_prefix"; then
2420   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2421 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2422 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2424 if test "${ac_cv_prog_CC+set}" = set; then
2425   echo $ECHO_N "(cached) $ECHO_C" >&6
2426 else
2427   if test -n "$CC"; then
2428   ac_cv_prog_CC="$CC" # Let the user override the test.
2429 else
2430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2431 for as_dir in $PATH
2432 do
2433   IFS=$as_save_IFS
2434   test -z "$as_dir" && as_dir=.
2435   for ac_exec_ext in '' $ac_executable_extensions; do
2436   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2437     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2438     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2439     break 2
2440   fi
2441 done
2442 done
2443 IFS=$as_save_IFS
2444
2445 fi
2446 fi
2447 CC=$ac_cv_prog_CC
2448 if test -n "$CC"; then
2449   { echo "$as_me:$LINENO: result: $CC" >&5
2450 echo "${ECHO_T}$CC" >&6; }
2451 else
2452   { echo "$as_me:$LINENO: result: no" >&5
2453 echo "${ECHO_T}no" >&6; }
2454 fi
2455
2456
2457 fi
2458 if test -z "$ac_cv_prog_CC"; then
2459   ac_ct_CC=$CC
2460   # Extract the first word of "gcc", so it can be a program name with args.
2461 set dummy gcc; ac_word=$2
2462 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2464 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2465   echo $ECHO_N "(cached) $ECHO_C" >&6
2466 else
2467   if test -n "$ac_ct_CC"; then
2468   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2469 else
2470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471 for as_dir in $PATH
2472 do
2473   IFS=$as_save_IFS
2474   test -z "$as_dir" && as_dir=.
2475   for ac_exec_ext in '' $ac_executable_extensions; do
2476   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2477     ac_cv_prog_ac_ct_CC="gcc"
2478     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2479     break 2
2480   fi
2481 done
2482 done
2483 IFS=$as_save_IFS
2484
2485 fi
2486 fi
2487 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2488 if test -n "$ac_ct_CC"; then
2489   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2490 echo "${ECHO_T}$ac_ct_CC" >&6; }
2491 else
2492   { echo "$as_me:$LINENO: result: no" >&5
2493 echo "${ECHO_T}no" >&6; }
2494 fi
2495
2496   if test "x$ac_ct_CC" = x; then
2497     CC=""
2498   else
2499     case $cross_compiling:$ac_tool_warned in
2500 yes:)
2501 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2502 whose name does not start with the host triplet.  If you think this
2503 configuration is useful to you, please write to autoconf@gnu.org." >&5
2504 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2505 whose name does not start with the host triplet.  If you think this
2506 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2507 ac_tool_warned=yes ;;
2508 esac
2509     CC=$ac_ct_CC
2510   fi
2511 else
2512   CC="$ac_cv_prog_CC"
2513 fi
2514
2515 if test -z "$CC"; then
2516           if test -n "$ac_tool_prefix"; then
2517     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2518 set dummy ${ac_tool_prefix}cc; ac_word=$2
2519 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2521 if test "${ac_cv_prog_CC+set}" = set; then
2522   echo $ECHO_N "(cached) $ECHO_C" >&6
2523 else
2524   if test -n "$CC"; then
2525   ac_cv_prog_CC="$CC" # Let the user override the test.
2526 else
2527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2528 for as_dir in $PATH
2529 do
2530   IFS=$as_save_IFS
2531   test -z "$as_dir" && as_dir=.
2532   for ac_exec_ext in '' $ac_executable_extensions; do
2533   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2534     ac_cv_prog_CC="${ac_tool_prefix}cc"
2535     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2536     break 2
2537   fi
2538 done
2539 done
2540 IFS=$as_save_IFS
2541
2542 fi
2543 fi
2544 CC=$ac_cv_prog_CC
2545 if test -n "$CC"; then
2546   { echo "$as_me:$LINENO: result: $CC" >&5
2547 echo "${ECHO_T}$CC" >&6; }
2548 else
2549   { echo "$as_me:$LINENO: result: no" >&5
2550 echo "${ECHO_T}no" >&6; }
2551 fi
2552
2553
2554   fi
2555 fi
2556 if test -z "$CC"; then
2557   # Extract the first word of "cc", so it can be a program name with args.
2558 set dummy cc; ac_word=$2
2559 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2561 if test "${ac_cv_prog_CC+set}" = set; then
2562   echo $ECHO_N "(cached) $ECHO_C" >&6
2563 else
2564   if test -n "$CC"; then
2565   ac_cv_prog_CC="$CC" # Let the user override the test.
2566 else
2567   ac_prog_rejected=no
2568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2569 for as_dir in $PATH
2570 do
2571   IFS=$as_save_IFS
2572   test -z "$as_dir" && as_dir=.
2573   for ac_exec_ext in '' $ac_executable_extensions; do
2574   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2575     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2576        ac_prog_rejected=yes
2577        continue
2578      fi
2579     ac_cv_prog_CC="cc"
2580     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2581     break 2
2582   fi
2583 done
2584 done
2585 IFS=$as_save_IFS
2586
2587 if test $ac_prog_rejected = yes; then
2588   # We found a bogon in the path, so make sure we never use it.
2589   set dummy $ac_cv_prog_CC
2590   shift
2591   if test $# != 0; then
2592     # We chose a different compiler from the bogus one.
2593     # However, it has the same basename, so the bogon will be chosen
2594     # first if we set CC to just the basename; use the full file name.
2595     shift
2596     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2597   fi
2598 fi
2599 fi
2600 fi
2601 CC=$ac_cv_prog_CC
2602 if test -n "$CC"; then
2603   { echo "$as_me:$LINENO: result: $CC" >&5
2604 echo "${ECHO_T}$CC" >&6; }
2605 else
2606   { echo "$as_me:$LINENO: result: no" >&5
2607 echo "${ECHO_T}no" >&6; }
2608 fi
2609
2610
2611 fi
2612 if test -z "$CC"; then
2613   if test -n "$ac_tool_prefix"; then
2614   for ac_prog in cl.exe
2615   do
2616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2618 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2620 if test "${ac_cv_prog_CC+set}" = set; then
2621   echo $ECHO_N "(cached) $ECHO_C" >&6
2622 else
2623   if test -n "$CC"; then
2624   ac_cv_prog_CC="$CC" # Let the user override the test.
2625 else
2626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2627 for as_dir in $PATH
2628 do
2629   IFS=$as_save_IFS
2630   test -z "$as_dir" && as_dir=.
2631   for ac_exec_ext in '' $ac_executable_extensions; do
2632   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2633     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2634     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2635     break 2
2636   fi
2637 done
2638 done
2639 IFS=$as_save_IFS
2640
2641 fi
2642 fi
2643 CC=$ac_cv_prog_CC
2644 if test -n "$CC"; then
2645   { echo "$as_me:$LINENO: result: $CC" >&5
2646 echo "${ECHO_T}$CC" >&6; }
2647 else
2648   { echo "$as_me:$LINENO: result: no" >&5
2649 echo "${ECHO_T}no" >&6; }
2650 fi
2651
2652
2653     test -n "$CC" && break
2654   done
2655 fi
2656 if test -z "$CC"; then
2657   ac_ct_CC=$CC
2658   for ac_prog in cl.exe
2659 do
2660   # Extract the first word of "$ac_prog", so it can be a program name with args.
2661 set dummy $ac_prog; ac_word=$2
2662 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2664 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2665   echo $ECHO_N "(cached) $ECHO_C" >&6
2666 else
2667   if test -n "$ac_ct_CC"; then
2668   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2669 else
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 for as_dir in $PATH
2672 do
2673   IFS=$as_save_IFS
2674   test -z "$as_dir" && as_dir=.
2675   for ac_exec_ext in '' $ac_executable_extensions; do
2676   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2677     ac_cv_prog_ac_ct_CC="$ac_prog"
2678     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2679     break 2
2680   fi
2681 done
2682 done
2683 IFS=$as_save_IFS
2684
2685 fi
2686 fi
2687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2688 if test -n "$ac_ct_CC"; then
2689   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2690 echo "${ECHO_T}$ac_ct_CC" >&6; }
2691 else
2692   { echo "$as_me:$LINENO: result: no" >&5
2693 echo "${ECHO_T}no" >&6; }
2694 fi
2695
2696
2697   test -n "$ac_ct_CC" && break
2698 done
2699
2700   if test "x$ac_ct_CC" = x; then
2701     CC=""
2702   else
2703     case $cross_compiling:$ac_tool_warned in
2704 yes:)
2705 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2706 whose name does not start with the host triplet.  If you think this
2707 configuration is useful to you, please write to autoconf@gnu.org." >&5
2708 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2709 whose name does not start with the host triplet.  If you think this
2710 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2711 ac_tool_warned=yes ;;
2712 esac
2713     CC=$ac_ct_CC
2714   fi
2715 fi
2716
2717 fi
2718
2719
2720 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2721 See \`config.log' for more details." >&5
2722 echo "$as_me: error: no acceptable C compiler found in \$PATH
2723 See \`config.log' for more details." >&2;}
2724    { (exit 1); exit 1; }; }
2725
2726 # Provide some information about the compiler.
2727 echo "$as_me:$LINENO: checking for C compiler version" >&5
2728 ac_compiler=`set X $ac_compile; echo $2`
2729 { (ac_try="$ac_compiler --version >&5"
2730 case "(($ac_try" in
2731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2732   *) ac_try_echo=$ac_try;;
2733 esac
2734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2735   (eval "$ac_compiler --version >&5") 2>&5
2736   ac_status=$?
2737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738   (exit $ac_status); }
2739 { (ac_try="$ac_compiler -v >&5"
2740 case "(($ac_try" in
2741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2742   *) ac_try_echo=$ac_try;;
2743 esac
2744 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2745   (eval "$ac_compiler -v >&5") 2>&5
2746   ac_status=$?
2747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2748   (exit $ac_status); }
2749 { (ac_try="$ac_compiler -V >&5"
2750 case "(($ac_try" in
2751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752   *) ac_try_echo=$ac_try;;
2753 esac
2754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2755   (eval "$ac_compiler -V >&5") 2>&5
2756   ac_status=$?
2757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2758   (exit $ac_status); }
2759
2760 cat >conftest.$ac_ext <<_ACEOF
2761 /* confdefs.h.  */
2762 _ACEOF
2763 cat confdefs.h >>conftest.$ac_ext
2764 cat >>conftest.$ac_ext <<_ACEOF
2765 /* end confdefs.h.  */
2766
2767 int
2768 main ()
2769 {
2770
2771   ;
2772   return 0;
2773 }
2774 _ACEOF
2775 ac_clean_files_save=$ac_clean_files
2776 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2777 # Try to create an executable without -o first, disregard a.out.
2778 # It will help us diagnose broken compilers, and finding out an intuition
2779 # of exeext.
2780 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2781 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2782 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2783 #
2784 # List of possible output files, starting from the most likely.
2785 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2786 # only as a last resort.  b.out is created by i960 compilers.
2787 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2788 #
2789 # The IRIX 6 linker writes into existing files which may not be
2790 # executable, retaining their permissions.  Remove them first so a
2791 # subsequent execution test works.
2792 ac_rmfiles=
2793 for ac_file in $ac_files
2794 do
2795   case $ac_file in
2796     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2797     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2798   esac
2799 done
2800 rm -f $ac_rmfiles
2801
2802 if { (ac_try="$ac_link_default"
2803 case "(($ac_try" in
2804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2805   *) ac_try_echo=$ac_try;;
2806 esac
2807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2808   (eval "$ac_link_default") 2>&5
2809   ac_status=$?
2810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811   (exit $ac_status); }; then
2812   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2813 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2814 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2815 # so that the user can short-circuit this test for compilers unknown to
2816 # Autoconf.
2817 for ac_file in $ac_files ''
2818 do
2819   test -f "$ac_file" || continue
2820   case $ac_file in
2821     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2822         ;;
2823     [ab].out )
2824         # We found the default executable, but exeext='' is most
2825         # certainly right.
2826         break;;
2827     *.* )
2828         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2829         then :; else
2830            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2831         fi
2832         # We set ac_cv_exeext here because the later test for it is not
2833         # safe: cross compilers may not add the suffix if given an `-o'
2834         # argument, so we may need to know it at that point already.
2835         # Even if this section looks crufty: it has the advantage of
2836         # actually working.
2837         break;;
2838     * )
2839         break;;
2840   esac
2841 done
2842 test "$ac_cv_exeext" = no && ac_cv_exeext=
2843
2844 else
2845   ac_file=''
2846 fi
2847
2848 { echo "$as_me:$LINENO: result: $ac_file" >&5
2849 echo "${ECHO_T}$ac_file" >&6; }
2850 if test -z "$ac_file"; then
2851   echo "$as_me: failed program was:" >&5
2852 sed 's/^/| /' conftest.$ac_ext >&5
2853
2854 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2855 See \`config.log' for more details." >&5
2856 echo "$as_me: error: C compiler cannot create executables
2857 See \`config.log' for more details." >&2;}
2858    { (exit 77); exit 77; }; }
2859 fi
2860
2861 ac_exeext=$ac_cv_exeext
2862
2863 # Check that the compiler produces executables we can run.  If not, either
2864 # the compiler is broken, or we cross compile.
2865 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2866 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2867 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2868 # If not cross compiling, check that we can run a simple program.
2869 if test "$cross_compiling" != yes; then
2870   if { ac_try='./$ac_file'
2871   { (case "(($ac_try" in
2872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2873   *) ac_try_echo=$ac_try;;
2874 esac
2875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2876   (eval "$ac_try") 2>&5
2877   ac_status=$?
2878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2879   (exit $ac_status); }; }; then
2880     cross_compiling=no
2881   else
2882     if test "$cross_compiling" = maybe; then
2883         cross_compiling=yes
2884     else
2885         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2886 If you meant to cross compile, use \`--host'.
2887 See \`config.log' for more details." >&5
2888 echo "$as_me: error: cannot run C compiled programs.
2889 If you meant to cross compile, use \`--host'.
2890 See \`config.log' for more details." >&2;}
2891    { (exit 1); exit 1; }; }
2892     fi
2893   fi
2894 fi
2895 { echo "$as_me:$LINENO: result: yes" >&5
2896 echo "${ECHO_T}yes" >&6; }
2897
2898 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2899 ac_clean_files=$ac_clean_files_save
2900 # Check that the compiler produces executables we can run.  If not, either
2901 # the compiler is broken, or we cross compile.
2902 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2903 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2904 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2905 echo "${ECHO_T}$cross_compiling" >&6; }
2906
2907 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2908 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2909 if { (ac_try="$ac_link"
2910 case "(($ac_try" in
2911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2912   *) ac_try_echo=$ac_try;;
2913 esac
2914 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2915   (eval "$ac_link") 2>&5
2916   ac_status=$?
2917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2918   (exit $ac_status); }; then
2919   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2920 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2921 # work properly (i.e., refer to `conftest.exe'), while it won't with
2922 # `rm'.
2923 for ac_file in conftest.exe conftest conftest.*; do
2924   test -f "$ac_file" || continue
2925   case $ac_file in
2926     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2927     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2928           break;;
2929     * ) break;;
2930   esac
2931 done
2932 else
2933   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2934 See \`config.log' for more details." >&5
2935 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2936 See \`config.log' for more details." >&2;}
2937    { (exit 1); exit 1; }; }
2938 fi
2939
2940 rm -f conftest$ac_cv_exeext
2941 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2942 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2943
2944 rm -f conftest.$ac_ext
2945 EXEEXT=$ac_cv_exeext
2946 ac_exeext=$EXEEXT
2947 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2948 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2949 if test "${ac_cv_objext+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   cat >conftest.$ac_ext <<_ACEOF
2953 /* confdefs.h.  */
2954 _ACEOF
2955 cat confdefs.h >>conftest.$ac_ext
2956 cat >>conftest.$ac_ext <<_ACEOF
2957 /* end confdefs.h.  */
2958
2959 int
2960 main ()
2961 {
2962
2963   ;
2964   return 0;
2965 }
2966 _ACEOF
2967 rm -f conftest.o conftest.obj
2968 if { (ac_try="$ac_compile"
2969 case "(($ac_try" in
2970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971   *) ac_try_echo=$ac_try;;
2972 esac
2973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2974   (eval "$ac_compile") 2>&5
2975   ac_status=$?
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); }; then
2978   for ac_file in conftest.o conftest.obj conftest.*; do
2979   test -f "$ac_file" || continue;
2980   case $ac_file in
2981     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2982     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2983        break;;
2984   esac
2985 done
2986 else
2987   echo "$as_me: failed program was:" >&5
2988 sed 's/^/| /' conftest.$ac_ext >&5
2989
2990 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2991 See \`config.log' for more details." >&5
2992 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2993 See \`config.log' for more details." >&2;}
2994    { (exit 1); exit 1; }; }
2995 fi
2996
2997 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2998 fi
2999 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3000 echo "${ECHO_T}$ac_cv_objext" >&6; }
3001 OBJEXT=$ac_cv_objext
3002 ac_objext=$OBJEXT
3003 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3004 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3005 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   cat >conftest.$ac_ext <<_ACEOF
3009 /* confdefs.h.  */
3010 _ACEOF
3011 cat confdefs.h >>conftest.$ac_ext
3012 cat >>conftest.$ac_ext <<_ACEOF
3013 /* end confdefs.h.  */
3014
3015 int
3016 main ()
3017 {
3018 #ifndef __GNUC__
3019        choke me
3020 #endif
3021
3022   ;
3023   return 0;
3024 }
3025 _ACEOF
3026 rm -f conftest.$ac_objext
3027 if { (ac_try="$ac_compile"
3028 case "(($ac_try" in
3029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030   *) ac_try_echo=$ac_try;;
3031 esac
3032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3033   (eval "$ac_compile") 2>conftest.er1
3034   ac_status=$?
3035   grep -v '^ *+' conftest.er1 >conftest.err
3036   rm -f conftest.er1
3037   cat conftest.err >&5
3038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3039   (exit $ac_status); } && {
3040          test -z "$ac_c_werror_flag" ||
3041          test ! -s conftest.err
3042        } && test -s conftest.$ac_objext; then
3043   ac_compiler_gnu=yes
3044 else
3045   echo "$as_me: failed program was:" >&5
3046 sed 's/^/| /' conftest.$ac_ext >&5
3047
3048         ac_compiler_gnu=no
3049 fi
3050
3051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3052 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3053
3054 fi
3055 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3056 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3057 GCC=`test $ac_compiler_gnu = yes && echo yes`
3058 ac_test_CFLAGS=${CFLAGS+set}
3059 ac_save_CFLAGS=$CFLAGS
3060 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3061 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3062 if test "${ac_cv_prog_cc_g+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065   ac_save_c_werror_flag=$ac_c_werror_flag
3066    ac_c_werror_flag=yes
3067    ac_cv_prog_cc_g=no
3068    CFLAGS="-g"
3069    cat >conftest.$ac_ext <<_ACEOF
3070 /* confdefs.h.  */
3071 _ACEOF
3072 cat confdefs.h >>conftest.$ac_ext
3073 cat >>conftest.$ac_ext <<_ACEOF
3074 /* end confdefs.h.  */
3075
3076 int
3077 main ()
3078 {
3079
3080   ;
3081   return 0;
3082 }
3083 _ACEOF
3084 rm -f conftest.$ac_objext
3085 if { (ac_try="$ac_compile"
3086 case "(($ac_try" in
3087   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3088   *) ac_try_echo=$ac_try;;
3089 esac
3090 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3091   (eval "$ac_compile") 2>conftest.er1
3092   ac_status=$?
3093   grep -v '^ *+' conftest.er1 >conftest.err
3094   rm -f conftest.er1
3095   cat conftest.err >&5
3096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3097   (exit $ac_status); } && {
3098          test -z "$ac_c_werror_flag" ||
3099          test ! -s conftest.err
3100        } && test -s conftest.$ac_objext; then
3101   ac_cv_prog_cc_g=yes
3102 else
3103   echo "$as_me: failed program was:" >&5
3104 sed 's/^/| /' conftest.$ac_ext >&5
3105
3106         CFLAGS=""
3107       cat >conftest.$ac_ext <<_ACEOF
3108 /* confdefs.h.  */
3109 _ACEOF
3110 cat confdefs.h >>conftest.$ac_ext
3111 cat >>conftest.$ac_ext <<_ACEOF
3112 /* end confdefs.h.  */
3113
3114 int
3115 main ()
3116 {
3117
3118   ;
3119   return 0;
3120 }
3121 _ACEOF
3122 rm -f conftest.$ac_objext
3123 if { (ac_try="$ac_compile"
3124 case "(($ac_try" in
3125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3126   *) ac_try_echo=$ac_try;;
3127 esac
3128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3129   (eval "$ac_compile") 2>conftest.er1
3130   ac_status=$?
3131   grep -v '^ *+' conftest.er1 >conftest.err
3132   rm -f conftest.er1
3133   cat conftest.err >&5
3134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135   (exit $ac_status); } && {
3136          test -z "$ac_c_werror_flag" ||
3137          test ! -s conftest.err
3138        } && test -s conftest.$ac_objext; then
3139   :
3140 else
3141   echo "$as_me: failed program was:" >&5
3142 sed 's/^/| /' conftest.$ac_ext >&5
3143
3144         ac_c_werror_flag=$ac_save_c_werror_flag
3145          CFLAGS="-g"
3146          cat >conftest.$ac_ext <<_ACEOF
3147 /* confdefs.h.  */
3148 _ACEOF
3149 cat confdefs.h >>conftest.$ac_ext
3150 cat >>conftest.$ac_ext <<_ACEOF
3151 /* end confdefs.h.  */
3152
3153 int
3154 main ()
3155 {
3156
3157   ;
3158   return 0;
3159 }
3160 _ACEOF
3161 rm -f conftest.$ac_objext
3162 if { (ac_try="$ac_compile"
3163 case "(($ac_try" in
3164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3165   *) ac_try_echo=$ac_try;;
3166 esac
3167 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3168   (eval "$ac_compile") 2>conftest.er1
3169   ac_status=$?
3170   grep -v '^ *+' conftest.er1 >conftest.err
3171   rm -f conftest.er1
3172   cat conftest.err >&5
3173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3174   (exit $ac_status); } && {
3175          test -z "$ac_c_werror_flag" ||
3176          test ! -s conftest.err
3177        } && test -s conftest.$ac_objext; then
3178   ac_cv_prog_cc_g=yes
3179 else
3180   echo "$as_me: failed program was:" >&5
3181 sed 's/^/| /' conftest.$ac_ext >&5
3182
3183
3184 fi
3185
3186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3187 fi
3188
3189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190 fi
3191
3192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3193    ac_c_werror_flag=$ac_save_c_werror_flag
3194 fi
3195 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3196 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3197 if test "$ac_test_CFLAGS" = set; then
3198   CFLAGS=$ac_save_CFLAGS
3199 elif test $ac_cv_prog_cc_g = yes; then
3200   if test "$GCC" = yes; then
3201     CFLAGS="-g -O2"
3202   else
3203     CFLAGS="-g"
3204   fi
3205 else
3206   if test "$GCC" = yes; then
3207     CFLAGS="-O2"
3208   else
3209     CFLAGS=
3210   fi
3211 fi
3212 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3213 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3214 if test "${ac_cv_prog_cc_c89+set}" = set; then
3215   echo $ECHO_N "(cached) $ECHO_C" >&6
3216 else
3217   ac_cv_prog_cc_c89=no
3218 ac_save_CC=$CC
3219 cat >conftest.$ac_ext <<_ACEOF
3220 /* confdefs.h.  */
3221 _ACEOF
3222 cat confdefs.h >>conftest.$ac_ext
3223 cat >>conftest.$ac_ext <<_ACEOF
3224 /* end confdefs.h.  */
3225 #include <stdarg.h>
3226 #include <stdio.h>
3227 #include <sys/types.h>
3228 #include <sys/stat.h>
3229 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3230 struct buf { int x; };
3231 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3232 static char *e (p, i)
3233      char **p;
3234      int i;
3235 {
3236   return p[i];
3237 }
3238 static char *f (char * (*g) (char **, int), char **p, ...)
3239 {
3240   char *s;
3241   va_list v;
3242   va_start (v,p);
3243   s = g (p, va_arg (v,int));
3244   va_end (v);
3245   return s;
3246 }
3247
3248 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3249    function prototypes and stuff, but not '\xHH' hex character constants.
3250    These don't provoke an error unfortunately, instead are silently treated
3251    as 'x'.  The following induces an error, until -std is added to get
3252    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3253    array size at least.  It's necessary to write '\x00'==0 to get something
3254    that's true only with -std.  */
3255 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3256
3257 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3258    inside strings and character constants.  */
3259 #define FOO(x) 'x'
3260 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3261
3262 int test (int i, double x);
3263 struct s1 {int (*f) (int a);};
3264 struct s2 {int (*f) (double a);};
3265 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3266 int argc;
3267 char **argv;
3268 int
3269 main ()
3270 {
3271 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3272   ;
3273   return 0;
3274 }
3275 _ACEOF
3276 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3277         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3278 do
3279   CC="$ac_save_CC $ac_arg"
3280   rm -f conftest.$ac_objext
3281 if { (ac_try="$ac_compile"
3282 case "(($ac_try" in
3283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284   *) ac_try_echo=$ac_try;;
3285 esac
3286 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3287   (eval "$ac_compile") 2>conftest.er1
3288   ac_status=$?
3289   grep -v '^ *+' conftest.er1 >conftest.err
3290   rm -f conftest.er1
3291   cat conftest.err >&5
3292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3293   (exit $ac_status); } && {
3294          test -z "$ac_c_werror_flag" ||
3295          test ! -s conftest.err
3296        } && test -s conftest.$ac_objext; then
3297   ac_cv_prog_cc_c89=$ac_arg
3298 else
3299   echo "$as_me: failed program was:" >&5
3300 sed 's/^/| /' conftest.$ac_ext >&5
3301
3302
3303 fi
3304
3305 rm -f core conftest.err conftest.$ac_objext
3306   test "x$ac_cv_prog_cc_c89" != "xno" && break
3307 done
3308 rm -f conftest.$ac_ext
3309 CC=$ac_save_CC
3310
3311 fi
3312 # AC_CACHE_VAL
3313 case "x$ac_cv_prog_cc_c89" in
3314   x)
3315     { echo "$as_me:$LINENO: result: none needed" >&5
3316 echo "${ECHO_T}none needed" >&6; } ;;
3317   xno)
3318     { echo "$as_me:$LINENO: result: unsupported" >&5
3319 echo "${ECHO_T}unsupported" >&6; } ;;
3320   *)
3321     CC="$CC $ac_cv_prog_cc_c89"
3322     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3323 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3324 esac
3325
3326
3327 ac_ext=c
3328 ac_cpp='$CPP $CPPFLAGS'
3329 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3330 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3331 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3332
3333
3334   if test -z "$GCC"; then
3335     # not using GCC
3336     { echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
3337 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6; }
3338     case "$host" in
3339       *-hpux* )
3340         { echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
3341 echo "${ECHO_T}HPUX: adding -Ae" >&6; }
3342         CC="$CC -Ae"
3343       ;;
3344       *-aix* )
3345         { echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
3346 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6; }
3347         CC="$CC -qlanglvl=ansi -qhalt=e"
3348       ;;
3349       *-dec-* )
3350         { echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
3351 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6; }
3352         CC="$CC -std1"
3353       ;;
3354       *)
3355         { echo "$as_me:$LINENO: result: no idea" >&5
3356 echo "${ECHO_T}no idea" >&6; }
3357       ;;
3358     esac
3359   else
3360     # using GCC
3361     case "$host" in
3362       *-solaris*)
3363         { echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
3364 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6; }
3365         CC="$CC -D__EXTENSIONS__"
3366       ;;
3367     esac
3368   fi
3369
3370   OBJCC="$CC"
3371
3372   { echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
3373 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6; }
3374   if test "$cross_compiling" = yes; then
3375   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3376 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3377    { (exit 1); exit 1; }; }
3378 else
3379   cat >conftest.$ac_ext <<_ACEOF
3380 /* confdefs.h.  */
3381 _ACEOF
3382 cat confdefs.h >>conftest.$ac_ext
3383 cat >>conftest.$ac_ext <<_ACEOF
3384 /* end confdefs.h.  */
3385  main(int ac, char **av) { return 0; }
3386 _ACEOF
3387 rm -f conftest$ac_exeext
3388 if { (ac_try="$ac_link"
3389 case "(($ac_try" in
3390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3391   *) ac_try_echo=$ac_try;;
3392 esac
3393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3394   (eval "$ac_link") 2>&5
3395   ac_status=$?
3396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3398   { (case "(($ac_try" in
3399   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3400   *) ac_try_echo=$ac_try;;
3401 esac
3402 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3403   (eval "$ac_try") 2>&5
3404   ac_status=$?
3405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3406   (exit $ac_status); }; }; then
3407   { echo "$as_me:$LINENO: result: yes" >&5
3408 echo "${ECHO_T}yes" >&6; }
3409 else
3410   echo "$as_me: program exited with status $ac_status" >&5
3411 echo "$as_me: failed program was:" >&5
3412 sed 's/^/| /' conftest.$ac_ext >&5
3413
3414 ( exit $ac_status )
3415 { echo "$as_me:$LINENO: result: no" >&5
3416 echo "${ECHO_T}no" >&6; }
3417      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
3418 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
3419    { (exit 1); exit 1; }; }
3420 fi
3421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3422 fi
3423
3424
3425
3426   if test -n "$GCC"; then
3427     { echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
3428 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
3429     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
3430     OBJCC="$OBJCC -Wall"
3431     # As of gcc 3.4, we have "-Wdeclaration-after-statement"
3432     # and so perhaps now we can do without -pedantic?
3433   else
3434     case "$host" in
3435       *-irix5* |*-irix6.0-3* )
3436         { echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
3437 echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
3438         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
3439       ;;
3440 #     *-dec-osf* )
3441 #       if test -z "$GCC"; then
3442 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
3443 #         CC="$CC -migrate -w0 -verbose -warnprotos"
3444 #       fi
3445 #     ;;
3446     esac
3447   fi
3448
3449 if test -n "$GCC"; then
3450    { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
3451 echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
3452 if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
3453   echo $ECHO_N "(cached) $ECHO_C" >&6
3454 else
3455   rm -rf conftest.$ac_ext
3456      touch conftest.$ac_ext
3457      if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3458           grep unrecognized >/dev/null ); then
3459        ac_cv_gcc_accepts_no_overlength=no
3460      else
3461        ac_cv_gcc_accepts_no_overlength=yes
3462        CC="$CC -Wno-overlength-strings"
3463      fi
3464 fi
3465 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
3466 echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
3467    ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
3468   fi
3469
3470 if test -n "$GCC"; then
3471    { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
3472 echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
3473 if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
3474   echo $ECHO_N "(cached) $ECHO_C" >&6
3475 else
3476   rm -rf conftest.$ac_ext
3477      touch conftest.$ac_ext
3478      if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3479           grep unrecognized >/dev/null ); then
3480        ac_cv_gcc_accepts_no_decl_after=no
3481      else
3482        ac_cv_gcc_accepts_no_decl_after=yes
3483        CC="$CC -Wdeclaration-after-statement"
3484      fi
3485 fi
3486 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
3487 echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
3488    ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
3489   fi
3490
3491 if test -n "$GCC"; then
3492    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
3493 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
3494 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
3495   echo $ECHO_N "(cached) $ECHO_C" >&6
3496 else
3497   rm -rf conftest.$ac_ext
3498      touch conftest.$ac_ext
3499      if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3500           grep unrecognized >/dev/null ); then
3501        ac_cv_gcc_accepts_no_cpp_precomp=no
3502      else
3503        ac_cv_gcc_accepts_no_cpp_precomp=yes
3504        CC="$CC -no-cpp-precomp"
3505      fi
3506 fi
3507 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
3508 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
3509    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
3510   fi
3511
3512 if test -n "$GCC"; then
3513
3514   case "$host" in
3515     *-darwin* )
3516       # Fucking Apple let // comments sneak into OpenGL headers, so
3517       # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
3518     ;;
3519    *)
3520      if test -n "$GCC"; then
3521    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
3522 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
3523 if test "${ac_cv_gcc_accepts_std+set}" = set; then
3524   echo $ECHO_N "(cached) $ECHO_C" >&6
3525 else
3526   rm -rf conftest.$ac_ext
3527      touch conftest.$ac_ext
3528      if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
3529           grep unrecognized >/dev/null ); then
3530        ac_cv_gcc_accepts_std=no
3531      else
3532        ac_cv_gcc_accepts_std=yes
3533        CC="$CC -std=c89"
3534      fi
3535 fi
3536 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
3537 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
3538    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
3539   fi
3540
3541    ;;
3542   esac
3543
3544    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
3545 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
3546    #
3547    # The reason that // comments are banned from xscreensaver is that gcc is
3548    # basically the only compiler in the world that supports them in C code.
3549    # All other vendors support them only in their C++ compilers, not in their
3550    # ANSI C compilers.  This means that it's a portability problem: every time
3551    # these comments have snuck into the xscreensaver source code, I've gotten
3552    # complaints about it the next day.  So we turn off support for them in gcc
3553    # as well to prevent them from accidentially slipping in.
3554    #
3555    if test "$ac_gcc_accepts_std" = yes ; then
3556      #
3557      # -std=c89 defines __STRICT_ANSI__, which we don't want.
3558      # (That appears to be the only additional preprocessor symbol
3559      # it defines, in addition to the syntax changes it makes.)
3560      #
3561      # -std=gnu89 is no good, because // comments were a GNU extension
3562      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
3563      # with -std=gnu89 but not with -std=c89.)
3564      #
3565      # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
3566      CC="$CC -U__STRICT_ANSI__"
3567 #   else
3568 #     # The old way:
3569 #     CC="$CC -Wp,-lang-c89"
3570    fi
3571   fi
3572
3573 ac_ext=c
3574 ac_cpp='$CPP $CPPFLAGS'
3575 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3579 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3580 # On Suns, sometimes $CPP names a directory.
3581 if test -n "$CPP" && test -d "$CPP"; then
3582   CPP=
3583 fi
3584 if test -z "$CPP"; then
3585   if test "${ac_cv_prog_CPP+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588       # Double quotes because CPP needs to be expanded
3589     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3590     do
3591       ac_preproc_ok=false
3592 for ac_c_preproc_warn_flag in '' yes
3593 do
3594   # Use a header file that comes with gcc, so configuring glibc
3595   # with a fresh cross-compiler works.
3596   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3597   # <limits.h> exists even on freestanding compilers.
3598   # On the NeXT, cc -E runs the code through the compiler's parser,
3599   # not just through cpp. "Syntax error" is here to catch this case.
3600   cat >conftest.$ac_ext <<_ACEOF
3601 /* confdefs.h.  */
3602 _ACEOF
3603 cat confdefs.h >>conftest.$ac_ext
3604 cat >>conftest.$ac_ext <<_ACEOF
3605 /* end confdefs.h.  */
3606 #ifdef __STDC__
3607 # include <limits.h>
3608 #else
3609 # include <assert.h>
3610 #endif
3611                      Syntax error
3612 _ACEOF
3613 if { (ac_try="$ac_cpp conftest.$ac_ext"
3614 case "(($ac_try" in
3615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3616   *) ac_try_echo=$ac_try;;
3617 esac
3618 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3619   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3620   ac_status=$?
3621   grep -v '^ *+' conftest.er1 >conftest.err
3622   rm -f conftest.er1
3623   cat conftest.err >&5
3624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625   (exit $ac_status); } >/dev/null && {
3626          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3627          test ! -s conftest.err
3628        }; then
3629   :
3630 else
3631   echo "$as_me: failed program was:" >&5
3632 sed 's/^/| /' conftest.$ac_ext >&5
3633
3634   # Broken: fails on valid input.
3635 continue
3636 fi
3637
3638 rm -f conftest.err conftest.$ac_ext
3639
3640   # OK, works on sane cases.  Now check whether nonexistent headers
3641   # can be detected and how.
3642   cat >conftest.$ac_ext <<_ACEOF
3643 /* confdefs.h.  */
3644 _ACEOF
3645 cat confdefs.h >>conftest.$ac_ext
3646 cat >>conftest.$ac_ext <<_ACEOF
3647 /* end confdefs.h.  */
3648 #include <ac_nonexistent.h>
3649 _ACEOF
3650 if { (ac_try="$ac_cpp conftest.$ac_ext"
3651 case "(($ac_try" in
3652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3653   *) ac_try_echo=$ac_try;;
3654 esac
3655 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3656   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3657   ac_status=$?
3658   grep -v '^ *+' conftest.er1 >conftest.err
3659   rm -f conftest.er1
3660   cat conftest.err >&5
3661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662   (exit $ac_status); } >/dev/null && {
3663          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3664          test ! -s conftest.err
3665        }; then
3666   # Broken: success on invalid input.
3667 continue
3668 else
3669   echo "$as_me: failed program was:" >&5
3670 sed 's/^/| /' conftest.$ac_ext >&5
3671
3672   # Passes both tests.
3673 ac_preproc_ok=:
3674 break
3675 fi
3676
3677 rm -f conftest.err conftest.$ac_ext
3678
3679 done
3680 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3681 rm -f conftest.err conftest.$ac_ext
3682 if $ac_preproc_ok; then
3683   break
3684 fi
3685
3686     done
3687     ac_cv_prog_CPP=$CPP
3688
3689 fi
3690   CPP=$ac_cv_prog_CPP
3691 else
3692   ac_cv_prog_CPP=$CPP
3693 fi
3694 { echo "$as_me:$LINENO: result: $CPP" >&5
3695 echo "${ECHO_T}$CPP" >&6; }
3696 ac_preproc_ok=false
3697 for ac_c_preproc_warn_flag in '' yes
3698 do
3699   # Use a header file that comes with gcc, so configuring glibc
3700   # with a fresh cross-compiler works.
3701   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3702   # <limits.h> exists even on freestanding compilers.
3703   # On the NeXT, cc -E runs the code through the compiler's parser,
3704   # not just through cpp. "Syntax error" is here to catch this case.
3705   cat >conftest.$ac_ext <<_ACEOF
3706 /* confdefs.h.  */
3707 _ACEOF
3708 cat confdefs.h >>conftest.$ac_ext
3709 cat >>conftest.$ac_ext <<_ACEOF
3710 /* end confdefs.h.  */
3711 #ifdef __STDC__
3712 # include <limits.h>
3713 #else
3714 # include <assert.h>
3715 #endif
3716                      Syntax error
3717 _ACEOF
3718 if { (ac_try="$ac_cpp conftest.$ac_ext"
3719 case "(($ac_try" in
3720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3721   *) ac_try_echo=$ac_try;;
3722 esac
3723 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3724   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3725   ac_status=$?
3726   grep -v '^ *+' conftest.er1 >conftest.err
3727   rm -f conftest.er1
3728   cat conftest.err >&5
3729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3730   (exit $ac_status); } >/dev/null && {
3731          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3732          test ! -s conftest.err
3733        }; then
3734   :
3735 else
3736   echo "$as_me: failed program was:" >&5
3737 sed 's/^/| /' conftest.$ac_ext >&5
3738
3739   # Broken: fails on valid input.
3740 continue
3741 fi
3742
3743 rm -f conftest.err conftest.$ac_ext
3744
3745   # OK, works on sane cases.  Now check whether nonexistent headers
3746   # can be detected and how.
3747   cat >conftest.$ac_ext <<_ACEOF
3748 /* confdefs.h.  */
3749 _ACEOF
3750 cat confdefs.h >>conftest.$ac_ext
3751 cat >>conftest.$ac_ext <<_ACEOF
3752 /* end confdefs.h.  */
3753 #include <ac_nonexistent.h>
3754 _ACEOF
3755 if { (ac_try="$ac_cpp conftest.$ac_ext"
3756 case "(($ac_try" in
3757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3758   *) ac_try_echo=$ac_try;;
3759 esac
3760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3761   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3762   ac_status=$?
3763   grep -v '^ *+' conftest.er1 >conftest.err
3764   rm -f conftest.er1
3765   cat conftest.err >&5
3766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3767   (exit $ac_status); } >/dev/null && {
3768          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3769          test ! -s conftest.err
3770        }; then
3771   # Broken: success on invalid input.
3772 continue
3773 else
3774   echo "$as_me: failed program was:" >&5
3775 sed 's/^/| /' conftest.$ac_ext >&5
3776
3777   # Passes both tests.
3778 ac_preproc_ok=:
3779 break
3780 fi
3781
3782 rm -f conftest.err conftest.$ac_ext
3783
3784 done
3785 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3786 rm -f conftest.err conftest.$ac_ext
3787 if $ac_preproc_ok; then
3788   :
3789 else
3790   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3791 See \`config.log' for more details." >&5
3792 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3793 See \`config.log' for more details." >&2;}
3794    { (exit 1); exit 1; }; }
3795 fi
3796
3797 ac_ext=c
3798 ac_cpp='$CPP $CPPFLAGS'
3799 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3800 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3801 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3802
3803 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3804 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
3805 if test "${ac_cv_c_const+set}" = set; then
3806   echo $ECHO_N "(cached) $ECHO_C" >&6
3807 else
3808   cat >conftest.$ac_ext <<_ACEOF
3809 /* confdefs.h.  */
3810 _ACEOF
3811 cat confdefs.h >>conftest.$ac_ext
3812 cat >>conftest.$ac_ext <<_ACEOF
3813 /* end confdefs.h.  */
3814
3815 int
3816 main ()
3817 {
3818 /* FIXME: Include the comments suggested by Paul. */
3819 #ifndef __cplusplus
3820   /* Ultrix mips cc rejects this.  */
3821   typedef int charset[2];
3822   const charset cs;
3823   /* SunOS 4.1.1 cc rejects this.  */
3824   char const *const *pcpcc;
3825   char **ppc;
3826   /* NEC SVR4.0.2 mips cc rejects this.  */
3827   struct point {int x, y;};
3828   static struct point const zero = {0,0};
3829   /* AIX XL C 1.02.0.0 rejects this.
3830      It does not let you subtract one const X* pointer from another in
3831      an arm of an if-expression whose if-part is not a constant
3832      expression */
3833   const char *g = "string";
3834   pcpcc = &g + (g ? g-g : 0);
3835   /* HPUX 7.0 cc rejects these. */
3836   ++pcpcc;
3837   ppc = (char**) pcpcc;
3838   pcpcc = (char const *const *) ppc;
3839   { /* SCO 3.2v4 cc rejects this.  */
3840     char *t;
3841     char const *s = 0 ? (char *) 0 : (char const *) 0;
3842
3843     *t++ = 0;
3844     if (s) return 0;
3845   }
3846   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3847     int x[] = {25, 17};
3848     const int *foo = &x[0];
3849     ++foo;
3850   }
3851   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3852     typedef const int *iptr;
3853     iptr p = 0;
3854     ++p;
3855   }
3856   { /* AIX XL C 1.02.0.0 rejects this saying
3857        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3858     struct s { int j; const int *ap[3]; };
3859     struct s *b; b->j = 5;
3860   }
3861   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3862     const int foo = 10;
3863     if (!foo) return 0;
3864   }
3865   return !cs[0] && !zero.x;
3866 #endif
3867
3868   ;
3869   return 0;
3870 }
3871 _ACEOF
3872 rm -f conftest.$ac_objext
3873 if { (ac_try="$ac_compile"
3874 case "(($ac_try" in
3875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876   *) ac_try_echo=$ac_try;;
3877 esac
3878 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3879   (eval "$ac_compile") 2>conftest.er1
3880   ac_status=$?
3881   grep -v '^ *+' conftest.er1 >conftest.err
3882   rm -f conftest.er1
3883   cat conftest.err >&5
3884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3885   (exit $ac_status); } && {
3886          test -z "$ac_c_werror_flag" ||
3887          test ! -s conftest.err
3888        } && test -s conftest.$ac_objext; then
3889   ac_cv_c_const=yes
3890 else
3891   echo "$as_me: failed program was:" >&5
3892 sed 's/^/| /' conftest.$ac_ext >&5
3893
3894         ac_cv_c_const=no
3895 fi
3896
3897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3898 fi
3899 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3900 echo "${ECHO_T}$ac_cv_c_const" >&6; }
3901 if test $ac_cv_c_const = no; then
3902
3903 cat >>confdefs.h <<\_ACEOF
3904 #define const
3905 _ACEOF
3906
3907 fi
3908
3909 { echo "$as_me:$LINENO: checking for inline" >&5
3910 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
3911 if test "${ac_cv_c_inline+set}" = set; then
3912   echo $ECHO_N "(cached) $ECHO_C" >&6
3913 else
3914   ac_cv_c_inline=no
3915 for ac_kw in inline __inline__ __inline; do
3916   cat >conftest.$ac_ext <<_ACEOF
3917 /* confdefs.h.  */
3918 _ACEOF
3919 cat confdefs.h >>conftest.$ac_ext
3920 cat >>conftest.$ac_ext <<_ACEOF
3921 /* end confdefs.h.  */
3922 #ifndef __cplusplus
3923 typedef int foo_t;
3924 static $ac_kw foo_t static_foo () {return 0; }
3925 $ac_kw foo_t foo () {return 0; }
3926 #endif
3927
3928 _ACEOF
3929 rm -f conftest.$ac_objext
3930 if { (ac_try="$ac_compile"
3931 case "(($ac_try" in
3932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933   *) ac_try_echo=$ac_try;;
3934 esac
3935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3936   (eval "$ac_compile") 2>conftest.er1
3937   ac_status=$?
3938   grep -v '^ *+' conftest.er1 >conftest.err
3939   rm -f conftest.er1
3940   cat conftest.err >&5
3941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942   (exit $ac_status); } && {
3943          test -z "$ac_c_werror_flag" ||
3944          test ! -s conftest.err
3945        } && test -s conftest.$ac_objext; then
3946   ac_cv_c_inline=$ac_kw
3947 else
3948   echo "$as_me: failed program was:" >&5
3949 sed 's/^/| /' conftest.$ac_ext >&5
3950
3951
3952 fi
3953
3954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3955   test "$ac_cv_c_inline" != no && break
3956 done
3957
3958 fi
3959 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3960 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
3961
3962
3963 case $ac_cv_c_inline in
3964   inline | yes) ;;
3965   *)
3966     case $ac_cv_c_inline in
3967       no) ac_val=;;
3968       *) ac_val=$ac_cv_c_inline;;
3969     esac
3970     cat >>confdefs.h <<_ACEOF
3971 #ifndef __cplusplus
3972 #define inline $ac_val
3973 #endif
3974 _ACEOF
3975     ;;
3976 esac
3977
3978
3979 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3980   { echo "$as_me:$LINENO: checking for bc" >&5
3981 echo $ECHO_N "checking for bc... $ECHO_C" >&6; }
3982   if test "$ac_bc_result" = "15" ; then
3983     { echo "$as_me:$LINENO: result: yes" >&5
3984 echo "${ECHO_T}yes" >&6; }
3985   else
3986     { echo "$as_me:$LINENO: result: no" >&5
3987 echo "${ECHO_T}no" >&6; }
3988     echo ''
3989     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3990                   part of Unix since the 1970s.  Come back when your vendor
3991                   has grown a clue." >&5
3992 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3993                   part of Unix since the 1970s.  Come back when your vendor
3994                   has grown a clue." >&2;}
3995    { (exit 1); exit 1; }; }
3996   fi
3997
3998
3999 # stuff for Makefiles
4000 # Find a good install program.  We prefer a C program (faster),
4001 # so one script is as good as another.  But avoid the broken or
4002 # incompatible versions:
4003 # SysV /etc/install, /usr/sbin/install
4004 # SunOS /usr/etc/install
4005 # IRIX /sbin/install
4006 # AIX /bin/install
4007 # AmigaOS /C/install, which installs bootblocks on floppy discs
4008 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4009 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4010 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4011 # OS/2's system install, which has a completely different semantic
4012 # ./install, which can be erroneously created by make from ./install.sh.
4013 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4014 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4015 if test -z "$INSTALL"; then
4016 if test "${ac_cv_path_install+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020 for as_dir in $PATH
4021 do
4022   IFS=$as_save_IFS
4023   test -z "$as_dir" && as_dir=.
4024   # Account for people who put trailing slashes in PATH elements.
4025 case $as_dir/ in
4026   ./ | .// | /cC/* | \
4027   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4028   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4029   /usr/ucb/* ) ;;
4030   *)
4031     # OSF1 and SCO ODT 3.0 have their own names for install.
4032     # Don't use installbsd from OSF since it installs stuff as root
4033     # by default.
4034     for ac_prog in ginstall scoinst install; do
4035       for ac_exec_ext in '' $ac_executable_extensions; do
4036         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4037           if test $ac_prog = install &&
4038             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4039             # AIX install.  It has an incompatible calling convention.
4040             :
4041           elif test $ac_prog = install &&
4042             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4043             # program-specific install script used by HP pwplus--don't use.
4044             :
4045           else
4046             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4047             break 3
4048           fi
4049         fi
4050       done
4051     done
4052     ;;
4053 esac
4054 done
4055 IFS=$as_save_IFS
4056
4057
4058 fi
4059   if test "${ac_cv_path_install+set}" = set; then
4060     INSTALL=$ac_cv_path_install
4061   else
4062     # As a last resort, use the slow shell script.  Don't cache a
4063     # value for INSTALL within a source directory, because that will
4064     # break other packages using the cache if that directory is
4065     # removed, or if the value is a relative name.
4066     INSTALL=$ac_install_sh
4067   fi
4068 fi
4069 { echo "$as_me:$LINENO: result: $INSTALL" >&5
4070 echo "${ECHO_T}$INSTALL" >&6; }
4071
4072 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4073 # It thinks the first close brace ends the variable substitution.
4074 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4075
4076 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4077
4078 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4079
4080 { echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
4081 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6; }
4082 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   ac_cv_install_d_creates_dirs=no
4086      rm -rf conftestdir
4087      if mkdir conftestdir; then
4088        cd conftestdir 2>/dev/null
4089        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
4090        if test -d dir1/dir2/. ; then
4091          ac_cv_install_d_creates_dirs=yes
4092        fi
4093        cd .. 2>/dev/null
4094        rm -rf conftestdir
4095      fi
4096
4097 fi
4098 { echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
4099 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6; }
4100
4101   if test "$ac_cv_install_d_creates_dirs" = no ; then
4102     { echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
4103 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6; }
4104 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
4105   echo $ECHO_N "(cached) $ECHO_C" >&6
4106 else
4107   ac_cv_mkdir_p_creates_dirs=no
4108        rm -rf conftestdir
4109        if mkdir conftestdir; then
4110          cd conftestdir 2>/dev/null
4111          mkdir -p dir1/dir2 >/dev/null 2>&1
4112          if test -d dir1/dir2/. ; then
4113            ac_cv_mkdir_p_creates_dirs=yes
4114          fi
4115          cd .. 2>/dev/null
4116          rm -rf conftestdir
4117        fi
4118
4119 fi
4120 { echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
4121 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6; }
4122   fi
4123
4124   if test "$ac_cv_install_d_creates_dirs" = yes ; then
4125     INSTALL_DIRS='${INSTALL} -d'
4126   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
4127     INSTALL_DIRS='mkdir -p'
4128   else
4129     # any other ideas?
4130     INSTALL_DIRS='${INSTALL} -d'
4131   fi
4132
4133 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4134 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
4135 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4136 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4137   echo $ECHO_N "(cached) $ECHO_C" >&6
4138 else
4139   cat >conftest.make <<\_ACEOF
4140 SHELL = /bin/sh
4141 all:
4142         @echo '@@@%%%=$(MAKE)=@@@%%%'
4143 _ACEOF
4144 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4145 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4146   *@@@%%%=?*=@@@%%%*)
4147     eval ac_cv_prog_make_${ac_make}_set=yes;;
4148   *)
4149     eval ac_cv_prog_make_${ac_make}_set=no;;
4150 esac
4151 rm -f conftest.make
4152 fi
4153 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4154   { echo "$as_me:$LINENO: result: yes" >&5
4155 echo "${ECHO_T}yes" >&6; }
4156   SET_MAKE=
4157 else
4158   { echo "$as_me:$LINENO: result: no" >&5
4159 echo "${ECHO_T}no" >&6; }
4160   SET_MAKE="MAKE=${MAKE-make}"
4161 fi
4162
4163
4164 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
4165 # That's wrong: it should be set to '${INSTALL}', so that one can
4166 # implement the "install-strip" target properly (strip executables,
4167 # but do not try to strip scripts.)
4168 #
4169 INSTALL_SCRIPT='${INSTALL}'
4170
4171 # random libc stuff
4172
4173 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4174 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4175 if test "${ac_cv_path_GREP+set}" = set; then
4176   echo $ECHO_N "(cached) $ECHO_C" >&6
4177 else
4178   # Extract the first word of "grep ggrep" to use in msg output
4179 if test -z "$GREP"; then
4180 set dummy grep ggrep; ac_prog_name=$2
4181 if test "${ac_cv_path_GREP+set}" = set; then
4182   echo $ECHO_N "(cached) $ECHO_C" >&6
4183 else
4184   ac_path_GREP_found=false
4185 # Loop through the user's path and test for each of PROGNAME-LIST
4186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4188 do
4189   IFS=$as_save_IFS
4190   test -z "$as_dir" && as_dir=.
4191   for ac_prog in grep ggrep; do
4192   for ac_exec_ext in '' $ac_executable_extensions; do
4193     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4194     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4195     # Check for GNU ac_path_GREP and select it if it is found.
4196   # Check for GNU $ac_path_GREP
4197 case `"$ac_path_GREP" --version 2>&1` in
4198 *GNU*)
4199   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4200 *)
4201   ac_count=0
4202   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4203   while :
4204   do
4205     cat "conftest.in" "conftest.in" >"conftest.tmp"
4206     mv "conftest.tmp" "conftest.in"
4207     cp "conftest.in" "conftest.nl"
4208     echo 'GREP' >> "conftest.nl"
4209     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4210     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4211     ac_count=`expr $ac_count + 1`
4212     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4213       # Best one so far, save it but keep looking for a better one
4214       ac_cv_path_GREP="$ac_path_GREP"
4215       ac_path_GREP_max=$ac_count
4216     fi
4217     # 10*(2^10) chars as input seems more than enough
4218     test $ac_count -gt 10 && break
4219   done
4220   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4221 esac
4222
4223
4224     $ac_path_GREP_found && break 3
4225   done
4226 done
4227
4228 done
4229 IFS=$as_save_IFS
4230
4231
4232 fi
4233
4234 GREP="$ac_cv_path_GREP"
4235 if test -z "$GREP"; then
4236   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4237 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4238    { (exit 1); exit 1; }; }
4239 fi
4240
4241 else
4242   ac_cv_path_GREP=$GREP
4243 fi
4244
4245
4246 fi
4247 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4248 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4249  GREP="$ac_cv_path_GREP"
4250
4251
4252 { echo "$as_me:$LINENO: checking for egrep" >&5
4253 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4254 if test "${ac_cv_path_EGREP+set}" = set; then
4255   echo $ECHO_N "(cached) $ECHO_C" >&6
4256 else
4257   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4258    then ac_cv_path_EGREP="$GREP -E"
4259    else
4260      # Extract the first word of "egrep" to use in msg output
4261 if test -z "$EGREP"; then
4262 set dummy egrep; ac_prog_name=$2
4263 if test "${ac_cv_path_EGREP+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   ac_path_EGREP_found=false
4267 # Loop through the user's path and test for each of PROGNAME-LIST
4268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4270 do
4271   IFS=$as_save_IFS
4272   test -z "$as_dir" && as_dir=.
4273   for ac_prog in egrep; do
4274   for ac_exec_ext in '' $ac_executable_extensions; do
4275     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4276     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4277     # Check for GNU ac_path_EGREP and select it if it is found.
4278   # Check for GNU $ac_path_EGREP
4279 case `"$ac_path_EGREP" --version 2>&1` in
4280 *GNU*)
4281   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4282 *)
4283   ac_count=0
4284   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4285   while :
4286   do
4287     cat "conftest.in" "conftest.in" >"conftest.tmp"
4288     mv "conftest.tmp" "conftest.in"
4289     cp "conftest.in" "conftest.nl"
4290     echo 'EGREP' >> "conftest.nl"
4291     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4292     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4293     ac_count=`expr $ac_count + 1`
4294     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4295       # Best one so far, save it but keep looking for a better one
4296       ac_cv_path_EGREP="$ac_path_EGREP"
4297       ac_path_EGREP_max=$ac_count
4298     fi
4299     # 10*(2^10) chars as input seems more than enough
4300     test $ac_count -gt 10 && break
4301   done
4302   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4303 esac
4304
4305
4306     $ac_path_EGREP_found && break 3
4307   done
4308 done
4309
4310 done
4311 IFS=$as_save_IFS
4312
4313
4314 fi
4315
4316 EGREP="$ac_cv_path_EGREP"
4317 if test -z "$EGREP"; then
4318   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4319 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4320    { (exit 1); exit 1; }; }
4321 fi
4322
4323 else
4324   ac_cv_path_EGREP=$EGREP
4325 fi
4326
4327
4328    fi
4329 fi
4330 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4331 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4332  EGREP="$ac_cv_path_EGREP"
4333
4334
4335 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4336 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4337 if test "${ac_cv_header_stdc+set}" = set; then
4338   echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340   cat >conftest.$ac_ext <<_ACEOF
4341 /* confdefs.h.  */
4342 _ACEOF
4343 cat confdefs.h >>conftest.$ac_ext
4344 cat >>conftest.$ac_ext <<_ACEOF
4345 /* end confdefs.h.  */
4346 #include <stdlib.h>
4347 #include <stdarg.h>
4348 #include <string.h>
4349 #include <float.h>
4350
4351 int
4352 main ()
4353 {
4354
4355   ;
4356   return 0;
4357 }
4358 _ACEOF
4359 rm -f conftest.$ac_objext
4360 if { (ac_try="$ac_compile"
4361 case "(($ac_try" in
4362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4363   *) ac_try_echo=$ac_try;;
4364 esac
4365 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4366   (eval "$ac_compile") 2>conftest.er1
4367   ac_status=$?
4368   grep -v '^ *+' conftest.er1 >conftest.err
4369   rm -f conftest.er1
4370   cat conftest.err >&5
4371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4372   (exit $ac_status); } && {
4373          test -z "$ac_c_werror_flag" ||
4374          test ! -s conftest.err
4375        } && test -s conftest.$ac_objext; then
4376   ac_cv_header_stdc=yes
4377 else
4378   echo "$as_me: failed program was:" >&5
4379 sed 's/^/| /' conftest.$ac_ext >&5
4380
4381         ac_cv_header_stdc=no
4382 fi
4383
4384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4385
4386 if test $ac_cv_header_stdc = yes; then
4387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4388   cat >conftest.$ac_ext <<_ACEOF
4389 /* confdefs.h.  */
4390 _ACEOF
4391 cat confdefs.h >>conftest.$ac_ext
4392 cat >>conftest.$ac_ext <<_ACEOF
4393 /* end confdefs.h.  */
4394 #include <string.h>
4395
4396 _ACEOF
4397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4398   $EGREP "memchr" >/dev/null 2>&1; then
4399   :
4400 else
4401   ac_cv_header_stdc=no
4402 fi
4403 rm -f conftest*
4404
4405 fi
4406
4407 if test $ac_cv_header_stdc = yes; then
4408   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4409   cat >conftest.$ac_ext <<_ACEOF
4410 /* confdefs.h.  */
4411 _ACEOF
4412 cat confdefs.h >>conftest.$ac_ext
4413 cat >>conftest.$ac_ext <<_ACEOF
4414 /* end confdefs.h.  */
4415 #include <stdlib.h>
4416
4417 _ACEOF
4418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4419   $EGREP "free" >/dev/null 2>&1; then
4420   :
4421 else
4422   ac_cv_header_stdc=no
4423 fi
4424 rm -f conftest*
4425
4426 fi
4427
4428 if test $ac_cv_header_stdc = yes; then
4429   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4430   if test "$cross_compiling" = yes; then
4431   :
4432 else
4433   cat >conftest.$ac_ext <<_ACEOF
4434 /* confdefs.h.  */
4435 _ACEOF
4436 cat confdefs.h >>conftest.$ac_ext
4437 cat >>conftest.$ac_ext <<_ACEOF
4438 /* end confdefs.h.  */
4439 #include <ctype.h>
4440 #include <stdlib.h>
4441 #if ((' ' & 0x0FF) == 0x020)
4442 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4443 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4444 #else
4445 # define ISLOWER(c) \
4446                    (('a' <= (c) && (c) <= 'i') \
4447                      || ('j' <= (c) && (c) <= 'r') \
4448                      || ('s' <= (c) && (c) <= 'z'))
4449 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4450 #endif
4451
4452 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4453 int
4454 main ()
4455 {
4456   int i;
4457   for (i = 0; i < 256; i++)
4458     if (XOR (islower (i), ISLOWER (i))
4459         || toupper (i) != TOUPPER (i))
4460       return 2;
4461   return 0;
4462 }
4463 _ACEOF
4464 rm -f conftest$ac_exeext
4465 if { (ac_try="$ac_link"
4466 case "(($ac_try" in
4467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4468   *) ac_try_echo=$ac_try;;
4469 esac
4470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4471   (eval "$ac_link") 2>&5
4472   ac_status=$?
4473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4475   { (case "(($ac_try" in
4476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4477   *) ac_try_echo=$ac_try;;
4478 esac
4479 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4480   (eval "$ac_try") 2>&5
4481   ac_status=$?
4482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483   (exit $ac_status); }; }; then
4484   :
4485 else
4486   echo "$as_me: program exited with status $ac_status" >&5
4487 echo "$as_me: failed program was:" >&5
4488 sed 's/^/| /' conftest.$ac_ext >&5
4489
4490 ( exit $ac_status )
4491 ac_cv_header_stdc=no
4492 fi
4493 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4494 fi
4495
4496
4497 fi
4498 fi
4499 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4500 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4501 if test $ac_cv_header_stdc = yes; then
4502
4503 cat >>confdefs.h <<\_ACEOF
4504 #define STDC_HEADERS 1
4505 _ACEOF
4506
4507 fi
4508
4509 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4520                   inttypes.h stdint.h unistd.h
4521 do
4522 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4523 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4525 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4526   echo $ECHO_N "(cached) $ECHO_C" >&6
4527 else
4528   cat >conftest.$ac_ext <<_ACEOF
4529 /* confdefs.h.  */
4530 _ACEOF
4531 cat confdefs.h >>conftest.$ac_ext
4532 cat >>conftest.$ac_ext <<_ACEOF
4533 /* end confdefs.h.  */
4534 $ac_includes_default
4535
4536 #include <$ac_header>
4537 _ACEOF
4538 rm -f conftest.$ac_objext
4539 if { (ac_try="$ac_compile"
4540 case "(($ac_try" in
4541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4542   *) ac_try_echo=$ac_try;;
4543 esac
4544 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4545   (eval "$ac_compile") 2>conftest.er1
4546   ac_status=$?
4547   grep -v '^ *+' conftest.er1 >conftest.err
4548   rm -f conftest.er1
4549   cat conftest.err >&5
4550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4551   (exit $ac_status); } && {
4552          test -z "$ac_c_werror_flag" ||
4553          test ! -s conftest.err
4554        } && test -s conftest.$ac_objext; then
4555   eval "$as_ac_Header=yes"
4556 else
4557   echo "$as_me: failed program was:" >&5
4558 sed 's/^/| /' conftest.$ac_ext >&5
4559
4560         eval "$as_ac_Header=no"
4561 fi
4562
4563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4564 fi
4565 ac_res=`eval echo '${'$as_ac_Header'}'`
4566                { echo "$as_me:$LINENO: result: $ac_res" >&5
4567 echo "${ECHO_T}$ac_res" >&6; }
4568 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4569   cat >>confdefs.h <<_ACEOF
4570 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4571 _ACEOF
4572
4573 fi
4574
4575 done
4576
4577
4578
4579 for ac_header in unistd.h
4580 do
4581 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4582 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4583   { echo "$as_me:$LINENO: checking for $ac_header" >&5
4584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4585 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4586   echo $ECHO_N "(cached) $ECHO_C" >&6
4587 fi
4588 ac_res=`eval echo '${'$as_ac_Header'}'`
4589                { echo "$as_me:$LINENO: result: $ac_res" >&5
4590 echo "${ECHO_T}$ac_res" >&6; }
4591 else
4592   # Is the header compilable?
4593 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4594 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4595 cat >conftest.$ac_ext <<_ACEOF
4596 /* confdefs.h.  */
4597 _ACEOF
4598 cat confdefs.h >>conftest.$ac_ext
4599 cat >>conftest.$ac_ext <<_ACEOF
4600 /* end confdefs.h.  */
4601 $ac_includes_default
4602 #include <$ac_header>
4603 _ACEOF
4604 rm -f conftest.$ac_objext
4605 if { (ac_try="$ac_compile"
4606 case "(($ac_try" in
4607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4608   *) ac_try_echo=$ac_try;;
4609 esac
4610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4611   (eval "$ac_compile") 2>conftest.er1
4612   ac_status=$?
4613   grep -v '^ *+' conftest.er1 >conftest.err
4614   rm -f conftest.er1
4615   cat conftest.err >&5
4616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); } && {
4618          test -z "$ac_c_werror_flag" ||
4619          test ! -s conftest.err
4620        } && test -s conftest.$ac_objext; then
4621   ac_header_compiler=yes
4622 else
4623   echo "$as_me: failed program was:" >&5
4624 sed 's/^/| /' conftest.$ac_ext >&5
4625
4626         ac_header_compiler=no
4627 fi
4628
4629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4630 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4631 echo "${ECHO_T}$ac_header_compiler" >&6; }
4632
4633 # Is the header present?
4634 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4635 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4636 cat >conftest.$ac_ext <<_ACEOF
4637 /* confdefs.h.  */
4638 _ACEOF
4639 cat confdefs.h >>conftest.$ac_ext
4640 cat >>conftest.$ac_ext <<_ACEOF
4641 /* end confdefs.h.  */
4642 #include <$ac_header>
4643 _ACEOF
4644 if { (ac_try="$ac_cpp conftest.$ac_ext"
4645 case "(($ac_try" in
4646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4647   *) ac_try_echo=$ac_try;;
4648 esac
4649 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4650   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4651   ac_status=$?
4652   grep -v '^ *+' conftest.er1 >conftest.err
4653   rm -f conftest.er1
4654   cat conftest.err >&5
4655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4656   (exit $ac_status); } >/dev/null && {
4657          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4658          test ! -s conftest.err
4659        }; then
4660   ac_header_preproc=yes
4661 else
4662   echo "$as_me: failed program was:" >&5
4663 sed 's/^/| /' conftest.$ac_ext >&5
4664
4665   ac_header_preproc=no
4666 fi
4667
4668 rm -f conftest.err conftest.$ac_ext
4669 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4670 echo "${ECHO_T}$ac_header_preproc" >&6; }
4671
4672 # So?  What about this header?
4673 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4674   yes:no: )
4675     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4676 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4677     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4678 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4679     ac_header_preproc=yes
4680     ;;
4681   no:yes:* )
4682     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4683 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4684     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4685 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4686     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4687 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4688     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4689 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4690     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4691 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4692     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4693 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4694
4695     ;;
4696 esac
4697 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4698 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4699 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4700   echo $ECHO_N "(cached) $ECHO_C" >&6
4701 else
4702   eval "$as_ac_Header=\$ac_header_preproc"
4703 fi
4704 ac_res=`eval echo '${'$as_ac_Header'}'`
4705                { echo "$as_me:$LINENO: result: $ac_res" >&5
4706 echo "${ECHO_T}$ac_res" >&6; }
4707
4708 fi
4709 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4710   cat >>confdefs.h <<_ACEOF
4711 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4712 _ACEOF
4713
4714 fi
4715
4716 done
4717
4718 { echo "$as_me:$LINENO: checking for mode_t" >&5
4719 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
4720 if test "${ac_cv_type_mode_t+set}" = set; then
4721   echo $ECHO_N "(cached) $ECHO_C" >&6
4722 else
4723   cat >conftest.$ac_ext <<_ACEOF
4724 /* confdefs.h.  */
4725 _ACEOF
4726 cat confdefs.h >>conftest.$ac_ext
4727 cat >>conftest.$ac_ext <<_ACEOF
4728 /* end confdefs.h.  */
4729 $ac_includes_default
4730 typedef mode_t ac__type_new_;
4731 int
4732 main ()
4733 {
4734 if ((ac__type_new_ *) 0)
4735   return 0;
4736 if (sizeof (ac__type_new_))
4737   return 0;
4738   ;
4739   return 0;
4740 }
4741 _ACEOF
4742 rm -f conftest.$ac_objext
4743 if { (ac_try="$ac_compile"
4744 case "(($ac_try" in
4745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4746   *) ac_try_echo=$ac_try;;
4747 esac
4748 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4749   (eval "$ac_compile") 2>conftest.er1
4750   ac_status=$?
4751   grep -v '^ *+' conftest.er1 >conftest.err
4752   rm -f conftest.er1
4753   cat conftest.err >&5
4754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4755   (exit $ac_status); } && {
4756          test -z "$ac_c_werror_flag" ||
4757          test ! -s conftest.err
4758        } && test -s conftest.$ac_objext; then
4759   ac_cv_type_mode_t=yes
4760 else
4761   echo "$as_me: failed program was:" >&5
4762 sed 's/^/| /' conftest.$ac_ext >&5
4763
4764         ac_cv_type_mode_t=no
4765 fi
4766
4767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4768 fi
4769 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4770 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
4771 if test $ac_cv_type_mode_t = yes; then
4772   :
4773 else
4774
4775 cat >>confdefs.h <<_ACEOF
4776 #define mode_t int
4777 _ACEOF
4778
4779 fi
4780
4781 { echo "$as_me:$LINENO: checking for pid_t" >&5
4782 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
4783 if test "${ac_cv_type_pid_t+set}" = set; then
4784   echo $ECHO_N "(cached) $ECHO_C" >&6
4785 else
4786   cat >conftest.$ac_ext <<_ACEOF
4787 /* confdefs.h.  */
4788 _ACEOF
4789 cat confdefs.h >>conftest.$ac_ext
4790 cat >>conftest.$ac_ext <<_ACEOF
4791 /* end confdefs.h.  */
4792 $ac_includes_default
4793 typedef pid_t ac__type_new_;
4794 int
4795 main ()
4796 {
4797 if ((ac__type_new_ *) 0)
4798   return 0;
4799 if (sizeof (ac__type_new_))
4800   return 0;
4801   ;
4802   return 0;
4803 }
4804 _ACEOF
4805 rm -f conftest.$ac_objext
4806 if { (ac_try="$ac_compile"
4807 case "(($ac_try" in
4808   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4809   *) ac_try_echo=$ac_try;;
4810 esac
4811 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4812   (eval "$ac_compile") 2>conftest.er1
4813   ac_status=$?
4814   grep -v '^ *+' conftest.er1 >conftest.err
4815   rm -f conftest.er1
4816   cat conftest.err >&5
4817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818   (exit $ac_status); } && {
4819          test -z "$ac_c_werror_flag" ||
4820          test ! -s conftest.err
4821        } && test -s conftest.$ac_objext; then
4822   ac_cv_type_pid_t=yes
4823 else
4824   echo "$as_me: failed program was:" >&5
4825 sed 's/^/| /' conftest.$ac_ext >&5
4826
4827         ac_cv_type_pid_t=no
4828 fi
4829
4830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4831 fi
4832 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4833 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
4834 if test $ac_cv_type_pid_t = yes; then
4835   :
4836 else
4837
4838 cat >>confdefs.h <<_ACEOF
4839 #define pid_t int
4840 _ACEOF
4841
4842 fi
4843
4844 { echo "$as_me:$LINENO: checking for size_t" >&5
4845 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
4846 if test "${ac_cv_type_size_t+set}" = set; then
4847   echo $ECHO_N "(cached) $ECHO_C" >&6
4848 else
4849   cat >conftest.$ac_ext <<_ACEOF
4850 /* confdefs.h.  */
4851 _ACEOF
4852 cat confdefs.h >>conftest.$ac_ext
4853 cat >>conftest.$ac_ext <<_ACEOF
4854 /* end confdefs.h.  */
4855 $ac_includes_default
4856 typedef size_t ac__type_new_;
4857 int
4858 main ()
4859 {
4860 if ((ac__type_new_ *) 0)
4861   return 0;
4862 if (sizeof (ac__type_new_))
4863   return 0;
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 rm -f conftest.$ac_objext
4869 if { (ac_try="$ac_compile"
4870 case "(($ac_try" in
4871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872   *) ac_try_echo=$ac_try;;
4873 esac
4874 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4875   (eval "$ac_compile") 2>conftest.er1
4876   ac_status=$?
4877   grep -v '^ *+' conftest.er1 >conftest.err
4878   rm -f conftest.er1
4879   cat conftest.err >&5
4880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881   (exit $ac_status); } && {
4882          test -z "$ac_c_werror_flag" ||
4883          test ! -s conftest.err
4884        } && test -s conftest.$ac_objext; then
4885   ac_cv_type_size_t=yes
4886 else
4887   echo "$as_me: failed program was:" >&5
4888 sed 's/^/| /' conftest.$ac_ext >&5
4889
4890         ac_cv_type_size_t=no
4891 fi
4892
4893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894 fi
4895 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4896 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
4897 if test $ac_cv_type_size_t = yes; then
4898   :
4899 else
4900
4901 cat >>confdefs.h <<_ACEOF
4902 #define size_t unsigned int
4903 _ACEOF
4904
4905 fi
4906
4907 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4908 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
4909 if test "${ac_cv_type_signal+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   cat >conftest.$ac_ext <<_ACEOF
4913 /* confdefs.h.  */
4914 _ACEOF
4915 cat confdefs.h >>conftest.$ac_ext
4916 cat >>conftest.$ac_ext <<_ACEOF
4917 /* end confdefs.h.  */
4918 #include <sys/types.h>
4919 #include <signal.h>
4920
4921 int
4922 main ()
4923 {
4924 return *(signal (0, 0)) (0) == 1;
4925   ;
4926   return 0;
4927 }
4928 _ACEOF
4929 rm -f conftest.$ac_objext
4930 if { (ac_try="$ac_compile"
4931 case "(($ac_try" in
4932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4933   *) ac_try_echo=$ac_try;;
4934 esac
4935 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4936   (eval "$ac_compile") 2>conftest.er1
4937   ac_status=$?
4938   grep -v '^ *+' conftest.er1 >conftest.err
4939   rm -f conftest.er1
4940   cat conftest.err >&5
4941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942   (exit $ac_status); } && {
4943          test -z "$ac_c_werror_flag" ||
4944          test ! -s conftest.err
4945        } && test -s conftest.$ac_objext; then
4946   ac_cv_type_signal=int
4947 else
4948   echo "$as_me: failed program was:" >&5
4949 sed 's/^/| /' conftest.$ac_ext >&5
4950
4951         ac_cv_type_signal=void
4952 fi
4953
4954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4955 fi
4956 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4957 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
4958
4959 cat >>confdefs.h <<_ACEOF
4960 #define RETSIGTYPE $ac_cv_type_signal
4961 _ACEOF
4962
4963
4964 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4965 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
4966 if test "${ac_cv_header_time+set}" = set; then
4967   echo $ECHO_N "(cached) $ECHO_C" >&6
4968 else
4969   cat >conftest.$ac_ext <<_ACEOF
4970 /* confdefs.h.  */
4971 _ACEOF
4972 cat confdefs.h >>conftest.$ac_ext
4973 cat >>conftest.$ac_ext <<_ACEOF
4974 /* end confdefs.h.  */
4975 #include <sys/types.h>
4976 #include <sys/time.h>
4977 #include <time.h>
4978
4979 int
4980 main ()
4981 {
4982 if ((struct tm *) 0)
4983 return 0;
4984   ;
4985   return 0;
4986 }
4987 _ACEOF
4988 rm -f conftest.$ac_objext
4989 if { (ac_try="$ac_compile"
4990 case "(($ac_try" in
4991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4992   *) ac_try_echo=$ac_try;;
4993 esac
4994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4995   (eval "$ac_compile") 2>conftest.er1
4996   ac_status=$?
4997   grep -v '^ *+' conftest.er1 >conftest.err
4998   rm -f conftest.er1
4999   cat conftest.err >&5
5000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001   (exit $ac_status); } && {
5002          test -z "$ac_c_werror_flag" ||
5003          test ! -s conftest.err
5004        } && test -s conftest.$ac_objext; then
5005   ac_cv_header_time=yes
5006 else
5007   echo "$as_me: failed program was:" >&5
5008 sed 's/^/| /' conftest.$ac_ext >&5
5009
5010         ac_cv_header_time=no
5011 fi
5012
5013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5014 fi
5015 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
5016 echo "${ECHO_T}$ac_cv_header_time" >&6; }
5017 if test $ac_cv_header_time = yes; then
5018
5019 cat >>confdefs.h <<\_ACEOF
5020 #define TIME_WITH_SYS_TIME 1
5021 _ACEOF
5022
5023 fi
5024
5025 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
5026 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
5027 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030   cat >conftest.$ac_ext <<_ACEOF
5031 /* confdefs.h.  */
5032 _ACEOF
5033 cat confdefs.h >>conftest.$ac_ext
5034 cat >>conftest.$ac_ext <<_ACEOF
5035 /* end confdefs.h.  */
5036 #include <sys/types.h>
5037 #include <sys/wait.h>
5038 #ifndef WEXITSTATUS
5039 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
5040 #endif
5041 #ifndef WIFEXITED
5042 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5043 #endif
5044
5045 int
5046 main ()
5047 {
5048   int s;
5049   wait (&s);
5050   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5051   ;
5052   return 0;
5053 }
5054 _ACEOF
5055 rm -f conftest.$ac_objext
5056 if { (ac_try="$ac_compile"
5057 case "(($ac_try" in
5058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059   *) ac_try_echo=$ac_try;;
5060 esac
5061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5062   (eval "$ac_compile") 2>conftest.er1
5063   ac_status=$?
5064   grep -v '^ *+' conftest.er1 >conftest.err
5065   rm -f conftest.er1
5066   cat conftest.err >&5
5067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); } && {
5069          test -z "$ac_c_werror_flag" ||
5070          test ! -s conftest.err
5071        } && test -s conftest.$ac_objext; then
5072   ac_cv_header_sys_wait_h=yes
5073 else
5074   echo "$as_me: failed program was:" >&5
5075 sed 's/^/| /' conftest.$ac_ext >&5
5076
5077         ac_cv_header_sys_wait_h=no
5078 fi
5079
5080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5081 fi
5082 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5083 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
5084 if test $ac_cv_header_sys_wait_h = yes; then
5085
5086 cat >>confdefs.h <<\_ACEOF
5087 #define HAVE_SYS_WAIT_H 1
5088 _ACEOF
5089
5090 fi
5091
5092
5093
5094
5095
5096
5097 ac_header_dirent=no
5098 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5099   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5100 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5101 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5102 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5103   echo $ECHO_N "(cached) $ECHO_C" >&6
5104 else
5105   cat >conftest.$ac_ext <<_ACEOF
5106 /* confdefs.h.  */
5107 _ACEOF
5108 cat confdefs.h >>conftest.$ac_ext
5109 cat >>conftest.$ac_ext <<_ACEOF
5110 /* end confdefs.h.  */
5111 #include <sys/types.h>
5112 #include <$ac_hdr>
5113
5114 int
5115 main ()
5116 {
5117 if ((DIR *) 0)
5118 return 0;
5119   ;
5120   return 0;
5121 }
5122 _ACEOF
5123 rm -f conftest.$ac_objext
5124 if { (ac_try="$ac_compile"
5125 case "(($ac_try" in
5126   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127   *) ac_try_echo=$ac_try;;
5128 esac
5129 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5130   (eval "$ac_compile") 2>conftest.er1
5131   ac_status=$?
5132   grep -v '^ *+' conftest.er1 >conftest.err
5133   rm -f conftest.er1
5134   cat conftest.err >&5
5135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136   (exit $ac_status); } && {
5137          test -z "$ac_c_werror_flag" ||
5138          test ! -s conftest.err
5139        } && test -s conftest.$ac_objext; then
5140   eval "$as_ac_Header=yes"
5141 else
5142   echo "$as_me: failed program was:" >&5
5143 sed 's/^/| /' conftest.$ac_ext >&5
5144
5145         eval "$as_ac_Header=no"
5146 fi
5147
5148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5149 fi
5150 ac_res=`eval echo '${'$as_ac_Header'}'`
5151                { echo "$as_me:$LINENO: result: $ac_res" >&5
5152 echo "${ECHO_T}$ac_res" >&6; }
5153 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5154   cat >>confdefs.h <<_ACEOF
5155 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5156 _ACEOF
5157
5158 ac_header_dirent=$ac_hdr; break
5159 fi
5160
5161 done
5162 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5163 if test $ac_header_dirent = dirent.h; then
5164   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5165 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5166 if test "${ac_cv_search_opendir+set}" = set; then
5167   echo $ECHO_N "(cached) $ECHO_C" >&6
5168 else
5169   ac_func_search_save_LIBS=$LIBS
5170 cat >conftest.$ac_ext <<_ACEOF
5171 /* confdefs.h.  */
5172 _ACEOF
5173 cat confdefs.h >>conftest.$ac_ext
5174 cat >>conftest.$ac_ext <<_ACEOF
5175 /* end confdefs.h.  */
5176
5177 /* Override any GCC internal prototype to avoid an error.
5178    Use char because int might match the return type of a GCC
5179    builtin and then its argument prototype would still apply.  */
5180 #ifdef __cplusplus
5181 extern "C"
5182 #endif
5183 char opendir ();
5184 int
5185 main ()
5186 {
5187 return opendir ();
5188   ;
5189   return 0;
5190 }
5191 _ACEOF
5192 for ac_lib in '' dir; do
5193   if test -z "$ac_lib"; then
5194     ac_res="none required"
5195   else
5196     ac_res=-l$ac_lib
5197     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5198   fi
5199   rm -f conftest.$ac_objext conftest$ac_exeext
5200 if { (ac_try="$ac_link"
5201 case "(($ac_try" in
5202   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203   *) ac_try_echo=$ac_try;;
5204 esac
5205 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5206   (eval "$ac_link") 2>conftest.er1
5207   ac_status=$?
5208   grep -v '^ *+' conftest.er1 >conftest.err
5209   rm -f conftest.er1
5210   cat conftest.err >&5
5211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212   (exit $ac_status); } && {
5213          test -z "$ac_c_werror_flag" ||
5214          test ! -s conftest.err
5215        } && test -s conftest$ac_exeext &&
5216        $as_test_x conftest$ac_exeext; then
5217   ac_cv_search_opendir=$ac_res
5218 else
5219   echo "$as_me: failed program was:" >&5
5220 sed 's/^/| /' conftest.$ac_ext >&5
5221
5222
5223 fi
5224
5225 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5226       conftest$ac_exeext
5227   if test "${ac_cv_search_opendir+set}" = set; then
5228   break
5229 fi
5230 done
5231 if test "${ac_cv_search_opendir+set}" = set; then
5232   :
5233 else
5234   ac_cv_search_opendir=no
5235 fi
5236 rm conftest.$ac_ext
5237 LIBS=$ac_func_search_save_LIBS
5238 fi
5239 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5240 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5241 ac_res=$ac_cv_search_opendir
5242 if test "$ac_res" != no; then
5243   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5244
5245 fi
5246
5247 else
5248   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5249 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
5250 if test "${ac_cv_search_opendir+set}" = set; then
5251   echo $ECHO_N "(cached) $ECHO_C" >&6
5252 else
5253   ac_func_search_save_LIBS=$LIBS
5254 cat >conftest.$ac_ext <<_ACEOF
5255 /* confdefs.h.  */
5256 _ACEOF
5257 cat confdefs.h >>conftest.$ac_ext
5258 cat >>conftest.$ac_ext <<_ACEOF
5259 /* end confdefs.h.  */
5260
5261 /* Override any GCC internal prototype to avoid an error.
5262    Use char because int might match the return type of a GCC
5263    builtin and then its argument prototype would still apply.  */
5264 #ifdef __cplusplus
5265 extern "C"
5266 #endif
5267 char opendir ();
5268 int
5269 main ()
5270 {
5271 return opendir ();
5272   ;
5273   return 0;
5274 }
5275 _ACEOF
5276 for ac_lib in '' x; do
5277   if test -z "$ac_lib"; then
5278     ac_res="none required"
5279   else
5280     ac_res=-l$ac_lib
5281     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5282   fi
5283   rm -f conftest.$ac_objext conftest$ac_exeext
5284 if { (ac_try="$ac_link"
5285 case "(($ac_try" in
5286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5287   *) ac_try_echo=$ac_try;;
5288 esac
5289 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5290   (eval "$ac_link") 2>conftest.er1
5291   ac_status=$?
5292   grep -v '^ *+' conftest.er1 >conftest.err
5293   rm -f conftest.er1
5294   cat conftest.err >&5
5295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296   (exit $ac_status); } && {
5297          test -z "$ac_c_werror_flag" ||
5298          test ! -s conftest.err
5299        } && test -s conftest$ac_exeext &&
5300        $as_test_x conftest$ac_exeext; then
5301   ac_cv_search_opendir=$ac_res
5302 else
5303   echo "$as_me: failed program was:" >&5
5304 sed 's/^/| /' conftest.$ac_ext >&5
5305
5306
5307 fi
5308
5309 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5310       conftest$ac_exeext
5311   if test "${ac_cv_search_opendir+set}" = set; then
5312   break
5313 fi
5314 done
5315 if test "${ac_cv_search_opendir+set}" = set; then
5316   :
5317 else
5318   ac_cv_search_opendir=no
5319 fi
5320 rm conftest.$ac_ext
5321 LIBS=$ac_func_search_save_LIBS
5322 fi
5323 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5324 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5325 ac_res=$ac_cv_search_opendir
5326 if test "$ac_res" != no; then
5327   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5328
5329 fi
5330
5331 fi
5332
5333 { echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
5334 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6; }
5335   if test "${ac_cv_gettimeofday_args+set}" = set; then
5336   echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338   cat >conftest.$ac_ext <<_ACEOF
5339 /* confdefs.h.  */
5340 _ACEOF
5341 cat confdefs.h >>conftest.$ac_ext
5342 cat >>conftest.$ac_ext <<_ACEOF
5343 /* end confdefs.h.  */
5344 #include <stdlib.h>
5345                     #include <sys/time.h>
5346 int
5347 main ()
5348 {
5349 struct timeval tv; struct timezone tzp;
5350                     gettimeofday(&tv, &tzp);
5351   ;
5352   return 0;
5353 }
5354 _ACEOF
5355 rm -f conftest.$ac_objext
5356 if { (ac_try="$ac_compile"
5357 case "(($ac_try" in
5358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359   *) ac_try_echo=$ac_try;;
5360 esac
5361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5362   (eval "$ac_compile") 2>conftest.er1
5363   ac_status=$?
5364   grep -v '^ *+' conftest.er1 >conftest.err
5365   rm -f conftest.er1
5366   cat conftest.err >&5
5367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368   (exit $ac_status); } && {
5369          test -z "$ac_c_werror_flag" ||
5370          test ! -s conftest.err
5371        } && test -s conftest.$ac_objext; then
5372   ac_gettimeofday_args=2
5373 else
5374   echo "$as_me: failed program was:" >&5
5375 sed 's/^/| /' conftest.$ac_ext >&5
5376
5377         cat >conftest.$ac_ext <<_ACEOF
5378 /* confdefs.h.  */
5379 _ACEOF
5380 cat confdefs.h >>conftest.$ac_ext
5381 cat >>conftest.$ac_ext <<_ACEOF
5382 /* end confdefs.h.  */
5383 #include <stdlib.h>
5384                                     #include <sys/time.h>
5385 int
5386 main ()
5387 {
5388 struct timeval tv; gettimeofday(&tv);
5389   ;
5390   return 0;
5391 }
5392 _ACEOF
5393 rm -f conftest.$ac_objext
5394 if { (ac_try="$ac_compile"
5395 case "(($ac_try" in
5396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5397   *) ac_try_echo=$ac_try;;
5398 esac
5399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5400   (eval "$ac_compile") 2>conftest.er1
5401   ac_status=$?
5402   grep -v '^ *+' conftest.er1 >conftest.err
5403   rm -f conftest.er1
5404   cat conftest.err >&5
5405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406   (exit $ac_status); } && {
5407          test -z "$ac_c_werror_flag" ||
5408          test ! -s conftest.err
5409        } && test -s conftest.$ac_objext; then
5410   ac_gettimeofday_args=1
5411 else
5412   echo "$as_me: failed program was:" >&5
5413 sed 's/^/| /' conftest.$ac_ext >&5
5414
5415         ac_gettimeofday_args=0
5416 fi
5417
5418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5419 fi
5420
5421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5422     ac_cv_gettimeofday_args=$ac_gettimeofday_args
5423 fi
5424
5425   ac_gettimeofday_args=$ac_cv_gettimeofday_args
5426   if test "$ac_gettimeofday_args" = 1 ; then
5427     cat >>confdefs.h <<\_ACEOF
5428 #define HAVE_GETTIMEOFDAY 1
5429 _ACEOF
5430
5431     { echo "$as_me:$LINENO: result: one argument" >&5
5432 echo "${ECHO_T}one argument" >&6; }
5433   elif test "$ac_gettimeofday_args" = 2 ; then
5434     cat >>confdefs.h <<\_ACEOF
5435 #define HAVE_GETTIMEOFDAY 1
5436 _ACEOF
5437
5438     cat >>confdefs.h <<\_ACEOF
5439 #define GETTIMEOFDAY_TWO_ARGS 1
5440 _ACEOF
5441
5442     { echo "$as_me:$LINENO: result: two arguments" >&5
5443 echo "${ECHO_T}two arguments" >&6; }
5444   else
5445     { echo "$as_me:$LINENO: result: unknown" >&5
5446 echo "${ECHO_T}unknown" >&6; }
5447   fi
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
5459 do
5460 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5461 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5462 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5463 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5464   echo $ECHO_N "(cached) $ECHO_C" >&6
5465 else
5466   cat >conftest.$ac_ext <<_ACEOF
5467 /* confdefs.h.  */
5468 _ACEOF
5469 cat confdefs.h >>conftest.$ac_ext
5470 cat >>conftest.$ac_ext <<_ACEOF
5471 /* end confdefs.h.  */
5472 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5473    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5474 #define $ac_func innocuous_$ac_func
5475
5476 /* System header to define __stub macros and hopefully few prototypes,
5477     which can conflict with char $ac_func (); below.
5478     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5479     <limits.h> exists even on freestanding compilers.  */
5480
5481 #ifdef __STDC__
5482 # include <limits.h>
5483 #else
5484 # include <assert.h>
5485 #endif
5486
5487 #undef $ac_func
5488
5489 /* Override any GCC internal prototype to avoid an error.
5490    Use char because int might match the return type of a GCC
5491    builtin and then its argument prototype would still apply.  */
5492 #ifdef __cplusplus
5493 extern "C"
5494 #endif
5495 char $ac_func ();
5496 /* The GNU C library defines this for functions which it implements
5497     to always fail with ENOSYS.  Some functions are actually named
5498     something starting with __ and the normal name is an alias.  */
5499 #if defined __stub_$ac_func || defined __stub___$ac_func
5500 choke me
5501 #endif
5502
5503 int
5504 main ()
5505 {
5506 return $ac_func ();
5507   ;
5508   return 0;
5509 }
5510 _ACEOF
5511 rm -f conftest.$ac_objext conftest$ac_exeext
5512 if { (ac_try="$ac_link"
5513 case "(($ac_try" in
5514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5515   *) ac_try_echo=$ac_try;;
5516 esac
5517 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5518   (eval "$ac_link") 2>conftest.er1
5519   ac_status=$?
5520   grep -v '^ *+' conftest.er1 >conftest.err
5521   rm -f conftest.er1
5522   cat conftest.err >&5
5523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524   (exit $ac_status); } && {
5525          test -z "$ac_c_werror_flag" ||
5526          test ! -s conftest.err
5527        } && test -s conftest$ac_exeext &&
5528        $as_test_x conftest$ac_exeext; then
5529   eval "$as_ac_var=yes"
5530 else
5531   echo "$as_me: failed program was:" >&5
5532 sed 's/^/| /' conftest.$ac_ext >&5
5533
5534         eval "$as_ac_var=no"
5535 fi
5536
5537 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5538       conftest$ac_exeext conftest.$ac_ext
5539 fi
5540 ac_res=`eval echo '${'$as_ac_var'}'`
5541                { echo "$as_me:$LINENO: result: $ac_res" >&5
5542 echo "${ECHO_T}$ac_res" >&6; }
5543 if test `eval echo '${'$as_ac_var'}'` = yes; then
5544   cat >>confdefs.h <<_ACEOF
5545 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5546 _ACEOF
5547
5548 fi
5549 done
5550
5551
5552
5553
5554
5555 for ac_func in sigaction syslog realpath setrlimit
5556 do
5557 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5558 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5559 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5560 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5561   echo $ECHO_N "(cached) $ECHO_C" >&6
5562 else
5563   cat >conftest.$ac_ext <<_ACEOF
5564 /* confdefs.h.  */
5565 _ACEOF
5566 cat confdefs.h >>conftest.$ac_ext
5567 cat >>conftest.$ac_ext <<_ACEOF
5568 /* end confdefs.h.  */
5569 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5570    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5571 #define $ac_func innocuous_$ac_func
5572
5573 /* System header to define __stub macros and hopefully few prototypes,
5574     which can conflict with char $ac_func (); below.
5575     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5576     <limits.h> exists even on freestanding compilers.  */
5577
5578 #ifdef __STDC__
5579 # include <limits.h>
5580 #else
5581 # include <assert.h>
5582 #endif
5583
5584 #undef $ac_func
5585
5586 /* Override any GCC internal prototype to avoid an error.
5587    Use char because int might match the return type of a GCC
5588    builtin and then its argument prototype would still apply.  */
5589 #ifdef __cplusplus
5590 extern "C"
5591 #endif
5592 char $ac_func ();
5593 /* The GNU C library defines this for functions which it implements
5594     to always fail with ENOSYS.  Some functions are actually named
5595     something starting with __ and the normal name is an alias.  */
5596 #if defined __stub_$ac_func || defined __stub___$ac_func
5597 choke me
5598 #endif
5599
5600 int
5601 main ()
5602 {
5603 return $ac_func ();
5604   ;
5605   return 0;
5606 }
5607 _ACEOF
5608 rm -f conftest.$ac_objext conftest$ac_exeext
5609 if { (ac_try="$ac_link"
5610 case "(($ac_try" in
5611   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5612   *) ac_try_echo=$ac_try;;
5613 esac
5614 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5615   (eval "$ac_link") 2>conftest.er1
5616   ac_status=$?
5617   grep -v '^ *+' conftest.er1 >conftest.err
5618   rm -f conftest.er1
5619   cat conftest.err >&5
5620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621   (exit $ac_status); } && {
5622          test -z "$ac_c_werror_flag" ||
5623          test ! -s conftest.err
5624        } && test -s conftest$ac_exeext &&
5625        $as_test_x conftest$ac_exeext; then
5626   eval "$as_ac_var=yes"
5627 else
5628   echo "$as_me: failed program was:" >&5
5629 sed 's/^/| /' conftest.$ac_ext >&5
5630
5631         eval "$as_ac_var=no"
5632 fi
5633
5634 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5635       conftest$ac_exeext conftest.$ac_ext
5636 fi
5637 ac_res=`eval echo '${'$as_ac_var'}'`
5638                { echo "$as_me:$LINENO: result: $ac_res" >&5
5639 echo "${ECHO_T}$ac_res" >&6; }
5640 if test `eval echo '${'$as_ac_var'}'` = yes; then
5641   cat >>confdefs.h <<_ACEOF
5642 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5643 _ACEOF
5644
5645 fi
5646 done
5647
5648
5649 for ac_func in setlocale
5650 do
5651 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5652 { echo "$as_me:$LINENO: checking for $ac_func" >&5
5653 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5654 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5655   echo $ECHO_N "(cached) $ECHO_C" >&6
5656 else
5657   cat >conftest.$ac_ext <<_ACEOF
5658 /* confdefs.h.  */
5659 _ACEOF
5660 cat confdefs.h >>conftest.$ac_ext
5661 cat >>conftest.$ac_ext <<_ACEOF
5662 /* end confdefs.h.  */
5663 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5664    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5665 #define $ac_func innocuous_$ac_func
5666
5667 /* System header to define __stub macros and hopefully few prototypes,
5668     which can conflict with char $ac_func (); below.
5669     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5670     <limits.h> exists even on freestanding compilers.  */
5671
5672 #ifdef __STDC__
5673 # include <limits.h>
5674 #else
5675 # include <assert.h>
5676 #endif
5677
5678 #undef $ac_func
5679
5680 /* Override any GCC internal prototype to avoid an error.
5681    Use char because int might match the return type of a GCC
5682    builtin and then its argument prototype would still apply.  */
5683 #ifdef __cplusplus
5684 extern "C"
5685 #endif
5686 char $ac_func ();
5687 /* The GNU C library defines this for functions which it implements
5688     to always fail with ENOSYS.  Some functions are actually named
5689     something starting with __ and the normal name is an alias.  */
5690 #if defined __stub_$ac_func || defined __stub___$ac_func
5691 choke me
5692 #endif
5693
5694 int
5695 main ()
5696 {
5697 return $ac_func ();
5698   ;
5699   return 0;
5700 }
5701 _ACEOF
5702 rm -f conftest.$ac_objext conftest$ac_exeext
5703 if { (ac_try="$ac_link"
5704 case "(($ac_try" in
5705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5706   *) ac_try_echo=$ac_try;;
5707 esac
5708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5709   (eval "$ac_link") 2>conftest.er1
5710   ac_status=$?
5711   grep -v '^ *+' conftest.er1 >conftest.err
5712   rm -f conftest.er1
5713   cat conftest.err >&5
5714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5715   (exit $ac_status); } && {
5716          test -z "$ac_c_werror_flag" ||
5717          test ! -s conftest.err
5718        } && test -s conftest$ac_exeext &&
5719        $as_test_x conftest$ac_exeext; then
5720   eval "$as_ac_var=yes"
5721 else
5722   echo "$as_me: failed program was:" >&5
5723 sed 's/^/| /' conftest.$ac_ext >&5
5724
5725         eval "$as_ac_var=no"
5726 fi
5727
5728 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5729       conftest$ac_exeext conftest.$ac_ext
5730 fi
5731 ac_res=`eval echo '${'$as_ac_var'}'`
5732                { echo "$as_me:$LINENO: result: $ac_res" >&5
5733 echo "${ECHO_T}$ac_res" >&6; }
5734 if test `eval echo '${'$as_ac_var'}'` = yes; then
5735   cat >>confdefs.h <<_ACEOF
5736 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5737 _ACEOF
5738
5739 fi
5740 done
5741
5742 { echo "$as_me:$LINENO: checking for struct icmp" >&5
5743 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6; }
5744 if test "${ac_cv_have_icmp+set}" = set; then
5745   echo $ECHO_N "(cached) $ECHO_C" >&6
5746 else
5747   cat >conftest.$ac_ext <<_ACEOF
5748 /* confdefs.h.  */
5749 _ACEOF
5750 cat confdefs.h >>conftest.$ac_ext
5751 cat >>conftest.$ac_ext <<_ACEOF
5752 /* end confdefs.h.  */
5753 #include <stdlib.h>
5754                    #include <stdio.h>
5755                    #include <math.h>
5756                    #include <unistd.h>
5757                    #include <limits.h>
5758                    #include <signal.h>
5759                    #include <fcntl.h>
5760                    #include <sys/types.h>
5761                    #include <sys/time.h>
5762                    #include <sys/ipc.h>
5763                    #include <sys/shm.h>
5764                    #include <sys/socket.h>
5765                    #include <netinet/in_systm.h>
5766                    #include <netinet/in.h>
5767                    #include <netinet/ip.h>
5768                    #include <netinet/ip_icmp.h>
5769                    #include <netinet/udp.h>
5770                    #include <arpa/inet.h>
5771                    #include <netdb.h>
5772 int
5773 main ()
5774 {
5775 struct icmp i;
5776                    struct sockaddr s;
5777                    struct sockaddr_in si;
5778                    struct ip ip;
5779                    i.icmp_type = ICMP_ECHO;
5780                    i.icmp_code = 0;
5781                    i.icmp_cksum = 0;
5782                    i.icmp_id = 0;
5783                    i.icmp_seq = 0;
5784                    si.sin_family = AF_INET;
5785                    #if defined(__DECC) || defined(_IP_VHL)
5786                    ip.ip_vhl = 0;
5787                    #else
5788                    ip.ip_hl = 0;
5789                    #endif
5790
5791   ;
5792   return 0;
5793 }
5794 _ACEOF
5795 rm -f conftest.$ac_objext
5796 if { (ac_try="$ac_compile"
5797 case "(($ac_try" in
5798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5799   *) ac_try_echo=$ac_try;;
5800 esac
5801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5802   (eval "$ac_compile") 2>conftest.er1
5803   ac_status=$?
5804   grep -v '^ *+' conftest.er1 >conftest.err
5805   rm -f conftest.er1
5806   cat conftest.err >&5
5807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808   (exit $ac_status); } && {
5809          test -z "$ac_c_werror_flag" ||
5810          test ! -s conftest.err
5811        } && test -s conftest.$ac_objext; then
5812   ac_cv_have_icmp=yes
5813 else
5814   echo "$as_me: failed program was:" >&5
5815 sed 's/^/| /' conftest.$ac_ext >&5
5816
5817         ac_cv_have_icmp=no
5818 fi
5819
5820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5821 fi
5822 { echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5823 echo "${ECHO_T}$ac_cv_have_icmp" >&6; }
5824  if test "$ac_cv_have_icmp" = yes ; then
5825    cat >>confdefs.h <<\_ACEOF
5826 #define HAVE_ICMP 1
5827 _ACEOF
5828
5829  fi
5830 { echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5831 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6; }
5832 if test "${ac_cv_have_icmphdr+set}" = set; then
5833   echo $ECHO_N "(cached) $ECHO_C" >&6
5834 else
5835   cat >conftest.$ac_ext <<_ACEOF
5836 /* confdefs.h.  */
5837 _ACEOF
5838 cat confdefs.h >>conftest.$ac_ext
5839 cat >>conftest.$ac_ext <<_ACEOF
5840 /* end confdefs.h.  */
5841 #include <stdlib.h>
5842                    #include <stdio.h>
5843                    #include <math.h>
5844                    #include <unistd.h>
5845                    #include <limits.h>
5846                    #include <signal.h>
5847                    #include <fcntl.h>
5848                    #include <sys/types.h>
5849                    #include <sys/time.h>
5850                    #include <sys/ipc.h>
5851                    #include <sys/shm.h>
5852                    #include <sys/socket.h>
5853                    #include <netinet/in_systm.h>
5854                    #include <netinet/in.h>
5855                    #include <netinet/ip.h>
5856                    #include <netinet/ip_icmp.h>
5857                    #include <netinet/udp.h>
5858                    #include <arpa/inet.h>
5859                    #include <netdb.h>
5860 int
5861 main ()
5862 {
5863 struct icmphdr i;
5864                    struct sockaddr s;
5865                    struct sockaddr_in si;
5866                    struct ip ip;
5867                    i.type = ICMP_ECHO;
5868                    i.code = 0;
5869                    i.checksum = 0;
5870                    i.un.echo.id = 0;
5871                    i.un.echo.sequence = 0;
5872                    si.sin_family = AF_INET;
5873                    ip.ip_hl = 0;
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f conftest.$ac_objext
5879 if { (ac_try="$ac_compile"
5880 case "(($ac_try" in
5881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5882   *) ac_try_echo=$ac_try;;
5883 esac
5884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5885   (eval "$ac_compile") 2>conftest.er1
5886   ac_status=$?
5887   grep -v '^ *+' conftest.er1 >conftest.err
5888   rm -f conftest.er1
5889   cat conftest.err >&5
5890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891   (exit $ac_status); } && {
5892          test -z "$ac_c_werror_flag" ||
5893          test ! -s conftest.err
5894        } && test -s conftest.$ac_objext; then
5895   ac_cv_have_icmphdr=yes
5896 else
5897   echo "$as_me: failed program was:" >&5
5898 sed 's/^/| /' conftest.$ac_ext >&5
5899
5900         ac_cv_have_icmphdr=no
5901 fi
5902
5903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5904 fi
5905 { echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5906 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6; }
5907  if test "$ac_cv_have_icmphdr" = yes ; then
5908    cat >>confdefs.h <<\_ACEOF
5909 #define HAVE_ICMPHDR 1
5910 _ACEOF
5911
5912  fi
5913
5914
5915 for ac_header in crypt.h sys/select.h
5916 do
5917 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5918 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5919   { echo "$as_me:$LINENO: checking for $ac_header" >&5
5920 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5921 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5922   echo $ECHO_N "(cached) $ECHO_C" >&6
5923 fi
5924 ac_res=`eval echo '${'$as_ac_Header'}'`
5925                { echo "$as_me:$LINENO: result: $ac_res" >&5
5926 echo "${ECHO_T}$ac_res" >&6; }
5927 else
5928   # Is the header compilable?
5929 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5930 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5931 cat >conftest.$ac_ext <<_ACEOF
5932 /* confdefs.h.  */
5933 _ACEOF
5934 cat confdefs.h >>conftest.$ac_ext
5935 cat >>conftest.$ac_ext <<_ACEOF
5936 /* end confdefs.h.  */
5937 $ac_includes_default
5938 #include <$ac_header>
5939 _ACEOF
5940 rm -f conftest.$ac_objext
5941 if { (ac_try="$ac_compile"
5942 case "(($ac_try" in
5943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5944   *) ac_try_echo=$ac_try;;
5945 esac
5946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5947   (eval "$ac_compile") 2>conftest.er1
5948   ac_status=$?
5949   grep -v '^ *+' conftest.er1 >conftest.err
5950   rm -f conftest.er1
5951   cat conftest.err >&5
5952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953   (exit $ac_status); } && {
5954          test -z "$ac_c_werror_flag" ||
5955          test ! -s conftest.err
5956        } && test -s conftest.$ac_objext; then
5957   ac_header_compiler=yes
5958 else
5959   echo "$as_me: failed program was:" >&5
5960 sed 's/^/| /' conftest.$ac_ext >&5
5961
5962         ac_header_compiler=no
5963 fi
5964
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5967 echo "${ECHO_T}$ac_header_compiler" >&6; }
5968
5969 # Is the header present?
5970 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5971 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5972 cat >conftest.$ac_ext <<_ACEOF
5973 /* confdefs.h.  */
5974 _ACEOF
5975 cat confdefs.h >>conftest.$ac_ext
5976 cat >>conftest.$ac_ext <<_ACEOF
5977 /* end confdefs.h.  */
5978 #include <$ac_header>
5979 _ACEOF
5980 if { (ac_try="$ac_cpp conftest.$ac_ext"
5981 case "(($ac_try" in
5982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5983   *) ac_try_echo=$ac_try;;
5984 esac
5985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5986   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5987   ac_status=$?
5988   grep -v '^ *+' conftest.er1 >conftest.err
5989   rm -f conftest.er1
5990   cat conftest.err >&5
5991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992   (exit $ac_status); } >/dev/null && {
5993          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5994          test ! -s conftest.err
5995        }; then
5996   ac_header_preproc=yes
5997 else
5998   echo "$as_me: failed program was:" >&5
5999 sed 's/^/| /' conftest.$ac_ext >&5
6000
6001   ac_header_preproc=no
6002 fi
6003
6004 rm -f conftest.err conftest.$ac_ext
6005 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6006 echo "${ECHO_T}$ac_header_preproc" >&6; }
6007
6008 # So?  What about this header?
6009 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6010   yes:no: )
6011     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6012 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6013     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6014 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6015     ac_header_preproc=yes
6016     ;;
6017   no:yes:* )
6018     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6019 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6020     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6021 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6022     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6023 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6024     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6025 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6026     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6027 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6028     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6029 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6030
6031     ;;
6032 esac
6033 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6034 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6035 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6036   echo $ECHO_N "(cached) $ECHO_C" >&6
6037 else
6038   eval "$as_ac_Header=\$ac_header_preproc"
6039 fi
6040 ac_res=`eval echo '${'$as_ac_Header'}'`
6041                { echo "$as_me:$LINENO: result: $ac_res" >&5
6042 echo "${ECHO_T}$ac_res" >&6; }
6043
6044 fi
6045 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6046   cat >>confdefs.h <<_ACEOF
6047 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6048 _ACEOF
6049
6050 fi
6051
6052 done
6053
6054 for ac_prog in perl5 perl
6055 do
6056   # Extract the first word of "$ac_prog", so it can be a program name with args.
6057 set dummy $ac_prog; ac_word=$2
6058 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6060 if test "${ac_cv_path_PERL+set}" = set; then
6061   echo $ECHO_N "(cached) $ECHO_C" >&6
6062 else
6063   case $PERL in
6064   [\\/]* | ?:[\\/]*)
6065   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6066   ;;
6067   *)
6068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6069 for as_dir in $PATH
6070 do
6071   IFS=$as_save_IFS
6072   test -z "$as_dir" && as_dir=.
6073   for ac_exec_ext in '' $ac_executable_extensions; do
6074   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6075     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6076     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6077     break 2
6078   fi
6079 done
6080 done
6081 IFS=$as_save_IFS
6082
6083   ;;
6084 esac
6085 fi
6086 PERL=$ac_cv_path_PERL
6087 if test -n "$PERL"; then
6088   { echo "$as_me:$LINENO: result: $PERL" >&5
6089 echo "${ECHO_T}$PERL" >&6; }
6090 else
6091   { echo "$as_me:$LINENO: result: no" >&5
6092 echo "${ECHO_T}no" >&6; }
6093 fi
6094
6095
6096   test -n "$PERL" && break
6097 done
6098
6099   if test -z "$PERL" ; then
6100     PERL_VERSION=0
6101   else
6102     { echo "$as_me:$LINENO: checking perl version" >&5
6103 echo $ECHO_N "checking perl version... $ECHO_C" >&6; }
6104 if test "${ac_cv_perl_version+set}" = set; then
6105   echo $ECHO_N "(cached) $ECHO_C" >&6
6106 else
6107   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
6108 fi
6109 { echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
6110 echo "${ECHO_T}$ac_cv_perl_version" >&6; }
6111     PERL_VERSION=$ac_cv_perl_version
6112   fi
6113
6114
6115 if test -z "$PERL" ; then
6116   # don't let it be blank...
6117   PERL=/usr/bin/perl
6118 fi
6119
6120 { echo "$as_me:$LINENO: checking for X" >&5
6121 echo $ECHO_N "checking for X... $ECHO_C" >&6; }
6122
6123
6124 # Check whether --with-x was given.
6125 if test "${with_x+set}" = set; then
6126   withval=$with_x;
6127 fi
6128
6129 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6130 if test "x$with_x" = xno; then
6131   # The user explicitly disabled X.
6132   have_x=disabled
6133 else
6134   case $x_includes,$x_libraries in #(
6135     *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
6136 echo "$as_me: error: Cannot use X directory names containing '" >&2;}
6137    { (exit 1); exit 1; }; };; #(
6138     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
6139   echo $ECHO_N "(cached) $ECHO_C" >&6
6140 else
6141   # One or both of the vars are not set, and there is no cached value.
6142 ac_x_includes=no ac_x_libraries=no
6143 rm -f -r conftest.dir
6144 if mkdir conftest.dir; then
6145   cd conftest.dir
6146   cat >Imakefile <<'_ACEOF'
6147 incroot:
6148         @echo incroot='${INCROOT}'
6149 usrlibdir:
6150         @echo usrlibdir='${USRLIBDIR}'
6151 libdir:
6152         @echo libdir='${LIBDIR}'
6153 _ACEOF
6154   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6155     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6156     for ac_var in incroot usrlibdir libdir; do
6157       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6158     done
6159     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6160     for ac_extension in a so sl; do
6161       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6162          test -f "$ac_im_libdir/libX11.$ac_extension"; then
6163         ac_im_usrlibdir=$ac_im_libdir; break
6164       fi
6165     done
6166     # Screen out bogus values from the imake configuration.  They are
6167     # bogus both because they are the default anyway, and because
6168     # using them would break gcc on systems where it needs fixed includes.
6169     case $ac_im_incroot in
6170         /usr/include) ac_x_includes= ;;
6171         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6172     esac
6173     case $ac_im_usrlibdir in
6174         /usr/lib | /lib) ;;
6175         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6176     esac
6177   fi
6178   cd ..
6179   rm -f -r conftest.dir
6180 fi
6181
6182 # Standard set of common directories for X headers.
6183 # Check X11 before X11Rn because it is often a symlink to the current release.
6184 ac_x_header_dirs='
6185 /usr/X11/include
6186 /usr/X11R6/include
6187 /usr/X11R5/include
6188 /usr/X11R4/include
6189
6190 /usr/include/X11
6191 /usr/include/X11R6
6192 /usr/include/X11R5
6193 /usr/include/X11R4
6194
6195 /usr/local/X11/include
6196 /usr/local/X11R6/include
6197 /usr/local/X11R5/include
6198 /usr/local/X11R4/include
6199
6200 /usr/local/include/X11
6201 /usr/local/include/X11R6
6202 /usr/local/include/X11R5
6203 /usr/local/include/X11R4
6204
6205 /usr/X386/include
6206 /usr/x386/include
6207 /usr/XFree86/include/X11
6208
6209 /usr/include
6210 /usr/local/include
6211 /usr/unsupported/include
6212 /usr/athena/include
6213 /usr/local/x11r5/include
6214 /usr/lpp/Xamples/include
6215
6216 /usr/openwin/include
6217 /usr/openwin/share/include'
6218
6219 if test "$ac_x_includes" = no; then
6220   # Guess where to find include files, by looking for Xlib.h.
6221   # First, try using that file with no special directory specified.
6222   cat >conftest.$ac_ext <<_ACEOF
6223 /* confdefs.h.  */
6224 _ACEOF
6225 cat confdefs.h >>conftest.$ac_ext
6226 cat >>conftest.$ac_ext <<_ACEOF
6227 /* end confdefs.h.  */
6228 #include <X11/Xlib.h>
6229 _ACEOF
6230 if { (ac_try="$ac_cpp conftest.$ac_ext"
6231 case "(($ac_try" in
6232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6233   *) ac_try_echo=$ac_try;;
6234 esac
6235 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6236   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6237   ac_status=$?
6238   grep -v '^ *+' conftest.er1 >conftest.err
6239   rm -f conftest.er1
6240   cat conftest.err >&5
6241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242   (exit $ac_status); } >/dev/null && {
6243          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6244          test ! -s conftest.err
6245        }; then
6246   # We can compile using X headers with no special include directory.
6247 ac_x_includes=
6248 else
6249   echo "$as_me: failed program was:" >&5
6250 sed 's/^/| /' conftest.$ac_ext >&5
6251
6252   for ac_dir in $ac_x_header_dirs; do
6253   if test -r "$ac_dir/X11/Xlib.h"; then
6254     ac_x_includes=$ac_dir
6255     break
6256   fi
6257 done
6258 fi
6259
6260 rm -f conftest.err conftest.$ac_ext
6261 fi # $ac_x_includes = no
6262
6263 if test "$ac_x_libraries" = no; then
6264   # Check for the libraries.
6265   # See if we find them without any special options.
6266   # Don't add to $LIBS permanently.
6267   ac_save_LIBS=$LIBS
6268   LIBS="-lX11 $LIBS"
6269   cat >conftest.$ac_ext <<_ACEOF
6270 /* confdefs.h.  */
6271 _ACEOF
6272 cat confdefs.h >>conftest.$ac_ext
6273 cat >>conftest.$ac_ext <<_ACEOF
6274 /* end confdefs.h.  */
6275 #include <X11/Xlib.h>
6276 int
6277 main ()
6278 {
6279 XrmInitialize ()
6280   ;
6281   return 0;
6282 }
6283 _ACEOF
6284 rm -f conftest.$ac_objext conftest$ac_exeext
6285 if { (ac_try="$ac_link"
6286 case "(($ac_try" in
6287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6288   *) ac_try_echo=$ac_try;;
6289 esac
6290 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6291   (eval "$ac_link") 2>conftest.er1
6292   ac_status=$?
6293   grep -v '^ *+' conftest.er1 >conftest.err
6294   rm -f conftest.er1
6295   cat conftest.err >&5
6296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297   (exit $ac_status); } && {
6298          test -z "$ac_c_werror_flag" ||
6299          test ! -s conftest.err
6300        } && test -s conftest$ac_exeext &&
6301        $as_test_x conftest$ac_exeext; then
6302   LIBS=$ac_save_LIBS
6303 # We can link X programs with no special library path.
6304 ac_x_libraries=
6305 else
6306   echo "$as_me: failed program was:" >&5
6307 sed 's/^/| /' conftest.$ac_ext >&5
6308
6309         LIBS=$ac_save_LIBS
6310 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6311 do
6312   # Don't even attempt the hair of trying to link an X program!
6313   for ac_extension in a so sl; do
6314     if test -r "$ac_dir/libX11.$ac_extension"; then
6315       ac_x_libraries=$ac_dir
6316       break 2
6317     fi
6318   done
6319 done
6320 fi
6321
6322 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6323       conftest$ac_exeext conftest.$ac_ext
6324 fi # $ac_x_libraries = no
6325
6326 case $ac_x_includes,$ac_x_libraries in #(
6327   no,* | *,no | *\'*)
6328     # Didn't find X, or a directory has "'" in its name.
6329     ac_cv_have_x="have_x=no";; #(
6330   *)
6331     # Record where we found X for the cache.
6332     ac_cv_have_x="have_x=yes\
6333         ac_x_includes='$ac_x_includes'\
6334         ac_x_libraries='$ac_x_libraries'"
6335 esac
6336 fi
6337 ;; #(
6338     *) have_x=yes;;
6339   esac
6340   eval "$ac_cv_have_x"
6341 fi # $with_x != no
6342
6343 if test "$have_x" != yes; then
6344   { echo "$as_me:$LINENO: result: $have_x" >&5
6345 echo "${ECHO_T}$have_x" >&6; }
6346   no_x=yes
6347 else
6348   # If each of the values was on the command line, it overrides each guess.
6349   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6350   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6351   # Update the cache value to reflect the command line values.
6352   ac_cv_have_x="have_x=yes\
6353         ac_x_includes='$x_includes'\
6354         ac_x_libraries='$x_libraries'"
6355   { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6356 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
6357 fi
6358
6359 if test "$no_x" = yes; then
6360   # Not all programs may use this symbol, but it does not hurt to define it.
6361
6362 cat >>confdefs.h <<\_ACEOF
6363 #define X_DISPLAY_MISSING 1
6364 _ACEOF
6365
6366   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6367 else
6368   if test -n "$x_includes"; then
6369     X_CFLAGS="$X_CFLAGS -I$x_includes"
6370   fi
6371
6372   # It would also be nice to do this for all -L options, not just this one.
6373   if test -n "$x_libraries"; then
6374     X_LIBS="$X_LIBS -L$x_libraries"
6375     # For Solaris; some versions of Sun CC require a space after -R and
6376     # others require no space.  Words are not sufficient . . . .
6377     { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6378 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; }
6379     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6380     ac_xsave_c_werror_flag=$ac_c_werror_flag
6381     ac_c_werror_flag=yes
6382     cat >conftest.$ac_ext <<_ACEOF
6383 /* confdefs.h.  */
6384 _ACEOF
6385 cat confdefs.h >>conftest.$ac_ext
6386 cat >>conftest.$ac_ext <<_ACEOF
6387 /* end confdefs.h.  */
6388
6389 int
6390 main ()
6391 {
6392
6393   ;
6394   return 0;
6395 }
6396 _ACEOF
6397 rm -f conftest.$ac_objext conftest$ac_exeext
6398 if { (ac_try="$ac_link"
6399 case "(($ac_try" in
6400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6401   *) ac_try_echo=$ac_try;;
6402 esac
6403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6404   (eval "$ac_link") 2>conftest.er1
6405   ac_status=$?
6406   grep -v '^ *+' conftest.er1 >conftest.err
6407   rm -f conftest.er1
6408   cat conftest.err >&5
6409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410   (exit $ac_status); } && {
6411          test -z "$ac_c_werror_flag" ||
6412          test ! -s conftest.err
6413        } && test -s conftest$ac_exeext &&
6414        $as_test_x conftest$ac_exeext; then
6415   { echo "$as_me:$LINENO: result: no" >&5
6416 echo "${ECHO_T}no" >&6; }
6417        X_LIBS="$X_LIBS -R$x_libraries"
6418 else
6419   echo "$as_me: failed program was:" >&5
6420 sed 's/^/| /' conftest.$ac_ext >&5
6421
6422         LIBS="$ac_xsave_LIBS -R $x_libraries"
6423        cat >conftest.$ac_ext <<_ACEOF
6424 /* confdefs.h.  */
6425 _ACEOF
6426 cat confdefs.h >>conftest.$ac_ext
6427 cat >>conftest.$ac_ext <<_ACEOF
6428 /* end confdefs.h.  */
6429
6430 int
6431 main ()
6432 {
6433
6434   ;
6435   return 0;
6436 }
6437 _ACEOF
6438 rm -f conftest.$ac_objext conftest$ac_exeext
6439 if { (ac_try="$ac_link"
6440 case "(($ac_try" in
6441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6442   *) ac_try_echo=$ac_try;;
6443 esac
6444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6445   (eval "$ac_link") 2>conftest.er1
6446   ac_status=$?
6447   grep -v '^ *+' conftest.er1 >conftest.err
6448   rm -f conftest.er1
6449   cat conftest.err >&5
6450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451   (exit $ac_status); } && {
6452          test -z "$ac_c_werror_flag" ||
6453          test ! -s conftest.err
6454        } && test -s conftest$ac_exeext &&
6455        $as_test_x conftest$ac_exeext; then
6456   { echo "$as_me:$LINENO: result: yes" >&5
6457 echo "${ECHO_T}yes" >&6; }
6458           X_LIBS="$X_LIBS -R $x_libraries"
6459 else
6460   echo "$as_me: failed program was:" >&5
6461 sed 's/^/| /' conftest.$ac_ext >&5
6462
6463         { echo "$as_me:$LINENO: result: neither works" >&5
6464 echo "${ECHO_T}neither works" >&6; }
6465 fi
6466
6467 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6468       conftest$ac_exeext conftest.$ac_ext
6469 fi
6470
6471 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6472       conftest$ac_exeext conftest.$ac_ext
6473     ac_c_werror_flag=$ac_xsave_c_werror_flag
6474     LIBS=$ac_xsave_LIBS
6475   fi
6476
6477   # Check for system-dependent libraries X programs must link with.
6478   # Do this before checking for the system-independent R6 libraries
6479   # (-lICE), since we may need -lsocket or whatever for X linking.
6480
6481   if test "$ISC" = yes; then
6482     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6483   else
6484     # Martyn Johnson says this is needed for Ultrix, if the X
6485     # libraries were built with DECnet support.  And Karl Berry says
6486     # the Alpha needs dnet_stub (dnet does not exist).
6487     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6488     cat >conftest.$ac_ext <<_ACEOF
6489 /* confdefs.h.  */
6490 _ACEOF
6491 cat confdefs.h >>conftest.$ac_ext
6492 cat >>conftest.$ac_ext <<_ACEOF
6493 /* end confdefs.h.  */
6494
6495 /* Override any GCC internal prototype to avoid an error.
6496    Use char because int might match the return type of a GCC
6497    builtin and then its argument prototype would still apply.  */
6498 #ifdef __cplusplus
6499 extern "C"
6500 #endif
6501 char XOpenDisplay ();
6502 int
6503 main ()
6504 {
6505 return XOpenDisplay ();
6506   ;
6507   return 0;
6508 }
6509 _ACEOF
6510 rm -f conftest.$ac_objext conftest$ac_exeext
6511 if { (ac_try="$ac_link"
6512 case "(($ac_try" in
6513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6514   *) ac_try_echo=$ac_try;;
6515 esac
6516 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6517   (eval "$ac_link") 2>conftest.er1
6518   ac_status=$?
6519   grep -v '^ *+' conftest.er1 >conftest.err
6520   rm -f conftest.er1
6521   cat conftest.err >&5
6522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523   (exit $ac_status); } && {
6524          test -z "$ac_c_werror_flag" ||
6525          test ! -s conftest.err
6526        } && test -s conftest$ac_exeext &&
6527        $as_test_x conftest$ac_exeext; then
6528   :
6529 else
6530   echo "$as_me: failed program was:" >&5
6531 sed 's/^/| /' conftest.$ac_ext >&5
6532
6533         { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6534 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
6535 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538   ac_check_lib_save_LIBS=$LIBS
6539 LIBS="-ldnet  $LIBS"
6540 cat >conftest.$ac_ext <<_ACEOF
6541 /* confdefs.h.  */
6542 _ACEOF
6543 cat confdefs.h >>conftest.$ac_ext
6544 cat >>conftest.$ac_ext <<_ACEOF
6545 /* end confdefs.h.  */
6546
6547 /* Override any GCC internal prototype to avoid an error.
6548    Use char because int might match the return type of a GCC
6549    builtin and then its argument prototype would still apply.  */
6550 #ifdef __cplusplus
6551 extern "C"
6552 #endif
6553 char dnet_ntoa ();
6554 int
6555 main ()
6556 {
6557 return dnet_ntoa ();
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (ac_try="$ac_link"
6564 case "(($ac_try" in
6565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6566   *) ac_try_echo=$ac_try;;
6567 esac
6568 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6569   (eval "$ac_link") 2>conftest.er1
6570   ac_status=$?
6571   grep -v '^ *+' conftest.er1 >conftest.err
6572   rm -f conftest.er1
6573   cat conftest.err >&5
6574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575   (exit $ac_status); } && {
6576          test -z "$ac_c_werror_flag" ||
6577          test ! -s conftest.err
6578        } && test -s conftest$ac_exeext &&
6579        $as_test_x conftest$ac_exeext; then
6580   ac_cv_lib_dnet_dnet_ntoa=yes
6581 else
6582   echo "$as_me: failed program was:" >&5
6583 sed 's/^/| /' conftest.$ac_ext >&5
6584
6585         ac_cv_lib_dnet_dnet_ntoa=no
6586 fi
6587
6588 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6589       conftest$ac_exeext conftest.$ac_ext
6590 LIBS=$ac_check_lib_save_LIBS
6591 fi
6592 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6593 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6594 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6595   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6596 fi
6597
6598     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6599       { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6600 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; }
6601 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6602   echo $ECHO_N "(cached) $ECHO_C" >&6
6603 else
6604   ac_check_lib_save_LIBS=$LIBS
6605 LIBS="-ldnet_stub  $LIBS"
6606 cat >conftest.$ac_ext <<_ACEOF
6607 /* confdefs.h.  */
6608 _ACEOF
6609 cat confdefs.h >>conftest.$ac_ext
6610 cat >>conftest.$ac_ext <<_ACEOF
6611 /* end confdefs.h.  */
6612
6613 /* Override any GCC internal prototype to avoid an error.
6614    Use char because int might match the return type of a GCC
6615    builtin and then its argument prototype would still apply.  */
6616 #ifdef __cplusplus
6617 extern "C"
6618 #endif
6619 char dnet_ntoa ();
6620 int
6621 main ()
6622 {
6623 return dnet_ntoa ();
6624   ;
6625   return 0;
6626 }
6627 _ACEOF
6628 rm -f conftest.$ac_objext conftest$ac_exeext
6629 if { (ac_try="$ac_link"
6630 case "(($ac_try" in
6631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6632   *) ac_try_echo=$ac_try;;
6633 esac
6634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6635   (eval "$ac_link") 2>conftest.er1
6636   ac_status=$?
6637   grep -v '^ *+' conftest.er1 >conftest.err
6638   rm -f conftest.er1
6639   cat conftest.err >&5
6640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641   (exit $ac_status); } && {
6642          test -z "$ac_c_werror_flag" ||
6643          test ! -s conftest.err
6644        } && test -s conftest$ac_exeext &&
6645        $as_test_x conftest$ac_exeext; then
6646   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6647 else
6648   echo "$as_me: failed program was:" >&5
6649 sed 's/^/| /' conftest.$ac_ext >&5
6650
6651         ac_cv_lib_dnet_stub_dnet_ntoa=no
6652 fi
6653
6654 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6655       conftest$ac_exeext conftest.$ac_ext
6656 LIBS=$ac_check_lib_save_LIBS
6657 fi
6658 { echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6659 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
6660 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6661   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6662 fi
6663
6664     fi
6665 fi
6666
6667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6668       conftest$ac_exeext conftest.$ac_ext
6669     LIBS="$ac_xsave_LIBS"
6670
6671     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6672     # to get the SysV transport functions.
6673     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6674     # needs -lnsl.
6675     # The nsl library prevents programs from opening the X display
6676     # on Irix 5.2, according to T.E. Dickey.
6677     # The functions gethostbyname, getservbyname, and inet_addr are
6678     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6679     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
6680 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
6681 if test "${ac_cv_func_gethostbyname+set}" = set; then
6682   echo $ECHO_N "(cached) $ECHO_C" >&6
6683 else
6684   cat >conftest.$ac_ext <<_ACEOF
6685 /* confdefs.h.  */
6686 _ACEOF
6687 cat confdefs.h >>conftest.$ac_ext
6688 cat >>conftest.$ac_ext <<_ACEOF
6689 /* end confdefs.h.  */
6690 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6691    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6692 #define gethostbyname innocuous_gethostbyname
6693
6694 /* System header to define __stub macros and hopefully few prototypes,
6695     which can conflict with char gethostbyname (); below.
6696     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6697     <limits.h> exists even on freestanding compilers.  */
6698
6699 #ifdef __STDC__
6700 # include <limits.h>
6701 #else
6702 # include <assert.h>
6703 #endif
6704
6705 #undef gethostbyname
6706
6707 /* Override any GCC internal prototype to avoid an error.
6708    Use char because int might match the return type of a GCC
6709    builtin and then its argument prototype would still apply.  */
6710 #ifdef __cplusplus
6711 extern "C"
6712 #endif
6713 char gethostbyname ();
6714 /* The GNU C library defines this for functions which it implements
6715     to always fail with ENOSYS.  Some functions are actually named
6716     something starting with __ and the normal name is an alias.  */
6717 #if defined __stub_gethostbyname || defined __stub___gethostbyname
6718 choke me
6719 #endif
6720
6721 int
6722 main ()
6723 {
6724 return gethostbyname ();
6725   ;
6726   return 0;
6727 }
6728 _ACEOF
6729 rm -f conftest.$ac_objext conftest$ac_exeext
6730 if { (ac_try="$ac_link"
6731 case "(($ac_try" in
6732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6733   *) ac_try_echo=$ac_try;;
6734 esac
6735 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6736   (eval "$ac_link") 2>conftest.er1
6737   ac_status=$?
6738   grep -v '^ *+' conftest.er1 >conftest.err
6739   rm -f conftest.er1
6740   cat conftest.err >&5
6741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6742   (exit $ac_status); } && {
6743          test -z "$ac_c_werror_flag" ||
6744          test ! -s conftest.err
6745        } && test -s conftest$ac_exeext &&
6746        $as_test_x conftest$ac_exeext; then
6747   ac_cv_func_gethostbyname=yes
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 sed 's/^/| /' conftest.$ac_ext >&5
6751
6752         ac_cv_func_gethostbyname=no
6753 fi
6754
6755 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6756       conftest$ac_exeext conftest.$ac_ext
6757 fi
6758 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6759 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
6760
6761     if test $ac_cv_func_gethostbyname = no; then
6762       { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6763 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
6764 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6765   echo $ECHO_N "(cached) $ECHO_C" >&6
6766 else
6767   ac_check_lib_save_LIBS=$LIBS
6768 LIBS="-lnsl  $LIBS"
6769 cat >conftest.$ac_ext <<_ACEOF
6770 /* confdefs.h.  */
6771 _ACEOF
6772 cat confdefs.h >>conftest.$ac_ext
6773 cat >>conftest.$ac_ext <<_ACEOF
6774 /* end confdefs.h.  */
6775
6776 /* Override any GCC internal prototype to avoid an error.
6777    Use char because int might match the return type of a GCC
6778    builtin and then its argument prototype would still apply.  */
6779 #ifdef __cplusplus
6780 extern "C"
6781 #endif
6782 char gethostbyname ();
6783 int
6784 main ()
6785 {
6786 return gethostbyname ();
6787   ;
6788   return 0;
6789 }
6790 _ACEOF
6791 rm -f conftest.$ac_objext conftest$ac_exeext
6792 if { (ac_try="$ac_link"
6793 case "(($ac_try" in
6794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795   *) ac_try_echo=$ac_try;;
6796 esac
6797 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6798   (eval "$ac_link") 2>conftest.er1
6799   ac_status=$?
6800   grep -v '^ *+' conftest.er1 >conftest.err
6801   rm -f conftest.er1
6802   cat conftest.err >&5
6803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6804   (exit $ac_status); } && {
6805          test -z "$ac_c_werror_flag" ||
6806          test ! -s conftest.err
6807        } && test -s conftest$ac_exeext &&
6808        $as_test_x conftest$ac_exeext; then
6809   ac_cv_lib_nsl_gethostbyname=yes
6810 else
6811   echo "$as_me: failed program was:" >&5
6812 sed 's/^/| /' conftest.$ac_ext >&5
6813
6814         ac_cv_lib_nsl_gethostbyname=no
6815 fi
6816
6817 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6818       conftest$ac_exeext conftest.$ac_ext
6819 LIBS=$ac_check_lib_save_LIBS
6820 fi
6821 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6822 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
6823 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6824   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6825 fi
6826
6827       if test $ac_cv_lib_nsl_gethostbyname = no; then
6828         { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6829 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; }
6830 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   ac_check_lib_save_LIBS=$LIBS
6834 LIBS="-lbsd  $LIBS"
6835 cat >conftest.$ac_ext <<_ACEOF
6836 /* confdefs.h.  */
6837 _ACEOF
6838 cat confdefs.h >>conftest.$ac_ext
6839 cat >>conftest.$ac_ext <<_ACEOF
6840 /* end confdefs.h.  */
6841
6842 /* Override any GCC internal prototype to avoid an error.
6843    Use char because int might match the return type of a GCC
6844    builtin and then its argument prototype would still apply.  */
6845 #ifdef __cplusplus
6846 extern "C"
6847 #endif
6848 char gethostbyname ();
6849 int
6850 main ()
6851 {
6852 return gethostbyname ();
6853   ;
6854   return 0;
6855 }
6856 _ACEOF
6857 rm -f conftest.$ac_objext conftest$ac_exeext
6858 if { (ac_try="$ac_link"
6859 case "(($ac_try" in
6860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6861   *) ac_try_echo=$ac_try;;
6862 esac
6863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6864   (eval "$ac_link") 2>conftest.er1
6865   ac_status=$?
6866   grep -v '^ *+' conftest.er1 >conftest.err
6867   rm -f conftest.er1
6868   cat conftest.err >&5
6869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870   (exit $ac_status); } && {
6871          test -z "$ac_c_werror_flag" ||
6872          test ! -s conftest.err
6873        } && test -s conftest$ac_exeext &&
6874        $as_test_x conftest$ac_exeext; then
6875   ac_cv_lib_bsd_gethostbyname=yes
6876 else
6877   echo "$as_me: failed program was:" >&5
6878 sed 's/^/| /' conftest.$ac_ext >&5
6879
6880         ac_cv_lib_bsd_gethostbyname=no
6881 fi
6882
6883 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6884       conftest$ac_exeext conftest.$ac_ext
6885 LIBS=$ac_check_lib_save_LIBS
6886 fi
6887 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6888 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; }
6889 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6890   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6891 fi
6892
6893       fi
6894     fi
6895
6896     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6897     # socket/setsockopt and other routines are undefined under SCO ODT
6898     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6899     # on later versions), says Simon Leinen: it contains gethostby*
6900     # variants that don't use the name server (or something).  -lsocket
6901     # must be given before -lnsl if both are needed.  We assume that
6902     # if connect needs -lnsl, so does gethostbyname.
6903     { echo "$as_me:$LINENO: checking for connect" >&5
6904 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
6905 if test "${ac_cv_func_connect+set}" = set; then
6906   echo $ECHO_N "(cached) $ECHO_C" >&6
6907 else
6908   cat >conftest.$ac_ext <<_ACEOF
6909 /* confdefs.h.  */
6910 _ACEOF
6911 cat confdefs.h >>conftest.$ac_ext
6912 cat >>conftest.$ac_ext <<_ACEOF
6913 /* end confdefs.h.  */
6914 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6915    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6916 #define connect innocuous_connect
6917
6918 /* System header to define __stub macros and hopefully few prototypes,
6919     which can conflict with char connect (); below.
6920     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6921     <limits.h> exists even on freestanding compilers.  */
6922
6923 #ifdef __STDC__
6924 # include <limits.h>
6925 #else
6926 # include <assert.h>
6927 #endif
6928
6929 #undef connect
6930
6931 /* Override any GCC internal prototype to avoid an error.
6932    Use char because int might match the return type of a GCC
6933    builtin and then its argument prototype would still apply.  */
6934 #ifdef __cplusplus
6935 extern "C"
6936 #endif
6937 char connect ();
6938 /* The GNU C library defines this for functions which it implements
6939     to always fail with ENOSYS.  Some functions are actually named
6940     something starting with __ and the normal name is an alias.  */
6941 #if defined __stub_connect || defined __stub___connect
6942 choke me
6943 #endif
6944
6945 int
6946 main ()
6947 {
6948 return connect ();
6949   ;
6950   return 0;
6951 }
6952 _ACEOF
6953 rm -f conftest.$ac_objext conftest$ac_exeext
6954 if { (ac_try="$ac_link"
6955 case "(($ac_try" in
6956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6957   *) ac_try_echo=$ac_try;;
6958 esac
6959 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6960   (eval "$ac_link") 2>conftest.er1
6961   ac_status=$?
6962   grep -v '^ *+' conftest.er1 >conftest.err
6963   rm -f conftest.er1
6964   cat conftest.err >&5
6965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966   (exit $ac_status); } && {
6967          test -z "$ac_c_werror_flag" ||
6968          test ! -s conftest.err
6969        } && test -s conftest$ac_exeext &&
6970        $as_test_x conftest$ac_exeext; then
6971   ac_cv_func_connect=yes
6972 else
6973   echo "$as_me: failed program was:" >&5
6974 sed 's/^/| /' conftest.$ac_ext >&5
6975
6976         ac_cv_func_connect=no
6977 fi
6978
6979 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6980       conftest$ac_exeext conftest.$ac_ext
6981 fi
6982 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6983 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
6984
6985     if test $ac_cv_func_connect = no; then
6986       { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6987 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
6988 if test "${ac_cv_lib_socket_connect+set}" = set; then
6989   echo $ECHO_N "(cached) $ECHO_C" >&6
6990 else
6991   ac_check_lib_save_LIBS=$LIBS
6992 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6993 cat >conftest.$ac_ext <<_ACEOF
6994 /* confdefs.h.  */
6995 _ACEOF
6996 cat confdefs.h >>conftest.$ac_ext
6997 cat >>conftest.$ac_ext <<_ACEOF
6998 /* end confdefs.h.  */
6999
7000 /* Override any GCC internal prototype to avoid an error.
7001    Use char because int might match the return type of a GCC
7002    builtin and then its argument prototype would still apply.  */
7003 #ifdef __cplusplus
7004 extern "C"
7005 #endif
7006 char connect ();
7007 int
7008 main ()
7009 {
7010 return connect ();
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext conftest$ac_exeext
7016 if { (ac_try="$ac_link"
7017 case "(($ac_try" in
7018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7019   *) ac_try_echo=$ac_try;;
7020 esac
7021 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7022   (eval "$ac_link") 2>conftest.er1
7023   ac_status=$?
7024   grep -v '^ *+' conftest.er1 >conftest.err
7025   rm -f conftest.er1
7026   cat conftest.err >&5
7027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028   (exit $ac_status); } && {
7029          test -z "$ac_c_werror_flag" ||
7030          test ! -s conftest.err
7031        } && test -s conftest$ac_exeext &&
7032        $as_test_x conftest$ac_exeext; then
7033   ac_cv_lib_socket_connect=yes
7034 else
7035   echo "$as_me: failed program was:" >&5
7036 sed 's/^/| /' conftest.$ac_ext >&5
7037
7038         ac_cv_lib_socket_connect=no
7039 fi
7040
7041 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7042       conftest$ac_exeext conftest.$ac_ext
7043 LIBS=$ac_check_lib_save_LIBS
7044 fi
7045 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7046 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
7047 if test $ac_cv_lib_socket_connect = yes; then
7048   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7049 fi
7050
7051     fi
7052
7053     # Guillermo Gomez says -lposix is necessary on A/UX.
7054     { echo "$as_me:$LINENO: checking for remove" >&5
7055 echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
7056 if test "${ac_cv_func_remove+set}" = set; then
7057   echo $ECHO_N "(cached) $ECHO_C" >&6
7058 else
7059   cat >conftest.$ac_ext <<_ACEOF
7060 /* confdefs.h.  */
7061 _ACEOF
7062 cat confdefs.h >>conftest.$ac_ext
7063 cat >>conftest.$ac_ext <<_ACEOF
7064 /* end confdefs.h.  */
7065 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
7066    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7067 #define remove innocuous_remove
7068
7069 /* System header to define __stub macros and hopefully few prototypes,
7070     which can conflict with char remove (); below.
7071     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7072     <limits.h> exists even on freestanding compilers.  */
7073
7074 #ifdef __STDC__
7075 # include <limits.h>
7076 #else
7077 # include <assert.h>
7078 #endif
7079
7080 #undef remove
7081
7082 /* Override any GCC internal prototype to avoid an error.
7083    Use char because int might match the return type of a GCC
7084    builtin and then its argument prototype would still apply.  */
7085 #ifdef __cplusplus
7086 extern "C"
7087 #endif
7088 char remove ();
7089 /* The GNU C library defines this for functions which it implements
7090     to always fail with ENOSYS.  Some functions are actually named
7091     something starting with __ and the normal name is an alias.  */
7092 #if defined __stub_remove || defined __stub___remove
7093 choke me
7094 #endif
7095
7096 int
7097 main ()
7098 {
7099 return remove ();
7100   ;
7101   return 0;
7102 }
7103 _ACEOF
7104 rm -f conftest.$ac_objext conftest$ac_exeext
7105 if { (ac_try="$ac_link"
7106 case "(($ac_try" in
7107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108   *) ac_try_echo=$ac_try;;
7109 esac
7110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7111   (eval "$ac_link") 2>conftest.er1
7112   ac_status=$?
7113   grep -v '^ *+' conftest.er1 >conftest.err
7114   rm -f conftest.er1
7115   cat conftest.err >&5
7116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7117   (exit $ac_status); } && {
7118          test -z "$ac_c_werror_flag" ||
7119          test ! -s conftest.err
7120        } && test -s conftest$ac_exeext &&
7121        $as_test_x conftest$ac_exeext; then
7122   ac_cv_func_remove=yes
7123 else
7124   echo "$as_me: failed program was:" >&5
7125 sed 's/^/| /' conftest.$ac_ext >&5
7126
7127         ac_cv_func_remove=no
7128 fi
7129
7130 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7131       conftest$ac_exeext conftest.$ac_ext
7132 fi
7133 { echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7134 echo "${ECHO_T}$ac_cv_func_remove" >&6; }
7135
7136     if test $ac_cv_func_remove = no; then
7137       { echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7138 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; }
7139 if test "${ac_cv_lib_posix_remove+set}" = set; then
7140   echo $ECHO_N "(cached) $ECHO_C" >&6
7141 else
7142   ac_check_lib_save_LIBS=$LIBS
7143 LIBS="-lposix  $LIBS"
7144 cat >conftest.$ac_ext <<_ACEOF
7145 /* confdefs.h.  */
7146 _ACEOF
7147 cat confdefs.h >>conftest.$ac_ext
7148 cat >>conftest.$ac_ext <<_ACEOF
7149 /* end confdefs.h.  */
7150
7151 /* Override any GCC internal prototype to avoid an error.
7152    Use char because int might match the return type of a GCC
7153    builtin and then its argument prototype would still apply.  */
7154 #ifdef __cplusplus
7155 extern "C"
7156 #endif
7157 char remove ();
7158 int
7159 main ()
7160 {
7161 return remove ();
7162   ;
7163   return 0;
7164 }
7165 _ACEOF
7166 rm -f conftest.$ac_objext conftest$ac_exeext
7167 if { (ac_try="$ac_link"
7168 case "(($ac_try" in
7169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7170   *) ac_try_echo=$ac_try;;
7171 esac
7172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7173   (eval "$ac_link") 2>conftest.er1
7174   ac_status=$?
7175   grep -v '^ *+' conftest.er1 >conftest.err
7176   rm -f conftest.er1
7177   cat conftest.err >&5
7178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179   (exit $ac_status); } && {
7180          test -z "$ac_c_werror_flag" ||
7181          test ! -s conftest.err
7182        } && test -s conftest$ac_exeext &&
7183        $as_test_x conftest$ac_exeext; then
7184   ac_cv_lib_posix_remove=yes
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 sed 's/^/| /' conftest.$ac_ext >&5
7188
7189         ac_cv_lib_posix_remove=no
7190 fi
7191
7192 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7193       conftest$ac_exeext conftest.$ac_ext
7194 LIBS=$ac_check_lib_save_LIBS
7195 fi
7196 { echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7197 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
7198 if test $ac_cv_lib_posix_remove = yes; then
7199   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7200 fi
7201
7202     fi
7203
7204     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7205     { echo "$as_me:$LINENO: checking for shmat" >&5
7206 echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
7207 if test "${ac_cv_func_shmat+set}" = set; then
7208   echo $ECHO_N "(cached) $ECHO_C" >&6
7209 else
7210   cat >conftest.$ac_ext <<_ACEOF
7211 /* confdefs.h.  */
7212 _ACEOF
7213 cat confdefs.h >>conftest.$ac_ext
7214 cat >>conftest.$ac_ext <<_ACEOF
7215 /* end confdefs.h.  */
7216 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7217    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7218 #define shmat innocuous_shmat
7219
7220 /* System header to define __stub macros and hopefully few prototypes,
7221     which can conflict with char shmat (); below.
7222     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7223     <limits.h> exists even on freestanding compilers.  */
7224
7225 #ifdef __STDC__
7226 # include <limits.h>
7227 #else
7228 # include <assert.h>
7229 #endif
7230
7231 #undef shmat
7232
7233 /* Override any GCC internal prototype to avoid an error.
7234    Use char because int might match the return type of a GCC
7235    builtin and then its argument prototype would still apply.  */
7236 #ifdef __cplusplus
7237 extern "C"
7238 #endif
7239 char shmat ();
7240 /* The GNU C library defines this for functions which it implements
7241     to always fail with ENOSYS.  Some functions are actually named
7242     something starting with __ and the normal name is an alias.  */
7243 #if defined __stub_shmat || defined __stub___shmat
7244 choke me
7245 #endif
7246
7247 int
7248 main ()
7249 {
7250 return shmat ();
7251   ;
7252   return 0;
7253 }
7254 _ACEOF
7255 rm -f conftest.$ac_objext conftest$ac_exeext
7256 if { (ac_try="$ac_link"
7257 case "(($ac_try" in
7258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7259   *) ac_try_echo=$ac_try;;
7260 esac
7261 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7262   (eval "$ac_link") 2>conftest.er1
7263   ac_status=$?
7264   grep -v '^ *+' conftest.er1 >conftest.err
7265   rm -f conftest.er1
7266   cat conftest.err >&5
7267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268   (exit $ac_status); } && {
7269          test -z "$ac_c_werror_flag" ||
7270          test ! -s conftest.err
7271        } && test -s conftest$ac_exeext &&
7272        $as_test_x conftest$ac_exeext; then
7273   ac_cv_func_shmat=yes
7274 else
7275   echo "$as_me: failed program was:" >&5
7276 sed 's/^/| /' conftest.$ac_ext >&5
7277
7278         ac_cv_func_shmat=no
7279 fi
7280
7281 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7282       conftest$ac_exeext conftest.$ac_ext
7283 fi
7284 { echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7285 echo "${ECHO_T}$ac_cv_func_shmat" >&6; }
7286
7287     if test $ac_cv_func_shmat = no; then
7288       { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7289 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; }
7290 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7291   echo $ECHO_N "(cached) $ECHO_C" >&6
7292 else
7293   ac_check_lib_save_LIBS=$LIBS
7294 LIBS="-lipc  $LIBS"
7295 cat >conftest.$ac_ext <<_ACEOF
7296 /* confdefs.h.  */
7297 _ACEOF
7298 cat confdefs.h >>conftest.$ac_ext
7299 cat >>conftest.$ac_ext <<_ACEOF
7300 /* end confdefs.h.  */
7301
7302 /* Override any GCC internal prototype to avoid an error.
7303    Use char because int might match the return type of a GCC
7304    builtin and then its argument prototype would still apply.  */
7305 #ifdef __cplusplus
7306 extern "C"
7307 #endif
7308 char shmat ();
7309 int
7310 main ()
7311 {
7312 return shmat ();
7313   ;
7314   return 0;
7315 }
7316 _ACEOF
7317 rm -f conftest.$ac_objext conftest$ac_exeext
7318 if { (ac_try="$ac_link"
7319 case "(($ac_try" in
7320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7321   *) ac_try_echo=$ac_try;;
7322 esac
7323 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7324   (eval "$ac_link") 2>conftest.er1
7325   ac_status=$?
7326   grep -v '^ *+' conftest.er1 >conftest.err
7327   rm -f conftest.er1
7328   cat conftest.err >&5
7329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330   (exit $ac_status); } && {
7331          test -z "$ac_c_werror_flag" ||
7332          test ! -s conftest.err
7333        } && test -s conftest$ac_exeext &&
7334        $as_test_x conftest$ac_exeext; then
7335   ac_cv_lib_ipc_shmat=yes
7336 else
7337   echo "$as_me: failed program was:" >&5
7338 sed 's/^/| /' conftest.$ac_ext >&5
7339
7340         ac_cv_lib_ipc_shmat=no
7341 fi
7342
7343 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7344       conftest$ac_exeext conftest.$ac_ext
7345 LIBS=$ac_check_lib_save_LIBS
7346 fi
7347 { echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7348 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
7349 if test $ac_cv_lib_ipc_shmat = yes; then
7350   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7351 fi
7352
7353     fi
7354   fi
7355
7356   # Check for libraries that X11R6 Xt/Xaw programs need.
7357   ac_save_LDFLAGS=$LDFLAGS
7358   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7359   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7360   # check for ICE first), but we must link in the order -lSM -lICE or
7361   # we get undefined symbols.  So assume we have SM if we have ICE.
7362   # These have to be linked with before -lX11, unlike the other
7363   # libraries we check for below, so use a different variable.
7364   # John Interrante, Karl Berry
7365   { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7366 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; }
7367 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   ac_check_lib_save_LIBS=$LIBS
7371 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7372 cat >conftest.$ac_ext <<_ACEOF
7373 /* confdefs.h.  */
7374 _ACEOF
7375 cat confdefs.h >>conftest.$ac_ext
7376 cat >>conftest.$ac_ext <<_ACEOF
7377 /* end confdefs.h.  */
7378
7379 /* Override any GCC internal prototype to avoid an error.
7380    Use char because int might match the return type of a GCC
7381    builtin and then its argument prototype would still apply.  */
7382 #ifdef __cplusplus
7383 extern "C"
7384 #endif
7385 char IceConnectionNumber ();
7386 int
7387 main ()
7388 {
7389 return IceConnectionNumber ();
7390   ;
7391   return 0;
7392 }
7393 _ACEOF
7394 rm -f conftest.$ac_objext conftest$ac_exeext
7395 if { (ac_try="$ac_link"
7396 case "(($ac_try" in
7397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7398   *) ac_try_echo=$ac_try;;
7399 esac
7400 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7401   (eval "$ac_link") 2>conftest.er1
7402   ac_status=$?
7403   grep -v '^ *+' conftest.er1 >conftest.err
7404   rm -f conftest.er1
7405   cat conftest.err >&5
7406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407   (exit $ac_status); } && {
7408          test -z "$ac_c_werror_flag" ||
7409          test ! -s conftest.err
7410        } && test -s conftest$ac_exeext &&
7411        $as_test_x conftest$ac_exeext; then
7412   ac_cv_lib_ICE_IceConnectionNumber=yes
7413 else
7414   echo "$as_me: failed program was:" >&5
7415 sed 's/^/| /' conftest.$ac_ext >&5
7416
7417         ac_cv_lib_ICE_IceConnectionNumber=no
7418 fi
7419
7420 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7421       conftest$ac_exeext conftest.$ac_ext
7422 LIBS=$ac_check_lib_save_LIBS
7423 fi
7424 { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7425 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7426 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7427   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7428 fi
7429
7430   LDFLAGS=$ac_save_LDFLAGS
7431
7432 fi
7433
7434
7435 if test "$have_x" != yes; then
7436   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
7437 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
7438    { (exit 1); exit 1; }; }
7439 fi
7440
7441
7442     { echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
7443 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6; }
7444 if test "${ac_cv_x_app_defaults+set}" = set; then
7445   echo $ECHO_N "(cached) $ECHO_C" >&6
7446 else
7447
7448   rm -fr conftestdir
7449   if mkdir conftestdir; then
7450     cd conftestdir 2>/dev/null
7451     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7452     cat > Imakefile <<'EOF'
7453 acfindx:
7454         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
7455 EOF
7456     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
7457       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
7458       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7459     fi
7460     cd .. 2>/dev/null
7461     rm -fr conftestdir
7462   fi
7463       if test x"$ac_x_app_defaults" = x; then
7464
7465   # Look for the directory under a standard set of common directories.
7466   # Check X11 before X11Rn because it's often a symlink to the current release.
7467   for ac_dir in                                 \
7468     /usr/X11/lib/app-defaults                   \
7469     /usr/X11R6/lib/app-defaults                 \
7470     /usr/X11R6/lib/X11/app-defaults             \
7471     /usr/X11R5/lib/app-defaults                 \
7472     /usr/X11R5/lib/X11/app-defaults             \
7473     /usr/X11R4/lib/app-defaults                 \
7474     /usr/X11R4/lib/X11/app-defaults             \
7475                                                 \
7476     /usr/lib/X11/app-defaults                   \
7477     /usr/lib/X11R6/app-defaults                 \
7478     /usr/lib/X11R5/app-defaults                 \
7479     /usr/lib/X11R4/app-defaults                 \
7480                                                 \
7481     /usr/local/X11/lib/app-defaults             \
7482     /usr/local/X11R6/lib/app-defaults           \
7483     /usr/local/X11R5/lib/app-defaults           \
7484     /usr/local/X11R4/lib/app-defaults           \
7485                                                 \
7486     /usr/local/lib/X11/app-defaults             \
7487     /usr/local/lib/X11R6/app-defaults           \
7488     /usr/local/lib/X11R6/X11/app-defaults       \
7489     /usr/local/lib/X11R5/app-defaults           \
7490     /usr/local/lib/X11R5/X11/app-defaults       \
7491     /usr/local/lib/X11R4/app-defaults           \
7492     /usr/local/lib/X11R4/X11/app-defaults       \
7493                                                 \
7494     /usr/X386/lib/X11/app-defaults              \
7495     /usr/x386/lib/X11/app-defaults              \
7496     /usr/XFree86/lib/X11/app-defaults           \
7497                                                 \
7498     /usr/lib/X11/app-defaults                   \
7499     /usr/local/lib/X11/app-defaults             \
7500     /usr/unsupported/lib/X11/app-defaults       \
7501     /usr/athena/lib/X11/app-defaults            \
7502     /usr/local/x11r5/lib/X11/app-defaults       \
7503     /usr/lpp/Xamples/lib/X11/app-defaults       \
7504     /lib/usr/lib/X11/app-defaults               \
7505                                                 \
7506     /usr/openwin/lib/app-defaults               \
7507     /usr/openwin/lib/X11/app-defaults           \
7508     /usr/openwin/share/lib/app-defaults         \
7509     /usr/openwin/share/lib/X11/app-defaults     \
7510                                                 \
7511     /X11R6/lib/app-defaults                     \
7512     /X11R5/lib/app-defaults                     \
7513     /X11R4/lib/app-defaults                     \
7514     ; \
7515   do
7516     if test -d "$ac_dir"; then
7517       ac_x_app_defaults=$ac_dir
7518       break
7519     fi
7520   done
7521
7522       fi
7523       if test x"$ac_x_app_defaults" = x; then
7524         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7525       else
7526         # Record where we found app-defaults for the cache.
7527         ac_cv_x_app_defaults="$ac_x_app_defaults"
7528       fi
7529 fi
7530 { echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7531 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6; }
7532     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7533 case "$host" in
7534     *-hpux*)
7535
7536       # The following arcana was gleaned from conversations with
7537       # Eric Schwartz <erics@col.hp.com>:
7538       #
7539       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7540       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7541       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7542       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7543       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7544       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7545       # you don't need any -I or -L arguments.
7546       #
7547       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7548       # are the same division as 10.x.  However, there are no symlinks to
7549       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7550       # arguments are always necessary.
7551       #
7552       # However, X11R6 was available on HPUX 9.x as a patch: if that
7553       # patch was installed, then all of X11R6 went in to
7554       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7555       #
7556       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7557       # whether R5 was available as a patch; R6 undoubtedly was not.)
7558       #
7559       # So.  We try and use the highest numbered pair of
7560       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7561       # that are available.  We do not mix and match different versions
7562       # of X.
7563       #
7564       # Question I still don't know the answer to: (do you?)
7565       #
7566       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7567       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7568       #     that contrib directory?  Did it contain so-called "standard"
7569       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7570       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7571       #     be a situation where one had to reach into the R5 headers and
7572       #     libs to find Xmu?  That is, must both R6 and R5 directories
7573       #     be on the -I and -L lists in that case?
7574       #
7575       for version in X11R6 X11R5 X11R4 ; do
7576         # if either pair of directories exists...
7577         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7578         then
7579            # if contrib exists, use it...
7580            if test -d /usr/contrib/$version/include ; then
7581              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7582              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7583            fi
7584            # if the "standard" one exists, use it.
7585            if test -d /usr/include/$version ; then
7586              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7587              X_LIBS="$X_LIBS -L/usr/lib/$version"
7588            fi
7589            # since at least one of the pair exists, go no farther.
7590            break
7591         fi
7592       done
7593
7594       # Now find Motif.  Thanks for not making xmkmf find this by
7595       # default, you losers.
7596       #
7597       if test -d /usr/include/Motif2.1 ; then
7598         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7599         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7600       elif test -d /usr/include/Motif1.2 ; then
7601         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7602         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7603       elif test -d /usr/include/Motif1.1 ; then
7604         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7605         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7606       fi
7607
7608       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7609       #
7610       if test -d /opt/graphics/OpenGL/include ; then
7611         # HP-UX 10.20 puts it here
7612         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7613         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7614       elif test -d /opt/Mesa/lib ; then
7615         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7616         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7617       fi
7618
7619
7620       if test -d /opt/xpm/lib/X11 ; then
7621         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7622         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7623       fi
7624
7625       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7626       # in /usr/local/, unless there is already an xscreensaver in
7627       # /usr/local/bin/.  This can be overridden with the --prefix arg
7628       # to configure.  I'm not sure this is the right thing to do, but
7629       # Richard Lloyd says so...
7630       #
7631       if test \! -x /usr/local/bin/xscreensaver ; then
7632         ac_default_prefix=/opt/xscreensaver
7633       fi
7634
7635     ;;
7636     *-solaris*)
7637
7638       # Thanks for not making xmkmf find this by default, pinheads.
7639       # And thanks for moving things around again, too.  Is this
7640       # really the standard location now?  What happened to the
7641       # joke that this kind of thing went in /opt?
7642       # cthomp says "answer: CDE (Common Disorganized Environment)"
7643       #
7644       if test -f /usr/dt/include/Xm/Xm.h ; then
7645         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7646         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7647
7648         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7649         { echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7650 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6; }
7651 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7652   echo $ECHO_N "(cached) $ECHO_C" >&6
7653 else
7654   ac_check_lib_save_LIBS=$LIBS
7655 LIBS="-lgen  $LIBS"
7656 cat >conftest.$ac_ext <<_ACEOF
7657 /* confdefs.h.  */
7658 _ACEOF
7659 cat confdefs.h >>conftest.$ac_ext
7660 cat >>conftest.$ac_ext <<_ACEOF
7661 /* end confdefs.h.  */
7662
7663 /* Override any GCC internal prototype to avoid an error.
7664    Use char because int might match the return type of a GCC
7665    builtin and then its argument prototype would still apply.  */
7666 #ifdef __cplusplus
7667 extern "C"
7668 #endif
7669 char regcmp ();
7670 int
7671 main ()
7672 {
7673 return regcmp ();
7674   ;
7675   return 0;
7676 }
7677 _ACEOF
7678 rm -f conftest.$ac_objext conftest$ac_exeext
7679 if { (ac_try="$ac_link"
7680 case "(($ac_try" in
7681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7682   *) ac_try_echo=$ac_try;;
7683 esac
7684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7685   (eval "$ac_link") 2>conftest.er1
7686   ac_status=$?
7687   grep -v '^ *+' conftest.er1 >conftest.err
7688   rm -f conftest.er1
7689   cat conftest.err >&5
7690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691   (exit $ac_status); } && {
7692          test -z "$ac_c_werror_flag" ||
7693          test ! -s conftest.err
7694        } && test -s conftest$ac_exeext &&
7695        $as_test_x conftest$ac_exeext; then
7696   ac_cv_lib_gen_regcmp=yes
7697 else
7698   echo "$as_me: failed program was:" >&5
7699 sed 's/^/| /' conftest.$ac_ext >&5
7700
7701         ac_cv_lib_gen_regcmp=no
7702 fi
7703
7704 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7705       conftest$ac_exeext conftest.$ac_ext
7706 LIBS=$ac_check_lib_save_LIBS
7707 fi
7708 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7709 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6; }
7710 if test $ac_cv_lib_gen_regcmp = yes; then
7711   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7712 fi
7713
7714       fi
7715
7716     ;;
7717     *-darwin*)
7718
7719       # On MacOS X (10.x with "fink"), many things are under /sw/.
7720       #
7721       if test -d /sw/include ; then
7722         X_CFLAGS="-I/sw/include $X_CFLAGS"
7723         X_LIBS="-L/sw/lib $X_LIBS"
7724       fi
7725     ;;
7726   esac
7727 { echo "$as_me:$LINENO: checking for XPointer" >&5
7728 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6; }
7729 if test "${ac_cv_xpointer+set}" = set; then
7730   echo $ECHO_N "(cached) $ECHO_C" >&6
7731 else
7732
7733   ac_save_CPPFLAGS="$CPPFLAGS"
7734   if test \! -z "$includedir" ; then
7735     CPPFLAGS="$CPPFLAGS -I$includedir"
7736   fi
7737   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7738   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
7739   cat >conftest.$ac_ext <<_ACEOF
7740 /* confdefs.h.  */
7741 _ACEOF
7742 cat confdefs.h >>conftest.$ac_ext
7743 cat >>conftest.$ac_ext <<_ACEOF
7744 /* end confdefs.h.  */
7745 #include <X11/Xlib.h>
7746 int
7747 main ()
7748 {
7749 XPointer foo = (XPointer) 0;
7750   ;
7751   return 0;
7752 }
7753 _ACEOF
7754 rm -f conftest.$ac_objext
7755 if { (ac_try="$ac_compile"
7756 case "(($ac_try" in
7757   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7758   *) ac_try_echo=$ac_try;;
7759 esac
7760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7761   (eval "$ac_compile") 2>conftest.er1
7762   ac_status=$?
7763   grep -v '^ *+' conftest.er1 >conftest.err
7764   rm -f conftest.er1
7765   cat conftest.err >&5
7766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767   (exit $ac_status); } && {
7768          test -z "$ac_c_werror_flag" ||
7769          test ! -s conftest.err
7770        } && test -s conftest.$ac_objext; then
7771   ac_cv_xpointer=yes
7772 else
7773   echo "$as_me: failed program was:" >&5
7774 sed 's/^/| /' conftest.$ac_ext >&5
7775
7776         ac_cv_xpointer=no
7777 fi
7778
7779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780   CPPFLAGS="$ac_save_CPPFLAGS"
7781 fi
7782 { echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7783 echo "${ECHO_T}$ac_cv_xpointer" >&6; }
7784   if test "$ac_cv_xpointer" != yes; then
7785    cat >>confdefs.h <<\_ACEOF
7786 #define XPointer char*
7787 _ACEOF
7788
7789   fi
7790
7791 { echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7792 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6; }
7793   ac_macosx=no
7794   case "$host" in
7795     *-apple-darwin* )
7796       ac_macosx=yes
7797     ;;
7798   esac
7799 { echo "$as_me:$LINENO: result: $ac_macosx" >&5
7800 echo "${ECHO_T}$ac_macosx" >&6; }
7801
7802
7803 ###############################################################################
7804 #
7805 #       Gettext support
7806 #
7807 ###############################################################################
7808
7809
7810
7811 if test -n ""; then
7812     { echo "$as_me:$LINENO: checking for intltool >= " >&5
7813 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
7814
7815     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7816     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7817
7818     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7819
7820
7821     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7822         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7823 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
7824     else
7825         { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7826 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6; }
7827         exit 1
7828     fi
7829 fi
7830
7831   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'
7832 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'
7833      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'
7834       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7835      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'
7836    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'
7837     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'
7838 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'
7839        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'
7840       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'
7841     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'
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855 # Use the tools built into the package, not the ones that are installed.
7856
7857 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7858 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7859 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7860
7861
7862
7863
7864
7865 # Extract the first word of "perl", so it can be a program name with args.
7866 set dummy perl; ac_word=$2
7867 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7869 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7870   echo $ECHO_N "(cached) $ECHO_C" >&6
7871 else
7872   case $INTLTOOL_PERL in
7873   [\\/]* | ?:[\\/]*)
7874   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7875   ;;
7876   *)
7877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878 for as_dir in $PATH
7879 do
7880   IFS=$as_save_IFS
7881   test -z "$as_dir" && as_dir=.
7882   for ac_exec_ext in '' $ac_executable_extensions; do
7883   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7884     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7885     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7886     break 2
7887   fi
7888 done
7889 done
7890 IFS=$as_save_IFS
7891
7892   ;;
7893 esac
7894 fi
7895 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7896 if test -n "$INTLTOOL_PERL"; then
7897   { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7898 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
7899 else
7900   { echo "$as_me:$LINENO: result: no" >&5
7901 echo "${ECHO_T}no" >&6; }
7902 fi
7903
7904
7905 if test -z "$INTLTOOL_PERL"; then
7906    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7907 echo "$as_me: error: perl not found; required for intltool" >&2;}
7908    { (exit 1); exit 1; }; }
7909 fi
7910 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7911    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7912 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7913    { (exit 1); exit 1; }; }
7914 fi
7915
7916 # Remove file type tags (using []) from po/POTFILES.
7917
7918
7919
7920
7921
7922
7923
7924 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7925
7926 ac_config_commands="$ac_config_commands default-1"
7927
7928
7929
7930 GETTEXT_PACKAGE=xscreensaver
7931
7932 cat >>confdefs.h <<_ACEOF
7933 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7934 _ACEOF
7935
7936
7937 cat >>confdefs.h <<_ACEOF
7938 #define PACKAGE "$GETTEXT_PACKAGE"
7939 _ACEOF
7940
7941
7942
7943 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"
7944 if test -n "$ac_tool_prefix"; then
7945   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7946 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7947 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7949 if test "${ac_cv_prog_RANLIB+set}" = set; then
7950   echo $ECHO_N "(cached) $ECHO_C" >&6
7951 else
7952   if test -n "$RANLIB"; then
7953   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7954 else
7955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956 for as_dir in $PATH
7957 do
7958   IFS=$as_save_IFS
7959   test -z "$as_dir" && as_dir=.
7960   for ac_exec_ext in '' $ac_executable_extensions; do
7961   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7962     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7963     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7964     break 2
7965   fi
7966 done
7967 done
7968 IFS=$as_save_IFS
7969
7970 fi
7971 fi
7972 RANLIB=$ac_cv_prog_RANLIB
7973 if test -n "$RANLIB"; then
7974   { echo "$as_me:$LINENO: result: $RANLIB" >&5
7975 echo "${ECHO_T}$RANLIB" >&6; }
7976 else
7977   { echo "$as_me:$LINENO: result: no" >&5
7978 echo "${ECHO_T}no" >&6; }
7979 fi
7980
7981
7982 fi
7983 if test -z "$ac_cv_prog_RANLIB"; then
7984   ac_ct_RANLIB=$RANLIB
7985   # Extract the first word of "ranlib", so it can be a program name with args.
7986 set dummy ranlib; ac_word=$2
7987 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7989 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992   if test -n "$ac_ct_RANLIB"; then
7993   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7994 else
7995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996 for as_dir in $PATH
7997 do
7998   IFS=$as_save_IFS
7999   test -z "$as_dir" && as_dir=.
8000   for ac_exec_ext in '' $ac_executable_extensions; do
8001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8002     ac_cv_prog_ac_ct_RANLIB="ranlib"
8003     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8004     break 2
8005   fi
8006 done
8007 done
8008 IFS=$as_save_IFS
8009
8010 fi
8011 fi
8012 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8013 if test -n "$ac_ct_RANLIB"; then
8014   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8015 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8016 else
8017   { echo "$as_me:$LINENO: result: no" >&5
8018 echo "${ECHO_T}no" >&6; }
8019 fi
8020
8021   if test "x$ac_ct_RANLIB" = x; then
8022     RANLIB=":"
8023   else
8024     case $cross_compiling:$ac_tool_warned in
8025 yes:)
8026 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8027 whose name does not start with the host triplet.  If you think this
8028 configuration is useful to you, please write to autoconf@gnu.org." >&5
8029 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8030 whose name does not start with the host triplet.  If you think this
8031 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8032 ac_tool_warned=yes ;;
8033 esac
8034     RANLIB=$ac_ct_RANLIB
8035   fi
8036 else
8037   RANLIB="$ac_cv_prog_RANLIB"
8038 fi
8039
8040 { echo "$as_me:$LINENO: checking for off_t" >&5
8041 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
8042 if test "${ac_cv_type_off_t+set}" = set; then
8043   echo $ECHO_N "(cached) $ECHO_C" >&6
8044 else
8045   cat >conftest.$ac_ext <<_ACEOF
8046 /* confdefs.h.  */
8047 _ACEOF
8048 cat confdefs.h >>conftest.$ac_ext
8049 cat >>conftest.$ac_ext <<_ACEOF
8050 /* end confdefs.h.  */
8051 $ac_includes_default
8052 typedef off_t ac__type_new_;
8053 int
8054 main ()
8055 {
8056 if ((ac__type_new_ *) 0)
8057   return 0;
8058 if (sizeof (ac__type_new_))
8059   return 0;
8060   ;
8061   return 0;
8062 }
8063 _ACEOF
8064 rm -f conftest.$ac_objext
8065 if { (ac_try="$ac_compile"
8066 case "(($ac_try" in
8067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8068   *) ac_try_echo=$ac_try;;
8069 esac
8070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8071   (eval "$ac_compile") 2>conftest.er1
8072   ac_status=$?
8073   grep -v '^ *+' conftest.er1 >conftest.err
8074   rm -f conftest.er1
8075   cat conftest.err >&5
8076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8077   (exit $ac_status); } && {
8078          test -z "$ac_c_werror_flag" ||
8079          test ! -s conftest.err
8080        } && test -s conftest.$ac_objext; then
8081   ac_cv_type_off_t=yes
8082 else
8083   echo "$as_me: failed program was:" >&5
8084 sed 's/^/| /' conftest.$ac_ext >&5
8085
8086         ac_cv_type_off_t=no
8087 fi
8088
8089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8090 fi
8091 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
8092 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
8093 if test $ac_cv_type_off_t = yes; then
8094   :
8095 else
8096
8097 cat >>confdefs.h <<_ACEOF
8098 #define off_t long int
8099 _ACEOF
8100
8101 fi
8102
8103 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8104 # for constant arguments.  Useless!
8105 { echo "$as_me:$LINENO: checking for working alloca.h" >&5
8106 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
8107 if test "${ac_cv_working_alloca_h+set}" = set; then
8108   echo $ECHO_N "(cached) $ECHO_C" >&6
8109 else
8110   cat >conftest.$ac_ext <<_ACEOF
8111 /* confdefs.h.  */
8112 _ACEOF
8113 cat confdefs.h >>conftest.$ac_ext
8114 cat >>conftest.$ac_ext <<_ACEOF
8115 /* end confdefs.h.  */
8116 #include <alloca.h>
8117 int
8118 main ()
8119 {
8120 char *p = (char *) alloca (2 * sizeof (int));
8121                           if (p) return 0;
8122   ;
8123   return 0;
8124 }
8125 _ACEOF
8126 rm -f conftest.$ac_objext conftest$ac_exeext
8127 if { (ac_try="$ac_link"
8128 case "(($ac_try" in
8129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8130   *) ac_try_echo=$ac_try;;
8131 esac
8132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8133   (eval "$ac_link") 2>conftest.er1
8134   ac_status=$?
8135   grep -v '^ *+' conftest.er1 >conftest.err
8136   rm -f conftest.er1
8137   cat conftest.err >&5
8138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139   (exit $ac_status); } && {
8140          test -z "$ac_c_werror_flag" ||
8141          test ! -s conftest.err
8142        } && test -s conftest$ac_exeext &&
8143        $as_test_x conftest$ac_exeext; then
8144   ac_cv_working_alloca_h=yes
8145 else
8146   echo "$as_me: failed program was:" >&5
8147 sed 's/^/| /' conftest.$ac_ext >&5
8148
8149         ac_cv_working_alloca_h=no
8150 fi
8151
8152 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8153       conftest$ac_exeext conftest.$ac_ext
8154 fi
8155 { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
8156 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
8157 if test $ac_cv_working_alloca_h = yes; then
8158
8159 cat >>confdefs.h <<\_ACEOF
8160 #define HAVE_ALLOCA_H 1
8161 _ACEOF
8162
8163 fi
8164
8165 { echo "$as_me:$LINENO: checking for alloca" >&5
8166 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
8167 if test "${ac_cv_func_alloca_works+set}" = set; then
8168   echo $ECHO_N "(cached) $ECHO_C" >&6
8169 else
8170   cat >conftest.$ac_ext <<_ACEOF
8171 /* confdefs.h.  */
8172 _ACEOF
8173 cat confdefs.h >>conftest.$ac_ext
8174 cat >>conftest.$ac_ext <<_ACEOF
8175 /* end confdefs.h.  */
8176 #ifdef __GNUC__
8177 # define alloca __builtin_alloca
8178 #else
8179 # ifdef _MSC_VER
8180 #  include <malloc.h>
8181 #  define alloca _alloca
8182 # else
8183 #  ifdef HAVE_ALLOCA_H
8184 #   include <alloca.h>
8185 #  else
8186 #   ifdef _AIX
8187  #pragma alloca
8188 #   else
8189 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8190 char *alloca ();
8191 #    endif
8192 #   endif
8193 #  endif
8194 # endif
8195 #endif
8196
8197 int
8198 main ()
8199 {
8200 char *p = (char *) alloca (1);
8201                                     if (p) return 0;
8202   ;
8203   return 0;
8204 }
8205 _ACEOF
8206 rm -f conftest.$ac_objext conftest$ac_exeext
8207 if { (ac_try="$ac_link"
8208 case "(($ac_try" in
8209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8210   *) ac_try_echo=$ac_try;;
8211 esac
8212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8213   (eval "$ac_link") 2>conftest.er1
8214   ac_status=$?
8215   grep -v '^ *+' conftest.er1 >conftest.err
8216   rm -f conftest.er1
8217   cat conftest.err >&5
8218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219   (exit $ac_status); } && {
8220          test -z "$ac_c_werror_flag" ||
8221          test ! -s conftest.err
8222        } && test -s conftest$ac_exeext &&
8223        $as_test_x conftest$ac_exeext; then
8224   ac_cv_func_alloca_works=yes
8225 else
8226   echo "$as_me: failed program was:" >&5
8227 sed 's/^/| /' conftest.$ac_ext >&5
8228
8229         ac_cv_func_alloca_works=no
8230 fi
8231
8232 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8233       conftest$ac_exeext conftest.$ac_ext
8234 fi
8235 { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
8236 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
8237
8238 if test $ac_cv_func_alloca_works = yes; then
8239
8240 cat >>confdefs.h <<\_ACEOF
8241 #define HAVE_ALLOCA 1
8242 _ACEOF
8243
8244 else
8245   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8246 # that cause trouble.  Some versions do not even contain alloca or
8247 # contain a buggy version.  If you still want to use their alloca,
8248 # use ar to extract alloca.o from them instead of compiling alloca.c.
8249
8250 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8251
8252 cat >>confdefs.h <<\_ACEOF
8253 #define C_ALLOCA 1
8254 _ACEOF
8255
8256
8257 { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
8258 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
8259 if test "${ac_cv_os_cray+set}" = set; then
8260   echo $ECHO_N "(cached) $ECHO_C" >&6
8261 else
8262   cat >conftest.$ac_ext <<_ACEOF
8263 /* confdefs.h.  */
8264 _ACEOF
8265 cat confdefs.h >>conftest.$ac_ext
8266 cat >>conftest.$ac_ext <<_ACEOF
8267 /* end confdefs.h.  */
8268 #if defined CRAY && ! defined CRAY2
8269 webecray
8270 #else
8271 wenotbecray
8272 #endif
8273
8274 _ACEOF
8275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8276   $EGREP "webecray" >/dev/null 2>&1; then
8277   ac_cv_os_cray=yes
8278 else
8279   ac_cv_os_cray=no
8280 fi
8281 rm -f conftest*
8282
8283 fi
8284 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
8285 echo "${ECHO_T}$ac_cv_os_cray" >&6; }
8286 if test $ac_cv_os_cray = yes; then
8287   for ac_func in _getb67 GETB67 getb67; do
8288     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8289 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8291 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8292   echo $ECHO_N "(cached) $ECHO_C" >&6
8293 else
8294   cat >conftest.$ac_ext <<_ACEOF
8295 /* confdefs.h.  */
8296 _ACEOF
8297 cat confdefs.h >>conftest.$ac_ext
8298 cat >>conftest.$ac_ext <<_ACEOF
8299 /* end confdefs.h.  */
8300 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8301    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8302 #define $ac_func innocuous_$ac_func
8303
8304 /* System header to define __stub macros and hopefully few prototypes,
8305     which can conflict with char $ac_func (); below.
8306     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8307     <limits.h> exists even on freestanding compilers.  */
8308
8309 #ifdef __STDC__
8310 # include <limits.h>
8311 #else
8312 # include <assert.h>
8313 #endif
8314
8315 #undef $ac_func
8316
8317 /* Override any GCC internal prototype to avoid an error.
8318    Use char because int might match the return type of a GCC
8319    builtin and then its argument prototype would still apply.  */
8320 #ifdef __cplusplus
8321 extern "C"
8322 #endif
8323 char $ac_func ();
8324 /* The GNU C library defines this for functions which it implements
8325     to always fail with ENOSYS.  Some functions are actually named
8326     something starting with __ and the normal name is an alias.  */
8327 #if defined __stub_$ac_func || defined __stub___$ac_func
8328 choke me
8329 #endif
8330
8331 int
8332 main ()
8333 {
8334 return $ac_func ();
8335   ;
8336   return 0;
8337 }
8338 _ACEOF
8339 rm -f conftest.$ac_objext conftest$ac_exeext
8340 if { (ac_try="$ac_link"
8341 case "(($ac_try" in
8342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8343   *) ac_try_echo=$ac_try;;
8344 esac
8345 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8346   (eval "$ac_link") 2>conftest.er1
8347   ac_status=$?
8348   grep -v '^ *+' conftest.er1 >conftest.err
8349   rm -f conftest.er1
8350   cat conftest.err >&5
8351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352   (exit $ac_status); } && {
8353          test -z "$ac_c_werror_flag" ||
8354          test ! -s conftest.err
8355        } && test -s conftest$ac_exeext &&
8356        $as_test_x conftest$ac_exeext; then
8357   eval "$as_ac_var=yes"
8358 else
8359   echo "$as_me: failed program was:" >&5
8360 sed 's/^/| /' conftest.$ac_ext >&5
8361
8362         eval "$as_ac_var=no"
8363 fi
8364
8365 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8366       conftest$ac_exeext conftest.$ac_ext
8367 fi
8368 ac_res=`eval echo '${'$as_ac_var'}'`
8369                { echo "$as_me:$LINENO: result: $ac_res" >&5
8370 echo "${ECHO_T}$ac_res" >&6; }
8371 if test `eval echo '${'$as_ac_var'}'` = yes; then
8372
8373 cat >>confdefs.h <<_ACEOF
8374 #define CRAY_STACKSEG_END $ac_func
8375 _ACEOF
8376
8377     break
8378 fi
8379
8380   done
8381 fi
8382
8383 { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
8384 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
8385 if test "${ac_cv_c_stack_direction+set}" = set; then
8386   echo $ECHO_N "(cached) $ECHO_C" >&6
8387 else
8388   if test "$cross_compiling" = yes; then
8389   ac_cv_c_stack_direction=0
8390 else
8391   cat >conftest.$ac_ext <<_ACEOF
8392 /* confdefs.h.  */
8393 _ACEOF
8394 cat confdefs.h >>conftest.$ac_ext
8395 cat >>conftest.$ac_ext <<_ACEOF
8396 /* end confdefs.h.  */
8397 $ac_includes_default
8398 int
8399 find_stack_direction ()
8400 {
8401   static char *addr = 0;
8402   auto char dummy;
8403   if (addr == 0)
8404     {
8405       addr = &dummy;
8406       return find_stack_direction ();
8407     }
8408   else
8409     return (&dummy > addr) ? 1 : -1;
8410 }
8411
8412 int
8413 main ()
8414 {
8415   return find_stack_direction () < 0;
8416 }
8417 _ACEOF
8418 rm -f conftest$ac_exeext
8419 if { (ac_try="$ac_link"
8420 case "(($ac_try" in
8421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8422   *) ac_try_echo=$ac_try;;
8423 esac
8424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8425   (eval "$ac_link") 2>&5
8426   ac_status=$?
8427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8429   { (case "(($ac_try" in
8430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8431   *) ac_try_echo=$ac_try;;
8432 esac
8433 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8434   (eval "$ac_try") 2>&5
8435   ac_status=$?
8436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437   (exit $ac_status); }; }; then
8438   ac_cv_c_stack_direction=1
8439 else
8440   echo "$as_me: program exited with status $ac_status" >&5
8441 echo "$as_me: failed program was:" >&5
8442 sed 's/^/| /' conftest.$ac_ext >&5
8443
8444 ( exit $ac_status )
8445 ac_cv_c_stack_direction=-1
8446 fi
8447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8448 fi
8449
8450
8451 fi
8452 { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
8453 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
8454
8455 cat >>confdefs.h <<_ACEOF
8456 #define STACK_DIRECTION $ac_cv_c_stack_direction
8457 _ACEOF
8458
8459
8460 fi
8461
8462
8463
8464 for ac_header in stdlib.h unistd.h
8465 do
8466 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8467 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8468   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8470 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 fi
8473 ac_res=`eval echo '${'$as_ac_Header'}'`
8474                { echo "$as_me:$LINENO: result: $ac_res" >&5
8475 echo "${ECHO_T}$ac_res" >&6; }
8476 else
8477   # Is the header compilable?
8478 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8479 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8480 cat >conftest.$ac_ext <<_ACEOF
8481 /* confdefs.h.  */
8482 _ACEOF
8483 cat confdefs.h >>conftest.$ac_ext
8484 cat >>conftest.$ac_ext <<_ACEOF
8485 /* end confdefs.h.  */
8486 $ac_includes_default
8487 #include <$ac_header>
8488 _ACEOF
8489 rm -f conftest.$ac_objext
8490 if { (ac_try="$ac_compile"
8491 case "(($ac_try" in
8492   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8493   *) ac_try_echo=$ac_try;;
8494 esac
8495 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8496   (eval "$ac_compile") 2>conftest.er1
8497   ac_status=$?
8498   grep -v '^ *+' conftest.er1 >conftest.err
8499   rm -f conftest.er1
8500   cat conftest.err >&5
8501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502   (exit $ac_status); } && {
8503          test -z "$ac_c_werror_flag" ||
8504          test ! -s conftest.err
8505        } && test -s conftest.$ac_objext; then
8506   ac_header_compiler=yes
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 sed 's/^/| /' conftest.$ac_ext >&5
8510
8511         ac_header_compiler=no
8512 fi
8513
8514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8515 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8516 echo "${ECHO_T}$ac_header_compiler" >&6; }
8517
8518 # Is the header present?
8519 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8520 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8521 cat >conftest.$ac_ext <<_ACEOF
8522 /* confdefs.h.  */
8523 _ACEOF
8524 cat confdefs.h >>conftest.$ac_ext
8525 cat >>conftest.$ac_ext <<_ACEOF
8526 /* end confdefs.h.  */
8527 #include <$ac_header>
8528 _ACEOF
8529 if { (ac_try="$ac_cpp conftest.$ac_ext"
8530 case "(($ac_try" in
8531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8532   *) ac_try_echo=$ac_try;;
8533 esac
8534 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8535   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8536   ac_status=$?
8537   grep -v '^ *+' conftest.er1 >conftest.err
8538   rm -f conftest.er1
8539   cat conftest.err >&5
8540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541   (exit $ac_status); } >/dev/null && {
8542          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8543          test ! -s conftest.err
8544        }; then
8545   ac_header_preproc=yes
8546 else
8547   echo "$as_me: failed program was:" >&5
8548 sed 's/^/| /' conftest.$ac_ext >&5
8549
8550   ac_header_preproc=no
8551 fi
8552
8553 rm -f conftest.err conftest.$ac_ext
8554 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8555 echo "${ECHO_T}$ac_header_preproc" >&6; }
8556
8557 # So?  What about this header?
8558 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8559   yes:no: )
8560     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8561 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8562     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8563 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8564     ac_header_preproc=yes
8565     ;;
8566   no:yes:* )
8567     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8568 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8569     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8570 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8571     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8572 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8573     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8574 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8577     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8578 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8579
8580     ;;
8581 esac
8582 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8583 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8584 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8585   echo $ECHO_N "(cached) $ECHO_C" >&6
8586 else
8587   eval "$as_ac_Header=\$ac_header_preproc"
8588 fi
8589 ac_res=`eval echo '${'$as_ac_Header'}'`
8590                { echo "$as_me:$LINENO: result: $ac_res" >&5
8591 echo "${ECHO_T}$ac_res" >&6; }
8592
8593 fi
8594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8595   cat >>confdefs.h <<_ACEOF
8596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8597 _ACEOF
8598
8599 fi
8600
8601 done
8602
8603
8604 for ac_func in getpagesize
8605 do
8606 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8607 { echo "$as_me:$LINENO: checking for $ac_func" >&5
8608 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8609 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8610   echo $ECHO_N "(cached) $ECHO_C" >&6
8611 else
8612   cat >conftest.$ac_ext <<_ACEOF
8613 /* confdefs.h.  */
8614 _ACEOF
8615 cat confdefs.h >>conftest.$ac_ext
8616 cat >>conftest.$ac_ext <<_ACEOF
8617 /* end confdefs.h.  */
8618 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8619    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8620 #define $ac_func innocuous_$ac_func
8621
8622 /* System header to define __stub macros and hopefully few prototypes,
8623     which can conflict with char $ac_func (); below.
8624     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8625     <limits.h> exists even on freestanding compilers.  */
8626
8627 #ifdef __STDC__
8628 # include <limits.h>
8629 #else
8630 # include <assert.h>
8631 #endif
8632
8633 #undef $ac_func
8634
8635 /* Override any GCC internal prototype to avoid an error.
8636    Use char because int might match the return type of a GCC
8637    builtin and then its argument prototype would still apply.  */
8638 #ifdef __cplusplus
8639 extern "C"
8640 #endif
8641 char $ac_func ();
8642 /* The GNU C library defines this for functions which it implements
8643     to always fail with ENOSYS.  Some functions are actually named
8644     something starting with __ and the normal name is an alias.  */
8645 #if defined __stub_$ac_func || defined __stub___$ac_func
8646 choke me
8647 #endif
8648
8649 int
8650 main ()
8651 {
8652 return $ac_func ();
8653   ;
8654   return 0;
8655 }
8656 _ACEOF
8657 rm -f conftest.$ac_objext conftest$ac_exeext
8658 if { (ac_try="$ac_link"
8659 case "(($ac_try" in
8660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8661   *) ac_try_echo=$ac_try;;
8662 esac
8663 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8664   (eval "$ac_link") 2>conftest.er1
8665   ac_status=$?
8666   grep -v '^ *+' conftest.er1 >conftest.err
8667   rm -f conftest.er1
8668   cat conftest.err >&5
8669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670   (exit $ac_status); } && {
8671          test -z "$ac_c_werror_flag" ||
8672          test ! -s conftest.err
8673        } && test -s conftest$ac_exeext &&
8674        $as_test_x conftest$ac_exeext; then
8675   eval "$as_ac_var=yes"
8676 else
8677   echo "$as_me: failed program was:" >&5
8678 sed 's/^/| /' conftest.$ac_ext >&5
8679
8680         eval "$as_ac_var=no"
8681 fi
8682
8683 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8684       conftest$ac_exeext conftest.$ac_ext
8685 fi
8686 ac_res=`eval echo '${'$as_ac_var'}'`
8687                { echo "$as_me:$LINENO: result: $ac_res" >&5
8688 echo "${ECHO_T}$ac_res" >&6; }
8689 if test `eval echo '${'$as_ac_var'}'` = yes; then
8690   cat >>confdefs.h <<_ACEOF
8691 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8692 _ACEOF
8693
8694 fi
8695 done
8696
8697 { echo "$as_me:$LINENO: checking for working mmap" >&5
8698 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
8699 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8700   echo $ECHO_N "(cached) $ECHO_C" >&6
8701 else
8702   if test "$cross_compiling" = yes; then
8703   ac_cv_func_mmap_fixed_mapped=no
8704 else
8705   cat >conftest.$ac_ext <<_ACEOF
8706 /* confdefs.h.  */
8707 _ACEOF
8708 cat confdefs.h >>conftest.$ac_ext
8709 cat >>conftest.$ac_ext <<_ACEOF
8710 /* end confdefs.h.  */
8711 $ac_includes_default
8712 /* malloc might have been renamed as rpl_malloc. */
8713 #undef malloc
8714
8715 /* Thanks to Mike Haertel and Jim Avera for this test.
8716    Here is a matrix of mmap possibilities:
8717         mmap private not fixed
8718         mmap private fixed at somewhere currently unmapped
8719         mmap private fixed at somewhere already mapped
8720         mmap shared not fixed
8721         mmap shared fixed at somewhere currently unmapped
8722         mmap shared fixed at somewhere already mapped
8723    For private mappings, we should verify that changes cannot be read()
8724    back from the file, nor mmap's back from the file at a different
8725    address.  (There have been systems where private was not correctly
8726    implemented like the infamous i386 svr4.0, and systems where the
8727    VM page cache was not coherent with the file system buffer cache
8728    like early versions of FreeBSD and possibly contemporary NetBSD.)
8729    For shared mappings, we should conversely verify that changes get
8730    propagated back to all the places they're supposed to be.
8731
8732    Grep wants private fixed already mapped.
8733    The main things grep needs to know about mmap are:
8734    * does it exist and is it safe to write into the mmap'd area
8735    * how to use it (BSD variants)  */
8736
8737 #include <fcntl.h>
8738 #include <sys/mman.h>
8739
8740 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8741 char *malloc ();
8742 #endif
8743
8744 /* This mess was copied from the GNU getpagesize.h.  */
8745 #ifndef HAVE_GETPAGESIZE
8746 /* Assume that all systems that can run configure have sys/param.h.  */
8747 # ifndef HAVE_SYS_PARAM_H
8748 #  define HAVE_SYS_PARAM_H 1
8749 # endif
8750
8751 # ifdef _SC_PAGESIZE
8752 #  define getpagesize() sysconf(_SC_PAGESIZE)
8753 # else /* no _SC_PAGESIZE */
8754 #  ifdef HAVE_SYS_PARAM_H
8755 #   include <sys/param.h>
8756 #   ifdef EXEC_PAGESIZE
8757 #    define getpagesize() EXEC_PAGESIZE
8758 #   else /* no EXEC_PAGESIZE */
8759 #    ifdef NBPG
8760 #     define getpagesize() NBPG * CLSIZE
8761 #     ifndef CLSIZE
8762 #      define CLSIZE 1
8763 #     endif /* no CLSIZE */
8764 #    else /* no NBPG */
8765 #     ifdef NBPC
8766 #      define getpagesize() NBPC
8767 #     else /* no NBPC */
8768 #      ifdef PAGESIZE
8769 #       define getpagesize() PAGESIZE
8770 #      endif /* PAGESIZE */
8771 #     endif /* no NBPC */
8772 #    endif /* no NBPG */
8773 #   endif /* no EXEC_PAGESIZE */
8774 #  else /* no HAVE_SYS_PARAM_H */
8775 #   define getpagesize() 8192   /* punt totally */
8776 #  endif /* no HAVE_SYS_PARAM_H */
8777 # endif /* no _SC_PAGESIZE */
8778
8779 #endif /* no HAVE_GETPAGESIZE */
8780
8781 int
8782 main ()
8783 {
8784   char *data, *data2, *data3;
8785   int i, pagesize;
8786   int fd;
8787
8788   pagesize = getpagesize ();
8789
8790   /* First, make a file with some known garbage in it. */
8791   data = (char *) malloc (pagesize);
8792   if (!data)
8793     return 1;
8794   for (i = 0; i < pagesize; ++i)
8795     *(data + i) = rand ();
8796   umask (0);
8797   fd = creat ("conftest.mmap", 0600);
8798   if (fd < 0)
8799     return 1;
8800   if (write (fd, data, pagesize) != pagesize)
8801     return 1;
8802   close (fd);
8803
8804   /* Next, try to mmap the file at a fixed address which already has
8805      something else allocated at it.  If we can, also make sure that
8806      we see the same garbage.  */
8807   fd = open ("conftest.mmap", O_RDWR);
8808   if (fd < 0)
8809     return 1;
8810   data2 = (char *) malloc (2 * pagesize);
8811   if (!data2)
8812     return 1;
8813   data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
8814   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8815                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8816     return 1;
8817   for (i = 0; i < pagesize; ++i)
8818     if (*(data + i) != *(data2 + i))
8819       return 1;
8820
8821   /* Finally, make sure that changes to the mapped area do not
8822      percolate back to the file as seen by read().  (This is a bug on
8823      some variants of i386 svr4.0.)  */
8824   for (i = 0; i < pagesize; ++i)
8825     *(data2 + i) = *(data2 + i) + 1;
8826   data3 = (char *) malloc (pagesize);
8827   if (!data3)
8828     return 1;
8829   if (read (fd, data3, pagesize) != pagesize)
8830     return 1;
8831   for (i = 0; i < pagesize; ++i)
8832     if (*(data + i) != *(data3 + i))
8833       return 1;
8834   close (fd);
8835   return 0;
8836 }
8837 _ACEOF
8838 rm -f conftest$ac_exeext
8839 if { (ac_try="$ac_link"
8840 case "(($ac_try" in
8841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8842   *) ac_try_echo=$ac_try;;
8843 esac
8844 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8845   (eval "$ac_link") 2>&5
8846   ac_status=$?
8847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8849   { (case "(($ac_try" in
8850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8851   *) ac_try_echo=$ac_try;;
8852 esac
8853 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8854   (eval "$ac_try") 2>&5
8855   ac_status=$?
8856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857   (exit $ac_status); }; }; then
8858   ac_cv_func_mmap_fixed_mapped=yes
8859 else
8860   echo "$as_me: program exited with status $ac_status" >&5
8861 echo "$as_me: failed program was:" >&5
8862 sed 's/^/| /' conftest.$ac_ext >&5
8863
8864 ( exit $ac_status )
8865 ac_cv_func_mmap_fixed_mapped=no
8866 fi
8867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8868 fi
8869
8870
8871 fi
8872 { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8873 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
8874 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8875
8876 cat >>confdefs.h <<\_ACEOF
8877 #define HAVE_MMAP 1
8878 _ACEOF
8879
8880 fi
8881 rm -f conftest.mmap
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8893 unistd.h sys/param.h
8894 do
8895 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8896 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8897   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8899 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8900   echo $ECHO_N "(cached) $ECHO_C" >&6
8901 fi
8902 ac_res=`eval echo '${'$as_ac_Header'}'`
8903                { echo "$as_me:$LINENO: result: $ac_res" >&5
8904 echo "${ECHO_T}$ac_res" >&6; }
8905 else
8906   # Is the header compilable?
8907 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8908 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8909 cat >conftest.$ac_ext <<_ACEOF
8910 /* confdefs.h.  */
8911 _ACEOF
8912 cat confdefs.h >>conftest.$ac_ext
8913 cat >>conftest.$ac_ext <<_ACEOF
8914 /* end confdefs.h.  */
8915 $ac_includes_default
8916 #include <$ac_header>
8917 _ACEOF
8918 rm -f conftest.$ac_objext
8919 if { (ac_try="$ac_compile"
8920 case "(($ac_try" in
8921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8922   *) ac_try_echo=$ac_try;;
8923 esac
8924 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8925   (eval "$ac_compile") 2>conftest.er1
8926   ac_status=$?
8927   grep -v '^ *+' conftest.er1 >conftest.err
8928   rm -f conftest.er1
8929   cat conftest.err >&5
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); } && {
8932          test -z "$ac_c_werror_flag" ||
8933          test ! -s conftest.err
8934        } && test -s conftest.$ac_objext; then
8935   ac_header_compiler=yes
8936 else
8937   echo "$as_me: failed program was:" >&5
8938 sed 's/^/| /' conftest.$ac_ext >&5
8939
8940         ac_header_compiler=no
8941 fi
8942
8943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8944 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8945 echo "${ECHO_T}$ac_header_compiler" >&6; }
8946
8947 # Is the header present?
8948 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8949 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8950 cat >conftest.$ac_ext <<_ACEOF
8951 /* confdefs.h.  */
8952 _ACEOF
8953 cat confdefs.h >>conftest.$ac_ext
8954 cat >>conftest.$ac_ext <<_ACEOF
8955 /* end confdefs.h.  */
8956 #include <$ac_header>
8957 _ACEOF
8958 if { (ac_try="$ac_cpp conftest.$ac_ext"
8959 case "(($ac_try" in
8960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8961   *) ac_try_echo=$ac_try;;
8962 esac
8963 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8964   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8965   ac_status=$?
8966   grep -v '^ *+' conftest.er1 >conftest.err
8967   rm -f conftest.er1
8968   cat conftest.err >&5
8969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970   (exit $ac_status); } >/dev/null && {
8971          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8972          test ! -s conftest.err
8973        }; then
8974   ac_header_preproc=yes
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 sed 's/^/| /' conftest.$ac_ext >&5
8978
8979   ac_header_preproc=no
8980 fi
8981
8982 rm -f conftest.err conftest.$ac_ext
8983 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8984 echo "${ECHO_T}$ac_header_preproc" >&6; }
8985
8986 # So?  What about this header?
8987 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8988   yes:no: )
8989     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8990 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8991     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8992 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8993     ac_header_preproc=yes
8994     ;;
8995   no:yes:* )
8996     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8997 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8998     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8999 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9000     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9001 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9002     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9003 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9004     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9005 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9006     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9007 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9008
9009     ;;
9010 esac
9011 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9012 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9013 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9014   echo $ECHO_N "(cached) $ECHO_C" >&6
9015 else
9016   eval "$as_ac_Header=\$ac_header_preproc"
9017 fi
9018 ac_res=`eval echo '${'$as_ac_Header'}'`
9019                { echo "$as_me:$LINENO: result: $ac_res" >&5
9020 echo "${ECHO_T}$ac_res" >&6; }
9021
9022 fi
9023 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9024   cat >>confdefs.h <<_ACEOF
9025 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9026 _ACEOF
9027
9028 fi
9029
9030 done
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
9044 strdup __argz_count __argz_stringify __argz_next
9045 do
9046 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9047 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9048 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9049 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9050   echo $ECHO_N "(cached) $ECHO_C" >&6
9051 else
9052   cat >conftest.$ac_ext <<_ACEOF
9053 /* confdefs.h.  */
9054 _ACEOF
9055 cat confdefs.h >>conftest.$ac_ext
9056 cat >>conftest.$ac_ext <<_ACEOF
9057 /* end confdefs.h.  */
9058 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9059    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9060 #define $ac_func innocuous_$ac_func
9061
9062 /* System header to define __stub macros and hopefully few prototypes,
9063     which can conflict with char $ac_func (); below.
9064     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9065     <limits.h> exists even on freestanding compilers.  */
9066
9067 #ifdef __STDC__
9068 # include <limits.h>
9069 #else
9070 # include <assert.h>
9071 #endif
9072
9073 #undef $ac_func
9074
9075 /* Override any GCC internal prototype to avoid an error.
9076    Use char because int might match the return type of a GCC
9077    builtin and then its argument prototype would still apply.  */
9078 #ifdef __cplusplus
9079 extern "C"
9080 #endif
9081 char $ac_func ();
9082 /* The GNU C library defines this for functions which it implements
9083     to always fail with ENOSYS.  Some functions are actually named
9084     something starting with __ and the normal name is an alias.  */
9085 #if defined __stub_$ac_func || defined __stub___$ac_func
9086 choke me
9087 #endif
9088
9089 int
9090 main ()
9091 {
9092 return $ac_func ();
9093   ;
9094   return 0;
9095 }
9096 _ACEOF
9097 rm -f conftest.$ac_objext conftest$ac_exeext
9098 if { (ac_try="$ac_link"
9099 case "(($ac_try" in
9100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101   *) ac_try_echo=$ac_try;;
9102 esac
9103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9104   (eval "$ac_link") 2>conftest.er1
9105   ac_status=$?
9106   grep -v '^ *+' conftest.er1 >conftest.err
9107   rm -f conftest.er1
9108   cat conftest.err >&5
9109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110   (exit $ac_status); } && {
9111          test -z "$ac_c_werror_flag" ||
9112          test ! -s conftest.err
9113        } && test -s conftest$ac_exeext &&
9114        $as_test_x conftest$ac_exeext; then
9115   eval "$as_ac_var=yes"
9116 else
9117   echo "$as_me: failed program was:" >&5
9118 sed 's/^/| /' conftest.$ac_ext >&5
9119
9120         eval "$as_ac_var=no"
9121 fi
9122
9123 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9124       conftest$ac_exeext conftest.$ac_ext
9125 fi
9126 ac_res=`eval echo '${'$as_ac_var'}'`
9127                { echo "$as_me:$LINENO: result: $ac_res" >&5
9128 echo "${ECHO_T}$ac_res" >&6; }
9129 if test `eval echo '${'$as_ac_var'}'` = yes; then
9130   cat >>confdefs.h <<_ACEOF
9131 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9132 _ACEOF
9133
9134 fi
9135 done
9136
9137
9138    if test $ac_cv_header_locale_h = yes; then
9139     { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
9140 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
9141 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9142   echo $ECHO_N "(cached) $ECHO_C" >&6
9143 else
9144   cat >conftest.$ac_ext <<_ACEOF
9145 /* confdefs.h.  */
9146 _ACEOF
9147 cat confdefs.h >>conftest.$ac_ext
9148 cat >>conftest.$ac_ext <<_ACEOF
9149 /* end confdefs.h.  */
9150 #include <locale.h>
9151 int
9152 main ()
9153 {
9154 return LC_MESSAGES
9155   ;
9156   return 0;
9157 }
9158 _ACEOF
9159 rm -f conftest.$ac_objext conftest$ac_exeext
9160 if { (ac_try="$ac_link"
9161 case "(($ac_try" in
9162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163   *) ac_try_echo=$ac_try;;
9164 esac
9165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9166   (eval "$ac_link") 2>conftest.er1
9167   ac_status=$?
9168   grep -v '^ *+' conftest.er1 >conftest.err
9169   rm -f conftest.er1
9170   cat conftest.err >&5
9171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172   (exit $ac_status); } && {
9173          test -z "$ac_c_werror_flag" ||
9174          test ! -s conftest.err
9175        } && test -s conftest$ac_exeext &&
9176        $as_test_x conftest$ac_exeext; then
9177   am_cv_val_LC_MESSAGES=yes
9178 else
9179   echo "$as_me: failed program was:" >&5
9180 sed 's/^/| /' conftest.$ac_ext >&5
9181
9182         am_cv_val_LC_MESSAGES=no
9183 fi
9184
9185 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9186       conftest$ac_exeext conftest.$ac_ext
9187 fi
9188 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
9189 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
9190     if test $am_cv_val_LC_MESSAGES = yes; then
9191
9192 cat >>confdefs.h <<\_ACEOF
9193 #define HAVE_LC_MESSAGES 1
9194 _ACEOF
9195
9196     fi
9197   fi
9198      USE_NLS=yes
9199
9200
9201         nls_cv_force_use_gnu_gettext="no"
9202
9203     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
9204     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
9205                               nls_cv_header_intl=
9206       nls_cv_header_libgt=
9207       CATOBJEXT=NONE
9208
9209       if test "${ac_cv_header_libintl_h+set}" = set; then
9210   { echo "$as_me:$LINENO: checking for libintl.h" >&5
9211 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9212 if test "${ac_cv_header_libintl_h+set}" = set; then
9213   echo $ECHO_N "(cached) $ECHO_C" >&6
9214 fi
9215 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9216 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9217 else
9218   # Is the header compilable?
9219 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
9220 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
9221 cat >conftest.$ac_ext <<_ACEOF
9222 /* confdefs.h.  */
9223 _ACEOF
9224 cat confdefs.h >>conftest.$ac_ext
9225 cat >>conftest.$ac_ext <<_ACEOF
9226 /* end confdefs.h.  */
9227 $ac_includes_default
9228 #include <libintl.h>
9229 _ACEOF
9230 rm -f conftest.$ac_objext
9231 if { (ac_try="$ac_compile"
9232 case "(($ac_try" in
9233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234   *) ac_try_echo=$ac_try;;
9235 esac
9236 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9237   (eval "$ac_compile") 2>conftest.er1
9238   ac_status=$?
9239   grep -v '^ *+' conftest.er1 >conftest.err
9240   rm -f conftest.er1
9241   cat conftest.err >&5
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); } && {
9244          test -z "$ac_c_werror_flag" ||
9245          test ! -s conftest.err
9246        } && test -s conftest.$ac_objext; then
9247   ac_header_compiler=yes
9248 else
9249   echo "$as_me: failed program was:" >&5
9250 sed 's/^/| /' conftest.$ac_ext >&5
9251
9252         ac_header_compiler=no
9253 fi
9254
9255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9256 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9257 echo "${ECHO_T}$ac_header_compiler" >&6; }
9258
9259 # Is the header present?
9260 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
9261 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
9262 cat >conftest.$ac_ext <<_ACEOF
9263 /* confdefs.h.  */
9264 _ACEOF
9265 cat confdefs.h >>conftest.$ac_ext
9266 cat >>conftest.$ac_ext <<_ACEOF
9267 /* end confdefs.h.  */
9268 #include <libintl.h>
9269 _ACEOF
9270 if { (ac_try="$ac_cpp conftest.$ac_ext"
9271 case "(($ac_try" in
9272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9273   *) ac_try_echo=$ac_try;;
9274 esac
9275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9276   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9277   ac_status=$?
9278   grep -v '^ *+' conftest.er1 >conftest.err
9279   rm -f conftest.er1
9280   cat conftest.err >&5
9281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282   (exit $ac_status); } >/dev/null && {
9283          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9284          test ! -s conftest.err
9285        }; then
9286   ac_header_preproc=yes
9287 else
9288   echo "$as_me: failed program was:" >&5
9289 sed 's/^/| /' conftest.$ac_ext >&5
9290
9291   ac_header_preproc=no
9292 fi
9293
9294 rm -f conftest.err conftest.$ac_ext
9295 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9296 echo "${ECHO_T}$ac_header_preproc" >&6; }
9297
9298 # So?  What about this header?
9299 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9300   yes:no: )
9301     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9302 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9303     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
9304 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
9305     ac_header_preproc=yes
9306     ;;
9307   no:yes:* )
9308     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
9309 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
9310     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
9311 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
9312     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
9313 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
9314     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
9315 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
9317 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
9318     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
9319 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
9320
9321     ;;
9322 esac
9323 { echo "$as_me:$LINENO: checking for libintl.h" >&5
9324 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
9325 if test "${ac_cv_header_libintl_h+set}" = set; then
9326   echo $ECHO_N "(cached) $ECHO_C" >&6
9327 else
9328   ac_cv_header_libintl_h=$ac_header_preproc
9329 fi
9330 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
9331 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
9332
9333 fi
9334 if test $ac_cv_header_libintl_h = yes; then
9335   { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
9336 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
9337 if test "${gt_cv_func_dgettext_libc+set}" = set; then
9338   echo $ECHO_N "(cached) $ECHO_C" >&6
9339 else
9340   cat >conftest.$ac_ext <<_ACEOF
9341 /* confdefs.h.  */
9342 _ACEOF
9343 cat confdefs.h >>conftest.$ac_ext
9344 cat >>conftest.$ac_ext <<_ACEOF
9345 /* end confdefs.h.  */
9346 #include <libintl.h>
9347 int
9348 main ()
9349 {
9350 return (int) dgettext ("","")
9351   ;
9352   return 0;
9353 }
9354 _ACEOF
9355 rm -f conftest.$ac_objext conftest$ac_exeext
9356 if { (ac_try="$ac_link"
9357 case "(($ac_try" in
9358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359   *) ac_try_echo=$ac_try;;
9360 esac
9361 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9362   (eval "$ac_link") 2>conftest.er1
9363   ac_status=$?
9364   grep -v '^ *+' conftest.er1 >conftest.err
9365   rm -f conftest.er1
9366   cat conftest.err >&5
9367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368   (exit $ac_status); } && {
9369          test -z "$ac_c_werror_flag" ||
9370          test ! -s conftest.err
9371        } && test -s conftest$ac_exeext &&
9372        $as_test_x conftest$ac_exeext; then
9373   gt_cv_func_dgettext_libc=yes
9374 else
9375   echo "$as_me: failed program was:" >&5
9376 sed 's/^/| /' conftest.$ac_ext >&5
9377
9378         gt_cv_func_dgettext_libc=no
9379 fi
9380
9381 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9382       conftest$ac_exeext conftest.$ac_ext
9383 fi
9384 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
9385 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
9386
9387           if test "$gt_cv_func_dgettext_libc" != "yes"; then
9388             { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
9389 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
9390 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
9391   echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393   ac_check_lib_save_LIBS=$LIBS
9394 LIBS="-lintl  $LIBS"
9395 cat >conftest.$ac_ext <<_ACEOF
9396 /* confdefs.h.  */
9397 _ACEOF
9398 cat confdefs.h >>conftest.$ac_ext
9399 cat >>conftest.$ac_ext <<_ACEOF
9400 /* end confdefs.h.  */
9401
9402 /* Override any GCC internal prototype to avoid an error.
9403    Use char because int might match the return type of a GCC
9404    builtin and then its argument prototype would still apply.  */
9405 #ifdef __cplusplus
9406 extern "C"
9407 #endif
9408 char bindtextdomain ();
9409 int
9410 main ()
9411 {
9412 return bindtextdomain ();
9413   ;
9414   return 0;
9415 }
9416 _ACEOF
9417 rm -f conftest.$ac_objext conftest$ac_exeext
9418 if { (ac_try="$ac_link"
9419 case "(($ac_try" in
9420   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421   *) ac_try_echo=$ac_try;;
9422 esac
9423 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9424   (eval "$ac_link") 2>conftest.er1
9425   ac_status=$?
9426   grep -v '^ *+' conftest.er1 >conftest.err
9427   rm -f conftest.er1
9428   cat conftest.err >&5
9429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9430   (exit $ac_status); } && {
9431          test -z "$ac_c_werror_flag" ||
9432          test ! -s conftest.err
9433        } && test -s conftest$ac_exeext &&
9434        $as_test_x conftest$ac_exeext; then
9435   ac_cv_lib_intl_bindtextdomain=yes
9436 else
9437   echo "$as_me: failed program was:" >&5
9438 sed 's/^/| /' conftest.$ac_ext >&5
9439
9440         ac_cv_lib_intl_bindtextdomain=no
9441 fi
9442
9443 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9444       conftest$ac_exeext conftest.$ac_ext
9445 LIBS=$ac_check_lib_save_LIBS
9446 fi
9447 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
9448 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
9449 if test $ac_cv_lib_intl_bindtextdomain = yes; then
9450   { echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
9451 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6; }
9452 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
9453   echo $ECHO_N "(cached) $ECHO_C" >&6
9454 else
9455   { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
9456 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
9457 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
9458   echo $ECHO_N "(cached) $ECHO_C" >&6
9459 else
9460   ac_check_lib_save_LIBS=$LIBS
9461 LIBS="-lintl  $LIBS"
9462 cat >conftest.$ac_ext <<_ACEOF
9463 /* confdefs.h.  */
9464 _ACEOF
9465 cat confdefs.h >>conftest.$ac_ext
9466 cat >>conftest.$ac_ext <<_ACEOF
9467 /* end confdefs.h.  */
9468
9469 /* Override any GCC internal prototype to avoid an error.
9470    Use char because int might match the return type of a GCC
9471    builtin and then its argument prototype would still apply.  */
9472 #ifdef __cplusplus
9473 extern "C"
9474 #endif
9475 char dgettext ();
9476 int
9477 main ()
9478 {
9479 return dgettext ();
9480   ;
9481   return 0;
9482 }
9483 _ACEOF
9484 rm -f conftest.$ac_objext conftest$ac_exeext
9485 if { (ac_try="$ac_link"
9486 case "(($ac_try" in
9487   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9488   *) ac_try_echo=$ac_try;;
9489 esac
9490 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9491   (eval "$ac_link") 2>conftest.er1
9492   ac_status=$?
9493   grep -v '^ *+' conftest.er1 >conftest.err
9494   rm -f conftest.er1
9495   cat conftest.err >&5
9496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9497   (exit $ac_status); } && {
9498          test -z "$ac_c_werror_flag" ||
9499          test ! -s conftest.err
9500        } && test -s conftest$ac_exeext &&
9501        $as_test_x conftest$ac_exeext; then
9502   ac_cv_lib_intl_dgettext=yes
9503 else
9504   echo "$as_me: failed program was:" >&5
9505 sed 's/^/| /' conftest.$ac_ext >&5
9506
9507         ac_cv_lib_intl_dgettext=no
9508 fi
9509
9510 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9511       conftest$ac_exeext conftest.$ac_ext
9512 LIBS=$ac_check_lib_save_LIBS
9513 fi
9514 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9515 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
9516 if test $ac_cv_lib_intl_dgettext = yes; then
9517   gt_cv_func_dgettext_libintl=yes
9518 else
9519   gt_cv_func_dgettext_libintl=no
9520 fi
9521
9522 fi
9523 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9524 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6; }
9525 fi
9526
9527           fi
9528
9529           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9530             LIBS="$LIBS -lintl";
9531           fi
9532
9533           if test "$gt_cv_func_dgettext_libc" = "yes" \
9534             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9535
9536 cat >>confdefs.h <<\_ACEOF
9537 #define HAVE_GETTEXT 1
9538 _ACEOF
9539
9540             # Extract the first word of "msgfmt", so it can be a program name with args.
9541 set dummy msgfmt; ac_word=$2
9542 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9544 if test "${ac_cv_path_MSGFMT+set}" = set; then
9545   echo $ECHO_N "(cached) $ECHO_C" >&6
9546 else
9547   case "$MSGFMT" in
9548   /*)
9549   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9550   ;;
9551   *)
9552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9553   for ac_dir in $PATH; do
9554     test -z "$ac_dir" && ac_dir=.
9555     if test -f $ac_dir/$ac_word; then
9556       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9557         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9558         break
9559       fi
9560     fi
9561   done
9562   IFS="$ac_save_ifs"
9563   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9564   ;;
9565 esac
9566 fi
9567 MSGFMT="$ac_cv_path_MSGFMT"
9568 if test -n "$MSGFMT"; then
9569   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
9570 echo "${ECHO_T}$MSGFMT" >&6; }
9571 else
9572   { echo "$as_me:$LINENO: result: no" >&5
9573 echo "${ECHO_T}no" >&6; }
9574 fi
9575             if test "$MSGFMT" != "no"; then
9576
9577 for ac_func in dcgettext
9578 do
9579 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9580 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9581 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9582 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9583   echo $ECHO_N "(cached) $ECHO_C" >&6
9584 else
9585   cat >conftest.$ac_ext <<_ACEOF
9586 /* confdefs.h.  */
9587 _ACEOF
9588 cat confdefs.h >>conftest.$ac_ext
9589 cat >>conftest.$ac_ext <<_ACEOF
9590 /* end confdefs.h.  */
9591 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9592    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9593 #define $ac_func innocuous_$ac_func
9594
9595 /* System header to define __stub macros and hopefully few prototypes,
9596     which can conflict with char $ac_func (); below.
9597     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9598     <limits.h> exists even on freestanding compilers.  */
9599
9600 #ifdef __STDC__
9601 # include <limits.h>
9602 #else
9603 # include <assert.h>
9604 #endif
9605
9606 #undef $ac_func
9607
9608 /* Override any GCC internal prototype to avoid an error.
9609    Use char because int might match the return type of a GCC
9610    builtin and then its argument prototype would still apply.  */
9611 #ifdef __cplusplus
9612 extern "C"
9613 #endif
9614 char $ac_func ();
9615 /* The GNU C library defines this for functions which it implements
9616     to always fail with ENOSYS.  Some functions are actually named
9617     something starting with __ and the normal name is an alias.  */
9618 #if defined __stub_$ac_func || defined __stub___$ac_func
9619 choke me
9620 #endif
9621
9622 int
9623 main ()
9624 {
9625 return $ac_func ();
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 rm -f conftest.$ac_objext conftest$ac_exeext
9631 if { (ac_try="$ac_link"
9632 case "(($ac_try" in
9633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634   *) ac_try_echo=$ac_try;;
9635 esac
9636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9637   (eval "$ac_link") 2>conftest.er1
9638   ac_status=$?
9639   grep -v '^ *+' conftest.er1 >conftest.err
9640   rm -f conftest.er1
9641   cat conftest.err >&5
9642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643   (exit $ac_status); } && {
9644          test -z "$ac_c_werror_flag" ||
9645          test ! -s conftest.err
9646        } && test -s conftest$ac_exeext &&
9647        $as_test_x conftest$ac_exeext; then
9648   eval "$as_ac_var=yes"
9649 else
9650   echo "$as_me: failed program was:" >&5
9651 sed 's/^/| /' conftest.$ac_ext >&5
9652
9653         eval "$as_ac_var=no"
9654 fi
9655
9656 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9657       conftest$ac_exeext conftest.$ac_ext
9658 fi
9659 ac_res=`eval echo '${'$as_ac_var'}'`
9660                { echo "$as_me:$LINENO: result: $ac_res" >&5
9661 echo "${ECHO_T}$ac_res" >&6; }
9662 if test `eval echo '${'$as_ac_var'}'` = yes; then
9663   cat >>confdefs.h <<_ACEOF
9664 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9665 _ACEOF
9666
9667 fi
9668 done
9669
9670               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9671 set dummy gmsgfmt; ac_word=$2
9672 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9673 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9674 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   case $GMSGFMT in
9678   [\\/]* | ?:[\\/]*)
9679   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9680   ;;
9681   *)
9682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9683 for as_dir in $PATH
9684 do
9685   IFS=$as_save_IFS
9686   test -z "$as_dir" && as_dir=.
9687   for ac_exec_ext in '' $ac_executable_extensions; do
9688   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9689     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9690     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9691     break 2
9692   fi
9693 done
9694 done
9695 IFS=$as_save_IFS
9696
9697   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9698   ;;
9699 esac
9700 fi
9701 GMSGFMT=$ac_cv_path_GMSGFMT
9702 if test -n "$GMSGFMT"; then
9703   { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9704 echo "${ECHO_T}$GMSGFMT" >&6; }
9705 else
9706   { echo "$as_me:$LINENO: result: no" >&5
9707 echo "${ECHO_T}no" >&6; }
9708 fi
9709
9710
9711               # Extract the first word of "xgettext", so it can be a program name with args.
9712 set dummy xgettext; ac_word=$2
9713 { echo "$as_me:$LINENO: checking for $ac_word" >&5
9714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9715 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9716   echo $ECHO_N "(cached) $ECHO_C" >&6
9717 else
9718   case "$XGETTEXT" in
9719   /*)
9720   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9721   ;;
9722   *)
9723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9724   for ac_dir in $PATH; do
9725     test -z "$ac_dir" && ac_dir=.
9726     if test -f $ac_dir/$ac_word; then
9727       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9728         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9729         break
9730       fi
9731     fi
9732   done
9733   IFS="$ac_save_ifs"
9734   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9735   ;;
9736 esac
9737 fi
9738 XGETTEXT="$ac_cv_path_XGETTEXT"
9739 if test -n "$XGETTEXT"; then
9740   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9741 echo "${ECHO_T}$XGETTEXT" >&6; }
9742 else
9743   { echo "$as_me:$LINENO: result: no" >&5
9744 echo "${ECHO_T}no" >&6; }
9745 fi
9746
9747               cat >conftest.$ac_ext <<_ACEOF
9748 /* confdefs.h.  */
9749 _ACEOF
9750 cat confdefs.h >>conftest.$ac_ext
9751 cat >>conftest.$ac_ext <<_ACEOF
9752 /* end confdefs.h.  */
9753
9754 int
9755 main ()
9756 {
9757 extern int _nl_msg_cat_cntr;
9758                              return _nl_msg_cat_cntr
9759   ;
9760   return 0;
9761 }
9762 _ACEOF
9763 rm -f conftest.$ac_objext conftest$ac_exeext
9764 if { (ac_try="$ac_link"
9765 case "(($ac_try" in
9766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9767   *) ac_try_echo=$ac_try;;
9768 esac
9769 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9770   (eval "$ac_link") 2>conftest.er1
9771   ac_status=$?
9772   grep -v '^ *+' conftest.er1 >conftest.err
9773   rm -f conftest.er1
9774   cat conftest.err >&5
9775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776   (exit $ac_status); } && {
9777          test -z "$ac_c_werror_flag" ||
9778          test ! -s conftest.err
9779        } && test -s conftest$ac_exeext &&
9780        $as_test_x conftest$ac_exeext; then
9781   CATOBJEXT=.gmo
9782                  DATADIRNAME=share
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 sed 's/^/| /' conftest.$ac_ext >&5
9786
9787         CATOBJEXT=.mo
9788                  DATADIRNAME=lib
9789 fi
9790
9791 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9792       conftest$ac_exeext conftest.$ac_ext
9793               INSTOBJEXT=.mo
9794             fi
9795           fi
9796
9797           # Added by Martin Baulig 12/15/98 for libc5 systems
9798           if test "$gt_cv_func_dgettext_libc" != "yes" \
9799             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9800             INTLLIBS=-lintl
9801             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9802           fi
9803
9804 fi
9805
9806
9807
9808       if test "$CATOBJEXT" = "NONE"; then
9809                         nls_cv_use_gnu_gettext=yes
9810       fi
9811     fi
9812
9813     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9814
9815 cat >>confdefs.h <<\_ACEOF
9816 #define ENABLE_NLS 1
9817 _ACEOF
9818
9819     else
9820             CATOBJEXT=
9821     fi
9822
9823         if test "$XGETTEXT" != ":"; then
9824                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9825         : ;
9826       else
9827         { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9828 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
9829         XGETTEXT=":"
9830       fi
9831     fi
9832
9833     # We need to process the po/ directory.
9834     POSUB=po
9835
9836     ac_config_commands="$ac_config_commands default-2"
9837
9838
9839                 for lang in $ALL_LINGUAS; do
9840       GMOFILES="$GMOFILES $lang.gmo"
9841       POFILES="$POFILES $lang.po"
9842     done
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856    if test "x$CATOBJEXT" != "x"; then
9857      if test "x$ALL_LINGUAS" = "x"; then
9858        LINGUAS=
9859      else
9860        { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9861 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
9862        NEW_LINGUAS=
9863        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9864          case "$ALL_LINGUAS" in
9865           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9866          esac
9867        done
9868        LINGUAS=$NEW_LINGUAS
9869        { echo "$as_me:$LINENO: result: $LINGUAS" >&5
9870 echo "${ECHO_T}$LINGUAS" >&6; }
9871      fi
9872
9873           if test -n "$LINGUAS"; then
9874        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9875      fi
9876    fi
9877
9878             test -d po || mkdir po
9879    if test "$CATOBJEXT" = ".cat"; then
9880      if test "${ac_cv_header_linux_version_h+set}" = set; then
9881   { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9882 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9883 if test "${ac_cv_header_linux_version_h+set}" = set; then
9884   echo $ECHO_N "(cached) $ECHO_C" >&6
9885 fi
9886 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9887 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
9888 else
9889   # Is the header compilable?
9890 { echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9891 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6; }
9892 cat >conftest.$ac_ext <<_ACEOF
9893 /* confdefs.h.  */
9894 _ACEOF
9895 cat confdefs.h >>conftest.$ac_ext
9896 cat >>conftest.$ac_ext <<_ACEOF
9897 /* end confdefs.h.  */
9898 $ac_includes_default
9899 #include <linux/version.h>
9900 _ACEOF
9901 rm -f conftest.$ac_objext
9902 if { (ac_try="$ac_compile"
9903 case "(($ac_try" in
9904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905   *) ac_try_echo=$ac_try;;
9906 esac
9907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9908   (eval "$ac_compile") 2>conftest.er1
9909   ac_status=$?
9910   grep -v '^ *+' conftest.er1 >conftest.err
9911   rm -f conftest.er1
9912   cat conftest.err >&5
9913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914   (exit $ac_status); } && {
9915          test -z "$ac_c_werror_flag" ||
9916          test ! -s conftest.err
9917        } && test -s conftest.$ac_objext; then
9918   ac_header_compiler=yes
9919 else
9920   echo "$as_me: failed program was:" >&5
9921 sed 's/^/| /' conftest.$ac_ext >&5
9922
9923         ac_header_compiler=no
9924 fi
9925
9926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9928 echo "${ECHO_T}$ac_header_compiler" >&6; }
9929
9930 # Is the header present?
9931 { echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9932 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6; }
9933 cat >conftest.$ac_ext <<_ACEOF
9934 /* confdefs.h.  */
9935 _ACEOF
9936 cat confdefs.h >>conftest.$ac_ext
9937 cat >>conftest.$ac_ext <<_ACEOF
9938 /* end confdefs.h.  */
9939 #include <linux/version.h>
9940 _ACEOF
9941 if { (ac_try="$ac_cpp conftest.$ac_ext"
9942 case "(($ac_try" in
9943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944   *) ac_try_echo=$ac_try;;
9945 esac
9946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9948   ac_status=$?
9949   grep -v '^ *+' conftest.er1 >conftest.err
9950   rm -f conftest.er1
9951   cat conftest.err >&5
9952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953   (exit $ac_status); } >/dev/null && {
9954          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9955          test ! -s conftest.err
9956        }; then
9957   ac_header_preproc=yes
9958 else
9959   echo "$as_me: failed program was:" >&5
9960 sed 's/^/| /' conftest.$ac_ext >&5
9961
9962   ac_header_preproc=no
9963 fi
9964
9965 rm -f conftest.err conftest.$ac_ext
9966 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9967 echo "${ECHO_T}$ac_header_preproc" >&6; }
9968
9969 # So?  What about this header?
9970 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9971   yes:no: )
9972     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9973 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9974     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9975 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9976     ac_header_preproc=yes
9977     ;;
9978   no:yes:* )
9979     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9980 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9981     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9982 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9983     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9984 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9985     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9986 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9987     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9988 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9989     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9990 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9991
9992     ;;
9993 esac
9994 { echo "$as_me:$LINENO: checking for linux/version.h" >&5
9995 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6; }
9996 if test "${ac_cv_header_linux_version_h+set}" = set; then
9997   echo $ECHO_N "(cached) $ECHO_C" >&6
9998 else
9999   ac_cv_header_linux_version_h=$ac_header_preproc
10000 fi
10001 { echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
10002 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6; }
10003
10004 fi
10005 if test $ac_cv_header_linux_version_h = yes; then
10006   msgformat=linux
10007 else
10008   msgformat=xopen
10009 fi
10010
10011
10012
10013                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
10014    fi
10015
10016             MKINSTALLDIRS=
10017 #
10018 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
10019 #
10020 #   if test -n "$ac_aux_dir"; then
10021 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
10022 #   fi
10023    if test -z "$MKINSTALLDIRS"; then
10024      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
10025    fi
10026
10027    # jwz: you know what, screw it.  Let's just use the version that I
10028    # already computed in configure.in, instead of this version that came
10029    # with the i18n crud, ok?
10030    MKINSTALLDIRS="$INSTALL_DIRS"
10031
10032
10033
10034
10035          test -d po || mkdir po
10036    if test "x$srcdir" != "x."; then
10037      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
10038        posrcprefix="$srcdir/"
10039      else
10040        posrcprefix="../$srcdir/"
10041      fi
10042    else
10043      posrcprefix="../"
10044    fi
10045    rm -f po/POTFILES
10046    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10047         < $srcdir/po/POTFILES.in > po/POTFILES
10048
10049 MKINSTALLDIRS="$INSTALL_DIRS"
10050
10051
10052 ###############################################################################
10053 #
10054 #       Check for -lXmu (some fucked up vendors don't ship it...)
10055 #
10056 ###############################################################################
10057
10058 have_xmu=no
10059
10060   ac_save_CPPFLAGS="$CPPFLAGS"
10061   if test \! -z "$includedir" ; then
10062     CPPFLAGS="$CPPFLAGS -I$includedir"
10063   fi
10064   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10065   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10066   { echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
10067 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6; }
10068 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
10069   echo $ECHO_N "(cached) $ECHO_C" >&6
10070 else
10071   cat >conftest.$ac_ext <<_ACEOF
10072 /* confdefs.h.  */
10073 _ACEOF
10074 cat confdefs.h >>conftest.$ac_ext
10075 cat >>conftest.$ac_ext <<_ACEOF
10076 /* end confdefs.h.  */
10077 #include <stdlib.h>
10078                    #include <stdio.h>
10079                    #include <X11/Intrinsic.h>
10080
10081 #include <X11/Xmu/Error.h>
10082 _ACEOF
10083 rm -f conftest.$ac_objext
10084 if { (ac_try="$ac_compile"
10085 case "(($ac_try" in
10086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10087   *) ac_try_echo=$ac_try;;
10088 esac
10089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10090   (eval "$ac_compile") 2>conftest.er1
10091   ac_status=$?
10092   grep -v '^ *+' conftest.er1 >conftest.err
10093   rm -f conftest.er1
10094   cat conftest.err >&5
10095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10096   (exit $ac_status); } && {
10097          test -z "$ac_c_werror_flag" ||
10098          test ! -s conftest.err
10099        } && test -s conftest.$ac_objext; then
10100   ac_cv_header_X11_Xmu_Error_h=yes
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 sed 's/^/| /' conftest.$ac_ext >&5
10104
10105         ac_cv_header_X11_Xmu_Error_h=no
10106 fi
10107
10108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10109 fi
10110 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
10111 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6; }
10112 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
10113   have_xmu=yes
10114 fi
10115
10116
10117   CPPFLAGS="$ac_save_CPPFLAGS"
10118 if test "$have_xmu" = no ; then
10119   XMU_SRCS='$(UTILS_SRC)/xmu.c'
10120   XMU_OBJS='$(UTILS_BIN)/xmu.o'
10121   XMU_LIBS=''
10122 else
10123   XMU_SRCS=''
10124   XMU_OBJS=''
10125   XMU_LIBS='-lXmu'
10126   cat >>confdefs.h <<\_ACEOF
10127 #define HAVE_XMU 1
10128 _ACEOF
10129
10130 fi
10131
10132
10133 ###############################################################################
10134 #
10135 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
10136 #       See comp.windows.x FAQ question 124.  The right fix is to
10137 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
10138 #
10139 ###############################################################################
10140
10141 if test "$have_xmu" = yes ; then
10142   case "$host" in
10143     *-sunos4*)
10144     { echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
10145 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6; }
10146 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
10147   echo $ECHO_N "(cached) $ECHO_C" >&6
10148 else
10149   ac_save_LDFLAGS="$LDFLAGS"
10150                     if test \! -z "$x_libraries" ; then
10151                       LDFLAGS="$LDFLAGS -L$x_libraries"
10152                     fi
10153                     # Note: this trick never works!  (Generally.)
10154                     # We're only getting away with using AC_TRY_LINK
10155                     # with X libraries because we know it's SunOS.
10156                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
10157                     cat >conftest.$ac_ext <<_ACEOF
10158 /* confdefs.h.  */
10159 _ACEOF
10160 cat confdefs.h >>conftest.$ac_ext
10161 cat >>conftest.$ac_ext <<_ACEOF
10162 /* end confdefs.h.  */
10163
10164 int
10165 main ()
10166 {
10167
10168   ;
10169   return 0;
10170 }
10171 _ACEOF
10172 rm -f conftest.$ac_objext conftest$ac_exeext
10173 if { (ac_try="$ac_link"
10174 case "(($ac_try" in
10175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10176   *) ac_try_echo=$ac_try;;
10177 esac
10178 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10179   (eval "$ac_link") 2>conftest.er1
10180   ac_status=$?
10181   grep -v '^ *+' conftest.er1 >conftest.err
10182   rm -f conftest.er1
10183   cat conftest.err >&5
10184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185   (exit $ac_status); } && {
10186          test -z "$ac_c_werror_flag" ||
10187          test ! -s conftest.err
10188        } && test -s conftest$ac_exeext &&
10189        $as_test_x conftest$ac_exeext; then
10190   ac_cv_sunos_xmu_bug=no
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 sed 's/^/| /' conftest.$ac_ext >&5
10194
10195         ac_cv_sunos_xmu_bug=yes
10196 fi
10197
10198 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10199       conftest$ac_exeext conftest.$ac_ext
10200                     LDFLAGS="$ac_save_LDFLAGS"
10201 fi
10202 { echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
10203 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6; }
10204     if test "$ac_cv_sunos_xmu_bug" = yes ; then
10205       { echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
10206 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6; }
10207 if test "${ac_cv_ld_static+set}" = set; then
10208   echo $ECHO_N "(cached) $ECHO_C" >&6
10209 else
10210   ac_save_LDFLAGS="$LDFLAGS"
10211                       LDFLAGS="$LDFLAGS -static"
10212                       cat >conftest.$ac_ext <<_ACEOF
10213 /* confdefs.h.  */
10214 _ACEOF
10215 cat confdefs.h >>conftest.$ac_ext
10216 cat >>conftest.$ac_ext <<_ACEOF
10217 /* end confdefs.h.  */
10218
10219 int
10220 main ()
10221 {
10222
10223   ;
10224   return 0;
10225 }
10226 _ACEOF
10227 rm -f conftest.$ac_objext conftest$ac_exeext
10228 if { (ac_try="$ac_link"
10229 case "(($ac_try" in
10230   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231   *) ac_try_echo=$ac_try;;
10232 esac
10233 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10234   (eval "$ac_link") 2>conftest.er1
10235   ac_status=$?
10236   grep -v '^ *+' conftest.er1 >conftest.err
10237   rm -f conftest.er1
10238   cat conftest.err >&5
10239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10240   (exit $ac_status); } && {
10241          test -z "$ac_c_werror_flag" ||
10242          test ! -s conftest.err
10243        } && test -s conftest$ac_exeext &&
10244        $as_test_x conftest$ac_exeext; then
10245   ac_cv_ld_static=yes
10246 else
10247   echo "$as_me: failed program was:" >&5
10248 sed 's/^/| /' conftest.$ac_ext >&5
10249
10250         ac_cv_ld_static=no
10251 fi
10252
10253 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10254       conftest$ac_exeext conftest.$ac_ext
10255                     LDFLAGS="$ac_save_LDFLAGS"
10256 fi
10257 { echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
10258 echo "${ECHO_T}$ac_cv_ld_static" >&6; }
10259       if test "$ac_cv_ld_static" = yes ; then
10260         LDFLAGS="$LDFLAGS -static"
10261       else
10262         LDFLAGS="$LDFLAGS -Bstatic"
10263       fi
10264     fi
10265     ;;
10266   esac
10267 fi
10268
10269
10270 ###############################################################################
10271 #
10272 #       Handle the --with-hackdir option
10273 #
10274 ###############################################################################
10275
10276 have_hackdir=yes
10277 with_hackdir_req=unspecified
10278
10279 # Check whether --with-hackdir was given.
10280 if test "${with_hackdir+set}" = set; then
10281   withval=$with_hackdir; with_hackdir="$withval"; with_hackdir_req="$withval"
10282 else
10283   with_hackdir=yes
10284 fi
10285
10286
10287 if test x"$with_hackdir" = xyes; then
10288   HACKDIR='${libexecdir}/xscreensaver'
10289 elif test x"$with_hackdir" = xno; then
10290   HACKDIR='${bindir}'
10291 else
10292   HACKDIR=$with_hackdir
10293 fi
10294
10295 # canonicalize slashes.
10296 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
10297
10298 # Expand HACKDIR as HACKDIR_FULL
10299 HACKDIR_FULL=`eval eval eval eval eval eval eval eval eval echo $HACKDIR`
10300
10301 # This option used to be called --enable-subdir; make sure that is no longer
10302 # used, since configure brain-damagedly ignores unknown --enable options.
10303
10304 obsolete_enable=
10305 # Check whether --enable-subdir was given.
10306 if test "${enable_subdir+set}" = set; then
10307   enableval=$enable_subdir; obsolete_enable=yes
10308 fi
10309
10310 if test -n "$obsolete_enable"; then
10311   echo "error: the --enable-subdir option has been replaced with"
10312   echo "       the new --with-hackdir option; see \`configure --help'"
10313   echo "       for more information."
10314   exit 1
10315 fi
10316
10317
10318 ###############################################################################
10319 #
10320 #       Handle the --with-configdir option
10321 #       Help for --with-x-app-defaults option added..
10322 #
10323 ###############################################################################
10324
10325 have_configdir=yes
10326 with_configdir_req=unspecified
10327
10328 # Check whether --with-configdir was given.
10329 if test "${with_configdir+set}" = set; then
10330   withval=$with_configdir; with_configdir="$withval"; with_configdir_req="$withval"
10331 else
10332   with_configdir=yes
10333 fi
10334
10335
10336 if test x"$with_configdir" = xyes; then
10337   HACK_CONF_DIR='${datadir}/xscreensaver/config'
10338 elif test x"$with_configdir" = xno; then
10339   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
10340   exit 1
10341 else
10342   # there must be a better way than this...
10343   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
10344     # absolute path
10345     HACK_CONF_DIR=$with_configdir
10346   else
10347     # relative path
10348     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
10349   fi
10350 fi
10351
10352
10353
10354
10355 ###############################################################################
10356 #
10357 #       Check for the SGI SCREEN_SAVER server extension.
10358 #
10359 ###############################################################################
10360
10361 have_sgi=no
10362 with_sgi_req=unspecified
10363
10364 # Check whether --with-sgi-ext was given.
10365 if test "${with_sgi_ext+set}" = set; then
10366   withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
10367 else
10368   with_sgi=yes
10369 fi
10370
10371
10372
10373    case "$with_sgi" in
10374     yes) ;;
10375     no)  ;;
10376
10377     /*)
10378      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
10379 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6; }
10380      d=$with_sgi/include
10381      if test -d $d; then
10382        X_CFLAGS="-I$d $X_CFLAGS"
10383        { echo "$as_me:$LINENO: result: $d" >&5
10384 echo "${ECHO_T}$d" >&6; }
10385      else
10386        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10387 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10388      fi
10389
10390      { echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
10391 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6; }
10392      d=$with_sgi/lib
10393      if test -d $d; then
10394        X_LIBS="-L$d $X_LIBS"
10395        { echo "$as_me:$LINENO: result: $d" >&5
10396 echo "${ECHO_T}$d" >&6; }
10397      else
10398        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10399 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10400      fi
10401
10402      # replace the directory string with "yes".
10403      with_sgi_req="yes"
10404      with_sgi=$with_sgi_req
10405      ;;
10406
10407     *)
10408      echo ""
10409      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
10410      echo "       If it is a directory, then \`DIR/include' will be added to"
10411      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10412      exit 1
10413      ;;
10414    esac
10415
10416
10417 if test "$with_sgi" = yes; then
10418
10419   ac_save_CPPFLAGS="$CPPFLAGS"
10420   if test \! -z "$includedir" ; then
10421     CPPFLAGS="$CPPFLAGS -I$includedir"
10422   fi
10423   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10424   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10425   { echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
10426 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6; }
10427 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10428   echo $ECHO_N "(cached) $ECHO_C" >&6
10429 else
10430   cat >conftest.$ac_ext <<_ACEOF
10431 /* confdefs.h.  */
10432 _ACEOF
10433 cat confdefs.h >>conftest.$ac_ext
10434 cat >>conftest.$ac_ext <<_ACEOF
10435 /* end confdefs.h.  */
10436 #include <X11/Xlib.h>
10437
10438 #include <X11/extensions/XScreenSaver.h>
10439 _ACEOF
10440 rm -f conftest.$ac_objext
10441 if { (ac_try="$ac_compile"
10442 case "(($ac_try" in
10443   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444   *) ac_try_echo=$ac_try;;
10445 esac
10446 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10447   (eval "$ac_compile") 2>conftest.er1
10448   ac_status=$?
10449   grep -v '^ *+' conftest.er1 >conftest.err
10450   rm -f conftest.er1
10451   cat conftest.err >&5
10452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453   (exit $ac_status); } && {
10454          test -z "$ac_c_werror_flag" ||
10455          test ! -s conftest.err
10456        } && test -s conftest.$ac_objext; then
10457   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10458 else
10459   echo "$as_me: failed program was:" >&5
10460 sed 's/^/| /' conftest.$ac_ext >&5
10461
10462         ac_cv_header_X11_extensions_XScreenSaver_h=no
10463 fi
10464
10465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10466 fi
10467 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10468 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6; }
10469 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10470   have_sgi=yes
10471                      cat >>confdefs.h <<\_ACEOF
10472 #define HAVE_SGI_SAVER_EXTENSION 1
10473 _ACEOF
10474
10475 fi
10476
10477
10478   CPPFLAGS="$ac_save_CPPFLAGS"
10479
10480 elif test "$with_sgi" != no; then
10481   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10482   exit 1
10483 fi
10484
10485
10486 ###############################################################################
10487 #
10488 #       Check for the XIDLE server extension.
10489 #
10490 ###############################################################################
10491
10492 have_xidle=no
10493 with_xidle_req=unspecified
10494
10495 # Check whether --with-xidle-ext was given.
10496 if test "${with_xidle_ext+set}" = set; then
10497   withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
10498 else
10499   with_xidle=yes
10500 fi
10501
10502
10503
10504    case "$with_xidle" in
10505     yes) ;;
10506     no)  ;;
10507
10508     /*)
10509      { echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10510 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6; }
10511      d=$with_xidle/include
10512      if test -d $d; then
10513        X_CFLAGS="-I$d $X_CFLAGS"
10514        { echo "$as_me:$LINENO: result: $d" >&5
10515 echo "${ECHO_T}$d" >&6; }
10516      else
10517        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10518 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10519      fi
10520
10521      { echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10522 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6; }
10523      d=$with_xidle/lib
10524      if test -d $d; then
10525        X_LIBS="-L$d $X_LIBS"
10526        { echo "$as_me:$LINENO: result: $d" >&5
10527 echo "${ECHO_T}$d" >&6; }
10528      else
10529        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10530 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10531      fi
10532
10533      # replace the directory string with "yes".
10534      with_xidle_req="yes"
10535      with_xidle=$with_xidle_req
10536      ;;
10537
10538     *)
10539      echo ""
10540      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10541      echo "       If it is a directory, then \`DIR/include' will be added to"
10542      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10543      exit 1
10544      ;;
10545    esac
10546
10547
10548 if test "$with_xidle" = yes; then
10549
10550   ac_save_CPPFLAGS="$CPPFLAGS"
10551   if test \! -z "$includedir" ; then
10552     CPPFLAGS="$CPPFLAGS -I$includedir"
10553   fi
10554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10555   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10556   { echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10557 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6; }
10558 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10559   echo $ECHO_N "(cached) $ECHO_C" >&6
10560 else
10561   cat >conftest.$ac_ext <<_ACEOF
10562 /* confdefs.h.  */
10563 _ACEOF
10564 cat confdefs.h >>conftest.$ac_ext
10565 cat >>conftest.$ac_ext <<_ACEOF
10566 /* end confdefs.h.  */
10567 #include <X11/Xlib.h>
10568
10569 #include <X11/extensions/xidle.h>
10570 _ACEOF
10571 rm -f conftest.$ac_objext
10572 if { (ac_try="$ac_compile"
10573 case "(($ac_try" in
10574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10575   *) ac_try_echo=$ac_try;;
10576 esac
10577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10578   (eval "$ac_compile") 2>conftest.er1
10579   ac_status=$?
10580   grep -v '^ *+' conftest.er1 >conftest.err
10581   rm -f conftest.er1
10582   cat conftest.err >&5
10583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10584   (exit $ac_status); } && {
10585          test -z "$ac_c_werror_flag" ||
10586          test ! -s conftest.err
10587        } && test -s conftest.$ac_objext; then
10588   ac_cv_header_X11_extensions_xidle_h=yes
10589 else
10590   echo "$as_me: failed program was:" >&5
10591 sed 's/^/| /' conftest.$ac_ext >&5
10592
10593         ac_cv_header_X11_extensions_xidle_h=no
10594 fi
10595
10596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10597 fi
10598 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10599 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6; }
10600 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10601   have_xidle=yes
10602                      cat >>confdefs.h <<\_ACEOF
10603 #define HAVE_XIDLE_EXTENSION 1
10604 _ACEOF
10605
10606 fi
10607
10608
10609   CPPFLAGS="$ac_save_CPPFLAGS"
10610 elif test "$with_xidle" != no; then
10611   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10612   exit 1
10613 fi
10614
10615
10616 ###############################################################################
10617 #
10618 #       Check for the SGI-VIDEO-CONTROL server extension.
10619 #
10620 ###############################################################################
10621
10622 have_sgivc=no
10623 with_sgivc_req=unspecified
10624
10625 # Check whether --with-sgivc-ext was given.
10626 if test "${with_sgivc_ext+set}" = set; then
10627   withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
10628 else
10629   with_sgivc=yes
10630 fi
10631
10632
10633
10634    case "$with_sgivc" in
10635     yes) ;;
10636     no)  ;;
10637
10638     /*)
10639      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10640 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6; }
10641      d=$with_sgivc/include
10642      if test -d $d; then
10643        X_CFLAGS="-I$d $X_CFLAGS"
10644        { echo "$as_me:$LINENO: result: $d" >&5
10645 echo "${ECHO_T}$d" >&6; }
10646      else
10647        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10648 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10649      fi
10650
10651      { echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10652 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6; }
10653      d=$with_sgivc/lib
10654      if test -d $d; then
10655        X_LIBS="-L$d $X_LIBS"
10656        { echo "$as_me:$LINENO: result: $d" >&5
10657 echo "${ECHO_T}$d" >&6; }
10658      else
10659        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10660 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10661      fi
10662
10663      # replace the directory string with "yes".
10664      with_sgivc_req="yes"
10665      with_sgivc=$with_sgivc_req
10666      ;;
10667
10668     *)
10669      echo ""
10670      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10671      echo "       If it is a directory, then \`DIR/include' will be added to"
10672      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10673      exit 1
10674      ;;
10675    esac
10676
10677
10678 if test "$with_sgivc" = yes; then
10679
10680   # first check for XSGIvc.h
10681
10682   ac_save_CPPFLAGS="$CPPFLAGS"
10683   if test \! -z "$includedir" ; then
10684     CPPFLAGS="$CPPFLAGS -I$includedir"
10685   fi
10686   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10687   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10688   { echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10689 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6; }
10690 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10691   echo $ECHO_N "(cached) $ECHO_C" >&6
10692 else
10693   cat >conftest.$ac_ext <<_ACEOF
10694 /* confdefs.h.  */
10695 _ACEOF
10696 cat confdefs.h >>conftest.$ac_ext
10697 cat >>conftest.$ac_ext <<_ACEOF
10698 /* end confdefs.h.  */
10699 #include <X11/Xlib.h>
10700
10701 #include <X11/extensions/XSGIvc.h>
10702 _ACEOF
10703 rm -f conftest.$ac_objext
10704 if { (ac_try="$ac_compile"
10705 case "(($ac_try" in
10706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10707   *) ac_try_echo=$ac_try;;
10708 esac
10709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10710   (eval "$ac_compile") 2>conftest.er1
10711   ac_status=$?
10712   grep -v '^ *+' conftest.er1 >conftest.err
10713   rm -f conftest.er1
10714   cat conftest.err >&5
10715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716   (exit $ac_status); } && {
10717          test -z "$ac_c_werror_flag" ||
10718          test ! -s conftest.err
10719        } && test -s conftest.$ac_objext; then
10720   ac_cv_header_X11_extensions_XSGIvc_h=yes
10721 else
10722   echo "$as_me: failed program was:" >&5
10723 sed 's/^/| /' conftest.$ac_ext >&5
10724
10725         ac_cv_header_X11_extensions_XSGIvc_h=no
10726 fi
10727
10728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10729 fi
10730 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10731 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6; }
10732 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10733   have_sgivc=yes
10734 fi
10735
10736
10737   CPPFLAGS="$ac_save_CPPFLAGS"
10738
10739   # if that succeeded, then check for the -lXsgivc
10740   if test "$have_sgivc" = yes; then
10741     have_sgivc=no
10742
10743   ac_save_CPPFLAGS="$CPPFLAGS"
10744   ac_save_LDFLAGS="$LDFLAGS"
10745 #  ac_save_LIBS="$LIBS"
10746
10747   if test \! -z "$includedir" ; then
10748     CPPFLAGS="$CPPFLAGS -I$includedir"
10749   fi
10750   # note: $X_CFLAGS includes $x_includes
10751   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10752
10753   if test \! -z "$libdir" ; then
10754     LDFLAGS="$LDFLAGS -L$libdir"
10755   fi
10756   # note: $X_LIBS includes $x_libraries
10757   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10758
10759   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10760   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10761   { echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10762 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6; }
10763 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10764   echo $ECHO_N "(cached) $ECHO_C" >&6
10765 else
10766   ac_check_lib_save_LIBS=$LIBS
10767 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10768 cat >conftest.$ac_ext <<_ACEOF
10769 /* confdefs.h.  */
10770 _ACEOF
10771 cat confdefs.h >>conftest.$ac_ext
10772 cat >>conftest.$ac_ext <<_ACEOF
10773 /* end confdefs.h.  */
10774
10775 /* Override any GCC internal prototype to avoid an error.
10776    Use char because int might match the return type of a GCC
10777    builtin and then its argument prototype would still apply.  */
10778 #ifdef __cplusplus
10779 extern "C"
10780 #endif
10781 char XSGIvcQueryGammaMap ();
10782 int
10783 main ()
10784 {
10785 return XSGIvcQueryGammaMap ();
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 rm -f conftest.$ac_objext conftest$ac_exeext
10791 if { (ac_try="$ac_link"
10792 case "(($ac_try" in
10793   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10794   *) ac_try_echo=$ac_try;;
10795 esac
10796 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10797   (eval "$ac_link") 2>conftest.er1
10798   ac_status=$?
10799   grep -v '^ *+' conftest.er1 >conftest.err
10800   rm -f conftest.er1
10801   cat conftest.err >&5
10802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803   (exit $ac_status); } && {
10804          test -z "$ac_c_werror_flag" ||
10805          test ! -s conftest.err
10806        } && test -s conftest$ac_exeext &&
10807        $as_test_x conftest$ac_exeext; then
10808   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10809 else
10810   echo "$as_me: failed program was:" >&5
10811 sed 's/^/| /' conftest.$ac_ext >&5
10812
10813         ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10814 fi
10815
10816 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10817       conftest$ac_exeext conftest.$ac_ext
10818 LIBS=$ac_check_lib_save_LIBS
10819 fi
10820 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10821 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
10822 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10823   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10824 else
10825   true
10826 fi
10827
10828   CPPFLAGS="$ac_save_CPPFLAGS"
10829   LDFLAGS="$ac_save_LDFLAGS"
10830 #  LIBS="$ac_save_LIBS"
10831
10832   fi
10833
10834   # if that succeeded, then we've really got it.
10835   if test "$have_sgivc" = yes; then
10836     cat >>confdefs.h <<\_ACEOF
10837 #define HAVE_SGI_VC_EXTENSION 1
10838 _ACEOF
10839
10840   fi
10841
10842 elif test "$with_sgivc" != no; then
10843   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10844   exit 1
10845 fi
10846
10847
10848 ###############################################################################
10849 #
10850 #       Check for the DPMS server extension.
10851 #
10852 ###############################################################################
10853
10854 have_dpms=no
10855 with_dpms_req=unspecified
10856
10857 # Check whether --with-dpms-ext was given.
10858 if test "${with_dpms_ext+set}" = set; then
10859   withval=$with_dpms_ext; with_dpms="$withval"; with_dpms_req="$withval"
10860 else
10861   with_dpms=yes
10862 fi
10863
10864
10865
10866    case "$with_dpms" in
10867     yes) ;;
10868     no)  ;;
10869
10870     /*)
10871      { echo "$as_me:$LINENO: checking for DPMS headers" >&5
10872 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6; }
10873      d=$with_dpms/include
10874      if test -d $d; then
10875        X_CFLAGS="-I$d $X_CFLAGS"
10876        { echo "$as_me:$LINENO: result: $d" >&5
10877 echo "${ECHO_T}$d" >&6; }
10878      else
10879        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10880 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10881      fi
10882
10883      { echo "$as_me:$LINENO: checking for DPMS libs" >&5
10884 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6; }
10885      d=$with_dpms/lib
10886      if test -d $d; then
10887        X_LIBS="-L$d $X_LIBS"
10888        { echo "$as_me:$LINENO: result: $d" >&5
10889 echo "${ECHO_T}$d" >&6; }
10890      else
10891        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10892 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
10893      fi
10894
10895      # replace the directory string with "yes".
10896      with_dpms_req="yes"
10897      with_dpms=$with_dpms_req
10898      ;;
10899
10900     *)
10901      echo ""
10902      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10903      echo "       If it is a directory, then \`DIR/include' will be added to"
10904      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10905      exit 1
10906      ;;
10907    esac
10908
10909
10910 if test "$with_dpms" = yes; then
10911
10912   # first check for dpms.h
10913
10914   ac_save_CPPFLAGS="$CPPFLAGS"
10915   if test \! -z "$includedir" ; then
10916     CPPFLAGS="$CPPFLAGS -I$includedir"
10917   fi
10918   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10919   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10920   { echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10921 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6; }
10922 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10923   echo $ECHO_N "(cached) $ECHO_C" >&6
10924 else
10925   cat >conftest.$ac_ext <<_ACEOF
10926 /* confdefs.h.  */
10927 _ACEOF
10928 cat confdefs.h >>conftest.$ac_ext
10929 cat >>conftest.$ac_ext <<_ACEOF
10930 /* end confdefs.h.  */
10931 #include <X11/Xlib.h>
10932                      #include <X11/Xmd.h>
10933
10934 #include <X11/extensions/dpms.h>
10935 _ACEOF
10936 rm -f conftest.$ac_objext
10937 if { (ac_try="$ac_compile"
10938 case "(($ac_try" in
10939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940   *) ac_try_echo=$ac_try;;
10941 esac
10942 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10943   (eval "$ac_compile") 2>conftest.er1
10944   ac_status=$?
10945   grep -v '^ *+' conftest.er1 >conftest.err
10946   rm -f conftest.er1
10947   cat conftest.err >&5
10948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949   (exit $ac_status); } && {
10950          test -z "$ac_c_werror_flag" ||
10951          test ! -s conftest.err
10952        } && test -s conftest.$ac_objext; then
10953   ac_cv_header_X11_extensions_dpms_h=yes
10954 else
10955   echo "$as_me: failed program was:" >&5
10956 sed 's/^/| /' conftest.$ac_ext >&5
10957
10958         ac_cv_header_X11_extensions_dpms_h=no
10959 fi
10960
10961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10962 fi
10963 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10964 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6; }
10965 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10966   have_dpms=yes
10967 fi
10968
10969
10970   CPPFLAGS="$ac_save_CPPFLAGS"
10971
10972   # if that succeeded, then check for the DPMS code in the libraries
10973   if test "$have_dpms" = yes; then
10974
10975     # first look in -lXext (this is where it is with XFree86 4.0)
10976     have_dpms=no
10977
10978   ac_save_CPPFLAGS="$CPPFLAGS"
10979   ac_save_LDFLAGS="$LDFLAGS"
10980 #  ac_save_LIBS="$LIBS"
10981
10982   if test \! -z "$includedir" ; then
10983     CPPFLAGS="$CPPFLAGS -I$includedir"
10984   fi
10985   # note: $X_CFLAGS includes $x_includes
10986   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10987
10988   if test \! -z "$libdir" ; then
10989     LDFLAGS="$LDFLAGS -L$libdir"
10990   fi
10991   # note: $X_LIBS includes $x_libraries
10992   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10993
10994   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
10995   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
10996   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10997 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6; }
10998 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10999   echo $ECHO_N "(cached) $ECHO_C" >&6
11000 else
11001   ac_check_lib_save_LIBS=$LIBS
11002 LIBS="-lXext -lXext -lX11 $LIBS"
11003 cat >conftest.$ac_ext <<_ACEOF
11004 /* confdefs.h.  */
11005 _ACEOF
11006 cat confdefs.h >>conftest.$ac_ext
11007 cat >>conftest.$ac_ext <<_ACEOF
11008 /* end confdefs.h.  */
11009
11010 /* Override any GCC internal prototype to avoid an error.
11011    Use char because int might match the return type of a GCC
11012    builtin and then its argument prototype would still apply.  */
11013 #ifdef __cplusplus
11014 extern "C"
11015 #endif
11016 char DPMSInfo ();
11017 int
11018 main ()
11019 {
11020 return DPMSInfo ();
11021   ;
11022   return 0;
11023 }
11024 _ACEOF
11025 rm -f conftest.$ac_objext conftest$ac_exeext
11026 if { (ac_try="$ac_link"
11027 case "(($ac_try" in
11028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11029   *) ac_try_echo=$ac_try;;
11030 esac
11031 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11032   (eval "$ac_link") 2>conftest.er1
11033   ac_status=$?
11034   grep -v '^ *+' conftest.er1 >conftest.err
11035   rm -f conftest.er1
11036   cat conftest.err >&5
11037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038   (exit $ac_status); } && {
11039          test -z "$ac_c_werror_flag" ||
11040          test ! -s conftest.err
11041        } && test -s conftest$ac_exeext &&
11042        $as_test_x conftest$ac_exeext; then
11043   ac_cv_lib_Xext_DPMSInfo=yes
11044 else
11045   echo "$as_me: failed program was:" >&5
11046 sed 's/^/| /' conftest.$ac_ext >&5
11047
11048         ac_cv_lib_Xext_DPMSInfo=no
11049 fi
11050
11051 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11052       conftest$ac_exeext conftest.$ac_ext
11053 LIBS=$ac_check_lib_save_LIBS
11054 fi
11055 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
11056 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6; }
11057 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
11058   have_dpms=yes
11059 else
11060   true
11061 fi
11062
11063   CPPFLAGS="$ac_save_CPPFLAGS"
11064   LDFLAGS="$ac_save_LDFLAGS"
11065 #  LIBS="$ac_save_LIBS"
11066
11067
11068     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
11069     if test "$have_dpms" = no; then
11070
11071   ac_save_CPPFLAGS="$CPPFLAGS"
11072   ac_save_LDFLAGS="$LDFLAGS"
11073 #  ac_save_LIBS="$LIBS"
11074
11075   if test \! -z "$includedir" ; then
11076     CPPFLAGS="$CPPFLAGS -I$includedir"
11077   fi
11078   # note: $X_CFLAGS includes $x_includes
11079   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11080
11081   if test \! -z "$libdir" ; then
11082     LDFLAGS="$LDFLAGS -L$libdir"
11083   fi
11084   # note: $X_LIBS includes $x_libraries
11085   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11086
11087   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11088   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11089   { echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
11090 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6; }
11091 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
11092   echo $ECHO_N "(cached) $ECHO_C" >&6
11093 else
11094   ac_check_lib_save_LIBS=$LIBS
11095 LIBS="-lXdpms -lXext -lX11 $LIBS"
11096 cat >conftest.$ac_ext <<_ACEOF
11097 /* confdefs.h.  */
11098 _ACEOF
11099 cat confdefs.h >>conftest.$ac_ext
11100 cat >>conftest.$ac_ext <<_ACEOF
11101 /* end confdefs.h.  */
11102
11103 /* Override any GCC internal prototype to avoid an error.
11104    Use char because int might match the return type of a GCC
11105    builtin and then its argument prototype would still apply.  */
11106 #ifdef __cplusplus
11107 extern "C"
11108 #endif
11109 char DPMSInfo ();
11110 int
11111 main ()
11112 {
11113 return DPMSInfo ();
11114   ;
11115   return 0;
11116 }
11117 _ACEOF
11118 rm -f conftest.$ac_objext conftest$ac_exeext
11119 if { (ac_try="$ac_link"
11120 case "(($ac_try" in
11121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11122   *) ac_try_echo=$ac_try;;
11123 esac
11124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11125   (eval "$ac_link") 2>conftest.er1
11126   ac_status=$?
11127   grep -v '^ *+' conftest.er1 >conftest.err
11128   rm -f conftest.er1
11129   cat conftest.err >&5
11130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11131   (exit $ac_status); } && {
11132          test -z "$ac_c_werror_flag" ||
11133          test ! -s conftest.err
11134        } && test -s conftest$ac_exeext &&
11135        $as_test_x conftest$ac_exeext; then
11136   ac_cv_lib_Xdpms_DPMSInfo=yes
11137 else
11138   echo "$as_me: failed program was:" >&5
11139 sed 's/^/| /' conftest.$ac_ext >&5
11140
11141         ac_cv_lib_Xdpms_DPMSInfo=no
11142 fi
11143
11144 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11145       conftest$ac_exeext conftest.$ac_ext
11146 LIBS=$ac_check_lib_save_LIBS
11147 fi
11148 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
11149 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6; }
11150 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
11151   have_dpms=yes; XDPMS_LIBS="-lXdpms"
11152 else
11153   true
11154 fi
11155
11156   CPPFLAGS="$ac_save_CPPFLAGS"
11157   LDFLAGS="$ac_save_LDFLAGS"
11158 #  LIBS="$ac_save_LIBS"
11159
11160     fi
11161   fi
11162
11163
11164   # if that succeeded, then we've really got it.
11165   if test "$have_dpms" = yes; then
11166     cat >>confdefs.h <<\_ACEOF
11167 #define HAVE_DPMS_EXTENSION 1
11168 _ACEOF
11169
11170   fi
11171
11172 elif test "$with_dpms" != no; then
11173   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
11174   exit 1
11175 fi
11176
11177
11178 ###############################################################################
11179 #
11180 #       Check for the XINERAMA server extension.
11181 #
11182 ###############################################################################
11183
11184 have_xinerama=no
11185 with_xinerama_req=unspecified
11186
11187 # Check whether --with-xinerama-ext was given.
11188 if test "${with_xinerama_ext+set}" = set; then
11189   withval=$with_xinerama_ext; with_xinerama="$withval"; with_xinerama_req="$withval"
11190 else
11191   with_xinerama=yes
11192 fi
11193
11194
11195
11196    case "$with_xinerama" in
11197     yes) ;;
11198     no)  ;;
11199
11200     /*)
11201      { echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
11202 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6; }
11203      d=$with_xinerama/include
11204      if test -d $d; then
11205        X_CFLAGS="-I$d $X_CFLAGS"
11206        { echo "$as_me:$LINENO: result: $d" >&5
11207 echo "${ECHO_T}$d" >&6; }
11208      else
11209        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11210 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11211      fi
11212
11213      { echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
11214 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6; }
11215      d=$with_xinerama/lib
11216      if test -d $d; then
11217        X_LIBS="-L$d $X_LIBS"
11218        { echo "$as_me:$LINENO: result: $d" >&5
11219 echo "${ECHO_T}$d" >&6; }
11220      else
11221        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11222 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11223      fi
11224
11225      # replace the directory string with "yes".
11226      with_xinerama_req="yes"
11227      with_xinerama=$with_xinerama_req
11228      ;;
11229
11230     *)
11231      echo ""
11232      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
11233      echo "       If it is a directory, then \`DIR/include' will be added to"
11234      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11235      exit 1
11236      ;;
11237    esac
11238
11239
11240 if test "$with_xinerama" = yes; then
11241
11242   # first check for Xinerama.h
11243
11244   ac_save_CPPFLAGS="$CPPFLAGS"
11245   if test \! -z "$includedir" ; then
11246     CPPFLAGS="$CPPFLAGS -I$includedir"
11247   fi
11248   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11249   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11250   { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
11251 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
11252 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
11253   echo $ECHO_N "(cached) $ECHO_C" >&6
11254 else
11255   cat >conftest.$ac_ext <<_ACEOF
11256 /* confdefs.h.  */
11257 _ACEOF
11258 cat confdefs.h >>conftest.$ac_ext
11259 cat >>conftest.$ac_ext <<_ACEOF
11260 /* end confdefs.h.  */
11261 #include <X11/Xlib.h>
11262
11263 #include <X11/extensions/Xinerama.h>
11264 _ACEOF
11265 rm -f conftest.$ac_objext
11266 if { (ac_try="$ac_compile"
11267 case "(($ac_try" in
11268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11269   *) ac_try_echo=$ac_try;;
11270 esac
11271 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11272   (eval "$ac_compile") 2>conftest.er1
11273   ac_status=$?
11274   grep -v '^ *+' conftest.er1 >conftest.err
11275   rm -f conftest.er1
11276   cat conftest.err >&5
11277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11278   (exit $ac_status); } && {
11279          test -z "$ac_c_werror_flag" ||
11280          test ! -s conftest.err
11281        } && test -s conftest.$ac_objext; then
11282   ac_cv_header_X11_extensions_Xinerama_h=yes
11283 else
11284   echo "$as_me: failed program was:" >&5
11285 sed 's/^/| /' conftest.$ac_ext >&5
11286
11287         ac_cv_header_X11_extensions_Xinerama_h=no
11288 fi
11289
11290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291 fi
11292 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11293 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
11294 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11295   have_xinerama=yes
11296 fi
11297
11298
11299   CPPFLAGS="$ac_save_CPPFLAGS"
11300
11301   # if that succeeded, then check for the XINERAMA code in the libraries
11302   if test "$have_xinerama" = yes; then
11303
11304     # first look in -lXext
11305     have_xinerama=no
11306
11307   ac_save_CPPFLAGS="$CPPFLAGS"
11308   ac_save_LDFLAGS="$LDFLAGS"
11309 #  ac_save_LIBS="$LIBS"
11310
11311   if test \! -z "$includedir" ; then
11312     CPPFLAGS="$CPPFLAGS -I$includedir"
11313   fi
11314   # note: $X_CFLAGS includes $x_includes
11315   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11316
11317   if test \! -z "$libdir" ; then
11318     LDFLAGS="$LDFLAGS -L$libdir"
11319   fi
11320   # note: $X_LIBS includes $x_libraries
11321   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11322
11323   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11324   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11325   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11326 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6; }
11327 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11328   echo $ECHO_N "(cached) $ECHO_C" >&6
11329 else
11330   ac_check_lib_save_LIBS=$LIBS
11331 LIBS="-lXext -lXext -lX11 $LIBS"
11332 cat >conftest.$ac_ext <<_ACEOF
11333 /* confdefs.h.  */
11334 _ACEOF
11335 cat confdefs.h >>conftest.$ac_ext
11336 cat >>conftest.$ac_ext <<_ACEOF
11337 /* end confdefs.h.  */
11338
11339 /* Override any GCC internal prototype to avoid an error.
11340    Use char because int might match the return type of a GCC
11341    builtin and then its argument prototype would still apply.  */
11342 #ifdef __cplusplus
11343 extern "C"
11344 #endif
11345 char XineramaQueryScreens ();
11346 int
11347 main ()
11348 {
11349 return XineramaQueryScreens ();
11350   ;
11351   return 0;
11352 }
11353 _ACEOF
11354 rm -f conftest.$ac_objext conftest$ac_exeext
11355 if { (ac_try="$ac_link"
11356 case "(($ac_try" in
11357   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11358   *) ac_try_echo=$ac_try;;
11359 esac
11360 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11361   (eval "$ac_link") 2>conftest.er1
11362   ac_status=$?
11363   grep -v '^ *+' conftest.er1 >conftest.err
11364   rm -f conftest.er1
11365   cat conftest.err >&5
11366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367   (exit $ac_status); } && {
11368          test -z "$ac_c_werror_flag" ||
11369          test ! -s conftest.err
11370        } && test -s conftest$ac_exeext &&
11371        $as_test_x conftest$ac_exeext; then
11372   ac_cv_lib_Xext_XineramaQueryScreens=yes
11373 else
11374   echo "$as_me: failed program was:" >&5
11375 sed 's/^/| /' conftest.$ac_ext >&5
11376
11377         ac_cv_lib_Xext_XineramaQueryScreens=no
11378 fi
11379
11380 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11381       conftest$ac_exeext conftest.$ac_ext
11382 LIBS=$ac_check_lib_save_LIBS
11383 fi
11384 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11385 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6; }
11386 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11387   have_xinerama=yes
11388 else
11389   true
11390 fi
11391
11392   CPPFLAGS="$ac_save_CPPFLAGS"
11393   LDFLAGS="$ac_save_LDFLAGS"
11394 #  LIBS="$ac_save_LIBS"
11395
11396
11397     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11398     if test "$have_xinerama" = no; then
11399
11400   ac_save_CPPFLAGS="$CPPFLAGS"
11401   ac_save_LDFLAGS="$LDFLAGS"
11402 #  ac_save_LIBS="$LIBS"
11403
11404   if test \! -z "$includedir" ; then
11405     CPPFLAGS="$CPPFLAGS -I$includedir"
11406   fi
11407   # note: $X_CFLAGS includes $x_includes
11408   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11409
11410   if test \! -z "$libdir" ; then
11411     LDFLAGS="$LDFLAGS -L$libdir"
11412   fi
11413   # note: $X_LIBS includes $x_libraries
11414   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11415
11416   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11417   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11418   { echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11419 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6; }
11420 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11421   echo $ECHO_N "(cached) $ECHO_C" >&6
11422 else
11423   ac_check_lib_save_LIBS=$LIBS
11424 LIBS="-lXinerama -lXext -lX11 $LIBS"
11425 cat >conftest.$ac_ext <<_ACEOF
11426 /* confdefs.h.  */
11427 _ACEOF
11428 cat confdefs.h >>conftest.$ac_ext
11429 cat >>conftest.$ac_ext <<_ACEOF
11430 /* end confdefs.h.  */
11431
11432 /* Override any GCC internal prototype to avoid an error.
11433    Use char because int might match the return type of a GCC
11434    builtin and then its argument prototype would still apply.  */
11435 #ifdef __cplusplus
11436 extern "C"
11437 #endif
11438 char XineramaQueryScreens ();
11439 int
11440 main ()
11441 {
11442 return XineramaQueryScreens ();
11443   ;
11444   return 0;
11445 }
11446 _ACEOF
11447 rm -f conftest.$ac_objext conftest$ac_exeext
11448 if { (ac_try="$ac_link"
11449 case "(($ac_try" in
11450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11451   *) ac_try_echo=$ac_try;;
11452 esac
11453 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11454   (eval "$ac_link") 2>conftest.er1
11455   ac_status=$?
11456   grep -v '^ *+' conftest.er1 >conftest.err
11457   rm -f conftest.er1
11458   cat conftest.err >&5
11459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11460   (exit $ac_status); } && {
11461          test -z "$ac_c_werror_flag" ||
11462          test ! -s conftest.err
11463        } && test -s conftest$ac_exeext &&
11464        $as_test_x conftest$ac_exeext; then
11465   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11466 else
11467   echo "$as_me: failed program was:" >&5
11468 sed 's/^/| /' conftest.$ac_ext >&5
11469
11470         ac_cv_lib_Xinerama_XineramaQueryScreens=no
11471 fi
11472
11473 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11474       conftest$ac_exeext conftest.$ac_ext
11475 LIBS=$ac_check_lib_save_LIBS
11476 fi
11477 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11478 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6; }
11479 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11480   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11481 else
11482   true
11483 fi
11484
11485   CPPFLAGS="$ac_save_CPPFLAGS"
11486   LDFLAGS="$ac_save_LDFLAGS"
11487 #  LIBS="$ac_save_LIBS"
11488
11489     fi
11490   fi
11491
11492   # if that succeeded, then we've really got it.
11493   if test "$have_xinerama" = yes; then
11494     cat >>confdefs.h <<\_ACEOF
11495 #define HAVE_XINERAMA 1
11496 _ACEOF
11497
11498   fi
11499
11500 elif test "$with_xinerama" != no; then
11501   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11502   exit 1
11503 fi
11504
11505
11506 ###############################################################################
11507 #
11508 #       Check for the XF86VMODE server extension (for virtual screens.)
11509 #
11510 ###############################################################################
11511
11512 have_xf86vmode=no
11513 with_xf86vmode_req=unspecified
11514
11515 # Check whether --with-xf86vmode-ext was given.
11516 if test "${with_xf86vmode_ext+set}" = set; then
11517   withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11518 else
11519   with_xf86vmode=yes
11520 fi
11521
11522
11523
11524    case "$with_xf86vmode" in
11525     yes) ;;
11526     no)  ;;
11527
11528     /*)
11529      { echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11530 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6; }
11531      d=$with_xf86vmode/include
11532      if test -d $d; then
11533        X_CFLAGS="-I$d $X_CFLAGS"
11534        { echo "$as_me:$LINENO: result: $d" >&5
11535 echo "${ECHO_T}$d" >&6; }
11536      else
11537        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11538 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11539      fi
11540
11541      { echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11542 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6; }
11543      d=$with_xf86vmode/lib
11544      if test -d $d; then
11545        X_LIBS="-L$d $X_LIBS"
11546        { echo "$as_me:$LINENO: result: $d" >&5
11547 echo "${ECHO_T}$d" >&6; }
11548      else
11549        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11550 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11551      fi
11552
11553      # replace the directory string with "yes".
11554      with_xf86vmode_req="yes"
11555      with_xf86vmode=$with_xf86vmode_req
11556      ;;
11557
11558     *)
11559      echo ""
11560      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11561      echo "       If it is a directory, then \`DIR/include' will be added to"
11562      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11563      exit 1
11564      ;;
11565    esac
11566
11567
11568 VIDMODE_LIBS=""
11569
11570 if test "$with_xf86vmode" = yes; then
11571
11572   # first check for xf86vmode.h
11573
11574   ac_save_CPPFLAGS="$CPPFLAGS"
11575   if test \! -z "$includedir" ; then
11576     CPPFLAGS="$CPPFLAGS -I$includedir"
11577   fi
11578   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11579   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11580   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11581 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11582 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11583   echo $ECHO_N "(cached) $ECHO_C" >&6
11584 else
11585   cat >conftest.$ac_ext <<_ACEOF
11586 /* confdefs.h.  */
11587 _ACEOF
11588 cat confdefs.h >>conftest.$ac_ext
11589 cat >>conftest.$ac_ext <<_ACEOF
11590 /* end confdefs.h.  */
11591 #include <X11/Xlib.h>
11592
11593 #include <X11/extensions/xf86vmode.h>
11594 _ACEOF
11595 rm -f conftest.$ac_objext
11596 if { (ac_try="$ac_compile"
11597 case "(($ac_try" in
11598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11599   *) ac_try_echo=$ac_try;;
11600 esac
11601 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11602   (eval "$ac_compile") 2>conftest.er1
11603   ac_status=$?
11604   grep -v '^ *+' conftest.er1 >conftest.err
11605   rm -f conftest.er1
11606   cat conftest.err >&5
11607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11608   (exit $ac_status); } && {
11609          test -z "$ac_c_werror_flag" ||
11610          test ! -s conftest.err
11611        } && test -s conftest.$ac_objext; then
11612   ac_cv_header_X11_extensions_xf86vmode_h=yes
11613 else
11614   echo "$as_me: failed program was:" >&5
11615 sed 's/^/| /' conftest.$ac_ext >&5
11616
11617         ac_cv_header_X11_extensions_xf86vmode_h=no
11618 fi
11619
11620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11621 fi
11622 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11623 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11624 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11625   have_xf86vmode=yes
11626 fi
11627
11628
11629   CPPFLAGS="$ac_save_CPPFLAGS"
11630
11631   # if that succeeded, then check for the -lXxf86vm
11632   if test "$have_xf86vmode" = yes; then
11633     have_xf86vmode=no
11634
11635   ac_save_CPPFLAGS="$CPPFLAGS"
11636   ac_save_LDFLAGS="$LDFLAGS"
11637 #  ac_save_LIBS="$LIBS"
11638
11639   if test \! -z "$includedir" ; then
11640     CPPFLAGS="$CPPFLAGS -I$includedir"
11641   fi
11642   # note: $X_CFLAGS includes $x_includes
11643   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11644
11645   if test \! -z "$libdir" ; then
11646     LDFLAGS="$LDFLAGS -L$libdir"
11647   fi
11648   # note: $X_LIBS includes $x_libraries
11649   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11650
11651   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11652   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11653   { echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11654 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6; }
11655 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11656   echo $ECHO_N "(cached) $ECHO_C" >&6
11657 else
11658   ac_check_lib_save_LIBS=$LIBS
11659 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11660 cat >conftest.$ac_ext <<_ACEOF
11661 /* confdefs.h.  */
11662 _ACEOF
11663 cat confdefs.h >>conftest.$ac_ext
11664 cat >>conftest.$ac_ext <<_ACEOF
11665 /* end confdefs.h.  */
11666
11667 /* Override any GCC internal prototype to avoid an error.
11668    Use char because int might match the return type of a GCC
11669    builtin and then its argument prototype would still apply.  */
11670 #ifdef __cplusplus
11671 extern "C"
11672 #endif
11673 char XF86VidModeGetViewPort ();
11674 int
11675 main ()
11676 {
11677 return XF86VidModeGetViewPort ();
11678   ;
11679   return 0;
11680 }
11681 _ACEOF
11682 rm -f conftest.$ac_objext conftest$ac_exeext
11683 if { (ac_try="$ac_link"
11684 case "(($ac_try" in
11685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11686   *) ac_try_echo=$ac_try;;
11687 esac
11688 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11689   (eval "$ac_link") 2>conftest.er1
11690   ac_status=$?
11691   grep -v '^ *+' conftest.er1 >conftest.err
11692   rm -f conftest.er1
11693   cat conftest.err >&5
11694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695   (exit $ac_status); } && {
11696          test -z "$ac_c_werror_flag" ||
11697          test ! -s conftest.err
11698        } && test -s conftest$ac_exeext &&
11699        $as_test_x conftest$ac_exeext; then
11700   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11701 else
11702   echo "$as_me: failed program was:" >&5
11703 sed 's/^/| /' conftest.$ac_ext >&5
11704
11705         ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11706 fi
11707
11708 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11709       conftest$ac_exeext conftest.$ac_ext
11710 LIBS=$ac_check_lib_save_LIBS
11711 fi
11712 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11713 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
11714 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11715   have_xf86vmode=yes;
11716                    VIDMODE_LIBS="-lXxf86vm";
11717                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11718 else
11719   true
11720 fi
11721
11722   CPPFLAGS="$ac_save_CPPFLAGS"
11723   LDFLAGS="$ac_save_LDFLAGS"
11724 #  LIBS="$ac_save_LIBS"
11725
11726   fi
11727
11728   # if that succeeded, then we've really got it.
11729   if test "$have_xf86vmode" = yes; then
11730     cat >>confdefs.h <<\_ACEOF
11731 #define HAVE_XF86VMODE 1
11732 _ACEOF
11733
11734   fi
11735
11736 elif test "$with_xf86vmode" != no; then
11737   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11738   exit 1
11739 fi
11740
11741
11742 ###############################################################################
11743 #
11744 #       Check for the XF86VMODE server extension (for gamma fading.)
11745 #
11746 ###############################################################################
11747
11748 have_xf86gamma=no
11749 have_xf86gamma_ramp=no
11750 with_xf86gamma_req=unspecified
11751
11752 # Check whether --with-xf86gamma-ext was given.
11753 if test "${with_xf86gamma_ext+set}" = set; then
11754   withval=$with_xf86gamma_ext; with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11755 else
11756   with_xf86gamma=yes
11757 fi
11758
11759
11760
11761    case "$with_xf86gamma" in
11762     yes) ;;
11763     no)  ;;
11764
11765     /*)
11766      { echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11767 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6; }
11768      d=$with_xf86gamma/include
11769      if test -d $d; then
11770        X_CFLAGS="-I$d $X_CFLAGS"
11771        { echo "$as_me:$LINENO: result: $d" >&5
11772 echo "${ECHO_T}$d" >&6; }
11773      else
11774        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11775 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11776      fi
11777
11778      { echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11779 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6; }
11780      d=$with_xf86gamma/lib
11781      if test -d $d; then
11782        X_LIBS="-L$d $X_LIBS"
11783        { echo "$as_me:$LINENO: result: $d" >&5
11784 echo "${ECHO_T}$d" >&6; }
11785      else
11786        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11787 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
11788      fi
11789
11790      # replace the directory string with "yes".
11791      with_xf86gamma_req="yes"
11792      with_xf86gamma=$with_xf86gamma_req
11793      ;;
11794
11795     *)
11796      echo ""
11797      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11798      echo "       If it is a directory, then \`DIR/include' will be added to"
11799      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11800      exit 1
11801      ;;
11802    esac
11803
11804
11805 if test "$with_xf86gamma" = yes; then
11806
11807   # first check for xf86vmode.h, if we haven't already
11808   if test "$have_xf86vmode" = yes; then
11809     have_xf86gamma=yes
11810   else
11811
11812   ac_save_CPPFLAGS="$CPPFLAGS"
11813   if test \! -z "$includedir" ; then
11814     CPPFLAGS="$CPPFLAGS -I$includedir"
11815   fi
11816   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11817   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11818   { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11819 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
11820 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11821   echo $ECHO_N "(cached) $ECHO_C" >&6
11822 else
11823   cat >conftest.$ac_ext <<_ACEOF
11824 /* confdefs.h.  */
11825 _ACEOF
11826 cat confdefs.h >>conftest.$ac_ext
11827 cat >>conftest.$ac_ext <<_ACEOF
11828 /* end confdefs.h.  */
11829 #include <X11/Xlib.h>
11830
11831 #include <X11/extensions/xf86vmode.h>
11832 _ACEOF
11833 rm -f conftest.$ac_objext
11834 if { (ac_try="$ac_compile"
11835 case "(($ac_try" in
11836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11837   *) ac_try_echo=$ac_try;;
11838 esac
11839 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11840   (eval "$ac_compile") 2>conftest.er1
11841   ac_status=$?
11842   grep -v '^ *+' conftest.er1 >conftest.err
11843   rm -f conftest.er1
11844   cat conftest.err >&5
11845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11846   (exit $ac_status); } && {
11847          test -z "$ac_c_werror_flag" ||
11848          test ! -s conftest.err
11849        } && test -s conftest.$ac_objext; then
11850   ac_cv_header_X11_extensions_xf86vmode_h=yes
11851 else
11852   echo "$as_me: failed program was:" >&5
11853 sed 's/^/| /' conftest.$ac_ext >&5
11854
11855         ac_cv_header_X11_extensions_xf86vmode_h=no
11856 fi
11857
11858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11859 fi
11860 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11861 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
11862 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11863   have_xf86gamma=yes
11864 fi
11865
11866
11867   CPPFLAGS="$ac_save_CPPFLAGS"
11868   fi
11869
11870   # if that succeeded, then check for the -lXxf86vm
11871   if test "$have_xf86gamma" = yes; then
11872     have_xf86gamma=no
11873
11874   ac_save_CPPFLAGS="$CPPFLAGS"
11875   ac_save_LDFLAGS="$LDFLAGS"
11876 #  ac_save_LIBS="$LIBS"
11877
11878   if test \! -z "$includedir" ; then
11879     CPPFLAGS="$CPPFLAGS -I$includedir"
11880   fi
11881   # note: $X_CFLAGS includes $x_includes
11882   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11883
11884   if test \! -z "$libdir" ; then
11885     LDFLAGS="$LDFLAGS -L$libdir"
11886   fi
11887   # note: $X_LIBS includes $x_libraries
11888   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11889
11890   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11891   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11892   { echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11893 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6; }
11894 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11895   echo $ECHO_N "(cached) $ECHO_C" >&6
11896 else
11897   ac_check_lib_save_LIBS=$LIBS
11898 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11899 cat >conftest.$ac_ext <<_ACEOF
11900 /* confdefs.h.  */
11901 _ACEOF
11902 cat confdefs.h >>conftest.$ac_ext
11903 cat >>conftest.$ac_ext <<_ACEOF
11904 /* end confdefs.h.  */
11905
11906 /* Override any GCC internal prototype to avoid an error.
11907    Use char because int might match the return type of a GCC
11908    builtin and then its argument prototype would still apply.  */
11909 #ifdef __cplusplus
11910 extern "C"
11911 #endif
11912 char XF86VidModeSetGamma ();
11913 int
11914 main ()
11915 {
11916 return XF86VidModeSetGamma ();
11917   ;
11918   return 0;
11919 }
11920 _ACEOF
11921 rm -f conftest.$ac_objext conftest$ac_exeext
11922 if { (ac_try="$ac_link"
11923 case "(($ac_try" in
11924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11925   *) ac_try_echo=$ac_try;;
11926 esac
11927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11928   (eval "$ac_link") 2>conftest.er1
11929   ac_status=$?
11930   grep -v '^ *+' conftest.er1 >conftest.err
11931   rm -f conftest.er1
11932   cat conftest.err >&5
11933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934   (exit $ac_status); } && {
11935          test -z "$ac_c_werror_flag" ||
11936          test ! -s conftest.err
11937        } && test -s conftest$ac_exeext &&
11938        $as_test_x conftest$ac_exeext; then
11939   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11940 else
11941   echo "$as_me: failed program was:" >&5
11942 sed 's/^/| /' conftest.$ac_ext >&5
11943
11944         ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11945 fi
11946
11947 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11948       conftest$ac_exeext conftest.$ac_ext
11949 LIBS=$ac_check_lib_save_LIBS
11950 fi
11951 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11952 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6; }
11953 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11954   have_xf86gamma=yes
11955 else
11956   true
11957 fi
11958
11959   CPPFLAGS="$ac_save_CPPFLAGS"
11960   LDFLAGS="$ac_save_LDFLAGS"
11961 #  LIBS="$ac_save_LIBS"
11962
11963   fi
11964
11965   # check for the Ramp versions of the functions too.
11966   if test "$have_xf86gamma" = yes; then
11967     have_xf86gamma_ramp=no
11968
11969   ac_save_CPPFLAGS="$CPPFLAGS"
11970   ac_save_LDFLAGS="$LDFLAGS"
11971 #  ac_save_LIBS="$LIBS"
11972
11973   if test \! -z "$includedir" ; then
11974     CPPFLAGS="$CPPFLAGS -I$includedir"
11975   fi
11976   # note: $X_CFLAGS includes $x_includes
11977   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11978
11979   if test \! -z "$libdir" ; then
11980     LDFLAGS="$LDFLAGS -L$libdir"
11981   fi
11982   # note: $X_LIBS includes $x_libraries
11983   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11984
11985   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
11986   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
11987   { echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11988 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6; }
11989 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11990   echo $ECHO_N "(cached) $ECHO_C" >&6
11991 else
11992   ac_check_lib_save_LIBS=$LIBS
11993 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11994 cat >conftest.$ac_ext <<_ACEOF
11995 /* confdefs.h.  */
11996 _ACEOF
11997 cat confdefs.h >>conftest.$ac_ext
11998 cat >>conftest.$ac_ext <<_ACEOF
11999 /* end confdefs.h.  */
12000
12001 /* Override any GCC internal prototype to avoid an error.
12002    Use char because int might match the return type of a GCC
12003    builtin and then its argument prototype would still apply.  */
12004 #ifdef __cplusplus
12005 extern "C"
12006 #endif
12007 char XF86VidModeSetGammaRamp ();
12008 int
12009 main ()
12010 {
12011 return XF86VidModeSetGammaRamp ();
12012   ;
12013   return 0;
12014 }
12015 _ACEOF
12016 rm -f conftest.$ac_objext conftest$ac_exeext
12017 if { (ac_try="$ac_link"
12018 case "(($ac_try" in
12019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12020   *) ac_try_echo=$ac_try;;
12021 esac
12022 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12023   (eval "$ac_link") 2>conftest.er1
12024   ac_status=$?
12025   grep -v '^ *+' conftest.er1 >conftest.err
12026   rm -f conftest.er1
12027   cat conftest.err >&5
12028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029   (exit $ac_status); } && {
12030          test -z "$ac_c_werror_flag" ||
12031          test ! -s conftest.err
12032        } && test -s conftest$ac_exeext &&
12033        $as_test_x conftest$ac_exeext; then
12034   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
12035 else
12036   echo "$as_me: failed program was:" >&5
12037 sed 's/^/| /' conftest.$ac_ext >&5
12038
12039         ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
12040 fi
12041
12042 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12043       conftest$ac_exeext conftest.$ac_ext
12044 LIBS=$ac_check_lib_save_LIBS
12045 fi
12046 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
12047 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6; }
12048 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
12049   have_xf86gamma_ramp=yes
12050 else
12051   true
12052 fi
12053
12054   CPPFLAGS="$ac_save_CPPFLAGS"
12055   LDFLAGS="$ac_save_LDFLAGS"
12056 #  LIBS="$ac_save_LIBS"
12057
12058   fi
12059
12060   # if those tests succeeded, then we've really got the functions.
12061   if test "$have_xf86gamma" = yes; then
12062     cat >>confdefs.h <<\_ACEOF
12063 #define HAVE_XF86VMODE_GAMMA 1
12064 _ACEOF
12065
12066   fi
12067
12068   if test "$have_xf86gamma_ramp" = yes; then
12069     cat >>confdefs.h <<\_ACEOF
12070 #define HAVE_XF86VMODE_GAMMA_RAMP 1
12071 _ACEOF
12072
12073   fi
12074
12075   # pull in the lib, if we haven't already
12076   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
12077     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
12078   fi
12079
12080 elif test "$with_xf86gamma" != no; then
12081   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
12082   exit 1
12083 fi
12084
12085
12086 ###############################################################################
12087 #
12088 #       Check for the RANDR (Resize and Rotate) server extension.
12089 #
12090 #       We need this to detect when the resolution of the desktop
12091 #       has changed out from under us (this is a newer, different
12092 #       mechanism than the XF86VMODE virtual viewports.)
12093 #
12094 ###############################################################################
12095
12096 have_randr=no
12097 with_randr_req=unspecified
12098
12099 # Check whether --with-randr-ext was given.
12100 if test "${with_randr_ext+set}" = set; then
12101   withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
12102 else
12103   with_randr=yes
12104 fi
12105
12106
12107
12108    case "$with_randr" in
12109     yes) ;;
12110     no)  ;;
12111
12112     /*)
12113      { echo "$as_me:$LINENO: checking for RANDR headers" >&5
12114 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6; }
12115      d=$with_randr/include
12116      if test -d $d; then
12117        X_CFLAGS="-I$d $X_CFLAGS"
12118        { echo "$as_me:$LINENO: result: $d" >&5
12119 echo "${ECHO_T}$d" >&6; }
12120      else
12121        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12122 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12123      fi
12124
12125      { echo "$as_me:$LINENO: checking for RANDR libs" >&5
12126 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6; }
12127      d=$with_randr/lib
12128      if test -d $d; then
12129        X_LIBS="-L$d $X_LIBS"
12130        { echo "$as_me:$LINENO: result: $d" >&5
12131 echo "${ECHO_T}$d" >&6; }
12132      else
12133        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12134 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12135      fi
12136
12137      # replace the directory string with "yes".
12138      with_randr_req="yes"
12139      with_randr=$with_randr_req
12140      ;;
12141
12142     *)
12143      echo ""
12144      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
12145      echo "       If it is a directory, then \`DIR/include' will be added to"
12146      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12147      exit 1
12148      ;;
12149    esac
12150
12151
12152 if test "$with_randr" = yes; then
12153
12154   # first check for Xrandr.h
12155
12156   ac_save_CPPFLAGS="$CPPFLAGS"
12157   if test \! -z "$includedir" ; then
12158     CPPFLAGS="$CPPFLAGS -I$includedir"
12159   fi
12160   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12161   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12162   { echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
12163 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
12164 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
12165   echo $ECHO_N "(cached) $ECHO_C" >&6
12166 else
12167   cat >conftest.$ac_ext <<_ACEOF
12168 /* confdefs.h.  */
12169 _ACEOF
12170 cat confdefs.h >>conftest.$ac_ext
12171 cat >>conftest.$ac_ext <<_ACEOF
12172 /* end confdefs.h.  */
12173 #include <X11/Xlib.h>
12174
12175 #include <X11/extensions/Xrandr.h>
12176 _ACEOF
12177 rm -f conftest.$ac_objext
12178 if { (ac_try="$ac_compile"
12179 case "(($ac_try" in
12180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12181   *) ac_try_echo=$ac_try;;
12182 esac
12183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12184   (eval "$ac_compile") 2>conftest.er1
12185   ac_status=$?
12186   grep -v '^ *+' conftest.er1 >conftest.err
12187   rm -f conftest.er1
12188   cat conftest.err >&5
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); } && {
12191          test -z "$ac_c_werror_flag" ||
12192          test ! -s conftest.err
12193        } && test -s conftest.$ac_objext; then
12194   ac_cv_header_X11_extensions_Xrandr_h=yes
12195 else
12196   echo "$as_me: failed program was:" >&5
12197 sed 's/^/| /' conftest.$ac_ext >&5
12198
12199         ac_cv_header_X11_extensions_Xrandr_h=no
12200 fi
12201
12202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203 fi
12204 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
12205 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
12206 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
12207   have_randr=yes
12208 fi
12209
12210
12211   CPPFLAGS="$ac_save_CPPFLAGS"
12212
12213   # if that succeeded, then check for the XRR code in the libraries
12214   if test "$have_randr" = yes; then
12215
12216     # RANDR probably needs -lXrender
12217     xrender_libs=
12218
12219   ac_save_CPPFLAGS="$CPPFLAGS"
12220   ac_save_LDFLAGS="$LDFLAGS"
12221 #  ac_save_LIBS="$LIBS"
12222
12223   if test \! -z "$includedir" ; then
12224     CPPFLAGS="$CPPFLAGS -I$includedir"
12225   fi
12226   # note: $X_CFLAGS includes $x_includes
12227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12228
12229   if test \! -z "$libdir" ; then
12230     LDFLAGS="$LDFLAGS -L$libdir"
12231   fi
12232   # note: $X_LIBS includes $x_libraries
12233   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12234
12235   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12236   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12237   { echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
12238 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6; }
12239 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
12240   echo $ECHO_N "(cached) $ECHO_C" >&6
12241 else
12242   ac_check_lib_save_LIBS=$LIBS
12243 LIBS="-lXrender -lXext -lX11 $LIBS"
12244 cat >conftest.$ac_ext <<_ACEOF
12245 /* confdefs.h.  */
12246 _ACEOF
12247 cat confdefs.h >>conftest.$ac_ext
12248 cat >>conftest.$ac_ext <<_ACEOF
12249 /* end confdefs.h.  */
12250
12251 /* Override any GCC internal prototype to avoid an error.
12252    Use char because int might match the return type of a GCC
12253    builtin and then its argument prototype would still apply.  */
12254 #ifdef __cplusplus
12255 extern "C"
12256 #endif
12257 char XRenderSetSubpixelOrder ();
12258 int
12259 main ()
12260 {
12261 return XRenderSetSubpixelOrder ();
12262   ;
12263   return 0;
12264 }
12265 _ACEOF
12266 rm -f conftest.$ac_objext conftest$ac_exeext
12267 if { (ac_try="$ac_link"
12268 case "(($ac_try" in
12269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12270   *) ac_try_echo=$ac_try;;
12271 esac
12272 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12273   (eval "$ac_link") 2>conftest.er1
12274   ac_status=$?
12275   grep -v '^ *+' conftest.er1 >conftest.err
12276   rm -f conftest.er1
12277   cat conftest.err >&5
12278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12279   (exit $ac_status); } && {
12280          test -z "$ac_c_werror_flag" ||
12281          test ! -s conftest.err
12282        } && test -s conftest$ac_exeext &&
12283        $as_test_x conftest$ac_exeext; then
12284   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12285 else
12286   echo "$as_me: failed program was:" >&5
12287 sed 's/^/| /' conftest.$ac_ext >&5
12288
12289         ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12290 fi
12291
12292 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12293       conftest$ac_exeext conftest.$ac_ext
12294 LIBS=$ac_check_lib_save_LIBS
12295 fi
12296 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12297 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
12298 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12299   xrender_libs="-lXrender"
12300 else
12301   true
12302 fi
12303
12304   CPPFLAGS="$ac_save_CPPFLAGS"
12305   LDFLAGS="$ac_save_LDFLAGS"
12306 #  LIBS="$ac_save_LIBS"
12307
12308
12309     # first look for RANDR in -lXext
12310     have_randr=no
12311
12312   ac_save_CPPFLAGS="$CPPFLAGS"
12313   ac_save_LDFLAGS="$LDFLAGS"
12314 #  ac_save_LIBS="$LIBS"
12315
12316   if test \! -z "$includedir" ; then
12317     CPPFLAGS="$CPPFLAGS -I$includedir"
12318   fi
12319   # note: $X_CFLAGS includes $x_includes
12320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12321
12322   if test \! -z "$libdir" ; then
12323     LDFLAGS="$LDFLAGS -L$libdir"
12324   fi
12325   # note: $X_LIBS includes $x_libraries
12326   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12327
12328   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12329   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12330   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12331 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6; }
12332 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12333   echo $ECHO_N "(cached) $ECHO_C" >&6
12334 else
12335   ac_check_lib_save_LIBS=$LIBS
12336 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12337 cat >conftest.$ac_ext <<_ACEOF
12338 /* confdefs.h.  */
12339 _ACEOF
12340 cat confdefs.h >>conftest.$ac_ext
12341 cat >>conftest.$ac_ext <<_ACEOF
12342 /* end confdefs.h.  */
12343
12344 /* Override any GCC internal prototype to avoid an error.
12345    Use char because int might match the return type of a GCC
12346    builtin and then its argument prototype would still apply.  */
12347 #ifdef __cplusplus
12348 extern "C"
12349 #endif
12350 char XRRGetScreenInfo ();
12351 int
12352 main ()
12353 {
12354 return XRRGetScreenInfo ();
12355   ;
12356   return 0;
12357 }
12358 _ACEOF
12359 rm -f conftest.$ac_objext conftest$ac_exeext
12360 if { (ac_try="$ac_link"
12361 case "(($ac_try" in
12362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12363   *) ac_try_echo=$ac_try;;
12364 esac
12365 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12366   (eval "$ac_link") 2>conftest.er1
12367   ac_status=$?
12368   grep -v '^ *+' conftest.er1 >conftest.err
12369   rm -f conftest.er1
12370   cat conftest.err >&5
12371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12372   (exit $ac_status); } && {
12373          test -z "$ac_c_werror_flag" ||
12374          test ! -s conftest.err
12375        } && test -s conftest$ac_exeext &&
12376        $as_test_x conftest$ac_exeext; then
12377   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12378 else
12379   echo "$as_me: failed program was:" >&5
12380 sed 's/^/| /' conftest.$ac_ext >&5
12381
12382         ac_cv_lib_Xext_XRRGetScreenInfo=no
12383 fi
12384
12385 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12386       conftest$ac_exeext conftest.$ac_ext
12387 LIBS=$ac_check_lib_save_LIBS
12388 fi
12389 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12390 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
12391 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12392   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12393 else
12394   true
12395 fi
12396
12397   CPPFLAGS="$ac_save_CPPFLAGS"
12398   LDFLAGS="$ac_save_LDFLAGS"
12399 #  LIBS="$ac_save_LIBS"
12400
12401
12402     # if that failed, look in -lXrandr
12403     if test "$have_randr" = no; then
12404
12405   ac_save_CPPFLAGS="$CPPFLAGS"
12406   ac_save_LDFLAGS="$LDFLAGS"
12407 #  ac_save_LIBS="$LIBS"
12408
12409   if test \! -z "$includedir" ; then
12410     CPPFLAGS="$CPPFLAGS -I$includedir"
12411   fi
12412   # note: $X_CFLAGS includes $x_includes
12413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12414
12415   if test \! -z "$libdir" ; then
12416     LDFLAGS="$LDFLAGS -L$libdir"
12417   fi
12418   # note: $X_LIBS includes $x_libraries
12419   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12420
12421   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12422   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12423   { echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12424 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6; }
12425 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12426   echo $ECHO_N "(cached) $ECHO_C" >&6
12427 else
12428   ac_check_lib_save_LIBS=$LIBS
12429 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12430 cat >conftest.$ac_ext <<_ACEOF
12431 /* confdefs.h.  */
12432 _ACEOF
12433 cat confdefs.h >>conftest.$ac_ext
12434 cat >>conftest.$ac_ext <<_ACEOF
12435 /* end confdefs.h.  */
12436
12437 /* Override any GCC internal prototype to avoid an error.
12438    Use char because int might match the return type of a GCC
12439    builtin and then its argument prototype would still apply.  */
12440 #ifdef __cplusplus
12441 extern "C"
12442 #endif
12443 char XRRGetScreenInfo ();
12444 int
12445 main ()
12446 {
12447 return XRRGetScreenInfo ();
12448   ;
12449   return 0;
12450 }
12451 _ACEOF
12452 rm -f conftest.$ac_objext conftest$ac_exeext
12453 if { (ac_try="$ac_link"
12454 case "(($ac_try" in
12455   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12456   *) ac_try_echo=$ac_try;;
12457 esac
12458 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12459   (eval "$ac_link") 2>conftest.er1
12460   ac_status=$?
12461   grep -v '^ *+' conftest.er1 >conftest.err
12462   rm -f conftest.er1
12463   cat conftest.err >&5
12464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12465   (exit $ac_status); } && {
12466          test -z "$ac_c_werror_flag" ||
12467          test ! -s conftest.err
12468        } && test -s conftest$ac_exeext &&
12469        $as_test_x conftest$ac_exeext; then
12470   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12471 else
12472   echo "$as_me: failed program was:" >&5
12473 sed 's/^/| /' conftest.$ac_ext >&5
12474
12475         ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12476 fi
12477
12478 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12479       conftest$ac_exeext conftest.$ac_ext
12480 LIBS=$ac_check_lib_save_LIBS
12481 fi
12482 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12483 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
12484 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12485   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12486 else
12487   true
12488 fi
12489
12490   CPPFLAGS="$ac_save_CPPFLAGS"
12491   LDFLAGS="$ac_save_LDFLAGS"
12492 #  LIBS="$ac_save_LIBS"
12493
12494     fi
12495   fi
12496
12497   # if that succeeded, then we've really got it.
12498   if test "$have_randr" = yes; then
12499     cat >>confdefs.h <<\_ACEOF
12500 #define HAVE_RANDR 1
12501 _ACEOF
12502
12503
12504     # Now check for version 1.2 in the same libs.
12505     # Try to compile, since on MacOS 10.5.7, headers are older than libs!
12506     { echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
12507 echo $ECHO_N "checking for XRRGetScreenResources... $ECHO_C" >&6; }
12508 if test "${ac_cv_randr_12+set}" = set; then
12509   echo $ECHO_N "(cached) $ECHO_C" >&6
12510 else
12511   ac_cv_randr_12=no
12512
12513   ac_save_CPPFLAGS="$CPPFLAGS"
12514   if test \! -z "$includedir" ; then
12515     CPPFLAGS="$CPPFLAGS -I$includedir"
12516   fi
12517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12518   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12519   cat >conftest.$ac_ext <<_ACEOF
12520 /* confdefs.h.  */
12521 _ACEOF
12522 cat confdefs.h >>conftest.$ac_ext
12523 cat >>conftest.$ac_ext <<_ACEOF
12524 /* end confdefs.h.  */
12525 #include <stdlib.h>
12526                          #include <X11/Xlib.h>
12527                          #include <X11/extensions/Xrandr.h>
12528 int
12529 main ()
12530 {
12531 XRRScreenResources *res =
12532                            XRRGetScreenResources (0, 0);
12533   ;
12534   return 0;
12535 }
12536 _ACEOF
12537 rm -f conftest.$ac_objext
12538 if { (ac_try="$ac_compile"
12539 case "(($ac_try" in
12540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12541   *) ac_try_echo=$ac_try;;
12542 esac
12543 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12544   (eval "$ac_compile") 2>conftest.er1
12545   ac_status=$?
12546   grep -v '^ *+' conftest.er1 >conftest.err
12547   rm -f conftest.er1
12548   cat conftest.err >&5
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); } && {
12551          test -z "$ac_c_werror_flag" ||
12552          test ! -s conftest.err
12553        } && test -s conftest.$ac_objext; then
12554   ac_cv_randr_12=yes
12555 else
12556   echo "$as_me: failed program was:" >&5
12557 sed 's/^/| /' conftest.$ac_ext >&5
12558
12559         ac_cv_randr_12=no
12560 fi
12561
12562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12563   CPPFLAGS="$ac_save_CPPFLAGS"
12564 fi
12565 { echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
12566 echo "${ECHO_T}$ac_cv_randr_12" >&6; }
12567     if test "$ac_cv_randr_12" = yes ; then
12568       cat >>confdefs.h <<\_ACEOF
12569 #define HAVE_RANDR_12 1
12570 _ACEOF
12571
12572     fi
12573 #   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
12574 #                  [true], $SAVER_LIBS)
12575   fi
12576
12577
12578 elif test "$with_randr" != no; then
12579   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12580   exit 1
12581 fi
12582
12583
12584 ###############################################################################
12585 #
12586 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12587 #       using other XF86 stuff.)
12588 #
12589 ###############################################################################
12590
12591 have_xf86miscsetgrabkeysstate=no
12592 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12593
12594   ac_save_CPPFLAGS="$CPPFLAGS"
12595   ac_save_LDFLAGS="$LDFLAGS"
12596 #  ac_save_LIBS="$LIBS"
12597
12598   if test \! -z "$includedir" ; then
12599     CPPFLAGS="$CPPFLAGS -I$includedir"
12600   fi
12601   # note: $X_CFLAGS includes $x_includes
12602   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12603
12604   if test \! -z "$libdir" ; then
12605     LDFLAGS="$LDFLAGS -L$libdir"
12606   fi
12607   # note: $X_LIBS includes $x_libraries
12608   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12609
12610   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12611   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
12612   { echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12613 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6; }
12614 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12615   echo $ECHO_N "(cached) $ECHO_C" >&6
12616 else
12617   ac_check_lib_save_LIBS=$LIBS
12618 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12619 cat >conftest.$ac_ext <<_ACEOF
12620 /* confdefs.h.  */
12621 _ACEOF
12622 cat confdefs.h >>conftest.$ac_ext
12623 cat >>conftest.$ac_ext <<_ACEOF
12624 /* end confdefs.h.  */
12625
12626 /* Override any GCC internal prototype to avoid an error.
12627    Use char because int might match the return type of a GCC
12628    builtin and then its argument prototype would still apply.  */
12629 #ifdef __cplusplus
12630 extern "C"
12631 #endif
12632 char XF86MiscSetGrabKeysState ();
12633 int
12634 main ()
12635 {
12636 return XF86MiscSetGrabKeysState ();
12637   ;
12638   return 0;
12639 }
12640 _ACEOF
12641 rm -f conftest.$ac_objext conftest$ac_exeext
12642 if { (ac_try="$ac_link"
12643 case "(($ac_try" in
12644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12645   *) ac_try_echo=$ac_try;;
12646 esac
12647 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12648   (eval "$ac_link") 2>conftest.er1
12649   ac_status=$?
12650   grep -v '^ *+' conftest.er1 >conftest.err
12651   rm -f conftest.er1
12652   cat conftest.err >&5
12653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654   (exit $ac_status); } && {
12655          test -z "$ac_c_werror_flag" ||
12656          test ! -s conftest.err
12657        } && test -s conftest$ac_exeext &&
12658        $as_test_x conftest$ac_exeext; then
12659   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12660 else
12661   echo "$as_me: failed program was:" >&5
12662 sed 's/^/| /' conftest.$ac_ext >&5
12663
12664         ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12665 fi
12666
12667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12668       conftest$ac_exeext conftest.$ac_ext
12669 LIBS=$ac_check_lib_save_LIBS
12670 fi
12671 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12672 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
12673 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12674   have_xf86miscsetgrabkeysstate=yes
12675 else
12676   true
12677 fi
12678
12679   CPPFLAGS="$ac_save_CPPFLAGS"
12680   LDFLAGS="$ac_save_LDFLAGS"
12681 #  LIBS="$ac_save_LIBS"
12682
12683   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12684     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12685     cat >>confdefs.h <<\_ACEOF
12686 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12687 _ACEOF
12688
12689   fi
12690 fi
12691
12692
12693 ###############################################################################
12694 #
12695 #       Check for HP XHPDisableReset and XHPEnableReset.
12696 #
12697 ###############################################################################
12698
12699 { echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12700 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6; }
12701
12702   ac_save_CPPFLAGS="$CPPFLAGS"
12703   if test \! -z "$includedir" ; then
12704     CPPFLAGS="$CPPFLAGS -I$includedir"
12705   fi
12706   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12707   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12708   cat >conftest.$ac_ext <<_ACEOF
12709 /* confdefs.h.  */
12710 _ACEOF
12711 cat confdefs.h >>conftest.$ac_ext
12712 cat >>conftest.$ac_ext <<_ACEOF
12713 /* end confdefs.h.  */
12714 #include <X11/XHPlib.h>
12715
12716 _ACEOF
12717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12718   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12719   cat >>confdefs.h <<\_ACEOF
12720 #define HAVE_XHPDISABLERESET 1
12721 _ACEOF
12722
12723                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12724                    { echo "$as_me:$LINENO: result: yes" >&5
12725 echo "${ECHO_T}yes" >&6; }
12726 else
12727   { echo "$as_me:$LINENO: result: no" >&5
12728 echo "${ECHO_T}no" >&6; }
12729 fi
12730 rm -f conftest*
12731
12732   CPPFLAGS="$ac_save_CPPFLAGS"
12733
12734
12735 ###############################################################################
12736 #
12737 #       Check for /proc/interrupts.
12738 #
12739 ###############################################################################
12740
12741 have_proc_interrupts=no
12742 with_proc_interrupts_req=unspecified
12743
12744 # Check whether --with-proc-interrupts was given.
12745 if test "${with_proc_interrupts+set}" = set; then
12746   withval=$with_proc_interrupts; with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12747 else
12748   with_proc_interrupts=yes
12749 fi
12750
12751
12752 if test "$with_proc_interrupts" = yes; then
12753
12754   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12755   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12756   # check that it has the bits we need, but otherwise we'll just go on faith.
12757   #
12758   have_proc_interrupts=yes
12759
12760   if test -f /proc/interrupts; then
12761    { echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12762 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6; }
12763 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12764   echo $ECHO_N "(cached) $ECHO_C" >&6
12765 else
12766   ac_cv_have_proc_interrupts=no
12767      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12768        ac_cv_have_proc_interrupts=yes
12769      fi
12770
12771 fi
12772 { echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12773 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6; }
12774    have_proc_interrupts=$ac_cv_have_proc_interrupts
12775   fi
12776
12777   if test "$have_proc_interrupts" = yes; then
12778     cat >>confdefs.h <<\_ACEOF
12779 #define HAVE_PROC_INTERRUPTS 1
12780 _ACEOF
12781
12782   fi
12783
12784 elif test "$with_proc_interrupts" != no; then
12785   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12786   exit 1
12787 fi
12788
12789
12790 ###############################################################################
12791 #
12792 #       The --enable-locking option
12793 #
12794 ###############################################################################
12795
12796 # Check whether --enable-locking was given.
12797 if test "${enable_locking+set}" = set; then
12798   enableval=$enable_locking; enable_locking="$enableval"
12799 else
12800   if test "$ac_macosx" = yes; then
12801     # We can't lock on MacOS X, so default to not compiling in support for it.
12802     # But allow --enable-locking to override that, so I can debug Linux locking
12803     # under MacOS X11.
12804     enable_locking=no
12805    else
12806     enable_locking=yes
12807    fi
12808 fi
12809
12810 if test "$enable_locking" = yes; then
12811   true
12812 elif test "$enable_locking" = no; then
12813   cat >>confdefs.h <<\_ACEOF
12814 #define NO_LOCKING 1
12815 _ACEOF
12816
12817 else
12818   echo "error: must be yes or no: --enable-locking=$enable_locking"
12819   exit 1
12820 fi
12821
12822
12823 ###############################################################################
12824 #
12825 #       Whether to allow root password to unblank.
12826 #
12827 ###############################################################################
12828 # Check whether --enable-root-passwd was given.
12829 if test "${enable_root_passwd+set}" = set; then
12830   enableval=$enable_root_passwd; enable_root_passwd="$enableval"
12831 else
12832   enable_root_passwd=yes
12833 fi
12834
12835 if test "$enable_root_passwd" = yes; then
12836   cat >>confdefs.h <<\_ACEOF
12837 #define ALLOW_ROOT_PASSWD 1
12838 _ACEOF
12839
12840   true
12841 elif test "$enable_root_passwd" != no; then
12842   echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
12843   exit 1
12844 fi
12845
12846 ###############################################################################
12847 #
12848 #       Check for PAM.
12849 #
12850 ###############################################################################
12851
12852 case "$host" in
12853   *-solaris*)
12854    # Solaris systems tend to come with PAM misconfigured.
12855    #  Don't build it by default, even if the headers exist.
12856    with_pam_default=no
12857    ;;
12858   *)
12859    # Default to building PAM support on all other systems, if it exists.
12860    with_pam_default=yes
12861   ;;
12862 esac
12863
12864 have_pam=no
12865 with_pam_req=unspecified
12866
12867
12868 # Check whether --with-pam was given.
12869 if test "${with_pam+set}" = set; then
12870   withval=$with_pam; with_pam="$withval"; with_pam_req="$withval"
12871 else
12872   with_pam=$with_pam_default
12873 fi
12874
12875
12876
12877 # Check whether --with-pam_service_name was given.
12878 if test "${with_pam_service_name+set}" = set; then
12879   withval=$with_pam_service_name; pam_service_name="$withval"
12880 else
12881   pam_service_name="xscreensaver"
12882 fi
12883
12884
12885
12886    case "$with_pam" in
12887     yes) ;;
12888     no)  ;;
12889
12890     /*)
12891      { echo "$as_me:$LINENO: checking for PAM headers" >&5
12892 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6; }
12893      d=$with_pam/include
12894      if test -d $d; then
12895        X_CFLAGS="-I$d $X_CFLAGS"
12896        { echo "$as_me:$LINENO: result: $d" >&5
12897 echo "${ECHO_T}$d" >&6; }
12898      else
12899        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12900 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12901      fi
12902
12903      { echo "$as_me:$LINENO: checking for PAM libs" >&5
12904 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6; }
12905      d=$with_pam/lib
12906      if test -d $d; then
12907        X_LIBS="-L$d $X_LIBS"
12908        { echo "$as_me:$LINENO: result: $d" >&5
12909 echo "${ECHO_T}$d" >&6; }
12910      else
12911        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12912 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
12913      fi
12914
12915      # replace the directory string with "yes".
12916      with_pam_req="yes"
12917      with_pam=$with_pam_req
12918      ;;
12919
12920     *)
12921      echo ""
12922      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12923      echo "       If it is a directory, then \`DIR/include' will be added to"
12924      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12925      exit 1
12926      ;;
12927    esac
12928
12929
12930 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12931   { echo "$as_me:$LINENO: checking for PAM" >&5
12932 echo $ECHO_N "checking for PAM... $ECHO_C" >&6; }
12933 if test "${ac_cv_pam+set}" = set; then
12934   echo $ECHO_N "(cached) $ECHO_C" >&6
12935 else
12936
12937   ac_save_CPPFLAGS="$CPPFLAGS"
12938   if test \! -z "$includedir" ; then
12939     CPPFLAGS="$CPPFLAGS -I$includedir"
12940   fi
12941   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12942   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
12943   cat >conftest.$ac_ext <<_ACEOF
12944 /* confdefs.h.  */
12945 _ACEOF
12946 cat confdefs.h >>conftest.$ac_ext
12947 cat >>conftest.$ac_ext <<_ACEOF
12948 /* end confdefs.h.  */
12949 #include <security/pam_appl.h>
12950 int
12951 main ()
12952 {
12953
12954   ;
12955   return 0;
12956 }
12957 _ACEOF
12958 rm -f conftest.$ac_objext
12959 if { (ac_try="$ac_compile"
12960 case "(($ac_try" in
12961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12962   *) ac_try_echo=$ac_try;;
12963 esac
12964 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12965   (eval "$ac_compile") 2>conftest.er1
12966   ac_status=$?
12967   grep -v '^ *+' conftest.er1 >conftest.err
12968   rm -f conftest.er1
12969   cat conftest.err >&5
12970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12971   (exit $ac_status); } && {
12972          test -z "$ac_c_werror_flag" ||
12973          test ! -s conftest.err
12974        } && test -s conftest.$ac_objext; then
12975   ac_cv_pam=yes
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 sed 's/^/| /' conftest.$ac_ext >&5
12979
12980         ac_cv_pam=no
12981 fi
12982
12983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12984   CPPFLAGS="$ac_save_CPPFLAGS"
12985 fi
12986 { echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12987 echo "${ECHO_T}$ac_cv_pam" >&6; }
12988   if test "$ac_cv_pam" = yes ; then
12989     have_pam=yes
12990     cat >>confdefs.h <<\_ACEOF
12991 #define HAVE_PAM 1
12992 _ACEOF
12993
12994     cat >>confdefs.h <<_ACEOF
12995 #define PAM_SERVICE_NAME "$pam_service_name"
12996 _ACEOF
12997
12998
12999     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
13000
13001     # libpam typically requires dlopen and dlsym.  On FreeBSD,
13002     # those are in libc.  On Linux and Solaris, they're in libdl.
13003     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13004 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
13005 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13006   echo $ECHO_N "(cached) $ECHO_C" >&6
13007 else
13008   ac_check_lib_save_LIBS=$LIBS
13009 LIBS="-ldl  $LIBS"
13010 cat >conftest.$ac_ext <<_ACEOF
13011 /* confdefs.h.  */
13012 _ACEOF
13013 cat confdefs.h >>conftest.$ac_ext
13014 cat >>conftest.$ac_ext <<_ACEOF
13015 /* end confdefs.h.  */
13016
13017 /* Override any GCC internal prototype to avoid an error.
13018    Use char because int might match the return type of a GCC
13019    builtin and then its argument prototype would still apply.  */
13020 #ifdef __cplusplus
13021 extern "C"
13022 #endif
13023 char dlopen ();
13024 int
13025 main ()
13026 {
13027 return dlopen ();
13028   ;
13029   return 0;
13030 }
13031 _ACEOF
13032 rm -f conftest.$ac_objext conftest$ac_exeext
13033 if { (ac_try="$ac_link"
13034 case "(($ac_try" in
13035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036   *) ac_try_echo=$ac_try;;
13037 esac
13038 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13039   (eval "$ac_link") 2>conftest.er1
13040   ac_status=$?
13041   grep -v '^ *+' conftest.er1 >conftest.err
13042   rm -f conftest.er1
13043   cat conftest.err >&5
13044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045   (exit $ac_status); } && {
13046          test -z "$ac_c_werror_flag" ||
13047          test ! -s conftest.err
13048        } && test -s conftest$ac_exeext &&
13049        $as_test_x conftest$ac_exeext; then
13050   ac_cv_lib_dl_dlopen=yes
13051 else
13052   echo "$as_me: failed program was:" >&5
13053 sed 's/^/| /' conftest.$ac_ext >&5
13054
13055         ac_cv_lib_dl_dlopen=no
13056 fi
13057
13058 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13059       conftest$ac_exeext conftest.$ac_ext
13060 LIBS=$ac_check_lib_save_LIBS
13061 fi
13062 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13063 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13064 if test $ac_cv_lib_dl_dlopen = yes; then
13065   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
13066 fi
13067
13068
13069     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
13070     have_timedwait=no
13071     { echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
13072 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6; }
13073 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   ac_check_lib_save_LIBS=$LIBS
13077 LIBS="-lc  $LIBS"
13078 cat >conftest.$ac_ext <<_ACEOF
13079 /* confdefs.h.  */
13080 _ACEOF
13081 cat confdefs.h >>conftest.$ac_ext
13082 cat >>conftest.$ac_ext <<_ACEOF
13083 /* end confdefs.h.  */
13084
13085 /* Override any GCC internal prototype to avoid an error.
13086    Use char because int might match the return type of a GCC
13087    builtin and then its argument prototype would still apply.  */
13088 #ifdef __cplusplus
13089 extern "C"
13090 #endif
13091 char sigtimedwait ();
13092 int
13093 main ()
13094 {
13095 return sigtimedwait ();
13096   ;
13097   return 0;
13098 }
13099 _ACEOF
13100 rm -f conftest.$ac_objext conftest$ac_exeext
13101 if { (ac_try="$ac_link"
13102 case "(($ac_try" in
13103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13104   *) ac_try_echo=$ac_try;;
13105 esac
13106 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13107   (eval "$ac_link") 2>conftest.er1
13108   ac_status=$?
13109   grep -v '^ *+' conftest.er1 >conftest.err
13110   rm -f conftest.er1
13111   cat conftest.err >&5
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); } && {
13114          test -z "$ac_c_werror_flag" ||
13115          test ! -s conftest.err
13116        } && test -s conftest$ac_exeext &&
13117        $as_test_x conftest$ac_exeext; then
13118   ac_cv_lib_c_sigtimedwait=yes
13119 else
13120   echo "$as_me: failed program was:" >&5
13121 sed 's/^/| /' conftest.$ac_ext >&5
13122
13123         ac_cv_lib_c_sigtimedwait=no
13124 fi
13125
13126 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13127       conftest$ac_exeext conftest.$ac_ext
13128 LIBS=$ac_check_lib_save_LIBS
13129 fi
13130 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
13131 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
13132 if test $ac_cv_lib_c_sigtimedwait = yes; then
13133   have_timedwait=yes
13134                   cat >>confdefs.h <<\_ACEOF
13135 #define HAVE_SIGTIMEDWAIT 1
13136 _ACEOF
13137
13138 fi
13139
13140     if test "$have_timedwait" = no ; then
13141       { echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
13142 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6; }
13143 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
13144   echo $ECHO_N "(cached) $ECHO_C" >&6
13145 else
13146   ac_check_lib_save_LIBS=$LIBS
13147 LIBS="-lrt  $LIBS"
13148 cat >conftest.$ac_ext <<_ACEOF
13149 /* confdefs.h.  */
13150 _ACEOF
13151 cat confdefs.h >>conftest.$ac_ext
13152 cat >>conftest.$ac_ext <<_ACEOF
13153 /* end confdefs.h.  */
13154
13155 /* Override any GCC internal prototype to avoid an error.
13156    Use char because int might match the return type of a GCC
13157    builtin and then its argument prototype would still apply.  */
13158 #ifdef __cplusplus
13159 extern "C"
13160 #endif
13161 char sigtimedwait ();
13162 int
13163 main ()
13164 {
13165 return sigtimedwait ();
13166   ;
13167   return 0;
13168 }
13169 _ACEOF
13170 rm -f conftest.$ac_objext conftest$ac_exeext
13171 if { (ac_try="$ac_link"
13172 case "(($ac_try" in
13173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13174   *) ac_try_echo=$ac_try;;
13175 esac
13176 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13177   (eval "$ac_link") 2>conftest.er1
13178   ac_status=$?
13179   grep -v '^ *+' conftest.er1 >conftest.err
13180   rm -f conftest.er1
13181   cat conftest.err >&5
13182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183   (exit $ac_status); } && {
13184          test -z "$ac_c_werror_flag" ||
13185          test ! -s conftest.err
13186        } && test -s conftest$ac_exeext &&
13187        $as_test_x conftest$ac_exeext; then
13188   ac_cv_lib_rt_sigtimedwait=yes
13189 else
13190   echo "$as_me: failed program was:" >&5
13191 sed 's/^/| /' conftest.$ac_ext >&5
13192
13193         ac_cv_lib_rt_sigtimedwait=no
13194 fi
13195
13196 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13197       conftest$ac_exeext conftest.$ac_ext
13198 LIBS=$ac_check_lib_save_LIBS
13199 fi
13200 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
13201 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
13202 if test $ac_cv_lib_rt_sigtimedwait = yes; then
13203   have_timedwait=yes
13204                                       cat >>confdefs.h <<\_ACEOF
13205 #define HAVE_SIGTIMEDWAIT 1
13206 _ACEOF
13207
13208                                       PASSWD_LIBS="${PASSWD_LIBS} -lrt"
13209 fi
13210
13211     fi
13212
13213     { echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
13214 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
13215     if test "${ac_cv_pam_strerror_args+set}" = set; then
13216   echo $ECHO_N "(cached) $ECHO_C" >&6
13217 else
13218
13219   ac_save_CPPFLAGS="$CPPFLAGS"
13220   if test \! -z "$includedir" ; then
13221     CPPFLAGS="$CPPFLAGS -I$includedir"
13222   fi
13223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13224   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13225   cat >conftest.$ac_ext <<_ACEOF
13226 /* confdefs.h.  */
13227 _ACEOF
13228 cat confdefs.h >>conftest.$ac_ext
13229 cat >>conftest.$ac_ext <<_ACEOF
13230 /* end confdefs.h.  */
13231 #include <stdio.h>
13232                         #include <stdlib.h>
13233                         #include <security/pam_appl.h>
13234 int
13235 main ()
13236 {
13237 pam_handle_t *pamh = 0;
13238                         char *s = pam_strerror(pamh, PAM_SUCCESS);
13239   ;
13240   return 0;
13241 }
13242 _ACEOF
13243 rm -f conftest.$ac_objext
13244 if { (ac_try="$ac_compile"
13245 case "(($ac_try" in
13246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13247   *) ac_try_echo=$ac_try;;
13248 esac
13249 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13250   (eval "$ac_compile") 2>conftest.er1
13251   ac_status=$?
13252   grep -v '^ *+' conftest.er1 >conftest.err
13253   rm -f conftest.er1
13254   cat conftest.err >&5
13255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13256   (exit $ac_status); } && {
13257          test -z "$ac_c_werror_flag" ||
13258          test ! -s conftest.err
13259        } && test -s conftest.$ac_objext; then
13260   ac_pam_strerror_args=2
13261 else
13262   echo "$as_me: failed program was:" >&5
13263 sed 's/^/| /' conftest.$ac_ext >&5
13264
13265
13266   ac_save_CPPFLAGS="$CPPFLAGS"
13267   if test \! -z "$includedir" ; then
13268     CPPFLAGS="$CPPFLAGS -I$includedir"
13269   fi
13270   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13271   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13272   cat >conftest.$ac_ext <<_ACEOF
13273 /* confdefs.h.  */
13274 _ACEOF
13275 cat confdefs.h >>conftest.$ac_ext
13276 cat >>conftest.$ac_ext <<_ACEOF
13277 /* end confdefs.h.  */
13278 #include <stdio.h>
13279                                           #include <stdlib.h>
13280                                           #include <security/pam_appl.h>
13281 int
13282 main ()
13283 {
13284 char *s =
13285                                            pam_strerror(PAM_SUCCESS);
13286   ;
13287   return 0;
13288 }
13289 _ACEOF
13290 rm -f conftest.$ac_objext
13291 if { (ac_try="$ac_compile"
13292 case "(($ac_try" in
13293   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13294   *) ac_try_echo=$ac_try;;
13295 esac
13296 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13297   (eval "$ac_compile") 2>conftest.er1
13298   ac_status=$?
13299   grep -v '^ *+' conftest.er1 >conftest.err
13300   rm -f conftest.er1
13301   cat conftest.err >&5
13302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13303   (exit $ac_status); } && {
13304          test -z "$ac_c_werror_flag" ||
13305          test ! -s conftest.err
13306        } && test -s conftest.$ac_objext; then
13307   ac_pam_strerror_args=1
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 sed 's/^/| /' conftest.$ac_ext >&5
13311
13312         ac_pam_strerror_args=0
13313 fi
13314
13315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316   CPPFLAGS="$ac_save_CPPFLAGS"
13317 fi
13318
13319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320   CPPFLAGS="$ac_save_CPPFLAGS"
13321       ac_cv_pam_strerror_args=$ac_pam_strerror_args
13322 fi
13323
13324     ac_pam_strerror_args=$ac_cv_pam_strerror_args
13325     if test "$ac_pam_strerror_args" = 1 ; then
13326       { echo "$as_me:$LINENO: result: one argument" >&5
13327 echo "${ECHO_T}one argument" >&6; }
13328     elif test "$ac_pam_strerror_args" = 2 ; then
13329       cat >>confdefs.h <<\_ACEOF
13330 #define PAM_STRERROR_TWO_ARGS 1
13331 _ACEOF
13332
13333       { echo "$as_me:$LINENO: result: two arguments" >&5
13334 echo "${ECHO_T}two arguments" >&6; }
13335     else
13336       { echo "$as_me:$LINENO: result: unknown" >&5
13337 echo "${ECHO_T}unknown" >&6; }
13338     fi
13339
13340 # Check pam_fail_delay
13341     { echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
13342 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6; }
13343     if test "${ac_cv_pam_fail_delay+set}" = set; then
13344   echo $ECHO_N "(cached) $ECHO_C" >&6
13345 else
13346   ac_save_LDFLAGS="$LDFLAGS"
13347       LDFLAGS="-lpam"
13348       cat >conftest.$ac_ext <<_ACEOF
13349 /* confdefs.h.  */
13350 _ACEOF
13351 cat confdefs.h >>conftest.$ac_ext
13352 cat >>conftest.$ac_ext <<_ACEOF
13353 /* end confdefs.h.  */
13354 #include <security/pam_appl.h>
13355 int
13356 main ()
13357 {
13358 pam_handle_t *pamh = 0;
13359                    unsigned int usec = 1;
13360                    int status = pam_fail_delay (pamh, usec);
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext conftest$ac_exeext
13366 if { (ac_try="$ac_link"
13367 case "(($ac_try" in
13368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13369   *) ac_try_echo=$ac_try;;
13370 esac
13371 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13372   (eval "$ac_link") 2>conftest.er1
13373   ac_status=$?
13374   grep -v '^ *+' conftest.er1 >conftest.err
13375   rm -f conftest.er1
13376   cat conftest.err >&5
13377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13378   (exit $ac_status); } && {
13379          test -z "$ac_c_werror_flag" ||
13380          test ! -s conftest.err
13381        } && test -s conftest$ac_exeext &&
13382        $as_test_x conftest$ac_exeext; then
13383   ac_pam_fail_delay=yes
13384 else
13385   echo "$as_me: failed program was:" >&5
13386 sed 's/^/| /' conftest.$ac_ext >&5
13387
13388         ac_pam_fail_delay=no
13389 fi
13390
13391 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13392       conftest$ac_exeext conftest.$ac_ext
13393       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
13394       LDFLAGS=$ac_save_LDFLAGS
13395 fi
13396
13397
13398       if test "$ac_pam_fail_delay" = yes ; then
13399         { echo "$as_me:$LINENO: result: yes" >&5
13400 echo "${ECHO_T}yes" >&6; }
13401         cat >>confdefs.h <<\_ACEOF
13402 #define HAVE_PAM_FAIL_DELAY 1
13403 _ACEOF
13404
13405       else
13406         { echo "$as_me:$LINENO: result: no" >&5
13407 echo "${ECHO_T}no" >&6; }
13408       fi
13409
13410   fi
13411 fi
13412
13413
13414 ###############################################################################
13415 #
13416 #       Check for Kerberos.
13417 #
13418 ###############################################################################
13419
13420 have_kerberos=no
13421 have_kerberos5=no
13422 with_kerberos_req=unspecified
13423
13424
13425 # Check whether --with-kerberos was given.
13426 if test "${with_kerberos+set}" = set; then
13427   withval=$with_kerberos; with_kerberos="$withval"; with_kerberos_req="$withval"
13428 else
13429   with_kerberos=yes
13430 fi
13431
13432
13433
13434    case "$with_kerberos" in
13435     yes) ;;
13436     no)  ;;
13437
13438     /*)
13439      { echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13440 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6; }
13441      d=$with_kerberos/include
13442      if test -d $d; then
13443        X_CFLAGS="-I$d $X_CFLAGS"
13444        { echo "$as_me:$LINENO: result: $d" >&5
13445 echo "${ECHO_T}$d" >&6; }
13446      else
13447        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13448 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13449      fi
13450
13451      { echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13452 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6; }
13453      d=$with_kerberos/lib
13454      if test -d $d; then
13455        X_LIBS="-L$d $X_LIBS"
13456        { echo "$as_me:$LINENO: result: $d" >&5
13457 echo "${ECHO_T}$d" >&6; }
13458      else
13459        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13460 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
13461      fi
13462
13463      # replace the directory string with "yes".
13464      with_kerberos_req="yes"
13465      with_kerberos=$with_kerberos_req
13466      ;;
13467
13468     *)
13469      echo ""
13470      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13471      echo "       If it is a directory, then \`DIR/include' will be added to"
13472      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13473      exit 1
13474      ;;
13475    esac
13476
13477
13478 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13479   { echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13480 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6; }
13481 if test "${ac_cv_kerberos+set}" = set; then
13482   echo $ECHO_N "(cached) $ECHO_C" >&6
13483 else
13484
13485   ac_save_CPPFLAGS="$CPPFLAGS"
13486   if test \! -z "$includedir" ; then
13487     CPPFLAGS="$CPPFLAGS -I$includedir"
13488   fi
13489   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13490   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13491   cat >conftest.$ac_ext <<_ACEOF
13492 /* confdefs.h.  */
13493 _ACEOF
13494 cat confdefs.h >>conftest.$ac_ext
13495 cat >>conftest.$ac_ext <<_ACEOF
13496 /* end confdefs.h.  */
13497 #include <krb.h>
13498 int
13499 main ()
13500 {
13501
13502   ;
13503   return 0;
13504 }
13505 _ACEOF
13506 rm -f conftest.$ac_objext
13507 if { (ac_try="$ac_compile"
13508 case "(($ac_try" in
13509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13510   *) ac_try_echo=$ac_try;;
13511 esac
13512 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13513   (eval "$ac_compile") 2>conftest.er1
13514   ac_status=$?
13515   grep -v '^ *+' conftest.er1 >conftest.err
13516   rm -f conftest.er1
13517   cat conftest.err >&5
13518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13519   (exit $ac_status); } && {
13520          test -z "$ac_c_werror_flag" ||
13521          test ! -s conftest.err
13522        } && test -s conftest.$ac_objext; then
13523   ac_cv_kerberos=yes
13524 else
13525   echo "$as_me: failed program was:" >&5
13526 sed 's/^/| /' conftest.$ac_ext >&5
13527
13528         ac_cv_kerberos=no
13529 fi
13530
13531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13532   CPPFLAGS="$ac_save_CPPFLAGS"
13533 fi
13534 { echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13535 echo "${ECHO_T}$ac_cv_kerberos" >&6; }
13536   { echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13537 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6; }
13538 if test "${ac_cv_kerberos5+set}" = set; then
13539   echo $ECHO_N "(cached) $ECHO_C" >&6
13540 else
13541
13542   ac_save_CPPFLAGS="$CPPFLAGS"
13543   if test \! -z "$includedir" ; then
13544     CPPFLAGS="$CPPFLAGS -I$includedir"
13545   fi
13546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13547   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13548   cat >conftest.$ac_ext <<_ACEOF
13549 /* confdefs.h.  */
13550 _ACEOF
13551 cat confdefs.h >>conftest.$ac_ext
13552 cat >>conftest.$ac_ext <<_ACEOF
13553 /* end confdefs.h.  */
13554 #include <kerberosIV/krb.h>
13555 int
13556 main ()
13557 {
13558
13559   ;
13560   return 0;
13561 }
13562 _ACEOF
13563 rm -f conftest.$ac_objext
13564 if { (ac_try="$ac_compile"
13565 case "(($ac_try" in
13566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13567   *) ac_try_echo=$ac_try;;
13568 esac
13569 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13570   (eval "$ac_compile") 2>conftest.er1
13571   ac_status=$?
13572   grep -v '^ *+' conftest.er1 >conftest.err
13573   rm -f conftest.er1
13574   cat conftest.err >&5
13575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13576   (exit $ac_status); } && {
13577          test -z "$ac_c_werror_flag" ||
13578          test ! -s conftest.err
13579        } && test -s conftest.$ac_objext; then
13580   ac_cv_kerberos5=yes
13581 else
13582   echo "$as_me: failed program was:" >&5
13583 sed 's/^/| /' conftest.$ac_ext >&5
13584
13585         ac_cv_kerberos5=no
13586 fi
13587
13588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589   CPPFLAGS="$ac_save_CPPFLAGS"
13590 fi
13591 { echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13592 echo "${ECHO_T}$ac_cv_kerberos5" >&6; }
13593
13594   if test "$ac_cv_kerberos" = yes ; then
13595     have_kerberos=yes
13596     cat >>confdefs.h <<\_ACEOF
13597 #define HAVE_KERBEROS 1
13598 _ACEOF
13599
13600   fi
13601
13602   if test "$ac_cv_kerberos5" = yes ; then
13603
13604     # Andrew Snare <ajs@pigpond.com> wrote:
13605     #
13606     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13607     # (krb4) was also available.  This turns out not to be the case with
13608     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13609     # is optional.
13610     #
13611     # So, disable kerberosV support if libkrb4 can't be found.
13612     # This is not the best solution, but it makes the compile not fail.
13613     #
13614
13615   ac_save_CPPFLAGS="$CPPFLAGS"
13616   ac_save_LDFLAGS="$LDFLAGS"
13617 #  ac_save_LIBS="$LIBS"
13618
13619   if test \! -z "$includedir" ; then
13620     CPPFLAGS="$CPPFLAGS -I$includedir"
13621   fi
13622   # note: $X_CFLAGS includes $x_includes
13623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13624
13625   if test \! -z "$libdir" ; then
13626     LDFLAGS="$LDFLAGS -L$libdir"
13627   fi
13628   # note: $X_LIBS includes $x_libraries
13629   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13630
13631   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13632   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13633   { echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13634 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6; }
13635 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13636   echo $ECHO_N "(cached) $ECHO_C" >&6
13637 else
13638   ac_check_lib_save_LIBS=$LIBS
13639 LIBS="-lkrb4  $LIBS"
13640 cat >conftest.$ac_ext <<_ACEOF
13641 /* confdefs.h.  */
13642 _ACEOF
13643 cat confdefs.h >>conftest.$ac_ext
13644 cat >>conftest.$ac_ext <<_ACEOF
13645 /* end confdefs.h.  */
13646
13647 /* Override any GCC internal prototype to avoid an error.
13648    Use char because int might match the return type of a GCC
13649    builtin and then its argument prototype would still apply.  */
13650 #ifdef __cplusplus
13651 extern "C"
13652 #endif
13653 char krb_get_tf_realm ();
13654 int
13655 main ()
13656 {
13657 return krb_get_tf_realm ();
13658   ;
13659   return 0;
13660 }
13661 _ACEOF
13662 rm -f conftest.$ac_objext conftest$ac_exeext
13663 if { (ac_try="$ac_link"
13664 case "(($ac_try" in
13665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13666   *) ac_try_echo=$ac_try;;
13667 esac
13668 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13669   (eval "$ac_link") 2>conftest.er1
13670   ac_status=$?
13671   grep -v '^ *+' conftest.er1 >conftest.err
13672   rm -f conftest.er1
13673   cat conftest.err >&5
13674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675   (exit $ac_status); } && {
13676          test -z "$ac_c_werror_flag" ||
13677          test ! -s conftest.err
13678        } && test -s conftest$ac_exeext &&
13679        $as_test_x conftest$ac_exeext; then
13680   ac_cv_lib_krb4_krb_get_tf_realm=yes
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 sed 's/^/| /' conftest.$ac_ext >&5
13684
13685         ac_cv_lib_krb4_krb_get_tf_realm=no
13686 fi
13687
13688 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13689       conftest$ac_exeext conftest.$ac_ext
13690 LIBS=$ac_check_lib_save_LIBS
13691 fi
13692 { echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13693 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6; }
13694 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13695   have_kerberos=yes
13696 else
13697   have_kerberos=no
13698 fi
13699
13700   CPPFLAGS="$ac_save_CPPFLAGS"
13701   LDFLAGS="$ac_save_LDFLAGS"
13702 #  LIBS="$ac_save_LIBS"
13703
13704     if test "$have_kerberos" = yes ; then
13705       have_kerberos5=yes
13706       cat >>confdefs.h <<\_ACEOF
13707 #define HAVE_KERBEROS 1
13708 _ACEOF
13709
13710       cat >>confdefs.h <<\_ACEOF
13711 #define HAVE_KERBEROS5 1
13712 _ACEOF
13713
13714     else
13715       have_kerberos5=no
13716       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13717 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13718     fi
13719
13720   fi
13721
13722   if test "$have_kerberos5" = yes ; then
13723     # from Matt Knopp <mhat@infocalypse.netlag.com>
13724     # (who got it from amu@mit.edu)
13725
13726     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13727
13728     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13729
13730   ac_save_CPPFLAGS="$CPPFLAGS"
13731   ac_save_LDFLAGS="$LDFLAGS"
13732 #  ac_save_LIBS="$LIBS"
13733
13734   if test \! -z "$includedir" ; then
13735     CPPFLAGS="$CPPFLAGS -I$includedir"
13736   fi
13737   # note: $X_CFLAGS includes $x_includes
13738   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13739
13740   if test \! -z "$libdir" ; then
13741     LDFLAGS="$LDFLAGS -L$libdir"
13742   fi
13743   # note: $X_LIBS includes $x_libraries
13744   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13745
13746   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
13747   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
13748   { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13749 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
13750 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753   ac_check_lib_save_LIBS=$LIBS
13754 LIBS="-lcrypt  $LIBS"
13755 cat >conftest.$ac_ext <<_ACEOF
13756 /* confdefs.h.  */
13757 _ACEOF
13758 cat confdefs.h >>conftest.$ac_ext
13759 cat >>conftest.$ac_ext <<_ACEOF
13760 /* end confdefs.h.  */
13761
13762 /* Override any GCC internal prototype to avoid an error.
13763    Use char because int might match the return type of a GCC
13764    builtin and then its argument prototype would still apply.  */
13765 #ifdef __cplusplus
13766 extern "C"
13767 #endif
13768 char crypt ();
13769 int
13770 main ()
13771 {
13772 return crypt ();
13773   ;
13774   return 0;
13775 }
13776 _ACEOF
13777 rm -f conftest.$ac_objext conftest$ac_exeext
13778 if { (ac_try="$ac_link"
13779 case "(($ac_try" in
13780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13781   *) ac_try_echo=$ac_try;;
13782 esac
13783 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13784   (eval "$ac_link") 2>conftest.er1
13785   ac_status=$?
13786   grep -v '^ *+' conftest.er1 >conftest.err
13787   rm -f conftest.er1
13788   cat conftest.err >&5
13789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790   (exit $ac_status); } && {
13791          test -z "$ac_c_werror_flag" ||
13792          test ! -s conftest.err
13793        } && test -s conftest$ac_exeext &&
13794        $as_test_x conftest$ac_exeext; then
13795   ac_cv_lib_crypt_crypt=yes
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 sed 's/^/| /' conftest.$ac_ext >&5
13799
13800         ac_cv_lib_crypt_crypt=no
13801 fi
13802
13803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13804       conftest$ac_exeext conftest.$ac_ext
13805 LIBS=$ac_check_lib_save_LIBS
13806 fi
13807 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13808 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
13809 if test $ac_cv_lib_crypt_crypt = yes; then
13810   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13811 fi
13812
13813   CPPFLAGS="$ac_save_CPPFLAGS"
13814   LDFLAGS="$ac_save_LDFLAGS"
13815 #  LIBS="$ac_save_LIBS"
13816
13817
13818   elif test "$have_kerberos" = yes ; then
13819     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13820     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13821   fi
13822
13823   if test "$have_kerberos" = yes ; then
13824     { echo "$as_me:$LINENO: checking for res_search" >&5
13825 echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
13826 if test "${ac_cv_func_res_search+set}" = set; then
13827   echo $ECHO_N "(cached) $ECHO_C" >&6
13828 else
13829   cat >conftest.$ac_ext <<_ACEOF
13830 /* confdefs.h.  */
13831 _ACEOF
13832 cat confdefs.h >>conftest.$ac_ext
13833 cat >>conftest.$ac_ext <<_ACEOF
13834 /* end confdefs.h.  */
13835 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13836    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13837 #define res_search innocuous_res_search
13838
13839 /* System header to define __stub macros and hopefully few prototypes,
13840     which can conflict with char res_search (); below.
13841     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13842     <limits.h> exists even on freestanding compilers.  */
13843
13844 #ifdef __STDC__
13845 # include <limits.h>
13846 #else
13847 # include <assert.h>
13848 #endif
13849
13850 #undef res_search
13851
13852 /* Override any GCC internal prototype to avoid an error.
13853    Use char because int might match the return type of a GCC
13854    builtin and then its argument prototype would still apply.  */
13855 #ifdef __cplusplus
13856 extern "C"
13857 #endif
13858 char res_search ();
13859 /* The GNU C library defines this for functions which it implements
13860     to always fail with ENOSYS.  Some functions are actually named
13861     something starting with __ and the normal name is an alias.  */
13862 #if defined __stub_res_search || defined __stub___res_search
13863 choke me
13864 #endif
13865
13866 int
13867 main ()
13868 {
13869 return res_search ();
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 rm -f conftest.$ac_objext conftest$ac_exeext
13875 if { (ac_try="$ac_link"
13876 case "(($ac_try" in
13877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13878   *) ac_try_echo=$ac_try;;
13879 esac
13880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13881   (eval "$ac_link") 2>conftest.er1
13882   ac_status=$?
13883   grep -v '^ *+' conftest.er1 >conftest.err
13884   rm -f conftest.er1
13885   cat conftest.err >&5
13886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887   (exit $ac_status); } && {
13888          test -z "$ac_c_werror_flag" ||
13889          test ! -s conftest.err
13890        } && test -s conftest$ac_exeext &&
13891        $as_test_x conftest$ac_exeext; then
13892   ac_cv_func_res_search=yes
13893 else
13894   echo "$as_me: failed program was:" >&5
13895 sed 's/^/| /' conftest.$ac_ext >&5
13896
13897         ac_cv_func_res_search=no
13898 fi
13899
13900 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13901       conftest$ac_exeext conftest.$ac_ext
13902 fi
13903 { echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13904 echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
13905 if test $ac_cv_func_res_search = yes; then
13906   :
13907 else
13908   { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13909 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
13910 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13911   echo $ECHO_N "(cached) $ECHO_C" >&6
13912 else
13913   ac_check_lib_save_LIBS=$LIBS
13914 LIBS="-lresolv  $LIBS"
13915 cat >conftest.$ac_ext <<_ACEOF
13916 /* confdefs.h.  */
13917 _ACEOF
13918 cat confdefs.h >>conftest.$ac_ext
13919 cat >>conftest.$ac_ext <<_ACEOF
13920 /* end confdefs.h.  */
13921
13922 /* Override any GCC internal prototype to avoid an error.
13923    Use char because int might match the return type of a GCC
13924    builtin and then its argument prototype would still apply.  */
13925 #ifdef __cplusplus
13926 extern "C"
13927 #endif
13928 char res_search ();
13929 int
13930 main ()
13931 {
13932 return res_search ();
13933   ;
13934   return 0;
13935 }
13936 _ACEOF
13937 rm -f conftest.$ac_objext conftest$ac_exeext
13938 if { (ac_try="$ac_link"
13939 case "(($ac_try" in
13940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13941   *) ac_try_echo=$ac_try;;
13942 esac
13943 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13944   (eval "$ac_link") 2>conftest.er1
13945   ac_status=$?
13946   grep -v '^ *+' conftest.er1 >conftest.err
13947   rm -f conftest.er1
13948   cat conftest.err >&5
13949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950   (exit $ac_status); } && {
13951          test -z "$ac_c_werror_flag" ||
13952          test ! -s conftest.err
13953        } && test -s conftest$ac_exeext &&
13954        $as_test_x conftest$ac_exeext; then
13955   ac_cv_lib_resolv_res_search=yes
13956 else
13957   echo "$as_me: failed program was:" >&5
13958 sed 's/^/| /' conftest.$ac_ext >&5
13959
13960         ac_cv_lib_resolv_res_search=no
13961 fi
13962
13963 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13964       conftest$ac_exeext conftest.$ac_ext
13965 LIBS=$ac_check_lib_save_LIBS
13966 fi
13967 { echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13968 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
13969 if test $ac_cv_lib_resolv_res_search = yes; then
13970   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13971 else
13972   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13973 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13974
13975 fi
13976
13977 fi
13978
13979   fi
13980 fi
13981
13982
13983 ###############################################################################
13984 #
13985 #       Check for the nine billion variants of shadow passwords...
13986 #
13987 ###############################################################################
13988
13989 need_setuid=no
13990
13991 have_shadow=no
13992 with_shadow_req=unspecified
13993
13994
13995 # Check whether --with-shadow was given.
13996 if test "${with_shadow+set}" = set; then
13997   withval=$with_shadow; with_shadow="$withval"; with_shadow_req="$withval"
13998 else
13999   with_shadow=yes
14000 fi
14001
14002
14003
14004    case "$with_shadow" in
14005     yes) ;;
14006     no)  ;;
14007
14008     /*)
14009      { echo "$as_me:$LINENO: checking for shadow password headers" >&5
14010 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6; }
14011      d=$with_shadow/include
14012      if test -d $d; then
14013        X_CFLAGS="-I$d $X_CFLAGS"
14014        { echo "$as_me:$LINENO: result: $d" >&5
14015 echo "${ECHO_T}$d" >&6; }
14016      else
14017        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14018 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14019      fi
14020
14021      { echo "$as_me:$LINENO: checking for shadow password libs" >&5
14022 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6; }
14023      d=$with_shadow/lib
14024      if test -d $d; then
14025        X_LIBS="-L$d $X_LIBS"
14026        { echo "$as_me:$LINENO: result: $d" >&5
14027 echo "${ECHO_T}$d" >&6; }
14028      else
14029        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14030 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
14031      fi
14032
14033      # replace the directory string with "yes".
14034      with_shadow_req="yes"
14035      with_shadow=$with_shadow_req
14036      ;;
14037
14038     *)
14039      echo ""
14040      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
14041      echo "       If it is a directory, then \`DIR/include' will be added to"
14042      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14043      exit 1
14044      ;;
14045    esac
14046
14047
14048 if test "$enable_locking" = no ; then
14049   with_shadow_req=no
14050   with_shadow=no
14051 fi
14052
14053
14054 ###############################################################################
14055 #
14056 #       Check for Sun "adjunct" passwords.
14057 #
14058 ###############################################################################
14059
14060 if test "$with_shadow" = yes ; then
14061   { echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
14062 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6; }
14063 if test "${ac_cv_sun_adjunct+set}" = set; then
14064   echo $ECHO_N "(cached) $ECHO_C" >&6
14065 else
14066
14067   ac_save_CPPFLAGS="$CPPFLAGS"
14068   if test \! -z "$includedir" ; then
14069     CPPFLAGS="$CPPFLAGS -I$includedir"
14070   fi
14071   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14072   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14073   cat >conftest.$ac_ext <<_ACEOF
14074 /* confdefs.h.  */
14075 _ACEOF
14076 cat confdefs.h >>conftest.$ac_ext
14077 cat >>conftest.$ac_ext <<_ACEOF
14078 /* end confdefs.h.  */
14079 #include <stdlib.h>
14080                                     #include <unistd.h>
14081                                     #include <sys/types.h>
14082                                     #include <sys/label.h>
14083                                     #include <sys/audit.h>
14084                                     #include <pwdadj.h>
14085 int
14086 main ()
14087 {
14088 struct passwd_adjunct *p = getpwanam("nobody");
14089                        const char *pw = p->pwa_passwd;
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext
14095 if { (ac_try="$ac_compile"
14096 case "(($ac_try" in
14097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14098   *) ac_try_echo=$ac_try;;
14099 esac
14100 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14101   (eval "$ac_compile") 2>conftest.er1
14102   ac_status=$?
14103   grep -v '^ *+' conftest.er1 >conftest.err
14104   rm -f conftest.er1
14105   cat conftest.err >&5
14106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107   (exit $ac_status); } && {
14108          test -z "$ac_c_werror_flag" ||
14109          test ! -s conftest.err
14110        } && test -s conftest.$ac_objext; then
14111   ac_cv_sun_adjunct=yes
14112 else
14113   echo "$as_me: failed program was:" >&5
14114 sed 's/^/| /' conftest.$ac_ext >&5
14115
14116         ac_cv_sun_adjunct=no
14117 fi
14118
14119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14120   CPPFLAGS="$ac_save_CPPFLAGS"
14121 fi
14122 { echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
14123 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6; }
14124   if test "$ac_cv_sun_adjunct" = yes; then
14125     have_shadow_adjunct=yes
14126     have_shadow=yes
14127     need_setuid=yes
14128   fi
14129 fi
14130
14131
14132 ###############################################################################
14133 #
14134 #       Check for DEC and SCO so-called "enhanced" security.
14135 #
14136 ###############################################################################
14137
14138 if test "$with_shadow" = yes ; then
14139   { echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
14140 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6; }
14141 if test "${ac_cv_enhanced_passwd+set}" = set; then
14142   echo $ECHO_N "(cached) $ECHO_C" >&6
14143 else
14144
14145   ac_save_CPPFLAGS="$CPPFLAGS"
14146   if test \! -z "$includedir" ; then
14147     CPPFLAGS="$CPPFLAGS -I$includedir"
14148   fi
14149   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14150   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14151   cat >conftest.$ac_ext <<_ACEOF
14152 /* confdefs.h.  */
14153 _ACEOF
14154 cat confdefs.h >>conftest.$ac_ext
14155 cat >>conftest.$ac_ext <<_ACEOF
14156 /* end confdefs.h.  */
14157 #include <stdlib.h>
14158                                     #include <unistd.h>
14159                                     #include <sys/types.h>
14160                                     #include <pwd.h>
14161                                     #include <sys/security.h>
14162                                     #include <prot.h>
14163 int
14164 main ()
14165 {
14166 struct pr_passwd *p;
14167                        const char *pw;
14168                        set_auth_parameters(0, 0);
14169                        check_auth_parameters();
14170                        p = getprpwnam("nobody");
14171                        pw = p->ufld.fd_encrypt;
14172   ;
14173   return 0;
14174 }
14175 _ACEOF
14176 rm -f conftest.$ac_objext
14177 if { (ac_try="$ac_compile"
14178 case "(($ac_try" in
14179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14180   *) ac_try_echo=$ac_try;;
14181 esac
14182 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14183   (eval "$ac_compile") 2>conftest.er1
14184   ac_status=$?
14185   grep -v '^ *+' conftest.er1 >conftest.err
14186   rm -f conftest.er1
14187   cat conftest.err >&5
14188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14189   (exit $ac_status); } && {
14190          test -z "$ac_c_werror_flag" ||
14191          test ! -s conftest.err
14192        } && test -s conftest.$ac_objext; then
14193   ac_cv_enhanced_passwd=yes
14194 else
14195   echo "$as_me: failed program was:" >&5
14196 sed 's/^/| /' conftest.$ac_ext >&5
14197
14198         ac_cv_enhanced_passwd=no
14199 fi
14200
14201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202   CPPFLAGS="$ac_save_CPPFLAGS"
14203 fi
14204 { echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
14205 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6; }
14206   if test $ac_cv_enhanced_passwd = yes; then
14207     have_shadow_enhanced=yes
14208     have_shadow=yes
14209     need_setuid=yes
14210
14211     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
14212     # (I'm told it needs -lcurses too, but I don't understand why.)
14213     # But on DEC, it's in -lsecurity.
14214     #
14215     { echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
14216 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6; }
14217 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
14218   echo $ECHO_N "(cached) $ECHO_C" >&6
14219 else
14220   ac_check_lib_save_LIBS=$LIBS
14221 LIBS="-lprot -lx $LIBS"
14222 cat >conftest.$ac_ext <<_ACEOF
14223 /* confdefs.h.  */
14224 _ACEOF
14225 cat confdefs.h >>conftest.$ac_ext
14226 cat >>conftest.$ac_ext <<_ACEOF
14227 /* end confdefs.h.  */
14228
14229 /* Override any GCC internal prototype to avoid an error.
14230    Use char because int might match the return type of a GCC
14231    builtin and then its argument prototype would still apply.  */
14232 #ifdef __cplusplus
14233 extern "C"
14234 #endif
14235 char getprpwnam ();
14236 int
14237 main ()
14238 {
14239 return getprpwnam ();
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f conftest.$ac_objext conftest$ac_exeext
14245 if { (ac_try="$ac_link"
14246 case "(($ac_try" in
14247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14248   *) ac_try_echo=$ac_try;;
14249 esac
14250 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14251   (eval "$ac_link") 2>conftest.er1
14252   ac_status=$?
14253   grep -v '^ *+' conftest.er1 >conftest.err
14254   rm -f conftest.er1
14255   cat conftest.err >&5
14256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257   (exit $ac_status); } && {
14258          test -z "$ac_c_werror_flag" ||
14259          test ! -s conftest.err
14260        } && test -s conftest$ac_exeext &&
14261        $as_test_x conftest$ac_exeext; then
14262   ac_cv_lib_prot_getprpwnam=yes
14263 else
14264   echo "$as_me: failed program was:" >&5
14265 sed 's/^/| /' conftest.$ac_ext >&5
14266
14267         ac_cv_lib_prot_getprpwnam=no
14268 fi
14269
14270 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14271       conftest$ac_exeext conftest.$ac_ext
14272 LIBS=$ac_check_lib_save_LIBS
14273 fi
14274 { echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
14275 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6; }
14276 if test $ac_cv_lib_prot_getprpwnam = yes; then
14277   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
14278 else
14279   { echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
14280 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6; }
14281 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284   ac_check_lib_save_LIBS=$LIBS
14285 LIBS="-lsecurity  $LIBS"
14286 cat >conftest.$ac_ext <<_ACEOF
14287 /* confdefs.h.  */
14288 _ACEOF
14289 cat confdefs.h >>conftest.$ac_ext
14290 cat >>conftest.$ac_ext <<_ACEOF
14291 /* end confdefs.h.  */
14292
14293 /* Override any GCC internal prototype to avoid an error.
14294    Use char because int might match the return type of a GCC
14295    builtin and then its argument prototype would still apply.  */
14296 #ifdef __cplusplus
14297 extern "C"
14298 #endif
14299 char getprpwnam ();
14300 int
14301 main ()
14302 {
14303 return getprpwnam ();
14304   ;
14305   return 0;
14306 }
14307 _ACEOF
14308 rm -f conftest.$ac_objext conftest$ac_exeext
14309 if { (ac_try="$ac_link"
14310 case "(($ac_try" in
14311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14312   *) ac_try_echo=$ac_try;;
14313 esac
14314 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14315   (eval "$ac_link") 2>conftest.er1
14316   ac_status=$?
14317   grep -v '^ *+' conftest.er1 >conftest.err
14318   rm -f conftest.er1
14319   cat conftest.err >&5
14320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321   (exit $ac_status); } && {
14322          test -z "$ac_c_werror_flag" ||
14323          test ! -s conftest.err
14324        } && test -s conftest$ac_exeext &&
14325        $as_test_x conftest$ac_exeext; then
14326   ac_cv_lib_security_getprpwnam=yes
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 sed 's/^/| /' conftest.$ac_ext >&5
14330
14331         ac_cv_lib_security_getprpwnam=no
14332 fi
14333
14334 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14335       conftest$ac_exeext conftest.$ac_ext
14336 LIBS=$ac_check_lib_save_LIBS
14337 fi
14338 { echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
14339 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6; }
14340 if test $ac_cv_lib_security_getprpwnam = yes; then
14341   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
14342 fi
14343
14344 fi
14345
14346   fi
14347 fi
14348
14349 ###############################################################################
14350 #
14351 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
14352 #
14353 ###############################################################################
14354
14355 if test "$with_shadow" = yes ; then
14356   { echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
14357 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6; }
14358 if test "${ac_cv_hpux_passwd+set}" = set; then
14359   echo $ECHO_N "(cached) $ECHO_C" >&6
14360 else
14361
14362   ac_save_CPPFLAGS="$CPPFLAGS"
14363   if test \! -z "$includedir" ; then
14364     CPPFLAGS="$CPPFLAGS -I$includedir"
14365   fi
14366   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14367   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14368   cat >conftest.$ac_ext <<_ACEOF
14369 /* confdefs.h.  */
14370 _ACEOF
14371 cat confdefs.h >>conftest.$ac_ext
14372 cat >>conftest.$ac_ext <<_ACEOF
14373 /* end confdefs.h.  */
14374 #include <stdlib.h>
14375                                     #include <unistd.h>
14376                                     #include <sys/types.h>
14377                                     #include <pwd.h>
14378                                     #include <hpsecurity.h>
14379                                     #include <prot.h>
14380 int
14381 main ()
14382 {
14383 struct s_passwd *p = getspwnam("nobody");
14384                        const char *pw = p->pw_passwd;
14385   ;
14386   return 0;
14387 }
14388 _ACEOF
14389 rm -f conftest.$ac_objext
14390 if { (ac_try="$ac_compile"
14391 case "(($ac_try" in
14392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14393   *) ac_try_echo=$ac_try;;
14394 esac
14395 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14396   (eval "$ac_compile") 2>conftest.er1
14397   ac_status=$?
14398   grep -v '^ *+' conftest.er1 >conftest.err
14399   rm -f conftest.er1
14400   cat conftest.err >&5
14401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402   (exit $ac_status); } && {
14403          test -z "$ac_c_werror_flag" ||
14404          test ! -s conftest.err
14405        } && test -s conftest.$ac_objext; then
14406   ac_cv_hpux_passwd=yes
14407 else
14408   echo "$as_me: failed program was:" >&5
14409 sed 's/^/| /' conftest.$ac_ext >&5
14410
14411         ac_cv_hpux_passwd=no
14412 fi
14413
14414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14415   CPPFLAGS="$ac_save_CPPFLAGS"
14416 fi
14417 { echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14418 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6; }
14419   if test "$ac_cv_hpux_passwd" = yes; then
14420     have_shadow_hpux=yes
14421     have_shadow=yes
14422     need_setuid=yes
14423
14424     # on HPUX, bigcrypt is in -lsec
14425     { echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14426 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6; }
14427 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14428   echo $ECHO_N "(cached) $ECHO_C" >&6
14429 else
14430   ac_check_lib_save_LIBS=$LIBS
14431 LIBS="-lsec  $LIBS"
14432 cat >conftest.$ac_ext <<_ACEOF
14433 /* confdefs.h.  */
14434 _ACEOF
14435 cat confdefs.h >>conftest.$ac_ext
14436 cat >>conftest.$ac_ext <<_ACEOF
14437 /* end confdefs.h.  */
14438
14439 /* Override any GCC internal prototype to avoid an error.
14440    Use char because int might match the return type of a GCC
14441    builtin and then its argument prototype would still apply.  */
14442 #ifdef __cplusplus
14443 extern "C"
14444 #endif
14445 char bigcrypt ();
14446 int
14447 main ()
14448 {
14449 return bigcrypt ();
14450   ;
14451   return 0;
14452 }
14453 _ACEOF
14454 rm -f conftest.$ac_objext conftest$ac_exeext
14455 if { (ac_try="$ac_link"
14456 case "(($ac_try" in
14457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14458   *) ac_try_echo=$ac_try;;
14459 esac
14460 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14461   (eval "$ac_link") 2>conftest.er1
14462   ac_status=$?
14463   grep -v '^ *+' conftest.er1 >conftest.err
14464   rm -f conftest.er1
14465   cat conftest.err >&5
14466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14467   (exit $ac_status); } && {
14468          test -z "$ac_c_werror_flag" ||
14469          test ! -s conftest.err
14470        } && test -s conftest$ac_exeext &&
14471        $as_test_x conftest$ac_exeext; then
14472   ac_cv_lib_sec_bigcrypt=yes
14473 else
14474   echo "$as_me: failed program was:" >&5
14475 sed 's/^/| /' conftest.$ac_ext >&5
14476
14477         ac_cv_lib_sec_bigcrypt=no
14478 fi
14479
14480 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14481       conftest$ac_exeext conftest.$ac_ext
14482 LIBS=$ac_check_lib_save_LIBS
14483 fi
14484 { echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14485 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6; }
14486 if test $ac_cv_lib_sec_bigcrypt = yes; then
14487   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14488 fi
14489
14490   fi
14491 fi
14492
14493
14494 ###############################################################################
14495 #
14496 #       Check for FreeBSD-style shadow passwords.
14497 #
14498 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14499 #       password systems -- except you only get stuff in the pw_passwd field
14500 #       if the running program is setuid.  So, guess that we've got this
14501 #       lossage to contend with if /etc/master.passwd exists, and default to
14502 #       a setuid installation.
14503 #
14504 ###############################################################################
14505
14506 if test "$with_shadow" = yes ; then
14507   { echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14508 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6; }
14509 if test "${ac_cv_master_passwd+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512   if test -f /etc/master.passwd ; then
14513                     ac_cv_master_passwd=yes
14514                   else
14515                     ac_cv_master_passwd=no
14516                   fi
14517 fi
14518 { echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14519 echo "${ECHO_T}$ac_cv_master_passwd" >&6; }
14520   if test "$ac_cv_master_passwd" = yes; then
14521     need_setuid=yes
14522   fi
14523 fi
14524
14525
14526 ###############################################################################
14527 #
14528 #       Check for traditional (ha!) shadow passwords.
14529 #
14530 ###############################################################################
14531
14532 if test "$with_shadow" = yes ; then
14533   { echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14534 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6; }
14535 if test "${ac_cv_shadow+set}" = set; then
14536   echo $ECHO_N "(cached) $ECHO_C" >&6
14537 else
14538
14539   ac_save_CPPFLAGS="$CPPFLAGS"
14540   if test \! -z "$includedir" ; then
14541     CPPFLAGS="$CPPFLAGS -I$includedir"
14542   fi
14543   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14544   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
14545   cat >conftest.$ac_ext <<_ACEOF
14546 /* confdefs.h.  */
14547 _ACEOF
14548 cat confdefs.h >>conftest.$ac_ext
14549 cat >>conftest.$ac_ext <<_ACEOF
14550 /* end confdefs.h.  */
14551 #include <stdlib.h>
14552                                     #include <unistd.h>
14553                                     #include <sys/types.h>
14554                                     #include <pwd.h>
14555                                     #include <shadow.h>
14556 int
14557 main ()
14558 {
14559 struct spwd *p = getspnam("nobody");
14560                        const char *pw = p->sp_pwdp;
14561   ;
14562   return 0;
14563 }
14564 _ACEOF
14565 rm -f conftest.$ac_objext
14566 if { (ac_try="$ac_compile"
14567 case "(($ac_try" in
14568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14569   *) ac_try_echo=$ac_try;;
14570 esac
14571 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14572   (eval "$ac_compile") 2>conftest.er1
14573   ac_status=$?
14574   grep -v '^ *+' conftest.er1 >conftest.err
14575   rm -f conftest.er1
14576   cat conftest.err >&5
14577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14578   (exit $ac_status); } && {
14579          test -z "$ac_c_werror_flag" ||
14580          test ! -s conftest.err
14581        } && test -s conftest.$ac_objext; then
14582   ac_cv_shadow=yes
14583 else
14584   echo "$as_me: failed program was:" >&5
14585 sed 's/^/| /' conftest.$ac_ext >&5
14586
14587         ac_cv_shadow=no
14588 fi
14589
14590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14591   CPPFLAGS="$ac_save_CPPFLAGS"
14592 fi
14593 { echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14594 echo "${ECHO_T}$ac_cv_shadow" >&6; }
14595   if test "$ac_cv_shadow" = yes; then
14596     have_shadow=yes
14597     need_setuid=yes
14598
14599     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14600     have_getspnam=no
14601     { echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14602 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6; }
14603 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14604   echo $ECHO_N "(cached) $ECHO_C" >&6
14605 else
14606   ac_check_lib_save_LIBS=$LIBS
14607 LIBS="-lc  $LIBS"
14608 cat >conftest.$ac_ext <<_ACEOF
14609 /* confdefs.h.  */
14610 _ACEOF
14611 cat confdefs.h >>conftest.$ac_ext
14612 cat >>conftest.$ac_ext <<_ACEOF
14613 /* end confdefs.h.  */
14614
14615 /* Override any GCC internal prototype to avoid an error.
14616    Use char because int might match the return type of a GCC
14617    builtin and then its argument prototype would still apply.  */
14618 #ifdef __cplusplus
14619 extern "C"
14620 #endif
14621 char getspnam ();
14622 int
14623 main ()
14624 {
14625 return getspnam ();
14626   ;
14627   return 0;
14628 }
14629 _ACEOF
14630 rm -f conftest.$ac_objext conftest$ac_exeext
14631 if { (ac_try="$ac_link"
14632 case "(($ac_try" in
14633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14634   *) ac_try_echo=$ac_try;;
14635 esac
14636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14637   (eval "$ac_link") 2>conftest.er1
14638   ac_status=$?
14639   grep -v '^ *+' conftest.er1 >conftest.err
14640   rm -f conftest.er1
14641   cat conftest.err >&5
14642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643   (exit $ac_status); } && {
14644          test -z "$ac_c_werror_flag" ||
14645          test ! -s conftest.err
14646        } && test -s conftest$ac_exeext &&
14647        $as_test_x conftest$ac_exeext; then
14648   ac_cv_lib_c_getspnam=yes
14649 else
14650   echo "$as_me: failed program was:" >&5
14651 sed 's/^/| /' conftest.$ac_ext >&5
14652
14653         ac_cv_lib_c_getspnam=no
14654 fi
14655
14656 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14657       conftest$ac_exeext conftest.$ac_ext
14658 LIBS=$ac_check_lib_save_LIBS
14659 fi
14660 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14661 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6; }
14662 if test $ac_cv_lib_c_getspnam = yes; then
14663   have_getspnam=yes
14664 fi
14665
14666     if test "$have_getspnam" = no ; then
14667       { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14668 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
14669 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14670   echo $ECHO_N "(cached) $ECHO_C" >&6
14671 else
14672   ac_check_lib_save_LIBS=$LIBS
14673 LIBS="-lgen  $LIBS"
14674 cat >conftest.$ac_ext <<_ACEOF
14675 /* confdefs.h.  */
14676 _ACEOF
14677 cat confdefs.h >>conftest.$ac_ext
14678 cat >>conftest.$ac_ext <<_ACEOF
14679 /* end confdefs.h.  */
14680
14681 /* Override any GCC internal prototype to avoid an error.
14682    Use char because int might match the return type of a GCC
14683    builtin and then its argument prototype would still apply.  */
14684 #ifdef __cplusplus
14685 extern "C"
14686 #endif
14687 char getspnam ();
14688 int
14689 main ()
14690 {
14691 return getspnam ();
14692   ;
14693   return 0;
14694 }
14695 _ACEOF
14696 rm -f conftest.$ac_objext conftest$ac_exeext
14697 if { (ac_try="$ac_link"
14698 case "(($ac_try" in
14699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14700   *) ac_try_echo=$ac_try;;
14701 esac
14702 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14703   (eval "$ac_link") 2>conftest.er1
14704   ac_status=$?
14705   grep -v '^ *+' conftest.er1 >conftest.err
14706   rm -f conftest.er1
14707   cat conftest.err >&5
14708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14709   (exit $ac_status); } && {
14710          test -z "$ac_c_werror_flag" ||
14711          test ! -s conftest.err
14712        } && test -s conftest$ac_exeext &&
14713        $as_test_x conftest$ac_exeext; then
14714   ac_cv_lib_gen_getspnam=yes
14715 else
14716   echo "$as_me: failed program was:" >&5
14717 sed 's/^/| /' conftest.$ac_ext >&5
14718
14719         ac_cv_lib_gen_getspnam=no
14720 fi
14721
14722 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14723       conftest$ac_exeext conftest.$ac_ext
14724 LIBS=$ac_check_lib_save_LIBS
14725 fi
14726 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14727 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
14728 if test $ac_cv_lib_gen_getspnam = yes; then
14729   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14730 fi
14731
14732     fi
14733   fi
14734 fi
14735
14736
14737 ###############################################################################
14738 #
14739 #       Check for other libraries needed for non-shadow passwords.
14740 #
14741 ###############################################################################
14742
14743 if test "$enable_locking" = yes ; then
14744
14745   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14746   have_crypt=no
14747   { echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14748 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6; }
14749 if test "${ac_cv_lib_c_crypt+set}" = set; then
14750   echo $ECHO_N "(cached) $ECHO_C" >&6
14751 else
14752   ac_check_lib_save_LIBS=$LIBS
14753 LIBS="-lc  $LIBS"
14754 cat >conftest.$ac_ext <<_ACEOF
14755 /* confdefs.h.  */
14756 _ACEOF
14757 cat confdefs.h >>conftest.$ac_ext
14758 cat >>conftest.$ac_ext <<_ACEOF
14759 /* end confdefs.h.  */
14760
14761 /* Override any GCC internal prototype to avoid an error.
14762    Use char because int might match the return type of a GCC
14763    builtin and then its argument prototype would still apply.  */
14764 #ifdef __cplusplus
14765 extern "C"
14766 #endif
14767 char crypt ();
14768 int
14769 main ()
14770 {
14771 return crypt ();
14772   ;
14773   return 0;
14774 }
14775 _ACEOF
14776 rm -f conftest.$ac_objext conftest$ac_exeext
14777 if { (ac_try="$ac_link"
14778 case "(($ac_try" in
14779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14780   *) ac_try_echo=$ac_try;;
14781 esac
14782 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14783   (eval "$ac_link") 2>conftest.er1
14784   ac_status=$?
14785   grep -v '^ *+' conftest.er1 >conftest.err
14786   rm -f conftest.er1
14787   cat conftest.err >&5
14788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789   (exit $ac_status); } && {
14790          test -z "$ac_c_werror_flag" ||
14791          test ! -s conftest.err
14792        } && test -s conftest$ac_exeext &&
14793        $as_test_x conftest$ac_exeext; then
14794   ac_cv_lib_c_crypt=yes
14795 else
14796   echo "$as_me: failed program was:" >&5
14797 sed 's/^/| /' conftest.$ac_ext >&5
14798
14799         ac_cv_lib_c_crypt=no
14800 fi
14801
14802 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14803       conftest$ac_exeext conftest.$ac_ext
14804 LIBS=$ac_check_lib_save_LIBS
14805 fi
14806 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14807 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6; }
14808 if test $ac_cv_lib_c_crypt = yes; then
14809   have_crypt=yes
14810 fi
14811
14812   if test "$have_crypt" = no ; then
14813     { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14814 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
14815 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14816   echo $ECHO_N "(cached) $ECHO_C" >&6
14817 else
14818   ac_check_lib_save_LIBS=$LIBS
14819 LIBS="-lcrypt  $LIBS"
14820 cat >conftest.$ac_ext <<_ACEOF
14821 /* confdefs.h.  */
14822 _ACEOF
14823 cat confdefs.h >>conftest.$ac_ext
14824 cat >>conftest.$ac_ext <<_ACEOF
14825 /* end confdefs.h.  */
14826
14827 /* Override any GCC internal prototype to avoid an error.
14828    Use char because int might match the return type of a GCC
14829    builtin and then its argument prototype would still apply.  */
14830 #ifdef __cplusplus
14831 extern "C"
14832 #endif
14833 char crypt ();
14834 int
14835 main ()
14836 {
14837 return crypt ();
14838   ;
14839   return 0;
14840 }
14841 _ACEOF
14842 rm -f conftest.$ac_objext conftest$ac_exeext
14843 if { (ac_try="$ac_link"
14844 case "(($ac_try" in
14845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14846   *) ac_try_echo=$ac_try;;
14847 esac
14848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14849   (eval "$ac_link") 2>conftest.er1
14850   ac_status=$?
14851   grep -v '^ *+' conftest.er1 >conftest.err
14852   rm -f conftest.er1
14853   cat conftest.err >&5
14854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855   (exit $ac_status); } && {
14856          test -z "$ac_c_werror_flag" ||
14857          test ! -s conftest.err
14858        } && test -s conftest$ac_exeext &&
14859        $as_test_x conftest$ac_exeext; then
14860   ac_cv_lib_crypt_crypt=yes
14861 else
14862   echo "$as_me: failed program was:" >&5
14863 sed 's/^/| /' conftest.$ac_ext >&5
14864
14865         ac_cv_lib_crypt_crypt=no
14866 fi
14867
14868 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14869       conftest$ac_exeext conftest.$ac_ext
14870 LIBS=$ac_check_lib_save_LIBS
14871 fi
14872 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14873 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
14874 if test $ac_cv_lib_crypt_crypt = yes; then
14875   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14876 fi
14877
14878   fi
14879 fi
14880
14881
14882 # Most of the above shadow mechanisms will have set need_setuid to yes,
14883 # if they were found.  But, on some systems, we need setuid even when
14884 # using plain old vanilla passwords.
14885 #
14886 if test "$enable_locking" = yes ; then
14887   case "$host" in
14888     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14889       need_setuid=yes
14890     ;;
14891   esac
14892 fi
14893
14894
14895 if test "$have_shadow_adjunct" = yes ; then
14896   cat >>confdefs.h <<\_ACEOF
14897 #define HAVE_ADJUNCT_PASSWD 1
14898 _ACEOF
14899
14900 elif test "$have_shadow_enhanced" = yes ; then
14901   cat >>confdefs.h <<\_ACEOF
14902 #define HAVE_ENHANCED_PASSWD 1
14903 _ACEOF
14904
14905 elif test "$have_shadow_hpux" = yes ; then
14906   cat >>confdefs.h <<\_ACEOF
14907 #define HAVE_HPUX_PASSWD 1
14908 _ACEOF
14909
14910 elif test "$have_shadow" = yes ; then
14911   cat >>confdefs.h <<\_ACEOF
14912 #define HAVE_SHADOW_PASSWD 1
14913 _ACEOF
14914
14915 fi
14916
14917
14918 ###############################################################################
14919 #
14920 #       Check for external password helper
14921 #       On SuSE, instead of having xscreensaver be a setuid program, they
14922 #       fork an external program that takes the password on stdin, and
14923 #       returns true if that password is a valid one.  Then only that
14924 #       smaller program needs to be setuid.
14925 #
14926 #       (Note that this external program is not a GUI: the GUI is still
14927 #       all in xscreensaver itself; the external program just does auth.)
14928 #
14929 ###############################################################################
14930
14931 have_passwd_helper=no
14932 with_passwd_helper_req=unspecified
14933
14934
14935 # Check whether --with-passwd-helper was given.
14936 if test "${with_passwd_helper+set}" = set; then
14937   withval=$with_passwd_helper; with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14938 else
14939   with_passwd_helper=no
14940 fi
14941
14942 # no HANDLE_X_PATH_ARG for this one
14943
14944 if test "$enable_locking" = no ; then
14945   with_passwd_helper_req=no
14946   with_passwd_helper=no
14947 fi
14948
14949 case "$with_passwd_helper" in
14950   ""|no) : ;;
14951   /*)
14952     cat >>confdefs.h <<_ACEOF
14953 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14954 _ACEOF
14955
14956     have_passwd_helper=yes;;
14957   *)
14958     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14959     exit 1
14960 esac
14961
14962
14963 ###############################################################################
14964 #
14965 #       Check for a login manager for a "New Login" button on the lock dialog.
14966 #       Usually this will be "/usr/bin/gdmflexiserver".
14967 #
14968 ###############################################################################
14969
14970 have_login_manager=no
14971 with_login_manager_req=unspecified
14972 default_login_manager='gdmflexiserver -ls'
14973
14974
14975 # Check whether --with-login-manager was given.
14976 if test "${with_login_manager+set}" = set; then
14977   withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
14978 else
14979   with_login_manager=no
14980 fi
14981
14982 # no HANDLE_X_PATH_ARG for this one
14983
14984 if test "$enable_locking" = no ; then
14985   with_login_manager_req=no
14986   with_login_manager=no
14987 fi
14988
14989 if test -n "$with_login_manager_req" ; then
14990   ac_cv_login_manager_program=""
14991
14992  if test "$with_login_manager_req" = "yes" ; then
14993    with_login_manager_req=$default_login_manager
14994  fi
14995
14996   case "$with_login_manager_req" in
14997     no)
14998       with_login_manager=""
14999     ;;
15000     /*)
15001       # absolute path
15002       set dummy $with_login_manager_req ; login_manager_tmp=$2
15003       { echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
15004 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6; }
15005       if test -x "$login_manager_tmp" ; then
15006         { echo "$as_me:$LINENO: result: yes" >&5
15007 echo "${ECHO_T}yes" >&6; }
15008       else
15009         { echo "$as_me:$LINENO: result: no" >&5
15010 echo "${ECHO_T}no" >&6; }
15011         with_login_manager=""
15012       fi
15013     ;;
15014     *)
15015       # relative path
15016       set dummy $with_login_manager_req ; login_manager_tmp=$2
15017       # don't cache
15018       unset ac_cv_path_login_manager_tmp
15019       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
15020 set dummy $login_manager_tmp; ac_word=$2
15021 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15023 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
15024   echo $ECHO_N "(cached) $ECHO_C" >&6
15025 else
15026   case $login_manager_tmp in
15027   [\\/]* | ?:[\\/]*)
15028   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
15029   ;;
15030   *)
15031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15032 for as_dir in $PATH
15033 do
15034   IFS=$as_save_IFS
15035   test -z "$as_dir" && as_dir=.
15036   for ac_exec_ext in '' $ac_executable_extensions; do
15037   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15038     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
15039     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15040     break 2
15041   fi
15042 done
15043 done
15044 IFS=$as_save_IFS
15045
15046   ;;
15047 esac
15048 fi
15049 login_manager_tmp=$ac_cv_path_login_manager_tmp
15050 if test -n "$login_manager_tmp"; then
15051   { echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
15052 echo "${ECHO_T}$login_manager_tmp" >&6; }
15053 else
15054   { echo "$as_me:$LINENO: result: no" >&5
15055 echo "${ECHO_T}no" >&6; }
15056 fi
15057
15058
15059       if test -z "$login_manager_tmp" ; then
15060         with_login_manager=""
15061       else
15062         with_login_manager="$login_manager_tmp"
15063       fi
15064     ;;
15065   esac
15066   ac_cv_login_manager_program="$with_login_manager"
15067
15068 elif test -n "$ac_cv_login_manager_program"; then
15069   { echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
15070 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6; }
15071 fi
15072
15073 NEW_LOGIN_COMMAND_P=''
15074 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
15075
15076 if test -z "$NEW_LOGIN_COMMAND" ; then
15077   NEW_LOGIN_COMMAND="$default_login_manager"
15078   NEW_LOGIN_COMMAND_P='! '
15079 fi
15080
15081
15082
15083 ###############################################################################
15084 #
15085 #       Check for -lgtk (and Gnome stuff)
15086 #
15087 ###############################################################################
15088
15089 have_gtk=no
15090 with_gtk_req=unspecified
15091
15092 # Check whether --with-gtk was given.
15093 if test "${with_gtk+set}" = set; then
15094   withval=$with_gtk; with_gtk="$withval"; with_gtk_req="$withval"
15095 else
15096   with_gtk=yes
15097 fi
15098
15099
15100 # if --with-gtk=/directory/ was specified, remember that directory so that
15101 # we can also look for the `gtk-config' program in that directory.
15102 case "$with_gtk" in
15103   /*)
15104     gtk_dir="$with_gtk"
15105     ;;
15106   *)
15107     gtk_dir=""
15108     ;;
15109 esac
15110
15111
15112    case "$with_gtk" in
15113     yes) ;;
15114     no)  ;;
15115
15116     /*)
15117      { echo "$as_me:$LINENO: checking for Gtk headers" >&5
15118 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6; }
15119      d=$with_gtk/include
15120      if test -d $d; then
15121        X_CFLAGS="-I$d $X_CFLAGS"
15122        { echo "$as_me:$LINENO: result: $d" >&5
15123 echo "${ECHO_T}$d" >&6; }
15124      else
15125        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15126 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15127      fi
15128
15129      { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15130 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15131      d=$with_gtk/lib
15132      if test -d $d; then
15133        X_LIBS="-L$d $X_LIBS"
15134        { echo "$as_me:$LINENO: result: $d" >&5
15135 echo "${ECHO_T}$d" >&6; }
15136      else
15137        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15138 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15139      fi
15140
15141      # replace the directory string with "yes".
15142      with_gtk_req="yes"
15143      with_gtk=$with_gtk_req
15144      ;;
15145
15146     *)
15147      echo ""
15148      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
15149      echo "       If it is a directory, then \`DIR/include' will be added to"
15150      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15151      exit 1
15152      ;;
15153    esac
15154
15155
15156 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
15157   echo "error: must be yes or no: --with-gtk=$with_gtk"
15158   exit 1
15159 fi
15160
15161
15162 parse_gtk_version_string() {
15163   # M4 sucks!!
15164
15165   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
15166   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
15167
15168   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
15169   if test -z "$ac_gtk_version"; then
15170     ac_gtk_version=unknown
15171     ac_gtk_version_string=unknown
15172   fi
15173 }
15174
15175 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
15176 # if the user specified --with-gtk=/foo/ then look there.
15177 #
15178 gtk_path="$PATH"
15179 if test ! -z "$gtk_dir"; then
15180   # canonicalize slashes.
15181   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15182   gtk_path="$foo:$gtk_path"
15183 fi
15184
15185 for ac_prog in pkg-config
15186 do
15187   # Extract the first word of "$ac_prog", so it can be a program name with args.
15188 set dummy $ac_prog; ac_word=$2
15189 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15191 if test "${ac_cv_path_pkg_config+set}" = set; then
15192   echo $ECHO_N "(cached) $ECHO_C" >&6
15193 else
15194   case $pkg_config in
15195   [\\/]* | ?:[\\/]*)
15196   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15197   ;;
15198   *)
15199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15200 for as_dir in $gtk_path
15201 do
15202   IFS=$as_save_IFS
15203   test -z "$as_dir" && as_dir=.
15204   for ac_exec_ext in '' $ac_executable_extensions; do
15205   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15206     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15207     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15208     break 2
15209   fi
15210 done
15211 done
15212 IFS=$as_save_IFS
15213
15214   ;;
15215 esac
15216 fi
15217 pkg_config=$ac_cv_path_pkg_config
15218 if test -n "$pkg_config"; then
15219   { echo "$as_me:$LINENO: result: $pkg_config" >&5
15220 echo "${ECHO_T}$pkg_config" >&6; }
15221 else
15222   { echo "$as_me:$LINENO: result: no" >&5
15223 echo "${ECHO_T}no" >&6; }
15224 fi
15225
15226
15227   test -n "$pkg_config" && break
15228 done
15229
15230
15231 if test -z "$pkg_config" ; then
15232   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
15233 echo "$as_me: WARNING: pkg-config not found!" >&2;}
15234   pkg_config="false"
15235 fi
15236
15237
15238 # Utility function for running pkg-config-based tests...
15239 #
15240 pkgs=''
15241 pkg_check_version() {
15242   if test "$ok" = yes ; then
15243     req="$1"
15244     min="$2"
15245     { echo "$as_me:$LINENO: checking for $req" >&5
15246 echo $ECHO_N "checking for $req... $ECHO_C" >&6; }
15247     if $pkg_config --exists "$req" ; then
15248       vers=`$pkg_config --modversion "$req"`
15249       if $pkg_config --exists "$req >= $min" ; then
15250         { echo "$as_me:$LINENO: result: $vers" >&5
15251 echo "${ECHO_T}$vers" >&6; }
15252         pkgs="$pkgs $req"
15253         return 1
15254       else
15255         { echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15256 echo "${ECHO_T}$vers (wanted >= $min)" >&6; }
15257         ok=no
15258         return 0
15259       fi
15260     else
15261       { echo "$as_me:$LINENO: result: no" >&5
15262 echo "${ECHO_T}no" >&6; }
15263       ok=no
15264       return 0
15265     fi
15266   fi
15267 }
15268
15269
15270 jurassic_gtk=no
15271 gtk_halfassed=no
15272
15273 #if test "$with_gtk" = yes; then
15274   have_gtk=no
15275
15276   ok="yes"
15277   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15278   pkg_check_version         gmodule-2.0  2.0.0
15279   pkg_check_version          libxml-2.0  2.4.6
15280   pkg_check_version        libglade-2.0  1.99.0
15281   pkg_check_version      gdk-pixbuf-2.0  2.0.0
15282   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
15283   have_gtk="$ok"
15284
15285   if test "$have_gtk" = no; then
15286     if test -n "$ac_gtk_version_string" ; then
15287       gtk_halfassed="$ac_gtk_version_string"
15288       gtk_halfassed_lib="$req"
15289     fi
15290   fi
15291
15292   if test "$have_gtk" = yes; then
15293     parse_gtk_version_string
15294     jurassic_gtk=no
15295   fi
15296
15297   if test "$have_gtk" = yes; then
15298     { echo "$as_me:$LINENO: checking for Gtk includes" >&5
15299 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6; }
15300 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15301   echo $ECHO_N "(cached) $ECHO_C" >&6
15302 else
15303   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15304 fi
15305 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15306 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6; }
15307     { echo "$as_me:$LINENO: checking for Gtk libs" >&5
15308 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6; }
15309 if test "${ac_cv_gtk_config_libs+set}" = set; then
15310   echo $ECHO_N "(cached) $ECHO_C" >&6
15311 else
15312   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15313 fi
15314 { echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15315 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6; }
15316   fi
15317
15318   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15319   ac_gtk_config_libs=$ac_cv_gtk_config_libs
15320
15321   GTK_EXTRA_OBJS=""
15322   GTK_DATADIR=""
15323   if test "$have_gtk" = yes; then
15324     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15325     GTK_DATADIR="$GTK_DATADIR/share"
15326   fi
15327
15328   if test "$have_gtk" = yes; then
15329     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15330     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15331     cat >>confdefs.h <<\_ACEOF
15332 #define HAVE_GTK 1
15333 _ACEOF
15334
15335     cat >>confdefs.h <<\_ACEOF
15336 #define HAVE_GTK2 1
15337 _ACEOF
15338
15339     cat >>confdefs.h <<\_ACEOF
15340 #define HAVE_XML 1
15341 _ACEOF
15342
15343   fi
15344
15345 #fi
15346
15347 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15348 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15349 if test "${ac_cv_dbus_config_cflags+set}" = set; then
15350   echo $ECHO_N "(cached) $ECHO_C" >&6
15351 else
15352   ac_cv_dbus_config_cflags=`$pkg_config --cflags dbus-1`
15353 fi
15354 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_cflags" >&5
15355 echo "${ECHO_T}$ac_cv_dbus_config_cflags" >&6; }
15356 { echo "$as_me:$LINENO: checking for DBUS includes" >&5
15357 echo $ECHO_N "checking for DBUS includes... $ECHO_C" >&6; }
15358 if test "${ac_cv_dbus_config_libs+set}" = set; then
15359   echo $ECHO_N "(cached) $ECHO_C" >&6
15360 else
15361   ac_cv_dbus_config_libs=`$pkg_config --libs dbus-1`
15362 fi
15363 { echo "$as_me:$LINENO: result: $ac_cv_dbus_config_libs" >&5
15364 echo "${ECHO_T}$ac_cv_dbus_config_libs" >&6; }
15365
15366 ac_dbus_config_cflags=$ac_cv_dbus_config_cflags
15367 ac_dbus_config_libs=$ac_cv_dbus_config_libs
15368
15369 INCLUDES="$INCLUDES $ac_dbus_config_cflags"
15370 GTK_LIBS="$GTK_LIBS $ac_dbus_config_libs"
15371
15372 { echo "$as_me:$LINENO: checking for OSSO includes" >&5
15373 echo $ECHO_N "checking for OSSO includes... $ECHO_C" >&6; }
15374 if test "${ac_cv_osso_config_cflags+set}" = set; then
15375   echo $ECHO_N "(cached) $ECHO_C" >&6
15376 else
15377   ac_cv_osso_config_cflags=`$pkg_config --cflags libosso`
15378 fi
15379 { echo "$as_me:$LINENO: result: $ac_cv_osso_config_cflags" >&5
15380 echo "${ECHO_T}$ac_cv_osso_config_cflags" >&6; }
15381 { echo "$as_me:$LINENO: checking for OSSO includes" >&5
15382 echo $ECHO_N "checking for OSSO includes... $ECHO_C" >&6; }
15383 if test "${ac_cv_osso_config_libs+set}" = set; then
15384   echo $ECHO_N "(cached) $ECHO_C" >&6
15385 else
15386   ac_cv_osso_config_libs=`$pkg_config --libs libosso`
15387 fi
15388 { echo "$as_me:$LINENO: result: $ac_cv_osso_config_libs" >&5
15389 echo "${ECHO_T}$ac_cv_osso_config_libs" >&6; }
15390
15391 ac_osso_config_cflags=$ac_cv_osso_config_cflags
15392 ac_osso_config_libs=$ac_cv_osso_config_libs
15393
15394 INCLUDES="$INCLUDES $ac_osso_config_cflags"
15395 GTK_LIBS="$GTK_LIBS $ac_osso_config_libs"
15396
15397
15398
15399
15400 # Check for the various Gnome help and URL loading programs.
15401 #
15402 WITH_BROWSER=gnome-open
15403 if test "$have_gtk" = yes; then
15404   for ac_prog in gnome-open
15405 do
15406   # Extract the first word of "$ac_prog", so it can be a program name with args.
15407 set dummy $ac_prog; ac_word=$2
15408 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15410 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
15411   echo $ECHO_N "(cached) $ECHO_C" >&6
15412 else
15413   if test -n "$gnome_open_program"; then
15414   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
15415 else
15416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15417 for as_dir in $PATH
15418 do
15419   IFS=$as_save_IFS
15420   test -z "$as_dir" && as_dir=.
15421   for ac_exec_ext in '' $ac_executable_extensions; do
15422   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15423     ac_cv_prog_gnome_open_program="$ac_prog"
15424     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15425     break 2
15426   fi
15427 done
15428 done
15429 IFS=$as_save_IFS
15430
15431 fi
15432 fi
15433 gnome_open_program=$ac_cv_prog_gnome_open_program
15434 if test -n "$gnome_open_program"; then
15435   { echo "$as_me:$LINENO: result: $gnome_open_program" >&5
15436 echo "${ECHO_T}$gnome_open_program" >&6; }
15437 else
15438   { echo "$as_me:$LINENO: result: no" >&5
15439 echo "${ECHO_T}no" >&6; }
15440 fi
15441
15442
15443   test -n "$gnome_open_program" && break
15444 done
15445
15446   for ac_prog in gnome-url-show
15447 do
15448   # Extract the first word of "$ac_prog", so it can be a program name with args.
15449 set dummy $ac_prog; ac_word=$2
15450 { echo "$as_me:$LINENO: checking for $ac_word" >&5
15451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15452 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
15453   echo $ECHO_N "(cached) $ECHO_C" >&6
15454 else
15455   if test -n "$gnome_url_show_program"; then
15456   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
15457 else
15458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15459 for as_dir in $PATH
15460 do
15461   IFS=$as_save_IFS
15462   test -z "$as_dir" && as_dir=.
15463   for ac_exec_ext in '' $ac_executable_extensions; do
15464   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15465     ac_cv_prog_gnome_url_show_program="$ac_prog"
15466     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15467     break 2
15468   fi
15469 done
15470 done
15471 IFS=$as_save_IFS
15472
15473 fi
15474 fi
15475 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15476 if test -n "$gnome_url_show_program"; then
15477   { echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15478 echo "${ECHO_T}$gnome_url_show_program" >&6; }
15479 else
15480   { echo "$as_me:$LINENO: result: no" >&5
15481 echo "${ECHO_T}no" >&6; }
15482 fi
15483
15484
15485   test -n "$gnome_url_show_program" && break
15486 done
15487
15488 fi
15489
15490
15491 ###############################################################################
15492 #
15493 #       Check for -lXm.
15494 #
15495 ###############################################################################
15496
15497 have_motif=no
15498 with_motif_req=unspecified
15499
15500 # Check whether --with-motif was given.
15501 if test "${with_motif+set}" = set; then
15502   withval=$with_motif; with_motif="$withval"; with_motif_req="$withval"
15503 else
15504   with_motif=no
15505 fi
15506
15507
15508
15509    case "$with_motif" in
15510     yes) ;;
15511     no)  ;;
15512
15513     /*)
15514      { echo "$as_me:$LINENO: checking for Motif headers" >&5
15515 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6; }
15516      d=$with_motif/include
15517      if test -d $d; then
15518        X_CFLAGS="-I$d $X_CFLAGS"
15519        { echo "$as_me:$LINENO: result: $d" >&5
15520 echo "${ECHO_T}$d" >&6; }
15521      else
15522        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15523 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15524      fi
15525
15526      { echo "$as_me:$LINENO: checking for Motif libs" >&5
15527 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6; }
15528      d=$with_motif/lib
15529      if test -d $d; then
15530        X_LIBS="-L$d $X_LIBS"
15531        { echo "$as_me:$LINENO: result: $d" >&5
15532 echo "${ECHO_T}$d" >&6; }
15533      else
15534        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15535 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
15536      fi
15537
15538      # replace the directory string with "yes".
15539      with_motif_req="yes"
15540      with_motif=$with_motif_req
15541      ;;
15542
15543     *)
15544      echo ""
15545      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15546      echo "       If it is a directory, then \`DIR/include' will be added to"
15547      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15548      exit 1
15549      ;;
15550    esac
15551
15552
15553 if test "$with_motif" != yes -a "$with_motif" != no ; then
15554   echo "error: must be yes or no: --with-motif=$with_motif"
15555   exit 1
15556 fi
15557
15558 if test "$with_motif" = yes; then
15559   have_motif=no
15560
15561   ac_save_CPPFLAGS="$CPPFLAGS"
15562   if test \! -z "$includedir" ; then
15563     CPPFLAGS="$CPPFLAGS -I$includedir"
15564   fi
15565   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15566   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15567   { echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15568 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6; }
15569 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15570   echo $ECHO_N "(cached) $ECHO_C" >&6
15571 else
15572   cat >conftest.$ac_ext <<_ACEOF
15573 /* confdefs.h.  */
15574 _ACEOF
15575 cat confdefs.h >>conftest.$ac_ext
15576 cat >>conftest.$ac_ext <<_ACEOF
15577 /* end confdefs.h.  */
15578 #include <stdlib.h>
15579                      #include <stdio.h>
15580                      #include <X11/Intrinsic.h>
15581
15582 #include <Xm/Xm.h>
15583 _ACEOF
15584 rm -f conftest.$ac_objext
15585 if { (ac_try="$ac_compile"
15586 case "(($ac_try" in
15587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15588   *) ac_try_echo=$ac_try;;
15589 esac
15590 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15591   (eval "$ac_compile") 2>conftest.er1
15592   ac_status=$?
15593   grep -v '^ *+' conftest.er1 >conftest.err
15594   rm -f conftest.er1
15595   cat conftest.err >&5
15596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15597   (exit $ac_status); } && {
15598          test -z "$ac_c_werror_flag" ||
15599          test ! -s conftest.err
15600        } && test -s conftest.$ac_objext; then
15601   ac_cv_header_Xm_Xm_h=yes
15602 else
15603   echo "$as_me: failed program was:" >&5
15604 sed 's/^/| /' conftest.$ac_ext >&5
15605
15606         ac_cv_header_Xm_Xm_h=no
15607 fi
15608
15609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610 fi
15611 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15612 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6; }
15613 if test $ac_cv_header_Xm_Xm_h = yes; then
15614   have_motif=yes
15615                      cat >>confdefs.h <<\_ACEOF
15616 #define HAVE_MOTIF 1
15617 _ACEOF
15618
15619                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15620 fi
15621
15622
15623   CPPFLAGS="$ac_save_CPPFLAGS"
15624 fi
15625
15626
15627 if test "$have_motif" = yes; then
15628
15629   ac_save_CPPFLAGS="$CPPFLAGS"
15630   if test \! -z "$includedir" ; then
15631     CPPFLAGS="$CPPFLAGS -I$includedir"
15632   fi
15633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15634   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15635   { echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15636 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6; }
15637 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15638   echo $ECHO_N "(cached) $ECHO_C" >&6
15639 else
15640   cat >conftest.$ac_ext <<_ACEOF
15641 /* confdefs.h.  */
15642 _ACEOF
15643 cat confdefs.h >>conftest.$ac_ext
15644 cat >>conftest.$ac_ext <<_ACEOF
15645 /* end confdefs.h.  */
15646 #include <stdlib.h>
15647                      #include <stdio.h>
15648                      #include <X11/Intrinsic.h>
15649
15650 #include <Xm/ComboBox.h>
15651 _ACEOF
15652 rm -f conftest.$ac_objext
15653 if { (ac_try="$ac_compile"
15654 case "(($ac_try" in
15655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15656   *) ac_try_echo=$ac_try;;
15657 esac
15658 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15659   (eval "$ac_compile") 2>conftest.er1
15660   ac_status=$?
15661   grep -v '^ *+' conftest.er1 >conftest.err
15662   rm -f conftest.er1
15663   cat conftest.err >&5
15664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15665   (exit $ac_status); } && {
15666          test -z "$ac_c_werror_flag" ||
15667          test ! -s conftest.err
15668        } && test -s conftest.$ac_objext; then
15669   ac_cv_header_Xm_ComboBox_h=yes
15670 else
15671   echo "$as_me: failed program was:" >&5
15672 sed 's/^/| /' conftest.$ac_ext >&5
15673
15674         ac_cv_header_Xm_ComboBox_h=no
15675 fi
15676
15677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15678 fi
15679 { echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15680 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6; }
15681 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15682   cat >>confdefs.h <<\_ACEOF
15683 #define HAVE_XMCOMBOBOX 1
15684 _ACEOF
15685
15686 fi
15687
15688
15689   CPPFLAGS="$ac_save_CPPFLAGS"
15690 fi
15691
15692
15693 ###############################################################################
15694 #
15695 #       Checking whether Motif is really Lesstif.
15696 #
15697 ###############################################################################
15698
15699 have_lesstif=no
15700 if test "$have_motif" = yes ; then
15701   { echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15702 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6; }
15703 if test "${ac_cv_have_lesstif+set}" = set; then
15704   echo $ECHO_N "(cached) $ECHO_C" >&6
15705 else
15706
15707   ac_save_CPPFLAGS="$CPPFLAGS"
15708   if test \! -z "$includedir" ; then
15709     CPPFLAGS="$CPPFLAGS -I$includedir"
15710   fi
15711   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15712   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15713   cat >conftest.$ac_ext <<_ACEOF
15714 /* confdefs.h.  */
15715 _ACEOF
15716 cat confdefs.h >>conftest.$ac_ext
15717 cat >>conftest.$ac_ext <<_ACEOF
15718 /* end confdefs.h.  */
15719 #include <Xm/Xm.h>
15720 int
15721 main ()
15722 {
15723 long vers = LesstifVersion;
15724   ;
15725   return 0;
15726 }
15727 _ACEOF
15728 rm -f conftest.$ac_objext
15729 if { (ac_try="$ac_compile"
15730 case "(($ac_try" in
15731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15732   *) ac_try_echo=$ac_try;;
15733 esac
15734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15735   (eval "$ac_compile") 2>conftest.er1
15736   ac_status=$?
15737   grep -v '^ *+' conftest.er1 >conftest.err
15738   rm -f conftest.er1
15739   cat conftest.err >&5
15740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741   (exit $ac_status); } && {
15742          test -z "$ac_c_werror_flag" ||
15743          test ! -s conftest.err
15744        } && test -s conftest.$ac_objext; then
15745   ac_cv_have_lesstif=yes
15746 else
15747   echo "$as_me: failed program was:" >&5
15748 sed 's/^/| /' conftest.$ac_ext >&5
15749
15750         ac_cv_have_lesstif=no
15751 fi
15752
15753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15754   CPPFLAGS="$ac_save_CPPFLAGS"
15755 fi
15756 { echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15757 echo "${ECHO_T}$ac_cv_have_lesstif" >&6; }
15758   have_lesstif=$ac_cv_have_lesstif
15759 fi
15760
15761
15762 lesstif_version=unknown
15763 lesstif_version_string=unknown
15764
15765 if test "$have_lesstif" = yes ; then
15766   ltv=unknown
15767   echo unknown > conftest-lt
15768   { echo "$as_me:$LINENO: checking LessTif version number" >&5
15769 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6; }
15770 if test "${ac_cv_lesstif_version_string+set}" = set; then
15771   echo $ECHO_N "(cached) $ECHO_C" >&6
15772 else
15773
15774   ac_save_CPPFLAGS="$CPPFLAGS"
15775   if test \! -z "$includedir" ; then
15776     CPPFLAGS="$CPPFLAGS -I$includedir"
15777   fi
15778   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15779   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15780   if test "$cross_compiling" = yes; then
15781   ac_cv_lesstif_version=unknown
15782                      ac_cv_lesstif_version_string=unknown
15783 else
15784   cat >conftest.$ac_ext <<_ACEOF
15785 /* confdefs.h.  */
15786 _ACEOF
15787 cat confdefs.h >>conftest.$ac_ext
15788 cat >>conftest.$ac_ext <<_ACEOF
15789 /* end confdefs.h.  */
15790 #include <stdio.h>
15791                      #include <Xm/Xm.h>
15792                      int main() {
15793                        FILE *f = fopen("conftest-lt", "w");
15794                        if (!f) exit(1);
15795                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15796                           LESSTIF_VERSION, LESSTIF_REVISION);
15797                        fclose(f);
15798                        exit(0);
15799                      }
15800 _ACEOF
15801 rm -f conftest$ac_exeext
15802 if { (ac_try="$ac_link"
15803 case "(($ac_try" in
15804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15805   *) ac_try_echo=$ac_try;;
15806 esac
15807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15808   (eval "$ac_link") 2>&5
15809   ac_status=$?
15810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15811   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15812   { (case "(($ac_try" in
15813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15814   *) ac_try_echo=$ac_try;;
15815 esac
15816 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15817   (eval "$ac_try") 2>&5
15818   ac_status=$?
15819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820   (exit $ac_status); }; }; then
15821   ltv=`cat conftest-lt`
15822                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15823                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15824 else
15825   echo "$as_me: program exited with status $ac_status" >&5
15826 echo "$as_me: failed program was:" >&5
15827 sed 's/^/| /' conftest.$ac_ext >&5
15828
15829 ( exit $ac_status )
15830 ac_cv_lesstif_version=unknown
15831                      ac_cv_lesstif_version_string=unknown
15832 fi
15833 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15834 fi
15835
15836
15837   CPPFLAGS="$ac_save_CPPFLAGS"
15838 fi
15839 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15840 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
15841   rm -f conftest-lt
15842   lesstif_version=$ac_cv_lesstif_version
15843   lesstif_version_string=$ac_cv_lesstif_version_string
15844
15845 fi
15846
15847
15848 if test "$have_motif" = yes ; then
15849   mtv=unknown
15850   echo unknown > conftest-mt
15851   { echo "$as_me:$LINENO: checking Motif version number" >&5
15852 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6; }
15853 if test "${ac_cv_motif_version_string+set}" = set; then
15854   echo $ECHO_N "(cached) $ECHO_C" >&6
15855 else
15856
15857   ac_save_CPPFLAGS="$CPPFLAGS"
15858   if test \! -z "$includedir" ; then
15859     CPPFLAGS="$CPPFLAGS -I$includedir"
15860   fi
15861   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15862   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15863   if test "$cross_compiling" = yes; then
15864   ac_cv_motif_version=unknown
15865                      ac_cv_motif_version_string=unknown
15866 else
15867   cat >conftest.$ac_ext <<_ACEOF
15868 /* confdefs.h.  */
15869 _ACEOF
15870 cat confdefs.h >>conftest.$ac_ext
15871 cat >>conftest.$ac_ext <<_ACEOF
15872 /* end confdefs.h.  */
15873 #include <stdio.h>
15874                      #include <Xm/Xm.h>
15875                      int main() {
15876                        FILE *f = fopen("conftest-mt", "w");
15877                        if (!f) exit(1);
15878                        fprintf(f, "%d %d.%d\n", XmVersion,
15879                           XmVERSION, XmREVISION);
15880                        fclose(f);
15881                        exit(0);
15882                      }
15883 _ACEOF
15884 rm -f conftest$ac_exeext
15885 if { (ac_try="$ac_link"
15886 case "(($ac_try" in
15887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15888   *) ac_try_echo=$ac_try;;
15889 esac
15890 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15891   (eval "$ac_link") 2>&5
15892   ac_status=$?
15893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15895   { (case "(($ac_try" in
15896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15897   *) ac_try_echo=$ac_try;;
15898 esac
15899 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15900   (eval "$ac_try") 2>&5
15901   ac_status=$?
15902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903   (exit $ac_status); }; }; then
15904   mtv=`cat conftest-mt`
15905                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15906                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15907 else
15908   echo "$as_me: program exited with status $ac_status" >&5
15909 echo "$as_me: failed program was:" >&5
15910 sed 's/^/| /' conftest.$ac_ext >&5
15911
15912 ( exit $ac_status )
15913 ac_cv_motif_version=unknown
15914                      ac_cv_motif_version_string=unknown
15915 fi
15916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15917 fi
15918
15919
15920   CPPFLAGS="$ac_save_CPPFLAGS"
15921 fi
15922 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15923 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
15924   rm -f conftest-mt
15925   motif_version=$ac_cv_motif_version
15926   motif_version_string=$ac_cv_motif_version_string
15927
15928 fi
15929
15930
15931 ###############################################################################
15932 #
15933 #       Checking whether Motif requires -lXpm.
15934 #
15935 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15936 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15937 #       of the library whether to build the XPM code into libXm, or whether
15938 #       to rely on an external libXm.  So the only way to tell whether XPM is
15939 #       a link-time requirement is to examine libXm.a, which is very
15940 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15941 #       always link against XPM if the XPM lib exists (and this will be a
15942 #       no-op if libXm happens to already have the XPM code in it.)
15943 #
15944 ###############################################################################
15945
15946 motif_requires_xpm=no
15947 if test "$have_motif" = yes ; then
15948    { echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15949 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6; }
15950    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15951    then
15952      motif_requires_xpm=yes
15953      { echo "$as_me:$LINENO: result: maybe" >&5
15954 echo "${ECHO_T}maybe" >&6; }
15955    else
15956      { echo "$as_me:$LINENO: result: no" >&5
15957 echo "${ECHO_T}no" >&6; }
15958    fi
15959 fi
15960
15961
15962 ###############################################################################
15963 #
15964 #       Checking whether Motif requires -lXp.
15965 #
15966 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15967 #       Extension".   Why this extension isn't in -lXext with all the others,
15968 #       I have no idea.
15969 #
15970 ###############################################################################
15971
15972 have_xp_ext=no
15973 if test "$have_motif" = yes ; then
15974    have_xp_ext=no
15975
15976   ac_save_CPPFLAGS="$CPPFLAGS"
15977   ac_save_LDFLAGS="$LDFLAGS"
15978 #  ac_save_LIBS="$LIBS"
15979
15980   if test \! -z "$includedir" ; then
15981     CPPFLAGS="$CPPFLAGS -I$includedir"
15982   fi
15983   # note: $X_CFLAGS includes $x_includes
15984   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15985
15986   if test \! -z "$libdir" ; then
15987     LDFLAGS="$LDFLAGS -L$libdir"
15988   fi
15989   # note: $X_LIBS includes $x_libraries
15990   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15991
15992   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
15993   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
15994   { echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15995 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6; }
15996 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15997   echo $ECHO_N "(cached) $ECHO_C" >&6
15998 else
15999   ac_check_lib_save_LIBS=$LIBS
16000 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16001 cat >conftest.$ac_ext <<_ACEOF
16002 /* confdefs.h.  */
16003 _ACEOF
16004 cat confdefs.h >>conftest.$ac_ext
16005 cat >>conftest.$ac_ext <<_ACEOF
16006 /* end confdefs.h.  */
16007
16008 /* Override any GCC internal prototype to avoid an error.
16009    Use char because int might match the return type of a GCC
16010    builtin and then its argument prototype would still apply.  */
16011 #ifdef __cplusplus
16012 extern "C"
16013 #endif
16014 char XpQueryExtension ();
16015 int
16016 main ()
16017 {
16018 return XpQueryExtension ();
16019   ;
16020   return 0;
16021 }
16022 _ACEOF
16023 rm -f conftest.$ac_objext conftest$ac_exeext
16024 if { (ac_try="$ac_link"
16025 case "(($ac_try" in
16026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16027   *) ac_try_echo=$ac_try;;
16028 esac
16029 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16030   (eval "$ac_link") 2>conftest.er1
16031   ac_status=$?
16032   grep -v '^ *+' conftest.er1 >conftest.err
16033   rm -f conftest.er1
16034   cat conftest.err >&5
16035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036   (exit $ac_status); } && {
16037          test -z "$ac_c_werror_flag" ||
16038          test ! -s conftest.err
16039        } && test -s conftest$ac_exeext &&
16040        $as_test_x conftest$ac_exeext; then
16041   ac_cv_lib_Xp_XpQueryExtension=yes
16042 else
16043   echo "$as_me: failed program was:" >&5
16044 sed 's/^/| /' conftest.$ac_ext >&5
16045
16046         ac_cv_lib_Xp_XpQueryExtension=no
16047 fi
16048
16049 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16050       conftest$ac_exeext conftest.$ac_ext
16051 LIBS=$ac_check_lib_save_LIBS
16052 fi
16053 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16054 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6; }
16055 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16056   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16057 else
16058   true
16059 fi
16060
16061   CPPFLAGS="$ac_save_CPPFLAGS"
16062   LDFLAGS="$ac_save_LDFLAGS"
16063 #  LIBS="$ac_save_LIBS"
16064
16065 fi
16066
16067
16068 ###############################################################################
16069 #
16070 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16071 #
16072 ###############################################################################
16073
16074 have_xintl=no
16075 if test "$have_motif" = yes ; then
16076
16077   ac_save_CPPFLAGS="$CPPFLAGS"
16078   ac_save_LDFLAGS="$LDFLAGS"
16079 #  ac_save_LIBS="$LIBS"
16080
16081   if test \! -z "$includedir" ; then
16082     CPPFLAGS="$CPPFLAGS -I$includedir"
16083   fi
16084   # note: $X_CFLAGS includes $x_includes
16085   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16086
16087   if test \! -z "$libdir" ; then
16088     LDFLAGS="$LDFLAGS -L$libdir"
16089   fi
16090   # note: $X_LIBS includes $x_libraries
16091   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16092
16093   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16094   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16095   { echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16096 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6; }
16097 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16098   echo $ECHO_N "(cached) $ECHO_C" >&6
16099 else
16100   ac_check_lib_save_LIBS=$LIBS
16101 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16102 cat >conftest.$ac_ext <<_ACEOF
16103 /* confdefs.h.  */
16104 _ACEOF
16105 cat confdefs.h >>conftest.$ac_ext
16106 cat >>conftest.$ac_ext <<_ACEOF
16107 /* end confdefs.h.  */
16108
16109 /* Override any GCC internal prototype to avoid an error.
16110    Use char because int might match the return type of a GCC
16111    builtin and then its argument prototype would still apply.  */
16112 #ifdef __cplusplus
16113 extern "C"
16114 #endif
16115 char _Xsetlocale ();
16116 int
16117 main ()
16118 {
16119 return _Xsetlocale ();
16120   ;
16121   return 0;
16122 }
16123 _ACEOF
16124 rm -f conftest.$ac_objext conftest$ac_exeext
16125 if { (ac_try="$ac_link"
16126 case "(($ac_try" in
16127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16128   *) ac_try_echo=$ac_try;;
16129 esac
16130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16131   (eval "$ac_link") 2>conftest.er1
16132   ac_status=$?
16133   grep -v '^ *+' conftest.er1 >conftest.err
16134   rm -f conftest.er1
16135   cat conftest.err >&5
16136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137   (exit $ac_status); } && {
16138          test -z "$ac_c_werror_flag" ||
16139          test ! -s conftest.err
16140        } && test -s conftest$ac_exeext &&
16141        $as_test_x conftest$ac_exeext; then
16142   ac_cv_lib_Xintl__Xsetlocale=yes
16143 else
16144   echo "$as_me: failed program was:" >&5
16145 sed 's/^/| /' conftest.$ac_ext >&5
16146
16147         ac_cv_lib_Xintl__Xsetlocale=no
16148 fi
16149
16150 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16151       conftest$ac_exeext conftest.$ac_ext
16152 LIBS=$ac_check_lib_save_LIBS
16153 fi
16154 { echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16155 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6; }
16156 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16157   have_xintl=yes
16158 else
16159   have_xintl=no
16160 fi
16161
16162   CPPFLAGS="$ac_save_CPPFLAGS"
16163   LDFLAGS="$ac_save_LDFLAGS"
16164 #  LIBS="$ac_save_LIBS"
16165
16166   if test "$have_xintl" = yes; then
16167     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16168   fi
16169 fi
16170
16171
16172 ###############################################################################
16173 #
16174 #       Check for -lGL or -lMesaGL.
16175 #
16176 ###############################################################################
16177
16178 have_gl=no
16179 ac_have_mesa_gl=no
16180 with_gl_req=unspecified
16181 gl_halfassed=no
16182
16183 # Check whether --with-gl was given.
16184 if test "${with_gl+set}" = set; then
16185   withval=$with_gl; with_gl="$withval"; with_gl_req="$withval"
16186 else
16187   with_gl=yes
16188 fi
16189
16190
16191
16192    case "$with_gl" in
16193     yes) ;;
16194     no)  ;;
16195
16196     /*)
16197      { echo "$as_me:$LINENO: checking for GL headers" >&5
16198 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6; }
16199      d=$with_gl/include
16200      if test -d $d; then
16201        X_CFLAGS="-I$d $X_CFLAGS"
16202        { echo "$as_me:$LINENO: result: $d" >&5
16203 echo "${ECHO_T}$d" >&6; }
16204      else
16205        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16206 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16207      fi
16208
16209      { echo "$as_me:$LINENO: checking for GL libs" >&5
16210 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6; }
16211      d=$with_gl/lib
16212      if test -d $d; then
16213        X_LIBS="-L$d $X_LIBS"
16214        { echo "$as_me:$LINENO: result: $d" >&5
16215 echo "${ECHO_T}$d" >&6; }
16216      else
16217        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16218 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
16219      fi
16220
16221      # replace the directory string with "yes".
16222      with_gl_req="yes"
16223      with_gl=$with_gl_req
16224      ;;
16225
16226     *)
16227      echo ""
16228      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16229      echo "       If it is a directory, then \`DIR/include' will be added to"
16230      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16231      exit 1
16232      ;;
16233    esac
16234
16235
16236 ac_mesagl_version=unknown
16237 ac_mesagl_version_string=unknown
16238
16239 if test "$with_gl" = yes; then
16240
16241   ac_save_CPPFLAGS="$CPPFLAGS"
16242   if test \! -z "$includedir" ; then
16243     CPPFLAGS="$CPPFLAGS -I$includedir"
16244   fi
16245   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16246   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16247   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16248   { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16249 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16250 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16251   echo $ECHO_N "(cached) $ECHO_C" >&6
16252 fi
16253 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16254 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16255 else
16256   # Is the header compilable?
16257 { echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16258 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
16259 cat >conftest.$ac_ext <<_ACEOF
16260 /* confdefs.h.  */
16261 _ACEOF
16262 cat confdefs.h >>conftest.$ac_ext
16263 cat >>conftest.$ac_ext <<_ACEOF
16264 /* end confdefs.h.  */
16265 $ac_includes_default
16266 #include <GL/gl.h>
16267 _ACEOF
16268 rm -f conftest.$ac_objext
16269 if { (ac_try="$ac_compile"
16270 case "(($ac_try" in
16271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16272   *) ac_try_echo=$ac_try;;
16273 esac
16274 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16275   (eval "$ac_compile") 2>conftest.er1
16276   ac_status=$?
16277   grep -v '^ *+' conftest.er1 >conftest.err
16278   rm -f conftest.er1
16279   cat conftest.err >&5
16280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16281   (exit $ac_status); } && {
16282          test -z "$ac_c_werror_flag" ||
16283          test ! -s conftest.err
16284        } && test -s conftest.$ac_objext; then
16285   ac_header_compiler=yes
16286 else
16287   echo "$as_me: failed program was:" >&5
16288 sed 's/^/| /' conftest.$ac_ext >&5
16289
16290         ac_header_compiler=no
16291 fi
16292
16293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16294 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16295 echo "${ECHO_T}$ac_header_compiler" >&6; }
16296
16297 # Is the header present?
16298 { echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16299 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
16300 cat >conftest.$ac_ext <<_ACEOF
16301 /* confdefs.h.  */
16302 _ACEOF
16303 cat confdefs.h >>conftest.$ac_ext
16304 cat >>conftest.$ac_ext <<_ACEOF
16305 /* end confdefs.h.  */
16306 #include <GL/gl.h>
16307 _ACEOF
16308 if { (ac_try="$ac_cpp conftest.$ac_ext"
16309 case "(($ac_try" in
16310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16311   *) ac_try_echo=$ac_try;;
16312 esac
16313 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16314   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16315   ac_status=$?
16316   grep -v '^ *+' conftest.er1 >conftest.err
16317   rm -f conftest.er1
16318   cat conftest.err >&5
16319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320   (exit $ac_status); } >/dev/null && {
16321          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16322          test ! -s conftest.err
16323        }; then
16324   ac_header_preproc=yes
16325 else
16326   echo "$as_me: failed program was:" >&5
16327 sed 's/^/| /' conftest.$ac_ext >&5
16328
16329   ac_header_preproc=no
16330 fi
16331
16332 rm -f conftest.err conftest.$ac_ext
16333 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16334 echo "${ECHO_T}$ac_header_preproc" >&6; }
16335
16336 # So?  What about this header?
16337 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16338   yes:no: )
16339     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16340 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16341     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16342 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16343     ac_header_preproc=yes
16344     ;;
16345   no:yes:* )
16346     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16347 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16348     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16349 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16350     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16351 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16352     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16353 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16354     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16355 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16356     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16357 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16358
16359     ;;
16360 esac
16361 { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16362 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
16363 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16364   echo $ECHO_N "(cached) $ECHO_C" >&6
16365 else
16366   ac_cv_header_GL_gl_h=$ac_header_preproc
16367 fi
16368 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16369 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
16370
16371 fi
16372 if test $ac_cv_header_GL_gl_h = yes; then
16373   have_gl=yes
16374 else
16375   have_gl=no
16376 fi
16377
16378
16379   CPPFLAGS="$ac_save_CPPFLAGS"
16380   if test "$have_gl" = yes ; then
16381
16382   ac_save_CPPFLAGS="$CPPFLAGS"
16383   if test \! -z "$includedir" ; then
16384     CPPFLAGS="$CPPFLAGS -I$includedir"
16385   fi
16386   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16387   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16388   { echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16389 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6; }
16390 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16391   echo $ECHO_N "(cached) $ECHO_C" >&6
16392 else
16393   cat >conftest.$ac_ext <<_ACEOF
16394 /* confdefs.h.  */
16395 _ACEOF
16396 cat confdefs.h >>conftest.$ac_ext
16397 cat >>conftest.$ac_ext <<_ACEOF
16398 /* end confdefs.h.  */
16399 #include <GL/gl.h>
16400
16401 #include <GL/glx.h>
16402 _ACEOF
16403 rm -f conftest.$ac_objext
16404 if { (ac_try="$ac_compile"
16405 case "(($ac_try" in
16406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16407   *) ac_try_echo=$ac_try;;
16408 esac
16409 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16410   (eval "$ac_compile") 2>conftest.er1
16411   ac_status=$?
16412   grep -v '^ *+' conftest.er1 >conftest.err
16413   rm -f conftest.er1
16414   cat conftest.err >&5
16415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416   (exit $ac_status); } && {
16417          test -z "$ac_c_werror_flag" ||
16418          test ! -s conftest.err
16419        } && test -s conftest.$ac_objext; then
16420   ac_cv_header_GL_glx_h=yes
16421 else
16422   echo "$as_me: failed program was:" >&5
16423 sed 's/^/| /' conftest.$ac_ext >&5
16424
16425         ac_cv_header_GL_glx_h=no
16426 fi
16427
16428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16429 fi
16430 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16431 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6; }
16432 if test $ac_cv_header_GL_glx_h = yes; then
16433   have_gl=yes
16434 else
16435   have_gl=no
16436 fi
16437
16438
16439   CPPFLAGS="$ac_save_CPPFLAGS"
16440   fi
16441
16442   # If we have the headers, try and figure out which vendor it's from.
16443   #
16444   if test "$have_gl" = yes ; then
16445
16446     # We need to know whether it's MesaGL so that we know which libraries
16447     # to link against.
16448     #
16449     { echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16450 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6; }
16451 if test "${ac_cv_have_mesa_gl+set}" = set; then
16452   echo $ECHO_N "(cached) $ECHO_C" >&6
16453 else
16454   ac_cv_have_mesa_gl=no
16455        if test "$ac_macosx" = no; then
16456          # WTF! MacOS 10.5.0 ships the Mesa GL headers!
16457          # It's not really Mesa, is it?
16458
16459   ac_save_CPPFLAGS="$CPPFLAGS"
16460   if test \! -z "$includedir" ; then
16461     CPPFLAGS="$CPPFLAGS -I$includedir"
16462   fi
16463   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16464   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16465   cat >conftest.$ac_ext <<_ACEOF
16466 /* confdefs.h.  */
16467 _ACEOF
16468 cat confdefs.h >>conftest.$ac_ext
16469 cat >>conftest.$ac_ext <<_ACEOF
16470 /* end confdefs.h.  */
16471 #include <GL/glx.h>
16472
16473 _ACEOF
16474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16475   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16476   ac_cv_have_mesa_gl=yes
16477 fi
16478 rm -f conftest*
16479
16480   CPPFLAGS="$ac_save_CPPFLAGS"
16481        fi
16482 fi
16483 { echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16484 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6; }
16485     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16486
16487     gl_lib_1=""
16488     GL_LIBS=""
16489
16490     if test "$ac_macosx" = yes; then
16491
16492       # Without these, every link against libGL gets a bunch of useless
16493       # warnings.
16494       #
16495       osx_crud="-bind_at_load -multiply_defined suppress"
16496       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16497 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16498       GL_LIBS="$GL_LIBS $osx_crud"
16499       unset osx_crud
16500
16501       # New lossage in 10.5.0: without this, we get:
16502       #   ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
16503       #
16504       osx_crud="/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
16505       osx_crud="-Wl,-dylib_file,${osx_crud}:${osx_crud}"
16506
16507       { echo "$as_me:$LINENO: result: adding \"$osx_crud\" to GL_LIBS" >&5
16508 echo "${ECHO_T}adding \"$osx_crud\" to GL_LIBS" >&6; }
16509       GL_LIBS="$GL_LIBS $osx_crud"
16510       unset osx_crud
16511     fi
16512
16513
16514     # Some versions of MesaGL are compiled to require -lpthread.
16515     # So if the Mesa headers exist, and -lpthread exists, then always
16516     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16517     #
16518     if test "$ac_have_mesa_gl" = yes; then
16519       { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16520 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
16521 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16522   echo $ECHO_N "(cached) $ECHO_C" >&6
16523 else
16524   ac_check_lib_save_LIBS=$LIBS
16525 LIBS="-lpthread  $LIBS"
16526 cat >conftest.$ac_ext <<_ACEOF
16527 /* confdefs.h.  */
16528 _ACEOF
16529 cat confdefs.h >>conftest.$ac_ext
16530 cat >>conftest.$ac_ext <<_ACEOF
16531 /* end confdefs.h.  */
16532
16533 /* Override any GCC internal prototype to avoid an error.
16534    Use char because int might match the return type of a GCC
16535    builtin and then its argument prototype would still apply.  */
16536 #ifdef __cplusplus
16537 extern "C"
16538 #endif
16539 char pthread_create ();
16540 int
16541 main ()
16542 {
16543 return pthread_create ();
16544   ;
16545   return 0;
16546 }
16547 _ACEOF
16548 rm -f conftest.$ac_objext conftest$ac_exeext
16549 if { (ac_try="$ac_link"
16550 case "(($ac_try" in
16551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552   *) ac_try_echo=$ac_try;;
16553 esac
16554 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16555   (eval "$ac_link") 2>conftest.er1
16556   ac_status=$?
16557   grep -v '^ *+' conftest.er1 >conftest.err
16558   rm -f conftest.er1
16559   cat conftest.err >&5
16560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561   (exit $ac_status); } && {
16562          test -z "$ac_c_werror_flag" ||
16563          test ! -s conftest.err
16564        } && test -s conftest$ac_exeext &&
16565        $as_test_x conftest$ac_exeext; then
16566   ac_cv_lib_pthread_pthread_create=yes
16567 else
16568   echo "$as_me: failed program was:" >&5
16569 sed 's/^/| /' conftest.$ac_ext >&5
16570
16571         ac_cv_lib_pthread_pthread_create=no
16572 fi
16573
16574 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16575       conftest$ac_exeext conftest.$ac_ext
16576 LIBS=$ac_check_lib_save_LIBS
16577 fi
16578 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16579 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
16580 if test $ac_cv_lib_pthread_pthread_create = yes; then
16581   GL_LIBS="-lpthread"
16582 fi
16583
16584     fi
16585
16586
16587     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16588     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16589     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16590     #
16591
16592     if test "$ac_have_mesa_gl" = yes ; then
16593
16594   ac_save_CPPFLAGS="$CPPFLAGS"
16595   ac_save_LDFLAGS="$LDFLAGS"
16596 #  ac_save_LIBS="$LIBS"
16597
16598   if test \! -z "$includedir" ; then
16599     CPPFLAGS="$CPPFLAGS -I$includedir"
16600   fi
16601   # note: $X_CFLAGS includes $x_includes
16602   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16603
16604   if test \! -z "$libdir" ; then
16605     LDFLAGS="$LDFLAGS -L$libdir"
16606   fi
16607   # note: $X_LIBS includes $x_libraries
16608   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16609
16610   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16611   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16612   { echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16613 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6; }
16614 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16615   echo $ECHO_N "(cached) $ECHO_C" >&6
16616 else
16617   ac_check_lib_save_LIBS=$LIBS
16618 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16619 cat >conftest.$ac_ext <<_ACEOF
16620 /* confdefs.h.  */
16621 _ACEOF
16622 cat confdefs.h >>conftest.$ac_ext
16623 cat >>conftest.$ac_ext <<_ACEOF
16624 /* end confdefs.h.  */
16625
16626 /* Override any GCC internal prototype to avoid an error.
16627    Use char because int might match the return type of a GCC
16628    builtin and then its argument prototype would still apply.  */
16629 #ifdef __cplusplus
16630 extern "C"
16631 #endif
16632 char glXCreateContext ();
16633 int
16634 main ()
16635 {
16636 return glXCreateContext ();
16637   ;
16638   return 0;
16639 }
16640 _ACEOF
16641 rm -f conftest.$ac_objext conftest$ac_exeext
16642 if { (ac_try="$ac_link"
16643 case "(($ac_try" in
16644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16645   *) ac_try_echo=$ac_try;;
16646 esac
16647 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16648   (eval "$ac_link") 2>conftest.er1
16649   ac_status=$?
16650   grep -v '^ *+' conftest.er1 >conftest.err
16651   rm -f conftest.er1
16652   cat conftest.err >&5
16653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16654   (exit $ac_status); } && {
16655          test -z "$ac_c_werror_flag" ||
16656          test ! -s conftest.err
16657        } && test -s conftest$ac_exeext &&
16658        $as_test_x conftest$ac_exeext; then
16659   ac_cv_lib_MesaGL_glXCreateContext=yes
16660 else
16661   echo "$as_me: failed program was:" >&5
16662 sed 's/^/| /' conftest.$ac_ext >&5
16663
16664         ac_cv_lib_MesaGL_glXCreateContext=no
16665 fi
16666
16667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16668       conftest$ac_exeext conftest.$ac_ext
16669 LIBS=$ac_check_lib_save_LIBS
16670 fi
16671 { echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16672 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6; }
16673 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16674   gl_lib_1="MesaGL"
16675                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16676 fi
16677
16678   CPPFLAGS="$ac_save_CPPFLAGS"
16679   LDFLAGS="$ac_save_LDFLAGS"
16680 #  LIBS="$ac_save_LIBS"
16681
16682     fi
16683
16684     if test "$gl_lib_1" = "" ; then
16685
16686   ac_save_CPPFLAGS="$CPPFLAGS"
16687   ac_save_LDFLAGS="$LDFLAGS"
16688 #  ac_save_LIBS="$LIBS"
16689
16690   if test \! -z "$includedir" ; then
16691     CPPFLAGS="$CPPFLAGS -I$includedir"
16692   fi
16693   # note: $X_CFLAGS includes $x_includes
16694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16695
16696   if test \! -z "$libdir" ; then
16697     LDFLAGS="$LDFLAGS -L$libdir"
16698   fi
16699   # note: $X_LIBS includes $x_libraries
16700   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16701
16702   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16703   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16704   { echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16705 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6; }
16706 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16707   echo $ECHO_N "(cached) $ECHO_C" >&6
16708 else
16709   ac_check_lib_save_LIBS=$LIBS
16710 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16711 cat >conftest.$ac_ext <<_ACEOF
16712 /* confdefs.h.  */
16713 _ACEOF
16714 cat confdefs.h >>conftest.$ac_ext
16715 cat >>conftest.$ac_ext <<_ACEOF
16716 /* end confdefs.h.  */
16717
16718 /* Override any GCC internal prototype to avoid an error.
16719    Use char because int might match the return type of a GCC
16720    builtin and then its argument prototype would still apply.  */
16721 #ifdef __cplusplus
16722 extern "C"
16723 #endif
16724 char glXCreateContext ();
16725 int
16726 main ()
16727 {
16728 return glXCreateContext ();
16729   ;
16730   return 0;
16731 }
16732 _ACEOF
16733 rm -f conftest.$ac_objext conftest$ac_exeext
16734 if { (ac_try="$ac_link"
16735 case "(($ac_try" in
16736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16737   *) ac_try_echo=$ac_try;;
16738 esac
16739 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16740   (eval "$ac_link") 2>conftest.er1
16741   ac_status=$?
16742   grep -v '^ *+' conftest.er1 >conftest.err
16743   rm -f conftest.er1
16744   cat conftest.err >&5
16745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746   (exit $ac_status); } && {
16747          test -z "$ac_c_werror_flag" ||
16748          test ! -s conftest.err
16749        } && test -s conftest$ac_exeext &&
16750        $as_test_x conftest$ac_exeext; then
16751   ac_cv_lib_GL_glXCreateContext=yes
16752 else
16753   echo "$as_me: failed program was:" >&5
16754 sed 's/^/| /' conftest.$ac_ext >&5
16755
16756         ac_cv_lib_GL_glXCreateContext=no
16757 fi
16758
16759 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16760       conftest$ac_exeext conftest.$ac_ext
16761 LIBS=$ac_check_lib_save_LIBS
16762 fi
16763 { echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16764 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6; }
16765 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16766   gl_lib_1="GL"
16767                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16768 fi
16769
16770   CPPFLAGS="$ac_save_CPPFLAGS"
16771   LDFLAGS="$ac_save_LDFLAGS"
16772 #  LIBS="$ac_save_LIBS"
16773
16774     fi
16775
16776     if test "$gl_lib_1" = "" ; then
16777       # we have headers, but no libs -- bail.
16778       have_gl=no
16779       ac_have_mesa_gl=no
16780       gl_halfassed=yes
16781     else
16782       # linking works -- we can build the GL hacks.
16783       cat >>confdefs.h <<\_ACEOF
16784 #define HAVE_GL 1
16785 _ACEOF
16786
16787       if test "$ac_have_mesa_gl" = yes ; then
16788         cat >>confdefs.h <<\_ACEOF
16789 #define HAVE_MESA_GL 1
16790 _ACEOF
16791
16792       fi
16793     fi
16794   fi
16795
16796
16797   # Now that we know we have GL headers and libs, do some more GL testing.
16798   #
16799
16800   if test "$have_gl" = yes ; then
16801     # If it's MesaGL, we'd like to issue a warning if the version number
16802     # is less than or equal to 2.6, because that version had a security bug.
16803     #
16804     if test "$ac_have_mesa_gl" = yes; then
16805
16806       { echo "$as_me:$LINENO: checking MesaGL version number" >&5
16807 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6; }
16808 if test "${ac_cv_mesagl_version_string+set}" = set; then
16809   echo $ECHO_N "(cached) $ECHO_C" >&6
16810 else
16811   cat > conftest.$ac_ext <<EOF
16812 #line 16812 "configure"
16813 #include "confdefs.h"
16814 #include <GL/gl.h>
16815 #ifndef MESA_MAJOR_VERSION
16816 # include <GL/xmesa.h>
16817 # ifdef XMESA_MAJOR_VERSION
16818    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16819       we have to check the XMesa version number (the number of the X protocol
16820       support, which seems to be the same as the Mesa version number.)
16821     */
16822 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16823 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16824 # else
16825    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16826       so we have no way of telling what version of Mesa this is at all.
16827       So, we'll guess that the osmesa version (the "offscreen protocol")
16828       is less than or equal to the real mesa version number.  Except that
16829       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16830       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16831     */
16832 # include <GL/osmesa.h>
16833 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16834 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16835 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16836 #   undef MESA_MINOR_VERSION
16837 #   define MESA_MINOR_VERSION 4 or newer, probably?
16838 #  endif
16839 # endif
16840 #endif
16841 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16842 EOF
16843
16844          ac_save_CPPFLAGS="$CPPFLAGS"
16845          if test \! -z "$includedir" ; then
16846            CPPFLAGS="$CPPFLAGS -I$includedir"
16847          fi
16848          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16849
16850          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16851
16852          # M4 sucks!!
16853
16854           mglv=`echo "$mglv" | sed -n \
16855              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16856
16857
16858          rm -f conftest.$ac_ext
16859
16860          CPPFLAGS="$ac_save_CPPFLAGS"
16861
16862          if test "$mglv" = ""; then
16863            ac_mesagl_version=unknown
16864            ac_mesagl_version_string=unknown
16865          else
16866            ac_mesagl_version_string="$mglv"
16867            # M4 sucks!!
16868
16869            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16870            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16871
16872            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16873            if test -z "$ac_mesagl_version"; then
16874              ac_mesagl_version=unknown
16875              ac_mesagl_version_string=unknown
16876            fi
16877          fi
16878          ac_cv_mesagl_version=$ac_mesagl_version
16879          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16880
16881 fi
16882 { echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16883 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6; }
16884       ac_mesagl_version=$ac_cv_mesagl_version
16885       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16886     fi
16887
16888
16889     # Check for OpenGL 1.1 features.
16890     #
16891
16892   ac_save_CPPFLAGS="$CPPFLAGS"
16893   ac_save_LDFLAGS="$LDFLAGS"
16894 #  ac_save_LIBS="$LIBS"
16895
16896   if test \! -z "$includedir" ; then
16897     CPPFLAGS="$CPPFLAGS -I$includedir"
16898   fi
16899   # note: $X_CFLAGS includes $x_includes
16900   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16901
16902   if test \! -z "$libdir" ; then
16903     LDFLAGS="$LDFLAGS -L$libdir"
16904   fi
16905   # note: $X_LIBS includes $x_libraries
16906   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16907
16908   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
16909   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
16910   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16911 { echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16912 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6; }
16913 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
16914   echo $ECHO_N "(cached) $ECHO_C" >&6
16915 else
16916   ac_check_lib_save_LIBS=$LIBS
16917 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16918 cat >conftest.$ac_ext <<_ACEOF
16919 /* confdefs.h.  */
16920 _ACEOF
16921 cat confdefs.h >>conftest.$ac_ext
16922 cat >>conftest.$ac_ext <<_ACEOF
16923 /* end confdefs.h.  */
16924
16925 /* Override any GCC internal prototype to avoid an error.
16926    Use char because int might match the return type of a GCC
16927    builtin and then its argument prototype would still apply.  */
16928 #ifdef __cplusplus
16929 extern "C"
16930 #endif
16931 char glBindTexture ();
16932 int
16933 main ()
16934 {
16935 return glBindTexture ();
16936   ;
16937   return 0;
16938 }
16939 _ACEOF
16940 rm -f conftest.$ac_objext conftest$ac_exeext
16941 if { (ac_try="$ac_link"
16942 case "(($ac_try" in
16943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16944   *) ac_try_echo=$ac_try;;
16945 esac
16946 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16947   (eval "$ac_link") 2>conftest.er1
16948   ac_status=$?
16949   grep -v '^ *+' conftest.er1 >conftest.err
16950   rm -f conftest.er1
16951   cat conftest.err >&5
16952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953   (exit $ac_status); } && {
16954          test -z "$ac_c_werror_flag" ||
16955          test ! -s conftest.err
16956        } && test -s conftest$ac_exeext &&
16957        $as_test_x conftest$ac_exeext; then
16958   eval "$as_ac_Lib=yes"
16959 else
16960   echo "$as_me: failed program was:" >&5
16961 sed 's/^/| /' conftest.$ac_ext >&5
16962
16963         eval "$as_ac_Lib=no"
16964 fi
16965
16966 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16967       conftest$ac_exeext conftest.$ac_ext
16968 LIBS=$ac_check_lib_save_LIBS
16969 fi
16970 ac_res=`eval echo '${'$as_ac_Lib'}'`
16971                { echo "$as_me:$LINENO: result: $ac_res" >&5
16972 echo "${ECHO_T}$ac_res" >&6; }
16973 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16974   cat >>confdefs.h <<\_ACEOF
16975 #define HAVE_GLBINDTEXTURE 1
16976 _ACEOF
16977
16978 else
16979   true
16980 fi
16981
16982   CPPFLAGS="$ac_save_CPPFLAGS"
16983   LDFLAGS="$ac_save_LDFLAGS"
16984 #  LIBS="$ac_save_LIBS"
16985
16986   fi
16987
16988 elif test "$with_gl" != no; then
16989   echo "error: must be yes or no: --with-gl=$with_gl"
16990   exit 1
16991 fi
16992
16993
16994 ###############################################################################
16995 #
16996 #       Check for -lgle.
16997 #
16998 ###############################################################################
16999
17000 have_gle=no
17001 with_gle_req=unspecified
17002 gle_halfassed=no
17003
17004 # Check whether --with-gle was given.
17005 if test "${with_gle+set}" = set; then
17006   withval=$with_gle; with_gle="$withval"; with_gle_req="$withval"
17007 else
17008   with_gle=yes
17009 fi
17010
17011
17012
17013    case "$with_gle" in
17014     yes) ;;
17015     no)  ;;
17016
17017     /*)
17018      { echo "$as_me:$LINENO: checking for GLE headers" >&5
17019 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6; }
17020      d=$with_gle/include
17021      if test -d $d; then
17022        X_CFLAGS="-I$d $X_CFLAGS"
17023        { echo "$as_me:$LINENO: result: $d" >&5
17024 echo "${ECHO_T}$d" >&6; }
17025      else
17026        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17027 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17028      fi
17029
17030      { echo "$as_me:$LINENO: checking for GLE libs" >&5
17031 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6; }
17032      d=$with_gle/lib
17033      if test -d $d; then
17034        X_LIBS="-L$d $X_LIBS"
17035        { echo "$as_me:$LINENO: result: $d" >&5
17036 echo "${ECHO_T}$d" >&6; }
17037      else
17038        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17039 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17040      fi
17041
17042      # replace the directory string with "yes".
17043      with_gle_req="yes"
17044      with_gle=$with_gle_req
17045      ;;
17046
17047     *)
17048      echo ""
17049      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17050      echo "       If it is a directory, then \`DIR/include' will be added to"
17051      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17052      exit 1
17053      ;;
17054    esac
17055
17056
17057 GLE_LIBS=""
17058
17059 if test "$have_gl" = no ; then
17060  true
17061 elif test "$with_gle" = yes; then
17062
17063
17064   ac_save_CPPFLAGS="$CPPFLAGS"
17065   if test \! -z "$includedir" ; then
17066     CPPFLAGS="$CPPFLAGS -I$includedir"
17067   fi
17068   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17069   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17070   { echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17071 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6; }
17072 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17073   echo $ECHO_N "(cached) $ECHO_C" >&6
17074 else
17075   cat >conftest.$ac_ext <<_ACEOF
17076 /* confdefs.h.  */
17077 _ACEOF
17078 cat confdefs.h >>conftest.$ac_ext
17079 cat >>conftest.$ac_ext <<_ACEOF
17080 /* end confdefs.h.  */
17081 #include <GL/gl.h>
17082
17083 #include <GL/gle.h>
17084 _ACEOF
17085 rm -f conftest.$ac_objext
17086 if { (ac_try="$ac_compile"
17087 case "(($ac_try" in
17088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17089   *) ac_try_echo=$ac_try;;
17090 esac
17091 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17092   (eval "$ac_compile") 2>conftest.er1
17093   ac_status=$?
17094   grep -v '^ *+' conftest.er1 >conftest.err
17095   rm -f conftest.er1
17096   cat conftest.err >&5
17097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098   (exit $ac_status); } && {
17099          test -z "$ac_c_werror_flag" ||
17100          test ! -s conftest.err
17101        } && test -s conftest.$ac_objext; then
17102   ac_cv_header_GL_gle_h=yes
17103 else
17104   echo "$as_me: failed program was:" >&5
17105 sed 's/^/| /' conftest.$ac_ext >&5
17106
17107         ac_cv_header_GL_gle_h=no
17108 fi
17109
17110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17111 fi
17112 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17113 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6; }
17114 if test $ac_cv_header_GL_gle_h = yes; then
17115   have_gle3=yes
17116 else
17117   have_gle3=no
17118 fi
17119
17120
17121   CPPFLAGS="$ac_save_CPPFLAGS"
17122   if test "$have_gle3" = yes ; then
17123     have_gle=yes;
17124   else
17125
17126   ac_save_CPPFLAGS="$CPPFLAGS"
17127   if test \! -z "$includedir" ; then
17128     CPPFLAGS="$CPPFLAGS -I$includedir"
17129   fi
17130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17131   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17132   { echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17133 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6; }
17134 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17135   echo $ECHO_N "(cached) $ECHO_C" >&6
17136 else
17137   cat >conftest.$ac_ext <<_ACEOF
17138 /* confdefs.h.  */
17139 _ACEOF
17140 cat confdefs.h >>conftest.$ac_ext
17141 cat >>conftest.$ac_ext <<_ACEOF
17142 /* end confdefs.h.  */
17143 #include <GL/gl.h>
17144
17145 #include <GL/gutil.h>
17146 _ACEOF
17147 rm -f conftest.$ac_objext
17148 if { (ac_try="$ac_compile"
17149 case "(($ac_try" in
17150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17151   *) ac_try_echo=$ac_try;;
17152 esac
17153 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17154   (eval "$ac_compile") 2>conftest.er1
17155   ac_status=$?
17156   grep -v '^ *+' conftest.er1 >conftest.err
17157   rm -f conftest.er1
17158   cat conftest.err >&5
17159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17160   (exit $ac_status); } && {
17161          test -z "$ac_c_werror_flag" ||
17162          test ! -s conftest.err
17163        } && test -s conftest.$ac_objext; then
17164   ac_cv_header_GL_gutil_h=yes
17165 else
17166   echo "$as_me: failed program was:" >&5
17167 sed 's/^/| /' conftest.$ac_ext >&5
17168
17169         ac_cv_header_GL_gutil_h=no
17170 fi
17171
17172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17173 fi
17174 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17175 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6; }
17176 if test $ac_cv_header_GL_gutil_h = yes; then
17177   have_gle=yes
17178 else
17179   have_gle=no
17180 fi
17181
17182
17183   CPPFLAGS="$ac_save_CPPFLAGS"
17184     if test "$have_gle" = yes ; then
17185
17186   ac_save_CPPFLAGS="$CPPFLAGS"
17187   if test \! -z "$includedir" ; then
17188     CPPFLAGS="$CPPFLAGS -I$includedir"
17189   fi
17190   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17191   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17192   { echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17193 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6; }
17194 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17195   echo $ECHO_N "(cached) $ECHO_C" >&6
17196 else
17197   cat >conftest.$ac_ext <<_ACEOF
17198 /* confdefs.h.  */
17199 _ACEOF
17200 cat confdefs.h >>conftest.$ac_ext
17201 cat >>conftest.$ac_ext <<_ACEOF
17202 /* end confdefs.h.  */
17203 #include <GL/gl.h>
17204
17205 #include <GL/tube.h>
17206 _ACEOF
17207 rm -f conftest.$ac_objext
17208 if { (ac_try="$ac_compile"
17209 case "(($ac_try" in
17210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17211   *) ac_try_echo=$ac_try;;
17212 esac
17213 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17214   (eval "$ac_compile") 2>conftest.er1
17215   ac_status=$?
17216   grep -v '^ *+' conftest.er1 >conftest.err
17217   rm -f conftest.er1
17218   cat conftest.err >&5
17219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17220   (exit $ac_status); } && {
17221          test -z "$ac_c_werror_flag" ||
17222          test ! -s conftest.err
17223        } && test -s conftest.$ac_objext; then
17224   ac_cv_header_GL_tube_h=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227 sed 's/^/| /' conftest.$ac_ext >&5
17228
17229         ac_cv_header_GL_tube_h=no
17230 fi
17231
17232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17233 fi
17234 { echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17235 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6; }
17236 if test $ac_cv_header_GL_tube_h = yes; then
17237   have_gle=yes
17238 else
17239   have_gle=no
17240 fi
17241
17242
17243   CPPFLAGS="$ac_save_CPPFLAGS"
17244     fi
17245   fi
17246
17247   if test "$have_gle" = yes ; then
17248     have_gle=no
17249     gle_halfassed=yes
17250
17251   ac_save_CPPFLAGS="$CPPFLAGS"
17252   ac_save_LDFLAGS="$LDFLAGS"
17253 #  ac_save_LIBS="$LIBS"
17254
17255   if test \! -z "$includedir" ; then
17256     CPPFLAGS="$CPPFLAGS -I$includedir"
17257   fi
17258   # note: $X_CFLAGS includes $x_includes
17259   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17260
17261   if test \! -z "$libdir" ; then
17262     LDFLAGS="$LDFLAGS -L$libdir"
17263   fi
17264   # note: $X_LIBS includes $x_libraries
17265   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17266
17267   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17268   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17269   { echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17270 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6; }
17271 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17272   echo $ECHO_N "(cached) $ECHO_C" >&6
17273 else
17274   ac_check_lib_save_LIBS=$LIBS
17275 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17276 cat >conftest.$ac_ext <<_ACEOF
17277 /* confdefs.h.  */
17278 _ACEOF
17279 cat confdefs.h >>conftest.$ac_ext
17280 cat >>conftest.$ac_ext <<_ACEOF
17281 /* end confdefs.h.  */
17282
17283 /* Override any GCC internal prototype to avoid an error.
17284    Use char because int might match the return type of a GCC
17285    builtin and then its argument prototype would still apply.  */
17286 #ifdef __cplusplus
17287 extern "C"
17288 #endif
17289 char gleCreateGC ();
17290 int
17291 main ()
17292 {
17293 return gleCreateGC ();
17294   ;
17295   return 0;
17296 }
17297 _ACEOF
17298 rm -f conftest.$ac_objext conftest$ac_exeext
17299 if { (ac_try="$ac_link"
17300 case "(($ac_try" in
17301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17302   *) ac_try_echo=$ac_try;;
17303 esac
17304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17305   (eval "$ac_link") 2>conftest.er1
17306   ac_status=$?
17307   grep -v '^ *+' conftest.er1 >conftest.err
17308   rm -f conftest.er1
17309   cat conftest.err >&5
17310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311   (exit $ac_status); } && {
17312          test -z "$ac_c_werror_flag" ||
17313          test ! -s conftest.err
17314        } && test -s conftest$ac_exeext &&
17315        $as_test_x conftest$ac_exeext; then
17316   ac_cv_lib_gle_gleCreateGC=yes
17317 else
17318   echo "$as_me: failed program was:" >&5
17319 sed 's/^/| /' conftest.$ac_ext >&5
17320
17321         ac_cv_lib_gle_gleCreateGC=no
17322 fi
17323
17324 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17325       conftest$ac_exeext conftest.$ac_ext
17326 LIBS=$ac_check_lib_save_LIBS
17327 fi
17328 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17329 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6; }
17330 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17331   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17332 fi
17333
17334   CPPFLAGS="$ac_save_CPPFLAGS"
17335   LDFLAGS="$ac_save_LDFLAGS"
17336 #  LIBS="$ac_save_LIBS"
17337
17338   fi
17339   if test "$have_gle" = yes ; then
17340     have_gle=no
17341     gle_halfassed=yes
17342
17343     # sometimes the libmatrix stuff is included in libgle.  look there first.
17344 #
17345 # I don't get it.  For some reason, this test passes on SGI, as if
17346 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17347 # Yet the link is succeeding.  Why???
17348 #
17349 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17350 #                   [have_gle=yes; gle_halfassed=no],
17351 #                   [], $GL_LIBS -lX11 -lXext -lm)
17352
17353     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17354     # *sigh*
17355     if test "$have_gle3" = yes ; then
17356
17357   ac_save_CPPFLAGS="$CPPFLAGS"
17358   ac_save_LDFLAGS="$LDFLAGS"
17359 #  ac_save_LIBS="$LIBS"
17360
17361   if test \! -z "$includedir" ; then
17362     CPPFLAGS="$CPPFLAGS -I$includedir"
17363   fi
17364   # note: $X_CFLAGS includes $x_includes
17365   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17366
17367   if test \! -z "$libdir" ; then
17368     LDFLAGS="$LDFLAGS -L$libdir"
17369   fi
17370   # note: $X_LIBS includes $x_libraries
17371   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17372
17373   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17374   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17375   { echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17376 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6; }
17377 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17378   echo $ECHO_N "(cached) $ECHO_C" >&6
17379 else
17380   ac_check_lib_save_LIBS=$LIBS
17381 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17382 cat >conftest.$ac_ext <<_ACEOF
17383 /* confdefs.h.  */
17384 _ACEOF
17385 cat confdefs.h >>conftest.$ac_ext
17386 cat >>conftest.$ac_ext <<_ACEOF
17387 /* end confdefs.h.  */
17388
17389 /* Override any GCC internal prototype to avoid an error.
17390    Use char because int might match the return type of a GCC
17391    builtin and then its argument prototype would still apply.  */
17392 #ifdef __cplusplus
17393 extern "C"
17394 #endif
17395 char uview_direction ();
17396 int
17397 main ()
17398 {
17399 return uview_direction ();
17400   ;
17401   return 0;
17402 }
17403 _ACEOF
17404 rm -f conftest.$ac_objext conftest$ac_exeext
17405 if { (ac_try="$ac_link"
17406 case "(($ac_try" in
17407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408   *) ac_try_echo=$ac_try;;
17409 esac
17410 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17411   (eval "$ac_link") 2>conftest.er1
17412   ac_status=$?
17413   grep -v '^ *+' conftest.er1 >conftest.err
17414   rm -f conftest.er1
17415   cat conftest.err >&5
17416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417   (exit $ac_status); } && {
17418          test -z "$ac_c_werror_flag" ||
17419          test ! -s conftest.err
17420        } && test -s conftest$ac_exeext &&
17421        $as_test_x conftest$ac_exeext; then
17422   ac_cv_lib_gle_uview_direction=yes
17423 else
17424   echo "$as_me: failed program was:" >&5
17425 sed 's/^/| /' conftest.$ac_ext >&5
17426
17427         ac_cv_lib_gle_uview_direction=no
17428 fi
17429
17430 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17431       conftest$ac_exeext conftest.$ac_ext
17432 LIBS=$ac_check_lib_save_LIBS
17433 fi
17434 { echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17435 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6; }
17436 if test $ac_cv_lib_gle_uview_direction = yes; then
17437   have_gle=yes; gle_halfassed=no
17438 fi
17439
17440   CPPFLAGS="$ac_save_CPPFLAGS"
17441   LDFLAGS="$ac_save_LDFLAGS"
17442 #  LIBS="$ac_save_LIBS"
17443
17444     fi
17445     # if it wasn't in libgle, then look in libmatrix.
17446     if test "$have_gle" = no ; then
17447
17448   ac_save_CPPFLAGS="$CPPFLAGS"
17449   ac_save_LDFLAGS="$LDFLAGS"
17450 #  ac_save_LIBS="$LIBS"
17451
17452   if test \! -z "$includedir" ; then
17453     CPPFLAGS="$CPPFLAGS -I$includedir"
17454   fi
17455   # note: $X_CFLAGS includes $x_includes
17456   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17457
17458   if test \! -z "$libdir" ; then
17459     LDFLAGS="$LDFLAGS -L$libdir"
17460   fi
17461   # note: $X_LIBS includes $x_libraries
17462   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17463
17464   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17465   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
17466   { echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17467 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6; }
17468 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17469   echo $ECHO_N "(cached) $ECHO_C" >&6
17470 else
17471   ac_check_lib_save_LIBS=$LIBS
17472 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17473 cat >conftest.$ac_ext <<_ACEOF
17474 /* confdefs.h.  */
17475 _ACEOF
17476 cat confdefs.h >>conftest.$ac_ext
17477 cat >>conftest.$ac_ext <<_ACEOF
17478 /* end confdefs.h.  */
17479
17480 /* Override any GCC internal prototype to avoid an error.
17481    Use char because int might match the return type of a GCC
17482    builtin and then its argument prototype would still apply.  */
17483 #ifdef __cplusplus
17484 extern "C"
17485 #endif
17486 char uview_direction_d ();
17487 int
17488 main ()
17489 {
17490 return uview_direction_d ();
17491   ;
17492   return 0;
17493 }
17494 _ACEOF
17495 rm -f conftest.$ac_objext conftest$ac_exeext
17496 if { (ac_try="$ac_link"
17497 case "(($ac_try" in
17498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499   *) ac_try_echo=$ac_try;;
17500 esac
17501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17502   (eval "$ac_link") 2>conftest.er1
17503   ac_status=$?
17504   grep -v '^ *+' conftest.er1 >conftest.err
17505   rm -f conftest.er1
17506   cat conftest.err >&5
17507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17508   (exit $ac_status); } && {
17509          test -z "$ac_c_werror_flag" ||
17510          test ! -s conftest.err
17511        } && test -s conftest$ac_exeext &&
17512        $as_test_x conftest$ac_exeext; then
17513   ac_cv_lib_matrix_uview_direction_d=yes
17514 else
17515   echo "$as_me: failed program was:" >&5
17516 sed 's/^/| /' conftest.$ac_ext >&5
17517
17518         ac_cv_lib_matrix_uview_direction_d=no
17519 fi
17520
17521 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17522       conftest$ac_exeext conftest.$ac_ext
17523 LIBS=$ac_check_lib_save_LIBS
17524 fi
17525 { echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17526 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6; }
17527 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17528   have_gle=yes; gle_halfassed=no;
17529                       GLE_LIBS="$GLE_LIBS -lmatrix"
17530 fi
17531
17532   CPPFLAGS="$ac_save_CPPFLAGS"
17533   LDFLAGS="$ac_save_LDFLAGS"
17534 #  LIBS="$ac_save_LIBS"
17535
17536     fi
17537   fi
17538
17539   if test "$have_gle" = yes ; then
17540     cat >>confdefs.h <<\_ACEOF
17541 #define HAVE_GLE 1
17542 _ACEOF
17543
17544     if test "$have_gle3" = yes ; then
17545       cat >>confdefs.h <<\_ACEOF
17546 #define HAVE_GLE3 1
17547 _ACEOF
17548
17549     fi
17550   fi
17551
17552 elif test "$with_gle" != no; then
17553   echo "error: must be yes or no: --with-gle=$with_gle"
17554   exit 1
17555
17556 fi
17557
17558
17559 ###############################################################################
17560 #
17561 #       Check for -lgdk_pixbuf.
17562 #       These tests are for gdk_pixbuf usage of the hacks,
17563 #       not xscreensaver-demo (thus we have to test again to get
17564 #       the libraries right: don't want to pull in all of GTK
17565 #       for the hacks.)
17566 #
17567 ###############################################################################
17568
17569 have_gdk_pixbuf=no
17570 with_gdk_pixbuf_req=unspecified
17571
17572 # Check whether --with-pixbuf was given.
17573 if test "${with_pixbuf+set}" = set; then
17574   withval=$with_pixbuf; with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17575 else
17576   with_gdk_pixbuf=yes
17577 fi
17578
17579
17580 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17581 # we can also look for the `gdk-pixbuf-config' program in that directory.
17582 case "$with_gdk_pixbuf" in
17583   /*)
17584     gdk_pixbuf_dir="$with_gdk_pixbuf"
17585     ;;
17586   *)
17587     gdk_pixbuf_dir=""
17588     ;;
17589 esac
17590
17591
17592    case "$with_gdk_pixbuf" in
17593     yes) ;;
17594     no)  ;;
17595
17596     /*)
17597      { echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17598 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6; }
17599      d=$with_gdk_pixbuf/include
17600      if test -d $d; then
17601        X_CFLAGS="-I$d $X_CFLAGS"
17602        { echo "$as_me:$LINENO: result: $d" >&5
17603 echo "${ECHO_T}$d" >&6; }
17604      else
17605        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17606 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17607      fi
17608
17609      { echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17610 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6; }
17611      d=$with_gdk_pixbuf/lib
17612      if test -d $d; then
17613        X_LIBS="-L$d $X_LIBS"
17614        { echo "$as_me:$LINENO: result: $d" >&5
17615 echo "${ECHO_T}$d" >&6; }
17616      else
17617        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17618 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
17619      fi
17620
17621      # replace the directory string with "yes".
17622      with_gdk_pixbuf_req="yes"
17623      with_gdk_pixbuf=$with_gdk_pixbuf_req
17624      ;;
17625
17626     *)
17627      echo ""
17628      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17629      echo "       If it is a directory, then \`DIR/include' will be added to"
17630      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17631      exit 1
17632      ;;
17633    esac
17634
17635
17636 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17637   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17638   exit 1
17639 fi
17640
17641 if test "$with_gdk_pixbuf" = yes; then
17642   have_gdk_pixbuf=no
17643
17644   pkgs=''
17645   ok="yes"
17646
17647   pkg_check_version gdk-pixbuf-2.0      2.0.0
17648   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17649   have_gdk_pixbuf="$ok"
17650
17651   if test "$have_gdk_pixbuf" = yes; then
17652     { echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17653 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6; }
17654 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17655   echo $ECHO_N "(cached) $ECHO_C" >&6
17656 else
17657   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17658 fi
17659 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17660 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6; }
17661     { echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17662 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6; }
17663 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17664   echo $ECHO_N "(cached) $ECHO_C" >&6
17665 else
17666   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17667 fi
17668 { echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17669 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6; }
17670   fi
17671
17672   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17673   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17674
17675
17676   if test "$have_gdk_pixbuf" = yes; then
17677     #
17678     # we appear to have pixbuf; check for headers/libs to be sure.
17679     #
17680     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17681     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17682
17683     have_gdk_pixbuf=no
17684
17685     # check for header A...
17686
17687   ac_save_CPPFLAGS="$CPPFLAGS"
17688   if test \! -z "$includedir" ; then
17689     CPPFLAGS="$CPPFLAGS -I$includedir"
17690   fi
17691   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17692   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17693   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17694   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17695 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17696 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17697   echo $ECHO_N "(cached) $ECHO_C" >&6
17698 fi
17699 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17700 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17701 else
17702   # Is the header compilable?
17703 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17704 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6; }
17705 cat >conftest.$ac_ext <<_ACEOF
17706 /* confdefs.h.  */
17707 _ACEOF
17708 cat confdefs.h >>conftest.$ac_ext
17709 cat >>conftest.$ac_ext <<_ACEOF
17710 /* end confdefs.h.  */
17711 $ac_includes_default
17712 #include <gdk-pixbuf/gdk-pixbuf.h>
17713 _ACEOF
17714 rm -f conftest.$ac_objext
17715 if { (ac_try="$ac_compile"
17716 case "(($ac_try" in
17717   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17718   *) ac_try_echo=$ac_try;;
17719 esac
17720 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17721   (eval "$ac_compile") 2>conftest.er1
17722   ac_status=$?
17723   grep -v '^ *+' conftest.er1 >conftest.err
17724   rm -f conftest.er1
17725   cat conftest.err >&5
17726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17727   (exit $ac_status); } && {
17728          test -z "$ac_c_werror_flag" ||
17729          test ! -s conftest.err
17730        } && test -s conftest.$ac_objext; then
17731   ac_header_compiler=yes
17732 else
17733   echo "$as_me: failed program was:" >&5
17734 sed 's/^/| /' conftest.$ac_ext >&5
17735
17736         ac_header_compiler=no
17737 fi
17738
17739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17740 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17741 echo "${ECHO_T}$ac_header_compiler" >&6; }
17742
17743 # Is the header present?
17744 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17745 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6; }
17746 cat >conftest.$ac_ext <<_ACEOF
17747 /* confdefs.h.  */
17748 _ACEOF
17749 cat confdefs.h >>conftest.$ac_ext
17750 cat >>conftest.$ac_ext <<_ACEOF
17751 /* end confdefs.h.  */
17752 #include <gdk-pixbuf/gdk-pixbuf.h>
17753 _ACEOF
17754 if { (ac_try="$ac_cpp conftest.$ac_ext"
17755 case "(($ac_try" in
17756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17757   *) ac_try_echo=$ac_try;;
17758 esac
17759 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17760   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17761   ac_status=$?
17762   grep -v '^ *+' conftest.er1 >conftest.err
17763   rm -f conftest.er1
17764   cat conftest.err >&5
17765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17766   (exit $ac_status); } >/dev/null && {
17767          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17768          test ! -s conftest.err
17769        }; then
17770   ac_header_preproc=yes
17771 else
17772   echo "$as_me: failed program was:" >&5
17773 sed 's/^/| /' conftest.$ac_ext >&5
17774
17775   ac_header_preproc=no
17776 fi
17777
17778 rm -f conftest.err conftest.$ac_ext
17779 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17780 echo "${ECHO_T}$ac_header_preproc" >&6; }
17781
17782 # So?  What about this header?
17783 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17784   yes:no: )
17785     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17786 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17787     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17788 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17789     ac_header_preproc=yes
17790     ;;
17791   no:yes:* )
17792     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17793 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17794     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17795 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17796     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17797 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17798     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17799 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17800     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17801 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17802     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17803 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17804
17805     ;;
17806 esac
17807 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17808 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6; }
17809 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17810   echo $ECHO_N "(cached) $ECHO_C" >&6
17811 else
17812   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17813 fi
17814 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17815 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6; }
17816
17817 fi
17818 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17819   have_gdk_pixbuf=yes
17820 fi
17821
17822
17823   CPPFLAGS="$ac_save_CPPFLAGS"
17824
17825     # if that worked, check for header B...
17826     if test "$have_gdk_pixbuf" = yes; then
17827       have_gdk_pixbuf=no
17828       gdk_pixbuf_halfassed=yes
17829
17830   ac_save_CPPFLAGS="$CPPFLAGS"
17831   if test \! -z "$includedir" ; then
17832     CPPFLAGS="$CPPFLAGS -I$includedir"
17833   fi
17834   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17835   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17836   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17837   { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17838 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17839 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17840   echo $ECHO_N "(cached) $ECHO_C" >&6
17841 fi
17842 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17843 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17844 else
17845   # Is the header compilable?
17846 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17847 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17848 cat >conftest.$ac_ext <<_ACEOF
17849 /* confdefs.h.  */
17850 _ACEOF
17851 cat confdefs.h >>conftest.$ac_ext
17852 cat >>conftest.$ac_ext <<_ACEOF
17853 /* end confdefs.h.  */
17854 $ac_includes_default
17855 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17856 _ACEOF
17857 rm -f conftest.$ac_objext
17858 if { (ac_try="$ac_compile"
17859 case "(($ac_try" in
17860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17861   *) ac_try_echo=$ac_try;;
17862 esac
17863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17864   (eval "$ac_compile") 2>conftest.er1
17865   ac_status=$?
17866   grep -v '^ *+' conftest.er1 >conftest.err
17867   rm -f conftest.er1
17868   cat conftest.err >&5
17869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17870   (exit $ac_status); } && {
17871          test -z "$ac_c_werror_flag" ||
17872          test ! -s conftest.err
17873        } && test -s conftest.$ac_objext; then
17874   ac_header_compiler=yes
17875 else
17876   echo "$as_me: failed program was:" >&5
17877 sed 's/^/| /' conftest.$ac_ext >&5
17878
17879         ac_header_compiler=no
17880 fi
17881
17882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17883 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17884 echo "${ECHO_T}$ac_header_compiler" >&6; }
17885
17886 # Is the header present?
17887 { echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17888 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
17889 cat >conftest.$ac_ext <<_ACEOF
17890 /* confdefs.h.  */
17891 _ACEOF
17892 cat confdefs.h >>conftest.$ac_ext
17893 cat >>conftest.$ac_ext <<_ACEOF
17894 /* end confdefs.h.  */
17895 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17896 _ACEOF
17897 if { (ac_try="$ac_cpp conftest.$ac_ext"
17898 case "(($ac_try" in
17899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17900   *) ac_try_echo=$ac_try;;
17901 esac
17902 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17903   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17904   ac_status=$?
17905   grep -v '^ *+' conftest.er1 >conftest.err
17906   rm -f conftest.er1
17907   cat conftest.err >&5
17908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17909   (exit $ac_status); } >/dev/null && {
17910          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17911          test ! -s conftest.err
17912        }; then
17913   ac_header_preproc=yes
17914 else
17915   echo "$as_me: failed program was:" >&5
17916 sed 's/^/| /' conftest.$ac_ext >&5
17917
17918   ac_header_preproc=no
17919 fi
17920
17921 rm -f conftest.err conftest.$ac_ext
17922 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17923 echo "${ECHO_T}$ac_header_preproc" >&6; }
17924
17925 # So?  What about this header?
17926 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17927   yes:no: )
17928     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17929 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17930     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17931 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17932     ac_header_preproc=yes
17933     ;;
17934   no:yes:* )
17935     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17936 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17937     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17938 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17939     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17940 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17941     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17942 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17943     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17944 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17945     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17946 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17947
17948     ;;
17949 esac
17950 { echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17951 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17952 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17953   echo $ECHO_N "(cached) $ECHO_C" >&6
17954 else
17955   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17956 fi
17957 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17958 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6; }
17959
17960 fi
17961 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17962   have_gdk_pixbuf=yes
17963                          gdk_pixbuf_halfassed=no
17964 fi
17965
17966
17967   CPPFLAGS="$ac_save_CPPFLAGS"
17968
17969       # yay, it has a new name in Gtk 2.x...
17970       if test "$have_gdk_pixbuf" = no; then
17971         have_gdk_pixbuf=no
17972         gdk_pixbuf_halfassed=yes
17973
17974   ac_save_CPPFLAGS="$CPPFLAGS"
17975   if test \! -z "$includedir" ; then
17976     CPPFLAGS="$CPPFLAGS -I$includedir"
17977   fi
17978   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17979   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
17980   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17981   { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17982 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
17983 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17984   echo $ECHO_N "(cached) $ECHO_C" >&6
17985 fi
17986 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17987 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
17988 else
17989   # Is the header compilable?
17990 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17991 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6; }
17992 cat >conftest.$ac_ext <<_ACEOF
17993 /* confdefs.h.  */
17994 _ACEOF
17995 cat confdefs.h >>conftest.$ac_ext
17996 cat >>conftest.$ac_ext <<_ACEOF
17997 /* end confdefs.h.  */
17998 $ac_includes_default
17999 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18000 _ACEOF
18001 rm -f conftest.$ac_objext
18002 if { (ac_try="$ac_compile"
18003 case "(($ac_try" in
18004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18005   *) ac_try_echo=$ac_try;;
18006 esac
18007 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18008   (eval "$ac_compile") 2>conftest.er1
18009   ac_status=$?
18010   grep -v '^ *+' conftest.er1 >conftest.err
18011   rm -f conftest.er1
18012   cat conftest.err >&5
18013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18014   (exit $ac_status); } && {
18015          test -z "$ac_c_werror_flag" ||
18016          test ! -s conftest.err
18017        } && test -s conftest.$ac_objext; then
18018   ac_header_compiler=yes
18019 else
18020   echo "$as_me: failed program was:" >&5
18021 sed 's/^/| /' conftest.$ac_ext >&5
18022
18023         ac_header_compiler=no
18024 fi
18025
18026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18027 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18028 echo "${ECHO_T}$ac_header_compiler" >&6; }
18029
18030 # Is the header present?
18031 { echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18032 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6; }
18033 cat >conftest.$ac_ext <<_ACEOF
18034 /* confdefs.h.  */
18035 _ACEOF
18036 cat confdefs.h >>conftest.$ac_ext
18037 cat >>conftest.$ac_ext <<_ACEOF
18038 /* end confdefs.h.  */
18039 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18040 _ACEOF
18041 if { (ac_try="$ac_cpp conftest.$ac_ext"
18042 case "(($ac_try" in
18043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18044   *) ac_try_echo=$ac_try;;
18045 esac
18046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18047   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18048   ac_status=$?
18049   grep -v '^ *+' conftest.er1 >conftest.err
18050   rm -f conftest.er1
18051   cat conftest.err >&5
18052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18053   (exit $ac_status); } >/dev/null && {
18054          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18055          test ! -s conftest.err
18056        }; then
18057   ac_header_preproc=yes
18058 else
18059   echo "$as_me: failed program was:" >&5
18060 sed 's/^/| /' conftest.$ac_ext >&5
18061
18062   ac_header_preproc=no
18063 fi
18064
18065 rm -f conftest.err conftest.$ac_ext
18066 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18067 echo "${ECHO_T}$ac_header_preproc" >&6; }
18068
18069 # So?  What about this header?
18070 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18071   yes:no: )
18072     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18073 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18074     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18075 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18076     ac_header_preproc=yes
18077     ;;
18078   no:yes:* )
18079     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18080 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18081     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18082 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18083     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18084 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18085     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18086 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18087     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18088 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18089     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18090 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18091
18092     ;;
18093 esac
18094 { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18095 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6; }
18096 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18097   echo $ECHO_N "(cached) $ECHO_C" >&6
18098 else
18099   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18100 fi
18101 { echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18102 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6; }
18103
18104 fi
18105 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18106   have_gdk_pixbuf=yes
18107                            gdk_pixbuf_halfassed=no
18108 fi
18109
18110
18111   CPPFLAGS="$ac_save_CPPFLAGS"
18112       fi
18113     fi
18114     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18115   fi
18116
18117   if test "$have_gdk_pixbuf" = yes; then
18118     # we have the headers, now check for the libraries
18119     have_gdk_pixbuf=no
18120     gdk_pixbuf_halfassed=yes
18121
18122     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
18123 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6; }
18124
18125     # library A...
18126
18127   ac_save_CPPFLAGS="$CPPFLAGS"
18128   ac_save_LDFLAGS="$LDFLAGS"
18129 #  ac_save_LIBS="$LIBS"
18130
18131   if test \! -z "$includedir" ; then
18132     CPPFLAGS="$CPPFLAGS -I$includedir"
18133   fi
18134   # note: $X_CFLAGS includes $x_includes
18135   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18136
18137   if test \! -z "$libdir" ; then
18138     LDFLAGS="$LDFLAGS -L$libdir"
18139   fi
18140   # note: $X_LIBS includes $x_libraries
18141   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18142
18143   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18144   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18145   { echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18146 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6; }
18147 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 else
18150   ac_check_lib_save_LIBS=$LIBS
18151 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18152 cat >conftest.$ac_ext <<_ACEOF
18153 /* confdefs.h.  */
18154 _ACEOF
18155 cat confdefs.h >>conftest.$ac_ext
18156 cat >>conftest.$ac_ext <<_ACEOF
18157 /* end confdefs.h.  */
18158
18159 /* Override any GCC internal prototype to avoid an error.
18160    Use char because int might match the return type of a GCC
18161    builtin and then its argument prototype would still apply.  */
18162 #ifdef __cplusplus
18163 extern "C"
18164 #endif
18165 char gdk_pixbuf_new_from_file ();
18166 int
18167 main ()
18168 {
18169 return gdk_pixbuf_new_from_file ();
18170   ;
18171   return 0;
18172 }
18173 _ACEOF
18174 rm -f conftest.$ac_objext conftest$ac_exeext
18175 if { (ac_try="$ac_link"
18176 case "(($ac_try" in
18177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18178   *) ac_try_echo=$ac_try;;
18179 esac
18180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18181   (eval "$ac_link") 2>conftest.er1
18182   ac_status=$?
18183   grep -v '^ *+' conftest.er1 >conftest.err
18184   rm -f conftest.er1
18185   cat conftest.err >&5
18186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18187   (exit $ac_status); } && {
18188          test -z "$ac_c_werror_flag" ||
18189          test ! -s conftest.err
18190        } && test -s conftest$ac_exeext &&
18191        $as_test_x conftest$ac_exeext; then
18192   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
18193 else
18194   echo "$as_me: failed program was:" >&5
18195 sed 's/^/| /' conftest.$ac_ext >&5
18196
18197         ac_cv_lib_c_gdk_pixbuf_new_from_file=no
18198 fi
18199
18200 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18201       conftest$ac_exeext conftest.$ac_ext
18202 LIBS=$ac_check_lib_save_LIBS
18203 fi
18204 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
18205 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6; }
18206 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
18207   have_gdk_pixbuf=yes
18208 fi
18209
18210   CPPFLAGS="$ac_save_CPPFLAGS"
18211   LDFLAGS="$ac_save_LDFLAGS"
18212 #  LIBS="$ac_save_LIBS"
18213
18214     # library B...
18215     if test "$have_gdk_pixbuf" = yes; then
18216       have_gdk_pixbuf=no
18217
18218   ac_save_CPPFLAGS="$CPPFLAGS"
18219   ac_save_LDFLAGS="$LDFLAGS"
18220 #  ac_save_LIBS="$LIBS"
18221
18222   if test \! -z "$includedir" ; then
18223     CPPFLAGS="$CPPFLAGS -I$includedir"
18224   fi
18225   # note: $X_CFLAGS includes $x_includes
18226   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18227
18228   if test \! -z "$libdir" ; then
18229     LDFLAGS="$LDFLAGS -L$libdir"
18230   fi
18231   # note: $X_LIBS includes $x_libraries
18232   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18233
18234   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18235   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18236   { echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
18237 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6; }
18238 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
18239   echo $ECHO_N "(cached) $ECHO_C" >&6
18240 else
18241   ac_check_lib_save_LIBS=$LIBS
18242 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18243 cat >conftest.$ac_ext <<_ACEOF
18244 /* confdefs.h.  */
18245 _ACEOF
18246 cat confdefs.h >>conftest.$ac_ext
18247 cat >>conftest.$ac_ext <<_ACEOF
18248 /* end confdefs.h.  */
18249
18250 /* Override any GCC internal prototype to avoid an error.
18251    Use char because int might match the return type of a GCC
18252    builtin and then its argument prototype would still apply.  */
18253 #ifdef __cplusplus
18254 extern "C"
18255 #endif
18256 char gdk_pixbuf_xlib_init ();
18257 int
18258 main ()
18259 {
18260 return gdk_pixbuf_xlib_init ();
18261   ;
18262   return 0;
18263 }
18264 _ACEOF
18265 rm -f conftest.$ac_objext conftest$ac_exeext
18266 if { (ac_try="$ac_link"
18267 case "(($ac_try" in
18268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269   *) ac_try_echo=$ac_try;;
18270 esac
18271 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18272   (eval "$ac_link") 2>conftest.er1
18273   ac_status=$?
18274   grep -v '^ *+' conftest.er1 >conftest.err
18275   rm -f conftest.er1
18276   cat conftest.err >&5
18277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18278   (exit $ac_status); } && {
18279          test -z "$ac_c_werror_flag" ||
18280          test ! -s conftest.err
18281        } && test -s conftest$ac_exeext &&
18282        $as_test_x conftest$ac_exeext; then
18283   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
18284 else
18285   echo "$as_me: failed program was:" >&5
18286 sed 's/^/| /' conftest.$ac_ext >&5
18287
18288         ac_cv_lib_c_gdk_pixbuf_xlib_init=no
18289 fi
18290
18291 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18292       conftest$ac_exeext conftest.$ac_ext
18293 LIBS=$ac_check_lib_save_LIBS
18294 fi
18295 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
18296 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6; }
18297 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
18298   have_gdk_pixbuf=yes
18299                       gdk_pixbuf_halfassed=no
18300 fi
18301
18302   CPPFLAGS="$ac_save_CPPFLAGS"
18303   LDFLAGS="$ac_save_LDFLAGS"
18304 #  LIBS="$ac_save_LIBS"
18305
18306     fi
18307   fi
18308
18309   if test "$have_gdk_pixbuf" = yes; then
18310     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
18311     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
18312     cat >>confdefs.h <<\_ACEOF
18313 #define HAVE_GDK_PIXBUF 1
18314 _ACEOF
18315
18316   else
18317     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
18318 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
18319   fi
18320
18321   if test "$have_gdk_pixbuf" = yes; then
18322
18323   ac_save_CPPFLAGS="$CPPFLAGS"
18324   ac_save_LDFLAGS="$LDFLAGS"
18325 #  ac_save_LIBS="$LIBS"
18326
18327   if test \! -z "$includedir" ; then
18328     CPPFLAGS="$CPPFLAGS -I$includedir"
18329   fi
18330   # note: $X_CFLAGS includes $x_includes
18331   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18332
18333   if test \! -z "$libdir" ; then
18334     LDFLAGS="$LDFLAGS -L$libdir"
18335   fi
18336   # note: $X_LIBS includes $x_libraries
18337   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18338
18339   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18340   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18341   { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
18342 echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
18343 if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
18344   echo $ECHO_N "(cached) $ECHO_C" >&6
18345 else
18346   ac_check_lib_save_LIBS=$LIBS
18347 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18348 cat >conftest.$ac_ext <<_ACEOF
18349 /* confdefs.h.  */
18350 _ACEOF
18351 cat confdefs.h >>conftest.$ac_ext
18352 cat >>conftest.$ac_ext <<_ACEOF
18353 /* end confdefs.h.  */
18354
18355 /* Override any GCC internal prototype to avoid an error.
18356    Use char because int might match the return type of a GCC
18357    builtin and then its argument prototype would still apply.  */
18358 #ifdef __cplusplus
18359 extern "C"
18360 #endif
18361 char gdk_pixbuf_apply_embedded_orientation ();
18362 int
18363 main ()
18364 {
18365 return gdk_pixbuf_apply_embedded_orientation ();
18366   ;
18367   return 0;
18368 }
18369 _ACEOF
18370 rm -f conftest.$ac_objext conftest$ac_exeext
18371 if { (ac_try="$ac_link"
18372 case "(($ac_try" in
18373   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374   *) ac_try_echo=$ac_try;;
18375 esac
18376 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18377   (eval "$ac_link") 2>conftest.er1
18378   ac_status=$?
18379   grep -v '^ *+' conftest.er1 >conftest.err
18380   rm -f conftest.er1
18381   cat conftest.err >&5
18382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18383   (exit $ac_status); } && {
18384          test -z "$ac_c_werror_flag" ||
18385          test ! -s conftest.err
18386        } && test -s conftest$ac_exeext &&
18387        $as_test_x conftest$ac_exeext; then
18388   ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
18389 else
18390   echo "$as_me: failed program was:" >&5
18391 sed 's/^/| /' conftest.$ac_ext >&5
18392
18393         ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
18394 fi
18395
18396 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18397       conftest$ac_exeext conftest.$ac_ext
18398 LIBS=$ac_check_lib_save_LIBS
18399 fi
18400 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
18401 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
18402 if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
18403   cat >>confdefs.h <<\_ACEOF
18404 #define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
18405 _ACEOF
18406
18407 fi
18408
18409   CPPFLAGS="$ac_save_CPPFLAGS"
18410   LDFLAGS="$ac_save_LDFLAGS"
18411 #  LIBS="$ac_save_LIBS"
18412
18413   fi
18414 fi
18415
18416
18417 ###############################################################################
18418 #
18419 #       Check for -lXpm.
18420 #
18421 ###############################################################################
18422
18423 have_xpm=no
18424 with_xpm_req=unspecified
18425
18426 # Check whether --with-xpm was given.
18427 if test "${with_xpm+set}" = set; then
18428   withval=$with_xpm; with_xpm="$withval"; with_xpm_req="$withval"
18429 else
18430   with_xpm=yes
18431 fi
18432
18433
18434
18435    case "$with_xpm" in
18436     yes) ;;
18437     no)  ;;
18438
18439     /*)
18440      { echo "$as_me:$LINENO: checking for XPM headers" >&5
18441 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6; }
18442      d=$with_xpm/include
18443      if test -d $d; then
18444        X_CFLAGS="-I$d $X_CFLAGS"
18445        { echo "$as_me:$LINENO: result: $d" >&5
18446 echo "${ECHO_T}$d" >&6; }
18447      else
18448        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18449 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18450      fi
18451
18452      { echo "$as_me:$LINENO: checking for XPM libs" >&5
18453 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6; }
18454      d=$with_xpm/lib
18455      if test -d $d; then
18456        X_LIBS="-L$d $X_LIBS"
18457        { echo "$as_me:$LINENO: result: $d" >&5
18458 echo "${ECHO_T}$d" >&6; }
18459      else
18460        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18461 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18462      fi
18463
18464      # replace the directory string with "yes".
18465      with_xpm_req="yes"
18466      with_xpm=$with_xpm_req
18467      ;;
18468
18469     *)
18470      echo ""
18471      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18472      echo "       If it is a directory, then \`DIR/include' will be added to"
18473      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18474      exit 1
18475      ;;
18476    esac
18477
18478
18479 if test "$with_xpm" = yes; then
18480
18481   ac_save_CPPFLAGS="$CPPFLAGS"
18482   if test \! -z "$includedir" ; then
18483     CPPFLAGS="$CPPFLAGS -I$includedir"
18484   fi
18485   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18486   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18487   { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18488 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
18489 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18490   echo $ECHO_N "(cached) $ECHO_C" >&6
18491 else
18492   cat >conftest.$ac_ext <<_ACEOF
18493 /* confdefs.h.  */
18494 _ACEOF
18495 cat confdefs.h >>conftest.$ac_ext
18496 cat >>conftest.$ac_ext <<_ACEOF
18497 /* end confdefs.h.  */
18498 #include <X11/Xlib.h>
18499
18500 #include <X11/xpm.h>
18501 _ACEOF
18502 rm -f conftest.$ac_objext
18503 if { (ac_try="$ac_compile"
18504 case "(($ac_try" in
18505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18506   *) ac_try_echo=$ac_try;;
18507 esac
18508 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18509   (eval "$ac_compile") 2>conftest.er1
18510   ac_status=$?
18511   grep -v '^ *+' conftest.er1 >conftest.err
18512   rm -f conftest.er1
18513   cat conftest.err >&5
18514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18515   (exit $ac_status); } && {
18516          test -z "$ac_c_werror_flag" ||
18517          test ! -s conftest.err
18518        } && test -s conftest.$ac_objext; then
18519   ac_cv_header_X11_xpm_h=yes
18520 else
18521   echo "$as_me: failed program was:" >&5
18522 sed 's/^/| /' conftest.$ac_ext >&5
18523
18524         ac_cv_header_X11_xpm_h=no
18525 fi
18526
18527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18528 fi
18529 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18530 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
18531 if test $ac_cv_header_X11_xpm_h = yes; then
18532   have_xpm=yes
18533                     cat >>confdefs.h <<\_ACEOF
18534 #define HAVE_XPM 1
18535 _ACEOF
18536
18537                     XPM_LIBS="-lXpm $XPM_LIBS"
18538 fi
18539
18540
18541   CPPFLAGS="$ac_save_CPPFLAGS"
18542 elif test "$with_xpm" != no; then
18543   echo "error: must be yes or no: --with-xpm=$with_xpm"
18544   exit 1
18545 fi
18546
18547 # See comment near $motif_requires_xpm, above.
18548 # Need to do this here, after both Motif and XPM have been checked for.
18549 #
18550 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18551   if test "$motif_requires_xpm" = yes ; then
18552     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18553   fi
18554 fi
18555
18556 if test "$XPM_LIBS" = "" ; then
18557   XPM_LIBS=$(MINIXPM)
18558 fi
18559
18560
18561 ###############################################################################
18562 #
18563 #       Check for -ljpeg
18564 #
18565 ###############################################################################
18566
18567 have_jpeg=no
18568 with_jpeg_req=unspecified
18569 jpeg_halfassed=no
18570
18571 # Check whether --with-jpeg was given.
18572 if test "${with_jpeg+set}" = set; then
18573   withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
18574 else
18575   with_jpeg=yes
18576 fi
18577
18578
18579
18580    case "$with_jpeg" in
18581     yes) ;;
18582     no)  ;;
18583
18584     /*)
18585      { echo "$as_me:$LINENO: checking for JPEG headers" >&5
18586 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6; }
18587      d=$with_jpeg/include
18588      if test -d $d; then
18589        X_CFLAGS="-I$d $X_CFLAGS"
18590        { echo "$as_me:$LINENO: result: $d" >&5
18591 echo "${ECHO_T}$d" >&6; }
18592      else
18593        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18594 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18595      fi
18596
18597      { echo "$as_me:$LINENO: checking for JPEG libs" >&5
18598 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6; }
18599      d=$with_jpeg/lib
18600      if test -d $d; then
18601        X_LIBS="-L$d $X_LIBS"
18602        { echo "$as_me:$LINENO: result: $d" >&5
18603 echo "${ECHO_T}$d" >&6; }
18604      else
18605        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18606 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
18607      fi
18608
18609      # replace the directory string with "yes".
18610      with_jpeg_req="yes"
18611      with_jpeg=$with_jpeg_req
18612      ;;
18613
18614     *)
18615      echo ""
18616      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18617      echo "       If it is a directory, then \`DIR/include' will be added to"
18618      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18619      exit 1
18620      ;;
18621    esac
18622
18623
18624 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18625   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18626   exit 1
18627 fi
18628
18629 if test "$with_jpeg" = yes; then
18630
18631   have_jpeg=no
18632
18633   ac_save_CPPFLAGS="$CPPFLAGS"
18634   if test \! -z "$includedir" ; then
18635     CPPFLAGS="$CPPFLAGS -I$includedir"
18636   fi
18637   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18638   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18639   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18640   { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18641 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18642 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 fi
18645 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18646 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18647 else
18648   # Is the header compilable?
18649 { echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18650 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
18651 cat >conftest.$ac_ext <<_ACEOF
18652 /* confdefs.h.  */
18653 _ACEOF
18654 cat confdefs.h >>conftest.$ac_ext
18655 cat >>conftest.$ac_ext <<_ACEOF
18656 /* end confdefs.h.  */
18657 $ac_includes_default
18658 #include <jpeglib.h>
18659 _ACEOF
18660 rm -f conftest.$ac_objext
18661 if { (ac_try="$ac_compile"
18662 case "(($ac_try" in
18663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18664   *) ac_try_echo=$ac_try;;
18665 esac
18666 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18667   (eval "$ac_compile") 2>conftest.er1
18668   ac_status=$?
18669   grep -v '^ *+' conftest.er1 >conftest.err
18670   rm -f conftest.er1
18671   cat conftest.err >&5
18672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18673   (exit $ac_status); } && {
18674          test -z "$ac_c_werror_flag" ||
18675          test ! -s conftest.err
18676        } && test -s conftest.$ac_objext; then
18677   ac_header_compiler=yes
18678 else
18679   echo "$as_me: failed program was:" >&5
18680 sed 's/^/| /' conftest.$ac_ext >&5
18681
18682         ac_header_compiler=no
18683 fi
18684
18685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18686 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18687 echo "${ECHO_T}$ac_header_compiler" >&6; }
18688
18689 # Is the header present?
18690 { echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18691 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
18692 cat >conftest.$ac_ext <<_ACEOF
18693 /* confdefs.h.  */
18694 _ACEOF
18695 cat confdefs.h >>conftest.$ac_ext
18696 cat >>conftest.$ac_ext <<_ACEOF
18697 /* end confdefs.h.  */
18698 #include <jpeglib.h>
18699 _ACEOF
18700 if { (ac_try="$ac_cpp conftest.$ac_ext"
18701 case "(($ac_try" in
18702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18703   *) ac_try_echo=$ac_try;;
18704 esac
18705 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18706   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18707   ac_status=$?
18708   grep -v '^ *+' conftest.er1 >conftest.err
18709   rm -f conftest.er1
18710   cat conftest.err >&5
18711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18712   (exit $ac_status); } >/dev/null && {
18713          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18714          test ! -s conftest.err
18715        }; then
18716   ac_header_preproc=yes
18717 else
18718   echo "$as_me: failed program was:" >&5
18719 sed 's/^/| /' conftest.$ac_ext >&5
18720
18721   ac_header_preproc=no
18722 fi
18723
18724 rm -f conftest.err conftest.$ac_ext
18725 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18726 echo "${ECHO_T}$ac_header_preproc" >&6; }
18727
18728 # So?  What about this header?
18729 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18730   yes:no: )
18731     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18732 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18733     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18734 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18735     ac_header_preproc=yes
18736     ;;
18737   no:yes:* )
18738     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18739 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18740     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18741 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18742     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18743 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18744     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18745 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18746     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18747 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18748     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18749 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18750
18751     ;;
18752 esac
18753 { echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18754 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; }
18755 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18756   echo $ECHO_N "(cached) $ECHO_C" >&6
18757 else
18758   ac_cv_header_jpeglib_h=$ac_header_preproc
18759 fi
18760 { echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18761 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
18762
18763 fi
18764 if test $ac_cv_header_jpeglib_h = yes; then
18765   have_jpeg=yes
18766 fi
18767
18768
18769   CPPFLAGS="$ac_save_CPPFLAGS"
18770
18771   if test "$have_jpeg" = yes; then
18772     # we have the header, now check for the library
18773     have_jpeg=no
18774     jpeg_halfassed=yes
18775
18776   ac_save_CPPFLAGS="$CPPFLAGS"
18777   ac_save_LDFLAGS="$LDFLAGS"
18778 #  ac_save_LIBS="$LIBS"
18779
18780   if test \! -z "$includedir" ; then
18781     CPPFLAGS="$CPPFLAGS -I$includedir"
18782   fi
18783   # note: $X_CFLAGS includes $x_includes
18784   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18785
18786   if test \! -z "$libdir" ; then
18787     LDFLAGS="$LDFLAGS -L$libdir"
18788   fi
18789   # note: $X_LIBS includes $x_libraries
18790   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18791
18792   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
18793   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
18794   { echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18795 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6; }
18796 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18797   echo $ECHO_N "(cached) $ECHO_C" >&6
18798 else
18799   ac_check_lib_save_LIBS=$LIBS
18800 LIBS="-ljpeg  $LIBS"
18801 cat >conftest.$ac_ext <<_ACEOF
18802 /* confdefs.h.  */
18803 _ACEOF
18804 cat confdefs.h >>conftest.$ac_ext
18805 cat >>conftest.$ac_ext <<_ACEOF
18806 /* end confdefs.h.  */
18807
18808 /* Override any GCC internal prototype to avoid an error.
18809    Use char because int might match the return type of a GCC
18810    builtin and then its argument prototype would still apply.  */
18811 #ifdef __cplusplus
18812 extern "C"
18813 #endif
18814 char jpeg_start_compress ();
18815 int
18816 main ()
18817 {
18818 return jpeg_start_compress ();
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 rm -f conftest.$ac_objext conftest$ac_exeext
18824 if { (ac_try="$ac_link"
18825 case "(($ac_try" in
18826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18827   *) ac_try_echo=$ac_try;;
18828 esac
18829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18830   (eval "$ac_link") 2>conftest.er1
18831   ac_status=$?
18832   grep -v '^ *+' conftest.er1 >conftest.err
18833   rm -f conftest.er1
18834   cat conftest.err >&5
18835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18836   (exit $ac_status); } && {
18837          test -z "$ac_c_werror_flag" ||
18838          test ! -s conftest.err
18839        } && test -s conftest$ac_exeext &&
18840        $as_test_x conftest$ac_exeext; then
18841   ac_cv_lib_jpeg_jpeg_start_compress=yes
18842 else
18843   echo "$as_me: failed program was:" >&5
18844 sed 's/^/| /' conftest.$ac_ext >&5
18845
18846         ac_cv_lib_jpeg_jpeg_start_compress=no
18847 fi
18848
18849 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18850       conftest$ac_exeext conftest.$ac_ext
18851 LIBS=$ac_check_lib_save_LIBS
18852 fi
18853 { echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18854 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
18855 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18856   have_jpeg=yes
18857                     jpeg_halfassed=no
18858                     JPEG_LIBS="-ljpeg"
18859                     cat >>confdefs.h <<\_ACEOF
18860 #define HAVE_JPEGLIB 1
18861 _ACEOF
18862
18863 fi
18864
18865   CPPFLAGS="$ac_save_CPPFLAGS"
18866   LDFLAGS="$ac_save_LDFLAGS"
18867 #  LIBS="$ac_save_LIBS"
18868
18869   fi
18870 fi
18871
18872
18873 ###############################################################################
18874 #
18875 #       Check for pty support: this allows 'phosphor' and 'apple2'
18876 #       to run curses-based programs, or be used as terminal windows.
18877 #
18878 ###############################################################################
18879
18880 PTY_LIBS=
18881
18882
18883 for ac_header in pty.h util.h
18884 do
18885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18886 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18887   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18889 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18890   echo $ECHO_N "(cached) $ECHO_C" >&6
18891 fi
18892 ac_res=`eval echo '${'$as_ac_Header'}'`
18893                { echo "$as_me:$LINENO: result: $ac_res" >&5
18894 echo "${ECHO_T}$ac_res" >&6; }
18895 else
18896   # Is the header compilable?
18897 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18898 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18899 cat >conftest.$ac_ext <<_ACEOF
18900 /* confdefs.h.  */
18901 _ACEOF
18902 cat confdefs.h >>conftest.$ac_ext
18903 cat >>conftest.$ac_ext <<_ACEOF
18904 /* end confdefs.h.  */
18905 $ac_includes_default
18906 #include <$ac_header>
18907 _ACEOF
18908 rm -f conftest.$ac_objext
18909 if { (ac_try="$ac_compile"
18910 case "(($ac_try" in
18911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18912   *) ac_try_echo=$ac_try;;
18913 esac
18914 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18915   (eval "$ac_compile") 2>conftest.er1
18916   ac_status=$?
18917   grep -v '^ *+' conftest.er1 >conftest.err
18918   rm -f conftest.er1
18919   cat conftest.err >&5
18920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18921   (exit $ac_status); } && {
18922          test -z "$ac_c_werror_flag" ||
18923          test ! -s conftest.err
18924        } && test -s conftest.$ac_objext; then
18925   ac_header_compiler=yes
18926 else
18927   echo "$as_me: failed program was:" >&5
18928 sed 's/^/| /' conftest.$ac_ext >&5
18929
18930         ac_header_compiler=no
18931 fi
18932
18933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18934 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18935 echo "${ECHO_T}$ac_header_compiler" >&6; }
18936
18937 # Is the header present?
18938 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18939 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18940 cat >conftest.$ac_ext <<_ACEOF
18941 /* confdefs.h.  */
18942 _ACEOF
18943 cat confdefs.h >>conftest.$ac_ext
18944 cat >>conftest.$ac_ext <<_ACEOF
18945 /* end confdefs.h.  */
18946 #include <$ac_header>
18947 _ACEOF
18948 if { (ac_try="$ac_cpp conftest.$ac_ext"
18949 case "(($ac_try" in
18950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18951   *) ac_try_echo=$ac_try;;
18952 esac
18953 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18954   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18955   ac_status=$?
18956   grep -v '^ *+' conftest.er1 >conftest.err
18957   rm -f conftest.er1
18958   cat conftest.err >&5
18959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18960   (exit $ac_status); } >/dev/null && {
18961          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18962          test ! -s conftest.err
18963        }; then
18964   ac_header_preproc=yes
18965 else
18966   echo "$as_me: failed program was:" >&5
18967 sed 's/^/| /' conftest.$ac_ext >&5
18968
18969   ac_header_preproc=no
18970 fi
18971
18972 rm -f conftest.err conftest.$ac_ext
18973 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18974 echo "${ECHO_T}$ac_header_preproc" >&6; }
18975
18976 # So?  What about this header?
18977 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18978   yes:no: )
18979     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18980 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18981     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18982 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18983     ac_header_preproc=yes
18984     ;;
18985   no:yes:* )
18986     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18987 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18988     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18989 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18990     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18991 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18992     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18993 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18995 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18996     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18997 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18998
18999     ;;
19000 esac
19001 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19002 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19003 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19004   echo $ECHO_N "(cached) $ECHO_C" >&6
19005 else
19006   eval "$as_ac_Header=\$ac_header_preproc"
19007 fi
19008 ac_res=`eval echo '${'$as_ac_Header'}'`
19009                { echo "$as_me:$LINENO: result: $ac_res" >&5
19010 echo "${ECHO_T}$ac_res" >&6; }
19011
19012 fi
19013 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19014   cat >>confdefs.h <<_ACEOF
19015 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19016 _ACEOF
19017
19018 fi
19019
19020 done
19021
19022
19023   ac_save_CPPFLAGS="$CPPFLAGS"
19024   ac_save_LDFLAGS="$LDFLAGS"
19025 #  ac_save_LIBS="$LIBS"
19026
19027   if test \! -z "$includedir" ; then
19028     CPPFLAGS="$CPPFLAGS -I$includedir"
19029   fi
19030   # note: $X_CFLAGS includes $x_includes
19031   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19032
19033   if test \! -z "$libdir" ; then
19034     LDFLAGS="$LDFLAGS -L$libdir"
19035   fi
19036   # note: $X_LIBS includes $x_libraries
19037   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19038
19039   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19040   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19041   { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19042 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
19043 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19044   echo $ECHO_N "(cached) $ECHO_C" >&6
19045 else
19046   ac_check_lib_save_LIBS=$LIBS
19047 LIBS="-lutil  $LIBS"
19048 cat >conftest.$ac_ext <<_ACEOF
19049 /* confdefs.h.  */
19050 _ACEOF
19051 cat confdefs.h >>conftest.$ac_ext
19052 cat >>conftest.$ac_ext <<_ACEOF
19053 /* end confdefs.h.  */
19054
19055 /* Override any GCC internal prototype to avoid an error.
19056    Use char because int might match the return type of a GCC
19057    builtin and then its argument prototype would still apply.  */
19058 #ifdef __cplusplus
19059 extern "C"
19060 #endif
19061 char forkpty ();
19062 int
19063 main ()
19064 {
19065 return forkpty ();
19066   ;
19067   return 0;
19068 }
19069 _ACEOF
19070 rm -f conftest.$ac_objext conftest$ac_exeext
19071 if { (ac_try="$ac_link"
19072 case "(($ac_try" in
19073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19074   *) ac_try_echo=$ac_try;;
19075 esac
19076 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19077   (eval "$ac_link") 2>conftest.er1
19078   ac_status=$?
19079   grep -v '^ *+' conftest.er1 >conftest.err
19080   rm -f conftest.er1
19081   cat conftest.err >&5
19082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19083   (exit $ac_status); } && {
19084          test -z "$ac_c_werror_flag" ||
19085          test ! -s conftest.err
19086        } && test -s conftest$ac_exeext &&
19087        $as_test_x conftest$ac_exeext; then
19088   ac_cv_lib_util_forkpty=yes
19089 else
19090   echo "$as_me: failed program was:" >&5
19091 sed 's/^/| /' conftest.$ac_ext >&5
19092
19093         ac_cv_lib_util_forkpty=no
19094 fi
19095
19096 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19097       conftest$ac_exeext conftest.$ac_ext
19098 LIBS=$ac_check_lib_save_LIBS
19099 fi
19100 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19101 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19102 if test $ac_cv_lib_util_forkpty = yes; then
19103   PTY_LIBS="-lutil"
19104                 ac_have_forkpty=yes
19105                 cat >>confdefs.h <<\_ACEOF
19106 #define HAVE_FORKPTY 1
19107 _ACEOF
19108
19109 fi
19110
19111   CPPFLAGS="$ac_save_CPPFLAGS"
19112   LDFLAGS="$ac_save_LDFLAGS"
19113 #  LIBS="$ac_save_LIBS"
19114
19115
19116 if test "$ac_have_forkpty" != yes ; then
19117   # we don't need (or have) -lutil on MacOS 10.4.2...
19118
19119   ac_save_CPPFLAGS="$CPPFLAGS"
19120   ac_save_LDFLAGS="$LDFLAGS"
19121 #  ac_save_LIBS="$LIBS"
19122
19123   if test \! -z "$includedir" ; then
19124     CPPFLAGS="$CPPFLAGS -I$includedir"
19125   fi
19126   # note: $X_CFLAGS includes $x_includes
19127   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19128
19129   if test \! -z "$libdir" ; then
19130     LDFLAGS="$LDFLAGS -L$libdir"
19131   fi
19132   # note: $X_LIBS includes $x_libraries
19133   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19134
19135   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19136   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19137   { echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
19138 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6; }
19139 if test "${ac_cv_lib_c_forkpty+set}" = set; then
19140   echo $ECHO_N "(cached) $ECHO_C" >&6
19141 else
19142   ac_check_lib_save_LIBS=$LIBS
19143 LIBS="-lc  $LIBS"
19144 cat >conftest.$ac_ext <<_ACEOF
19145 /* confdefs.h.  */
19146 _ACEOF
19147 cat confdefs.h >>conftest.$ac_ext
19148 cat >>conftest.$ac_ext <<_ACEOF
19149 /* end confdefs.h.  */
19150
19151 /* Override any GCC internal prototype to avoid an error.
19152    Use char because int might match the return type of a GCC
19153    builtin and then its argument prototype would still apply.  */
19154 #ifdef __cplusplus
19155 extern "C"
19156 #endif
19157 char forkpty ();
19158 int
19159 main ()
19160 {
19161 return forkpty ();
19162   ;
19163   return 0;
19164 }
19165 _ACEOF
19166 rm -f conftest.$ac_objext conftest$ac_exeext
19167 if { (ac_try="$ac_link"
19168 case "(($ac_try" in
19169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19170   *) ac_try_echo=$ac_try;;
19171 esac
19172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19173   (eval "$ac_link") 2>conftest.er1
19174   ac_status=$?
19175   grep -v '^ *+' conftest.er1 >conftest.err
19176   rm -f conftest.er1
19177   cat conftest.err >&5
19178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19179   (exit $ac_status); } && {
19180          test -z "$ac_c_werror_flag" ||
19181          test ! -s conftest.err
19182        } && test -s conftest$ac_exeext &&
19183        $as_test_x conftest$ac_exeext; then
19184   ac_cv_lib_c_forkpty=yes
19185 else
19186   echo "$as_me: failed program was:" >&5
19187 sed 's/^/| /' conftest.$ac_ext >&5
19188
19189         ac_cv_lib_c_forkpty=no
19190 fi
19191
19192 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19193       conftest$ac_exeext conftest.$ac_ext
19194 LIBS=$ac_check_lib_save_LIBS
19195 fi
19196 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
19197 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6; }
19198 if test $ac_cv_lib_c_forkpty = yes; then
19199   PTY_LIBS=""
19200                   cat >>confdefs.h <<\_ACEOF
19201 #define HAVE_FORKPTY 1
19202 _ACEOF
19203
19204 fi
19205
19206   CPPFLAGS="$ac_save_CPPFLAGS"
19207   LDFLAGS="$ac_save_LDFLAGS"
19208 #  LIBS="$ac_save_LIBS"
19209
19210 fi
19211
19212 ###############################################################################
19213 #
19214 #       Check for the XSHM server extension.
19215 #
19216 ###############################################################################
19217
19218 have_xshm=no
19219 with_xshm_req=unspecified
19220
19221 # Check whether --with-xshm-ext was given.
19222 if test "${with_xshm_ext+set}" = set; then
19223   withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
19224 else
19225   with_xshm=yes
19226 fi
19227
19228
19229
19230    case "$with_xshm" in
19231     yes) ;;
19232     no)  ;;
19233
19234     /*)
19235      { echo "$as_me:$LINENO: checking for XSHM headers" >&5
19236 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6; }
19237      d=$with_xshm/include
19238      if test -d $d; then
19239        X_CFLAGS="-I$d $X_CFLAGS"
19240        { echo "$as_me:$LINENO: result: $d" >&5
19241 echo "${ECHO_T}$d" >&6; }
19242      else
19243        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19244 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19245      fi
19246
19247      { echo "$as_me:$LINENO: checking for XSHM libs" >&5
19248 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6; }
19249      d=$with_xshm/lib
19250      if test -d $d; then
19251        X_LIBS="-L$d $X_LIBS"
19252        { echo "$as_me:$LINENO: result: $d" >&5
19253 echo "${ECHO_T}$d" >&6; }
19254      else
19255        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19256 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19257      fi
19258
19259      # replace the directory string with "yes".
19260      with_xshm_req="yes"
19261      with_xshm=$with_xshm_req
19262      ;;
19263
19264     *)
19265      echo ""
19266      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19267      echo "       If it is a directory, then \`DIR/include' will be added to"
19268      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19269      exit 1
19270      ;;
19271    esac
19272
19273
19274 if test "$with_xshm" = yes; then
19275
19276   # first check for Xshm.h.
19277
19278   ac_save_CPPFLAGS="$CPPFLAGS"
19279   if test \! -z "$includedir" ; then
19280     CPPFLAGS="$CPPFLAGS -I$includedir"
19281   fi
19282   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19283   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19284   { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19285 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; }
19286 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19287   echo $ECHO_N "(cached) $ECHO_C" >&6
19288 else
19289   cat >conftest.$ac_ext <<_ACEOF
19290 /* confdefs.h.  */
19291 _ACEOF
19292 cat confdefs.h >>conftest.$ac_ext
19293 cat >>conftest.$ac_ext <<_ACEOF
19294 /* end confdefs.h.  */
19295 #include <X11/Xlib.h>
19296
19297 #include <X11/extensions/XShm.h>
19298 _ACEOF
19299 rm -f conftest.$ac_objext
19300 if { (ac_try="$ac_compile"
19301 case "(($ac_try" in
19302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19303   *) ac_try_echo=$ac_try;;
19304 esac
19305 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19306   (eval "$ac_compile") 2>conftest.er1
19307   ac_status=$?
19308   grep -v '^ *+' conftest.er1 >conftest.err
19309   rm -f conftest.er1
19310   cat conftest.err >&5
19311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19312   (exit $ac_status); } && {
19313          test -z "$ac_c_werror_flag" ||
19314          test ! -s conftest.err
19315        } && test -s conftest.$ac_objext; then
19316   ac_cv_header_X11_extensions_XShm_h=yes
19317 else
19318   echo "$as_me: failed program was:" >&5
19319 sed 's/^/| /' conftest.$ac_ext >&5
19320
19321         ac_cv_header_X11_extensions_XShm_h=no
19322 fi
19323
19324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19325 fi
19326 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19327 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; }
19328 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19329   have_xshm=yes
19330 fi
19331
19332
19333   CPPFLAGS="$ac_save_CPPFLAGS"
19334
19335   # if that succeeded, then check for sys/ipc.h.
19336   if test "$have_xshm" = yes; then
19337     have_xshm=no
19338
19339   ac_save_CPPFLAGS="$CPPFLAGS"
19340   if test \! -z "$includedir" ; then
19341     CPPFLAGS="$CPPFLAGS -I$includedir"
19342   fi
19343   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19344   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19345   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19346   { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19347 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19348 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19349   echo $ECHO_N "(cached) $ECHO_C" >&6
19350 fi
19351 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19352 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19353 else
19354   # Is the header compilable?
19355 { echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19356 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; }
19357 cat >conftest.$ac_ext <<_ACEOF
19358 /* confdefs.h.  */
19359 _ACEOF
19360 cat confdefs.h >>conftest.$ac_ext
19361 cat >>conftest.$ac_ext <<_ACEOF
19362 /* end confdefs.h.  */
19363 $ac_includes_default
19364 #include <sys/ipc.h>
19365 _ACEOF
19366 rm -f conftest.$ac_objext
19367 if { (ac_try="$ac_compile"
19368 case "(($ac_try" in
19369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19370   *) ac_try_echo=$ac_try;;
19371 esac
19372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19373   (eval "$ac_compile") 2>conftest.er1
19374   ac_status=$?
19375   grep -v '^ *+' conftest.er1 >conftest.err
19376   rm -f conftest.er1
19377   cat conftest.err >&5
19378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19379   (exit $ac_status); } && {
19380          test -z "$ac_c_werror_flag" ||
19381          test ! -s conftest.err
19382        } && test -s conftest.$ac_objext; then
19383   ac_header_compiler=yes
19384 else
19385   echo "$as_me: failed program was:" >&5
19386 sed 's/^/| /' conftest.$ac_ext >&5
19387
19388         ac_header_compiler=no
19389 fi
19390
19391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19392 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19393 echo "${ECHO_T}$ac_header_compiler" >&6; }
19394
19395 # Is the header present?
19396 { echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19397 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; }
19398 cat >conftest.$ac_ext <<_ACEOF
19399 /* confdefs.h.  */
19400 _ACEOF
19401 cat confdefs.h >>conftest.$ac_ext
19402 cat >>conftest.$ac_ext <<_ACEOF
19403 /* end confdefs.h.  */
19404 #include <sys/ipc.h>
19405 _ACEOF
19406 if { (ac_try="$ac_cpp conftest.$ac_ext"
19407 case "(($ac_try" in
19408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19409   *) ac_try_echo=$ac_try;;
19410 esac
19411 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19412   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19413   ac_status=$?
19414   grep -v '^ *+' conftest.er1 >conftest.err
19415   rm -f conftest.er1
19416   cat conftest.err >&5
19417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19418   (exit $ac_status); } >/dev/null && {
19419          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19420          test ! -s conftest.err
19421        }; then
19422   ac_header_preproc=yes
19423 else
19424   echo "$as_me: failed program was:" >&5
19425 sed 's/^/| /' conftest.$ac_ext >&5
19426
19427   ac_header_preproc=no
19428 fi
19429
19430 rm -f conftest.err conftest.$ac_ext
19431 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19432 echo "${ECHO_T}$ac_header_preproc" >&6; }
19433
19434 # So?  What about this header?
19435 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19436   yes:no: )
19437     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19438 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19439     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19440 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19441     ac_header_preproc=yes
19442     ;;
19443   no:yes:* )
19444     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19445 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19446     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19447 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19448     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19449 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19450     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19451 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19452     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19453 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19454     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19455 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19456
19457     ;;
19458 esac
19459 { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19460 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; }
19461 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19462   echo $ECHO_N "(cached) $ECHO_C" >&6
19463 else
19464   ac_cv_header_sys_ipc_h=$ac_header_preproc
19465 fi
19466 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19467 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; }
19468
19469 fi
19470 if test $ac_cv_header_sys_ipc_h = yes; then
19471   have_xshm=yes
19472 fi
19473
19474
19475   CPPFLAGS="$ac_save_CPPFLAGS"
19476   fi
19477
19478   # if that succeeded, then check for sys/shm.h.
19479   if test "$have_xshm" = yes; then
19480     have_xshm=no
19481
19482   ac_save_CPPFLAGS="$CPPFLAGS"
19483   if test \! -z "$includedir" ; then
19484     CPPFLAGS="$CPPFLAGS -I$includedir"
19485   fi
19486   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19487   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19488   if test "${ac_cv_header_sys_shm_h+set}" = set; then
19489   { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19490 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19491 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19492   echo $ECHO_N "(cached) $ECHO_C" >&6
19493 fi
19494 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19495 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19496 else
19497   # Is the header compilable?
19498 { echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19499 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6; }
19500 cat >conftest.$ac_ext <<_ACEOF
19501 /* confdefs.h.  */
19502 _ACEOF
19503 cat confdefs.h >>conftest.$ac_ext
19504 cat >>conftest.$ac_ext <<_ACEOF
19505 /* end confdefs.h.  */
19506 $ac_includes_default
19507 #include <sys/shm.h>
19508 _ACEOF
19509 rm -f conftest.$ac_objext
19510 if { (ac_try="$ac_compile"
19511 case "(($ac_try" in
19512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19513   *) ac_try_echo=$ac_try;;
19514 esac
19515 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19516   (eval "$ac_compile") 2>conftest.er1
19517   ac_status=$?
19518   grep -v '^ *+' conftest.er1 >conftest.err
19519   rm -f conftest.er1
19520   cat conftest.err >&5
19521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19522   (exit $ac_status); } && {
19523          test -z "$ac_c_werror_flag" ||
19524          test ! -s conftest.err
19525        } && test -s conftest.$ac_objext; then
19526   ac_header_compiler=yes
19527 else
19528   echo "$as_me: failed program was:" >&5
19529 sed 's/^/| /' conftest.$ac_ext >&5
19530
19531         ac_header_compiler=no
19532 fi
19533
19534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19535 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19536 echo "${ECHO_T}$ac_header_compiler" >&6; }
19537
19538 # Is the header present?
19539 { echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19540 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6; }
19541 cat >conftest.$ac_ext <<_ACEOF
19542 /* confdefs.h.  */
19543 _ACEOF
19544 cat confdefs.h >>conftest.$ac_ext
19545 cat >>conftest.$ac_ext <<_ACEOF
19546 /* end confdefs.h.  */
19547 #include <sys/shm.h>
19548 _ACEOF
19549 if { (ac_try="$ac_cpp conftest.$ac_ext"
19550 case "(($ac_try" in
19551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19552   *) ac_try_echo=$ac_try;;
19553 esac
19554 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19555   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19556   ac_status=$?
19557   grep -v '^ *+' conftest.er1 >conftest.err
19558   rm -f conftest.er1
19559   cat conftest.err >&5
19560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19561   (exit $ac_status); } >/dev/null && {
19562          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19563          test ! -s conftest.err
19564        }; then
19565   ac_header_preproc=yes
19566 else
19567   echo "$as_me: failed program was:" >&5
19568 sed 's/^/| /' conftest.$ac_ext >&5
19569
19570   ac_header_preproc=no
19571 fi
19572
19573 rm -f conftest.err conftest.$ac_ext
19574 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19575 echo "${ECHO_T}$ac_header_preproc" >&6; }
19576
19577 # So?  What about this header?
19578 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19579   yes:no: )
19580     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19581 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19582     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19583 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19584     ac_header_preproc=yes
19585     ;;
19586   no:yes:* )
19587     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19588 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19589     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19590 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19591     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19592 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19593     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19594 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19595     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19596 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19597     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19598 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19599
19600     ;;
19601 esac
19602 { echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19603 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6; }
19604 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19605   echo $ECHO_N "(cached) $ECHO_C" >&6
19606 else
19607   ac_cv_header_sys_shm_h=$ac_header_preproc
19608 fi
19609 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19610 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6; }
19611
19612 fi
19613 if test $ac_cv_header_sys_shm_h = yes; then
19614   have_xshm=yes
19615 fi
19616
19617
19618   CPPFLAGS="$ac_save_CPPFLAGS"
19619   fi
19620
19621   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19622   # to exist, but the library code to not exist.  And even better, the library
19623   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19624   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19625   # that's not quite right, but close enough.)
19626   #
19627   case "$host" in
19628     *-aix*)
19629       if  `uname -v` -eq 3 ; then
19630         have_xshm=no
19631
19632   ac_save_CPPFLAGS="$CPPFLAGS"
19633   ac_save_LDFLAGS="$LDFLAGS"
19634 #  ac_save_LIBS="$LIBS"
19635
19636   if test \! -z "$includedir" ; then
19637     CPPFLAGS="$CPPFLAGS -I$includedir"
19638   fi
19639   # note: $X_CFLAGS includes $x_includes
19640   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19641
19642   if test \! -z "$libdir" ; then
19643     LDFLAGS="$LDFLAGS -L$libdir"
19644   fi
19645   # note: $X_LIBS includes $x_libraries
19646   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19647
19648   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19649   LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
19650   { echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19651 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6; }
19652 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19653   echo $ECHO_N "(cached) $ECHO_C" >&6
19654 else
19655   ac_check_lib_save_LIBS=$LIBS
19656 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19657 cat >conftest.$ac_ext <<_ACEOF
19658 /* confdefs.h.  */
19659 _ACEOF
19660 cat confdefs.h >>conftest.$ac_ext
19661 cat >>conftest.$ac_ext <<_ACEOF
19662 /* end confdefs.h.  */
19663
19664 /* Override any GCC internal prototype to avoid an error.
19665    Use char because int might match the return type of a GCC
19666    builtin and then its argument prototype would still apply.  */
19667 #ifdef __cplusplus
19668 extern "C"
19669 #endif
19670 char XShmQueryExtension ();
19671 int
19672 main ()
19673 {
19674 return XShmQueryExtension ();
19675   ;
19676   return 0;
19677 }
19678 _ACEOF
19679 rm -f conftest.$ac_objext conftest$ac_exeext
19680 if { (ac_try="$ac_link"
19681 case "(($ac_try" in
19682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19683   *) ac_try_echo=$ac_try;;
19684 esac
19685 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19686   (eval "$ac_link") 2>conftest.er1
19687   ac_status=$?
19688   grep -v '^ *+' conftest.er1 >conftest.err
19689   rm -f conftest.er1
19690   cat conftest.err >&5
19691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19692   (exit $ac_status); } && {
19693          test -z "$ac_c_werror_flag" ||
19694          test ! -s conftest.err
19695        } && test -s conftest$ac_exeext &&
19696        $as_test_x conftest$ac_exeext; then
19697   ac_cv_lib_XextSam_XShmQueryExtension=yes
19698 else
19699   echo "$as_me: failed program was:" >&5
19700 sed 's/^/| /' conftest.$ac_ext >&5
19701
19702         ac_cv_lib_XextSam_XShmQueryExtension=no
19703 fi
19704
19705 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19706       conftest$ac_exeext conftest.$ac_ext
19707 LIBS=$ac_check_lib_save_LIBS
19708 fi
19709 { echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19710 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
19711 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19712   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19713 else
19714   true
19715 fi
19716
19717   CPPFLAGS="$ac_save_CPPFLAGS"
19718   LDFLAGS="$ac_save_LDFLAGS"
19719 #  LIBS="$ac_save_LIBS"
19720
19721       fi
19722     ;;
19723   esac
19724
19725   # if that succeeded, then we've really got it.
19726   if test "$have_xshm" = yes; then
19727     cat >>confdefs.h <<\_ACEOF
19728 #define HAVE_XSHM_EXTENSION 1
19729 _ACEOF
19730
19731   fi
19732
19733 elif test "$with_xshm" != no; then
19734   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19735   exit 1
19736 fi
19737
19738
19739 ###############################################################################
19740 #
19741 #       Check for the DOUBLE-BUFFER server extension.
19742 #
19743 ###############################################################################
19744
19745 have_xdbe=no
19746 with_xdbe_req=unspecified
19747
19748 # Check whether --with-xdbe-ext was given.
19749 if test "${with_xdbe_ext+set}" = set; then
19750   withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
19751 else
19752   with_xdbe=yes
19753 fi
19754
19755
19756
19757    case "$with_xdbe" in
19758     yes) ;;
19759     no)  ;;
19760
19761     /*)
19762      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19763 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6; }
19764      d=$with_xdbe/include
19765      if test -d $d; then
19766        X_CFLAGS="-I$d $X_CFLAGS"
19767        { echo "$as_me:$LINENO: result: $d" >&5
19768 echo "${ECHO_T}$d" >&6; }
19769      else
19770        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19771 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19772      fi
19773
19774      { echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19775 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6; }
19776      d=$with_xdbe/lib
19777      if test -d $d; then
19778        X_LIBS="-L$d $X_LIBS"
19779        { echo "$as_me:$LINENO: result: $d" >&5
19780 echo "${ECHO_T}$d" >&6; }
19781      else
19782        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19783 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19784      fi
19785
19786      # replace the directory string with "yes".
19787      with_xdbe_req="yes"
19788      with_xdbe=$with_xdbe_req
19789      ;;
19790
19791     *)
19792      echo ""
19793      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19794      echo "       If it is a directory, then \`DIR/include' will be added to"
19795      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19796      exit 1
19797      ;;
19798    esac
19799
19800
19801 if test "$with_xdbe" = yes; then
19802
19803
19804   ac_save_CPPFLAGS="$CPPFLAGS"
19805   if test \! -z "$includedir" ; then
19806     CPPFLAGS="$CPPFLAGS -I$includedir"
19807   fi
19808   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19809   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19810   { echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19811 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6; }
19812 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19813   echo $ECHO_N "(cached) $ECHO_C" >&6
19814 else
19815   cat >conftest.$ac_ext <<_ACEOF
19816 /* confdefs.h.  */
19817 _ACEOF
19818 cat confdefs.h >>conftest.$ac_ext
19819 cat >>conftest.$ac_ext <<_ACEOF
19820 /* end confdefs.h.  */
19821 #include <X11/Xlib.h>
19822
19823 #include <X11/extensions/Xdbe.h>
19824 _ACEOF
19825 rm -f conftest.$ac_objext
19826 if { (ac_try="$ac_compile"
19827 case "(($ac_try" in
19828   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19829   *) ac_try_echo=$ac_try;;
19830 esac
19831 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19832   (eval "$ac_compile") 2>conftest.er1
19833   ac_status=$?
19834   grep -v '^ *+' conftest.er1 >conftest.err
19835   rm -f conftest.er1
19836   cat conftest.err >&5
19837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19838   (exit $ac_status); } && {
19839          test -z "$ac_c_werror_flag" ||
19840          test ! -s conftest.err
19841        } && test -s conftest.$ac_objext; then
19842   ac_cv_header_X11_extensions_Xdbe_h=yes
19843 else
19844   echo "$as_me: failed program was:" >&5
19845 sed 's/^/| /' conftest.$ac_ext >&5
19846
19847         ac_cv_header_X11_extensions_Xdbe_h=no
19848 fi
19849
19850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19851 fi
19852 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19853 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6; }
19854 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19855   have_xdbe=yes
19856 fi
19857
19858
19859   CPPFLAGS="$ac_save_CPPFLAGS"
19860   if test "$have_xdbe" = yes; then
19861     cat >>confdefs.h <<\_ACEOF
19862 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19863 _ACEOF
19864
19865   fi
19866
19867 elif test "$with_xdbe" != no; then
19868   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19869   exit 1
19870 fi
19871
19872
19873 ###############################################################################
19874 #
19875 #       Check for the SGI XReadDisplay server extension.
19876 #
19877 #       Note: this has to be down here, rather than up with the other server
19878 #       extension tests, so that the output of `configure --help' is in the
19879 #       right order.  Arrgh!
19880 #
19881 ###############################################################################
19882
19883 have_readdisplay=no
19884 with_readdisplay_req=unspecified
19885
19886 # Check whether --with-readdisplay was given.
19887 if test "${with_readdisplay+set}" = set; then
19888   withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
19889 else
19890   with_readdisplay=yes
19891 fi
19892
19893
19894
19895    case "$with_readdisplay" in
19896     yes) ;;
19897     no)  ;;
19898
19899     /*)
19900      { echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19901 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6; }
19902      d=$with_readdisplay/include
19903      if test -d $d; then
19904        X_CFLAGS="-I$d $X_CFLAGS"
19905        { echo "$as_me:$LINENO: result: $d" >&5
19906 echo "${ECHO_T}$d" >&6; }
19907      else
19908        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19909 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19910      fi
19911
19912      { echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19913 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6; }
19914      d=$with_readdisplay/lib
19915      if test -d $d; then
19916        X_LIBS="-L$d $X_LIBS"
19917        { echo "$as_me:$LINENO: result: $d" >&5
19918 echo "${ECHO_T}$d" >&6; }
19919      else
19920        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19921 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
19922      fi
19923
19924      # replace the directory string with "yes".
19925      with_readdisplay_req="yes"
19926      with_readdisplay=$with_readdisplay_req
19927      ;;
19928
19929     *)
19930      echo ""
19931      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19932      echo "       If it is a directory, then \`DIR/include' will be added to"
19933      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19934      exit 1
19935      ;;
19936    esac
19937
19938
19939 if test "$with_readdisplay" = yes; then
19940
19941   ac_save_CPPFLAGS="$CPPFLAGS"
19942   if test \! -z "$includedir" ; then
19943     CPPFLAGS="$CPPFLAGS -I$includedir"
19944   fi
19945   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19946   CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
19947   { echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19948 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6; }
19949 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19950   echo $ECHO_N "(cached) $ECHO_C" >&6
19951 else
19952   cat >conftest.$ac_ext <<_ACEOF
19953 /* confdefs.h.  */
19954 _ACEOF
19955 cat confdefs.h >>conftest.$ac_ext
19956 cat >>conftest.$ac_ext <<_ACEOF
19957 /* end confdefs.h.  */
19958 #include <X11/Xlib.h>
19959
19960 #include <X11/extensions/readdisplay.h>
19961 _ACEOF
19962 rm -f conftest.$ac_objext
19963 if { (ac_try="$ac_compile"
19964 case "(($ac_try" in
19965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19966   *) ac_try_echo=$ac_try;;
19967 esac
19968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19969   (eval "$ac_compile") 2>conftest.er1
19970   ac_status=$?
19971   grep -v '^ *+' conftest.er1 >conftest.err
19972   rm -f conftest.er1
19973   cat conftest.err >&5
19974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19975   (exit $ac_status); } && {
19976          test -z "$ac_c_werror_flag" ||
19977          test ! -s conftest.err
19978        } && test -s conftest.$ac_objext; then
19979   ac_cv_header_X11_extensions_readdisplay_h=yes
19980 else
19981   echo "$as_me: failed program was:" >&5
19982 sed 's/^/| /' conftest.$ac_ext >&5
19983
19984         ac_cv_header_X11_extensions_readdisplay_h=no
19985 fi
19986
19987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19988 fi
19989 { echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19990 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6; }
19991 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19992   cat >>confdefs.h <<\_ACEOF
19993 #define HAVE_READ_DISPLAY_EXTENSION 1
19994 _ACEOF
19995
19996 fi
19997
19998
19999   CPPFLAGS="$ac_save_CPPFLAGS"
20000 elif test "$with_readdisplay" != no; then
20001   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20002   exit 1
20003 fi
20004
20005
20006 ###############################################################################
20007 #
20008 #       Check for a directory full of images to use as the default value
20009 #       of the "imageDirectory" preference.
20010 #
20011 ###############################################################################
20012
20013 have_imagedir=no
20014 with_imagedir_req=unspecified
20015
20016
20017 # Check whether --with-image-directory was given.
20018 if test "${with_image_directory+set}" = set; then
20019   withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
20020 else
20021   with_imagedir=yes
20022 fi
20023
20024 # no HANDLE_X_PATH_ARG for this one
20025
20026 case "$with_imagedir" in
20027   /*)
20028     # absolute path
20029     { echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
20030 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6; }
20031     if test -d "$with_imagedir" ; then
20032       { echo "$as_me:$LINENO: result: yes" >&5
20033 echo "${ECHO_T}yes" >&6; }
20034     else
20035       { echo "$as_me:$LINENO: result: no" >&5
20036 echo "${ECHO_T}no" >&6; }
20037       with_imagedir=""
20038     fi
20039   ;;
20040   yes)
20041     with_imagedir=""
20042
20043     #### Could use some more defaults here...
20044     for dd in \
20045       "/usr/share/backgrounds/images/"          \
20046       "/usr/share/wallpapers/"                  \
20047       "/Library/Desktop Pictures/"              \
20048     ; do
20049       if test -z "$with_imagedir"; then
20050         { echo "$as_me:$LINENO: checking for image directory $dd" >&5
20051 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6; }
20052         if test -d "$dd" ; then
20053           { echo "$as_me:$LINENO: result: yes" >&5
20054 echo "${ECHO_T}yes" >&6; }
20055           with_imagedir="$dd"
20056         else
20057           { echo "$as_me:$LINENO: result: no" >&5
20058 echo "${ECHO_T}no" >&6; }
20059         fi
20060       fi
20061     done
20062
20063   ;;
20064   no)
20065     with_imagedir=""
20066   ;;
20067
20068   *)
20069     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
20070     exit 1
20071   ;;
20072 esac
20073 ac_cv_imagedir="$with_imagedir"
20074
20075 DEFAULT_IMAGES_P='True'
20076 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
20077
20078 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
20079   DEFAULT_IMAGES_P='False'
20080 fi
20081
20082
20083 ###############################################################################
20084 #
20085 #       Pick a text file to use as the default of the "textFile" preference.
20086 #       Any old file will do, but preferably one that will make interesting
20087 #       shapes when displayed by "starwars" and "fontglide".
20088 #
20089 ###############################################################################
20090
20091 have_textfile=no
20092 with_textfile_req=unspecified
20093
20094
20095 # Check whether --with-text-file was given.
20096 if test "${with_text_file+set}" = set; then
20097   withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
20098 else
20099   with_textfile=yes
20100 fi
20101
20102 # no HANDLE_X_PATH_ARG for this one
20103
20104 case "$with_textfile" in
20105   /*)
20106     # absolute path
20107     { echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
20108 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6; }
20109     if test -f "$with_textfile" ; then
20110       { echo "$as_me:$LINENO: result: yes" >&5
20111 echo "${ECHO_T}yes" >&6; }
20112     else
20113       { echo "$as_me:$LINENO: result: no" >&5
20114 echo "${ECHO_T}no" >&6; }
20115       with_textfile=""
20116     fi
20117   ;;
20118   yes)
20119     with_textfile=""
20120
20121     #### Could use some more defaults here...
20122     for f in \
20123       "/usr/X11R6/lib/X11/doc/README"              \
20124       "/usr/share/doc/xserver-common/copyright"    \
20125       "/usr/share/doc/xserver-xorg-core/copyright" \
20126       "/usr/X11R6/README"                          \
20127       "/usr/share/doc/debian/debian-manifesto"     \
20128     ; do
20129       if test -z "$with_textfile"; then
20130         { echo "$as_me:$LINENO: checking for text file $f" >&5
20131 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6; }
20132         if test -f "$f" ; then
20133           { echo "$as_me:$LINENO: result: yes" >&5
20134 echo "${ECHO_T}yes" >&6; }
20135           with_textfile="$f"
20136         else
20137           { echo "$as_me:$LINENO: result: no" >&5
20138 echo "${ECHO_T}no" >&6; }
20139         fi
20140       fi
20141     done
20142
20143   ;;
20144   no)
20145     with_textfile=""
20146   ;;
20147
20148   *)
20149     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
20150     exit 1
20151   ;;
20152 esac
20153 ac_cv_textfile="$with_textfile"
20154
20155 DEFAULT_TEXT_FILE="$ac_cv_textfile"
20156
20157
20158 ###############################################################################
20159 #
20160 #       Check the browser to see help URL
20161 #
20162 ###############################################################################
20163
20164 have_browser=no
20165 with_browser_req=unspecified
20166
20167
20168 # Check whether --with-browser was given.
20169 if test "${with_browser+set}" = set; then
20170   withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
20171 else
20172   with_browser=no
20173 fi
20174
20175 # no HANDLE_X_PATH_ARG for this one
20176
20177 case "$with_browser" in
20178   no )
20179   ;;
20180   * )
20181     WITH_BROWSER=$with_browser
20182     gnome_open_program=$with_browser
20183     { echo "$as_me:$LINENO: checking for browser $with_browser" >&5
20184 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6; }
20185     with_browser_fullpath=`which $with_browser 2>/dev/null`
20186     case $with_browser_fullpath in
20187          /* )
20188                 { echo "$as_me:$LINENO: result: yes" >&5
20189 echo "${ECHO_T}yes" >&6; }
20190                  have_browser=yes
20191                  ;;
20192         * )
20193                { echo "$as_me:$LINENO: result: no" >&5
20194 echo "${ECHO_T}no" >&6; }
20195 # Only warning: we don't want to install all packages for the
20196 # dependency of the browser in building stage...
20197                echo "WARNING: browser not found: --with-browser=$with_browser"
20198                ;;
20199     esac
20200   ;;
20201 esac
20202 ac_cv_browser="$with_browser"
20203
20204 ###############################################################################
20205 #
20206 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20207 #       This should be safe, but let's give people the option.
20208 #
20209 ###############################################################################
20210
20211 setuid_hacks_default=no
20212 setuid_hacks="$setuid_hacks_default"
20213
20214 # Check whether --with-setuid-hacks was given.
20215 if test "${with_setuid_hacks+set}" = set; then
20216   withval=$with_setuid_hacks; setuid_hacks="$withval"
20217 else
20218   setuid_hacks="$setuid_hacks_default"
20219 fi
20220
20221
20222
20223    case "$setuid_hacks" in
20224     yes) ;;
20225     no)  ;;
20226
20227     /*)
20228      { echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20229 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6; }
20230      d=$setuid_hacks/include
20231      if test -d $d; then
20232        X_CFLAGS="-I$d $X_CFLAGS"
20233        { echo "$as_me:$LINENO: result: $d" >&5
20234 echo "${ECHO_T}$d" >&6; }
20235      else
20236        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20237 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20238      fi
20239
20240      { echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20241 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6; }
20242      d=$setuid_hacks/lib
20243      if test -d $d; then
20244        X_LIBS="-L$d $X_LIBS"
20245        { echo "$as_me:$LINENO: result: $d" >&5
20246 echo "${ECHO_T}$d" >&6; }
20247      else
20248        { echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20249 echo "${ECHO_T}not found ($d: no such directory)" >&6; }
20250      fi
20251
20252      # replace the directory string with "yes".
20253      setuid_hacks_req="yes"
20254      setuid_hacks=$setuid_hacks_req
20255      ;;
20256
20257     *)
20258      echo ""
20259      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20260      echo "       If it is a directory, then \`DIR/include' will be added to"
20261      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20262      exit 1
20263      ;;
20264    esac
20265
20266
20267 if test "$setuid_hacks" = yes; then
20268   true
20269 elif test "$setuid_hacks" != no; then
20270   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20271   exit 1
20272 fi
20273
20274
20275 ###############################################################################
20276 #
20277 #       Done testing.  Now, set up the various -I and -L variables,
20278 #       and decide which GUI program to build by default.
20279 #
20280 ###############################################################################
20281
20282 DEPEND=makedepend
20283 DEPEND_FLAGS=
20284 DEPEND_DEFINES=
20285
20286
20287 if test \! -z "$includedir" ; then
20288   INCLUDES="$INCLUDES -I$includedir"
20289 fi
20290
20291 if test \! -z "$libdir" ; then
20292   LDFLAGS="$LDFLAGS -L$libdir"
20293 fi
20294
20295
20296 PREFERRED_DEMO_PROGRAM=''
20297 ALL_DEMO_PROGRAMS=
20298 if test "$have_motif" = yes; then
20299   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20300   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20301 fi
20302 if test "$have_gtk" = yes; then
20303   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20304   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20305 fi
20306
20307
20308 if test "$have_kerberos" = yes; then
20309   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20310   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20311 fi
20312 if test "$have_pam" = yes; then
20313   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20314   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20315   INSTALL_PAM="install-pam"
20316 fi
20317 if test "$have_passwd_helper" = yes; then
20318   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20319   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20320 fi
20321   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20322   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20323
20324
20325 if test "$enable_locking" = yes; then
20326   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20327   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20328 else
20329   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20330   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20331 fi
20332
20333 if test "$ac_macosx" = yes; then
20334   EXES_OSX='$(EXES_OSX)'
20335   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20336   MEN_OSX='$(MEN_OSX)'
20337 else
20338   EXES_OSX=
20339   SCRIPTS_OSX=
20340   MEN_OSX=
20341 fi
20342
20343
20344 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20345
20346 if test "$need_setuid" = yes; then
20347   NEED_SETUID=yes
20348 else
20349   NEED_SETUID=no
20350 fi
20351
20352 if test "$setuid_hacks" = yes; then
20353   SETUID_HACKS=yes
20354 else
20355   SETUID_HACKS=no
20356 fi
20357
20358 tab='   '
20359 if test "$have_gl" = yes; then
20360   GL_EXES='$(GL_EXES)'
20361   SUID_EXES='$(SUID_EXES)'
20362   RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
20363   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20364   GL_MEN='$(GL_MEN)'
20365   GL_KLUDGE=" "
20366 else
20367   GL_KLUDGE="-"
20368 fi
20369
20370 if test "$have_gle" = yes; then
20371   GLE_EXES='$(GLE_EXES)'
20372   GLE_KLUDGE=" "
20373 else
20374   GLE_KLUDGE="-"
20375 fi
20376
20377 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20378  JPEG_EXES='$(JPEG_EXES)'
20379 fi
20380
20381
20382 # Another substitution in the XScreenSaver.ad.in file:
20383 #
20384 if test "$gnome_open_program" != ''; then
20385   GNOME24=''
20386   GNOME22='!    '
20387   NOGNOME='!    '
20388 elif test "$gnome_url_show_program" != ''; then
20389   GNOME24='!    '
20390   GNOME22=''
20391   NOGNOME='!    '
20392 else
20393   GNOME24='!    '
20394   GNOME22='!    '
20395   NOGNOME=''
20396 fi
20397
20398
20399 # Set PO_DATADIR to something sensible.
20400 #
20401 { echo "$as_me:$LINENO: checking for locale directory" >&5
20402 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6; }
20403 if test -n "$GTK_DATADIR" ; then
20404   PO_DATADIR="$GTK_DATADIR"
20405 elif test "$have_gtk" = yes; then
20406   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20407   PO_DATADIR="$PO_DATADIR/share"
20408 fi
20409
20410 if test -z "$PO_DATADIR" ; then
20411   #
20412   # #### Total fucking kludge --
20413   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
20414   # but of course we need to expand all the nested variables to do that...
20415   #
20416   dd=`eval eval eval eval eval eval eval eval eval eval eval echo $datadir`
20417   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
20418 fi
20419
20420 { echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
20421 echo "${ECHO_T}$PO_DATADIR/locale" >&6; }
20422
20423
20424 # canonicalize slashes.
20425 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20426
20427 # gcc 3.0 likes to issue this warning for every file:
20428 #
20429 # cc1: warning: changing search order for system directory "/usr/local/include"
20430 # cc1: warning:   as it has already been specified as a non-system directory
20431 #
20432 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
20433 # Which *should* be totally redundant, and thus an ok thing to delete?
20434 #
20435 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
20436
20437
20438 ###############################################################################
20439 #
20440 #       Perform substitutions and write Makefiles.
20441 #
20442 ###############################################################################
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508 APPDEFAULTS=$ac_x_app_defaults
20509
20510
20511
20512
20513
20514
20515
20516 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20517
20518 cat >confcache <<\_ACEOF
20519 # This file is a shell script that caches the results of configure
20520 # tests run on this system so they can be shared between configure
20521 # scripts and configure runs, see configure's option --config-cache.
20522 # It is not useful on other systems.  If it contains results you don't
20523 # want to keep, you may remove or edit it.
20524 #
20525 # config.status only pays attention to the cache file if you give it
20526 # the --recheck option to rerun configure.
20527 #
20528 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20529 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20530 # following values.
20531
20532 _ACEOF
20533
20534 # The following way of writing the cache mishandles newlines in values,
20535 # but we know of no workaround that is simple, portable, and efficient.
20536 # So, we kill variables containing newlines.
20537 # Ultrix sh set writes to stderr and can't be redirected directly,
20538 # and sets the high bit in the cache file unless we assign to the vars.
20539 (
20540   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20541     eval ac_val=\$$ac_var
20542     case $ac_val in #(
20543     *${as_nl}*)
20544       case $ac_var in #(
20545       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20546 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20547       esac
20548       case $ac_var in #(
20549       _ | IFS | as_nl) ;; #(
20550       *) $as_unset $ac_var ;;
20551       esac ;;
20552     esac
20553   done
20554
20555   (set) 2>&1 |
20556     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20557     *${as_nl}ac_space=\ *)
20558       # `set' does not quote correctly, so add quotes (double-quote
20559       # substitution turns \\\\ into \\, and sed turns \\ into \).
20560       sed -n \
20561         "s/'/'\\\\''/g;
20562           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20563       ;; #(
20564     *)
20565       # `set' quotes correctly as required by POSIX, so do not add quotes.
20566       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20567       ;;
20568     esac |
20569     sort
20570 ) |
20571   sed '
20572      /^ac_cv_env_/b end
20573      t clear
20574      :clear
20575      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20576      t end
20577      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20578      :end' >>confcache
20579 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20580   if test -w "$cache_file"; then
20581     test "x$cache_file" != "x/dev/null" &&
20582       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20583 echo "$as_me: updating cache $cache_file" >&6;}
20584     cat confcache >$cache_file
20585   else
20586     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20587 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20588   fi
20589 fi
20590 rm -f confcache
20591
20592 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20593 # Let make expand exec_prefix.
20594 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20595
20596 DEFS=-DHAVE_CONFIG_H
20597
20598 ac_libobjs=
20599 ac_ltlibobjs=
20600 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20601   # 1. Remove the extension, and $U if already installed.
20602   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20603   ac_i=`echo "$ac_i" | sed "$ac_script"`
20604   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20605   #    will be set to the directory where LIBOBJS objects are built.
20606   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20607   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20608 done
20609 LIBOBJS=$ac_libobjs
20610
20611 LTLIBOBJS=$ac_ltlibobjs
20612
20613
20614
20615
20616         mv -f po/POTFILES po/POTFILES.tmp
20617         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20618         rm -f po/POTFILES.tmp
20619
20620
20621
20622 : ${CONFIG_STATUS=./config.status}
20623 ac_clean_files_save=$ac_clean_files
20624 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20625 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20626 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20627 cat >$CONFIG_STATUS <<_ACEOF
20628 #! $SHELL
20629 # Generated by $as_me.
20630 # Run this file to recreate the current configuration.
20631 # Compiler output produced by configure, useful for debugging
20632 # configure, is in config.log if it exists.
20633
20634 debug=false
20635 ac_cs_recheck=false
20636 ac_cs_silent=false
20637 SHELL=\${CONFIG_SHELL-$SHELL}
20638 _ACEOF
20639
20640 cat >>$CONFIG_STATUS <<\_ACEOF
20641 ## --------------------- ##
20642 ## M4sh Initialization.  ##
20643 ## --------------------- ##
20644
20645 # Be more Bourne compatible
20646 DUALCASE=1; export DUALCASE # for MKS sh
20647 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20648   emulate sh
20649   NULLCMD=:
20650   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20651   # is contrary to our usage.  Disable this feature.
20652   alias -g '${1+"$@"}'='"$@"'
20653   setopt NO_GLOB_SUBST
20654 else
20655   case `(set -o) 2>/dev/null` in
20656   *posix*) set -o posix ;;
20657 esac
20658
20659 fi
20660
20661
20662
20663
20664 # PATH needs CR
20665 # Avoid depending upon Character Ranges.
20666 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20667 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20668 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20669 as_cr_digits='0123456789'
20670 as_cr_alnum=$as_cr_Letters$as_cr_digits
20671
20672 # The user is always right.
20673 if test "${PATH_SEPARATOR+set}" != set; then
20674   echo "#! /bin/sh" >conf$$.sh
20675   echo  "exit 0"   >>conf$$.sh
20676   chmod +x conf$$.sh
20677   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20678     PATH_SEPARATOR=';'
20679   else
20680     PATH_SEPARATOR=:
20681   fi
20682   rm -f conf$$.sh
20683 fi
20684
20685 # Support unset when possible.
20686 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20687   as_unset=unset
20688 else
20689   as_unset=false
20690 fi
20691
20692
20693 # IFS
20694 # We need space, tab and new line, in precisely that order.  Quoting is
20695 # there to prevent editors from complaining about space-tab.
20696 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20697 # splitting by setting IFS to empty value.)
20698 as_nl='
20699 '
20700 IFS=" ""        $as_nl"
20701
20702 # Find who we are.  Look in the path if we contain no directory separator.
20703 case $0 in
20704   *[\\/]* ) as_myself=$0 ;;
20705   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20706 for as_dir in $PATH
20707 do
20708   IFS=$as_save_IFS
20709   test -z "$as_dir" && as_dir=.
20710   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20711 done
20712 IFS=$as_save_IFS
20713
20714      ;;
20715 esac
20716 # We did not find ourselves, most probably we were run as `sh COMMAND'
20717 # in which case we are not to be found in the path.
20718 if test "x$as_myself" = x; then
20719   as_myself=$0
20720 fi
20721 if test ! -f "$as_myself"; then
20722   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20723   { (exit 1); exit 1; }
20724 fi
20725
20726 # Work around bugs in pre-3.0 UWIN ksh.
20727 for as_var in ENV MAIL MAILPATH
20728 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20729 done
20730 PS1='$ '
20731 PS2='> '
20732 PS4='+ '
20733
20734 # NLS nuisances.
20735 for as_var in \
20736   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20737   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20738   LC_TELEPHONE LC_TIME
20739 do
20740   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20741     eval $as_var=C; export $as_var
20742   else
20743     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20744   fi
20745 done
20746
20747 # Required to use basename.
20748 if expr a : '\(a\)' >/dev/null 2>&1 &&
20749    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20750   as_expr=expr
20751 else
20752   as_expr=false
20753 fi
20754
20755 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20756   as_basename=basename
20757 else
20758   as_basename=false
20759 fi
20760
20761
20762 # Name of the executable.
20763 as_me=`$as_basename -- "$0" ||
20764 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20765          X"$0" : 'X\(//\)$' \| \
20766          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20767 echo X/"$0" |
20768     sed '/^.*\/\([^/][^/]*\)\/*$/{
20769             s//\1/
20770             q
20771           }
20772           /^X\/\(\/\/\)$/{
20773             s//\1/
20774             q
20775           }
20776           /^X\/\(\/\).*/{
20777             s//\1/
20778             q
20779           }
20780           s/.*/./; q'`
20781
20782 # CDPATH.
20783 $as_unset CDPATH
20784
20785
20786
20787   as_lineno_1=$LINENO
20788   as_lineno_2=$LINENO
20789   test "x$as_lineno_1" != "x$as_lineno_2" &&
20790   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
20791
20792   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20793   # uniformly replaced by the line number.  The first 'sed' inserts a
20794   # line-number line after each line using $LINENO; the second 'sed'
20795   # does the real work.  The second script uses 'N' to pair each
20796   # line-number line with the line containing $LINENO, and appends
20797   # trailing '-' during substitution so that $LINENO is not a special
20798   # case at line end.
20799   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20800   # scripts with optimization help from Paolo Bonzini.  Blame Lee
20801   # E. McMahon (1931-1989) for sed's syntax.  :-)
20802   sed -n '
20803     p
20804     /[$]LINENO/=
20805   ' <$as_myself |
20806     sed '
20807       s/[$]LINENO.*/&-/
20808       t lineno
20809       b
20810       :lineno
20811       N
20812       :loop
20813       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
20814       t loop
20815       s/-\n.*//
20816     ' >$as_me.lineno &&
20817   chmod +x "$as_me.lineno" ||
20818     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
20819    { (exit 1); exit 1; }; }
20820
20821   # Don't try to exec as it changes $[0], causing all sort of problems
20822   # (the dirname of $[0] is not the place where we might find the
20823   # original and so on.  Autoconf is especially sensitive to this).
20824   . "./$as_me.lineno"
20825   # Exit status is that of the last command.
20826   exit
20827 }
20828
20829
20830 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20831   as_dirname=dirname
20832 else
20833   as_dirname=false
20834 fi
20835
20836 ECHO_C= ECHO_N= ECHO_T=
20837 case `echo -n x` in
20838 -n*)
20839   case `echo 'x\c'` in
20840   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20841   *)   ECHO_C='\c';;
20842   esac;;
20843 *)
20844   ECHO_N='-n';;
20845 esac
20846
20847 if expr a : '\(a\)' >/dev/null 2>&1 &&
20848    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20849   as_expr=expr
20850 else
20851   as_expr=false
20852 fi
20853
20854 rm -f conf$$ conf$$.exe conf$$.file
20855 if test -d conf$$.dir; then
20856   rm -f conf$$.dir/conf$$.file
20857 else
20858   rm -f conf$$.dir
20859   mkdir conf$$.dir
20860 fi
20861 echo >conf$$.file
20862 if ln -s conf$$.file conf$$ 2>/dev/null; then
20863   as_ln_s='ln -s'
20864   # ... but there are two gotchas:
20865   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20866   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20867   # In both cases, we have to default to `cp -p'.
20868   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20869     as_ln_s='cp -p'
20870 elif ln conf$$.file conf$$ 2>/dev/null; then
20871   as_ln_s=ln
20872 else
20873   as_ln_s='cp -p'
20874 fi
20875 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20876 rmdir conf$$.dir 2>/dev/null
20877
20878 if mkdir -p . 2>/dev/null; then
20879   as_mkdir_p=:
20880 else
20881   test -d ./-p && rmdir ./-p
20882   as_mkdir_p=false
20883 fi
20884
20885 if test -x / >/dev/null 2>&1; then
20886   as_test_x='test -x'
20887 else
20888   if ls -dL / >/dev/null 2>&1; then
20889     as_ls_L_option=L
20890   else
20891     as_ls_L_option=
20892   fi
20893   as_test_x='
20894     eval sh -c '\''
20895       if test -d "$1"; then
20896         test -d "$1/.";
20897       else
20898         case $1 in
20899         -*)set "./$1";;
20900         esac;
20901         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
20902         ???[sx]*):;;*)false;;esac;fi
20903     '\'' sh
20904   '
20905 fi
20906 as_executable_p=$as_test_x
20907
20908 # Sed expression to map a string onto a valid CPP name.
20909 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20910
20911 # Sed expression to map a string onto a valid variable name.
20912 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20913
20914
20915 exec 6>&1
20916
20917 # Save the log message, to keep $[0] and so on meaningful, and to
20918 # report actual input values of CONFIG_FILES etc. instead of their
20919 # values after options handling.
20920 ac_log="
20921 This file was extended by $as_me, which was
20922 generated by GNU Autoconf 2.61.  Invocation command line was
20923
20924   CONFIG_FILES    = $CONFIG_FILES
20925   CONFIG_HEADERS  = $CONFIG_HEADERS
20926   CONFIG_LINKS    = $CONFIG_LINKS
20927   CONFIG_COMMANDS = $CONFIG_COMMANDS
20928   $ $0 $@
20929
20930 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20931 "
20932
20933 _ACEOF
20934
20935 cat >>$CONFIG_STATUS <<_ACEOF
20936 # Files that config.status was made for.
20937 config_files="$ac_config_files"
20938 config_headers="$ac_config_headers"
20939 config_commands="$ac_config_commands"
20940
20941 _ACEOF
20942
20943 cat >>$CONFIG_STATUS <<\_ACEOF
20944 ac_cs_usage="\
20945 \`$as_me' instantiates files from templates according to the
20946 current configuration.
20947
20948 Usage: $0 [OPTIONS] [FILE]...
20949
20950   -h, --help       print this help, then exit
20951   -V, --version    print version number and configuration settings, then exit
20952   -q, --quiet      do not print progress messages
20953   -d, --debug      don't remove temporary files
20954       --recheck    update $as_me by reconfiguring in the same conditions
20955   --file=FILE[:TEMPLATE]
20956                    instantiate the configuration file FILE
20957   --header=FILE[:TEMPLATE]
20958                    instantiate the configuration header FILE
20959
20960 Configuration files:
20961 $config_files
20962
20963 Configuration headers:
20964 $config_headers
20965
20966 Configuration commands:
20967 $config_commands
20968
20969 Report bugs to <bug-autoconf@gnu.org>."
20970
20971 _ACEOF
20972 cat >>$CONFIG_STATUS <<_ACEOF
20973 ac_cs_version="\\
20974 config.status
20975 configured by $0, generated by GNU Autoconf 2.61,
20976   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
20977
20978 Copyright (C) 2006 Free Software Foundation, Inc.
20979 This config.status script is free software; the Free Software Foundation
20980 gives unlimited permission to copy, distribute and modify it."
20981
20982 ac_pwd='$ac_pwd'
20983 srcdir='$srcdir'
20984 INSTALL='$INSTALL'
20985 _ACEOF
20986
20987 cat >>$CONFIG_STATUS <<\_ACEOF
20988 # If no file are specified by the user, then we need to provide default
20989 # value.  By we need to know if files were specified by the user.
20990 ac_need_defaults=:
20991 while test $# != 0
20992 do
20993   case $1 in
20994   --*=*)
20995     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20996     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20997     ac_shift=:
20998     ;;
20999   *)
21000     ac_option=$1
21001     ac_optarg=$2
21002     ac_shift=shift
21003     ;;
21004   esac
21005
21006   case $ac_option in
21007   # Handling of the options.
21008   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21009     ac_cs_recheck=: ;;
21010   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21011     echo "$ac_cs_version"; exit ;;
21012   --debug | --debu | --deb | --de | --d | -d )
21013     debug=: ;;
21014   --file | --fil | --fi | --f )
21015     $ac_shift
21016     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21017     ac_need_defaults=false;;
21018   --header | --heade | --head | --hea )
21019     $ac_shift
21020     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21021     ac_need_defaults=false;;
21022   --he | --h)
21023     # Conflict between --help and --header
21024     { echo "$as_me: error: ambiguous option: $1
21025 Try \`$0 --help' for more information." >&2
21026    { (exit 1); exit 1; }; };;
21027   --help | --hel | -h )
21028     echo "$ac_cs_usage"; exit ;;
21029   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21030   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21031     ac_cs_silent=: ;;
21032
21033   # This is an error.
21034   -*) { echo "$as_me: error: unrecognized option: $1
21035 Try \`$0 --help' for more information." >&2
21036    { (exit 1); exit 1; }; } ;;
21037
21038   *) ac_config_targets="$ac_config_targets $1"
21039      ac_need_defaults=false ;;
21040
21041   esac
21042   shift
21043 done
21044
21045 ac_configure_extra_args=
21046
21047 if $ac_cs_silent; then
21048   exec 6>/dev/null
21049   ac_configure_extra_args="$ac_configure_extra_args --silent"
21050 fi
21051
21052 _ACEOF
21053 cat >>$CONFIG_STATUS <<_ACEOF
21054 if \$ac_cs_recheck; then
21055   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21056   CONFIG_SHELL=$SHELL
21057   export CONFIG_SHELL
21058   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21059 fi
21060
21061 _ACEOF
21062 cat >>$CONFIG_STATUS <<\_ACEOF
21063 exec 5>>config.log
21064 {
21065   echo
21066   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21067 ## Running $as_me. ##
21068 _ASBOX
21069   echo "$ac_log"
21070 } >&5
21071
21072 _ACEOF
21073 cat >>$CONFIG_STATUS <<_ACEOF
21074 #
21075 # INIT-COMMANDS
21076 #
21077 INTLTOOL_PERL=${INTLTOOL_PERL}
21078
21079
21080 _ACEOF
21081
21082 cat >>$CONFIG_STATUS <<\_ACEOF
21083
21084 # Handling of arguments.
21085 for ac_config_target in $ac_config_targets
21086 do
21087   case $ac_config_target in
21088     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21089     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21090     "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21091     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21092     "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21093     "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21094     "hacks/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21095     "hacks/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21096     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21097     "driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21098
21099   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21100 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21101    { (exit 1); exit 1; }; };;
21102   esac
21103 done
21104
21105
21106 # If the user did not use the arguments to specify the items to instantiate,
21107 # then the envvar interface is used.  Set only those that are not.
21108 # We use the long form for the default assignment because of an extremely
21109 # bizarre bug on SunOS 4.1.3.
21110 if $ac_need_defaults; then
21111   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21112   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21113   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21114 fi
21115
21116 # Have a temporary directory for convenience.  Make it in the build tree
21117 # simply because there is no reason against having it here, and in addition,
21118 # creating and moving files from /tmp can sometimes cause problems.
21119 # Hook for its removal unless debugging.
21120 # Note that there is a small window in which the directory will not be cleaned:
21121 # after its creation but before its name has been assigned to `$tmp'.
21122 $debug ||
21123 {
21124   tmp=
21125   trap 'exit_status=$?
21126   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21127 ' 0
21128   trap '{ (exit 1); exit 1; }' 1 2 13 15
21129 }
21130 # Create a (secure) tmp directory for tmp files.
21131
21132 {
21133   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21134   test -n "$tmp" && test -d "$tmp"
21135 }  ||
21136 {
21137   tmp=./conf$$-$RANDOM
21138   (umask 077 && mkdir "$tmp")
21139 } ||
21140 {
21141    echo "$me: cannot create a temporary directory in ." >&2
21142    { (exit 1); exit 1; }
21143 }
21144
21145 #
21146 # Set up the sed scripts for CONFIG_FILES section.
21147 #
21148
21149 # No need to generate the scripts if there are no CONFIG_FILES.
21150 # This happens for instance when ./config.status config.h
21151 if test -n "$CONFIG_FILES"; then
21152
21153 _ACEOF
21154
21155
21156
21157 ac_delim='%!_!# '
21158 for ac_last_try in false false false false false :; do
21159   cat >conf$$subs.sed <<_ACEOF
21160 SHELL!$SHELL$ac_delim
21161 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21162 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21163 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21164 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21165 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21166 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21167 exec_prefix!$exec_prefix$ac_delim
21168 prefix!$prefix$ac_delim
21169 program_transform_name!$program_transform_name$ac_delim
21170 bindir!$bindir$ac_delim
21171 sbindir!$sbindir$ac_delim
21172 libexecdir!$libexecdir$ac_delim
21173 datarootdir!$datarootdir$ac_delim
21174 datadir!$datadir$ac_delim
21175 sysconfdir!$sysconfdir$ac_delim
21176 sharedstatedir!$sharedstatedir$ac_delim
21177 localstatedir!$localstatedir$ac_delim
21178 includedir!$includedir$ac_delim
21179 oldincludedir!$oldincludedir$ac_delim
21180 docdir!$docdir$ac_delim
21181 infodir!$infodir$ac_delim
21182 htmldir!$htmldir$ac_delim
21183 dvidir!$dvidir$ac_delim
21184 pdfdir!$pdfdir$ac_delim
21185 psdir!$psdir$ac_delim
21186 libdir!$libdir$ac_delim
21187 localedir!$localedir$ac_delim
21188 mandir!$mandir$ac_delim
21189 DEFS!$DEFS$ac_delim
21190 ECHO_C!$ECHO_C$ac_delim
21191 ECHO_N!$ECHO_N$ac_delim
21192 ECHO_T!$ECHO_T$ac_delim
21193 LIBS!$LIBS$ac_delim
21194 build_alias!$build_alias$ac_delim
21195 host_alias!$host_alias$ac_delim
21196 target_alias!$target_alias$ac_delim
21197 build!$build$ac_delim
21198 build_cpu!$build_cpu$ac_delim
21199 build_vendor!$build_vendor$ac_delim
21200 build_os!$build_os$ac_delim
21201 host!$host$ac_delim
21202 host_cpu!$host_cpu$ac_delim
21203 host_vendor!$host_vendor$ac_delim
21204 host_os!$host_os$ac_delim
21205 CC!$CC$ac_delim
21206 CFLAGS!$CFLAGS$ac_delim
21207 LDFLAGS!$LDFLAGS$ac_delim
21208 CPPFLAGS!$CPPFLAGS$ac_delim
21209 ac_ct_CC!$ac_ct_CC$ac_delim
21210 EXEEXT!$EXEEXT$ac_delim
21211 OBJEXT!$OBJEXT$ac_delim
21212 CPP!$CPP$ac_delim
21213 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21214 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21215 INSTALL_DATA!$INSTALL_DATA$ac_delim
21216 SET_MAKE!$SET_MAKE$ac_delim
21217 GREP!$GREP$ac_delim
21218 EGREP!$EGREP$ac_delim
21219 PERL!$PERL$ac_delim
21220 XMKMF!$XMKMF$ac_delim
21221 X_CFLAGS!$X_CFLAGS$ac_delim
21222 X_PRE_LIBS!$X_PRE_LIBS$ac_delim
21223 X_LIBS!$X_LIBS$ac_delim
21224 X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
21225 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
21226 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
21227 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
21228 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
21229 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
21230 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
21231 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
21232 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
21233 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
21234 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
21235 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
21236 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
21237 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
21238 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
21239 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
21240 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
21241 RANLIB!$RANLIB$ac_delim
21242 ALLOCA!$ALLOCA$ac_delim
21243 USE_NLS!$USE_NLS$ac_delim
21244 MSGFMT!$MSGFMT$ac_delim
21245 GMSGFMT!$GMSGFMT$ac_delim
21246 XGETTEXT!$XGETTEXT$ac_delim
21247 CATALOGS!$CATALOGS$ac_delim
21248 CATOBJEXT!$CATOBJEXT$ac_delim
21249 DATADIRNAME!$DATADIRNAME$ac_delim
21250 GMOFILES!$GMOFILES$ac_delim
21251 INSTOBJEXT!$INSTOBJEXT$ac_delim
21252 INTLDEPS!$INTLDEPS$ac_delim
21253 INTLLIBS!$INTLLIBS$ac_delim
21254 INTLOBJS!$INTLOBJS$ac_delim
21255 POFILES!$POFILES$ac_delim
21256 POSUB!$POSUB$ac_delim
21257 _ACEOF
21258
21259   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21260     break
21261   elif $ac_last_try; then
21262     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21263 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21264    { (exit 1); exit 1; }; }
21265   else
21266     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21267   fi
21268 done
21269
21270 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21271 if test -n "$ac_eof"; then
21272   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21273   ac_eof=`expr $ac_eof + 1`
21274 fi
21275
21276 cat >>$CONFIG_STATUS <<_ACEOF
21277 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21278 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21279 _ACEOF
21280 sed '
21281 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21282 s/^/s,@/; s/!/@,|#_!!_#|/
21283 :n
21284 t n
21285 s/'"$ac_delim"'$/,g/; t
21286 s/$/\\/; p
21287 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21288 ' >>$CONFIG_STATUS <conf$$subs.sed
21289 rm -f conf$$subs.sed
21290 cat >>$CONFIG_STATUS <<_ACEOF
21291 CEOF$ac_eof
21292 _ACEOF
21293
21294
21295 ac_delim='%!_!# '
21296 for ac_last_try in false false false false false :; do
21297   cat >conf$$subs.sed <<_ACEOF
21298 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
21299 login_manager_tmp!$login_manager_tmp$ac_delim
21300 pkg_config!$pkg_config$ac_delim
21301 gnome_open_program!$gnome_open_program$ac_delim
21302 gnome_url_show_program!$gnome_url_show_program$ac_delim
21303 INCLUDES!$INCLUDES$ac_delim
21304 PREFERRED_DEMO_PROGRAM!$PREFERRED_DEMO_PROGRAM$ac_delim
21305 ALL_DEMO_PROGRAMS!$ALL_DEMO_PROGRAMS$ac_delim
21306 SAVER_LIBS!$SAVER_LIBS$ac_delim
21307 MOTIF_LIBS!$MOTIF_LIBS$ac_delim
21308 GTK_LIBS!$GTK_LIBS$ac_delim
21309 XML_LIBS!$XML_LIBS$ac_delim
21310 JPEG_LIBS!$JPEG_LIBS$ac_delim
21311 HACK_LIBS!$HACK_LIBS$ac_delim
21312 XPM_LIBS!$XPM_LIBS$ac_delim
21313 PTY_LIBS!$PTY_LIBS$ac_delim
21314 GL_LIBS!$GL_LIBS$ac_delim
21315 GLE_LIBS!$GLE_LIBS$ac_delim
21316 XDPMS_LIBS!$XDPMS_LIBS$ac_delim
21317 XINERAMA_LIBS!$XINERAMA_LIBS$ac_delim
21318 PASSWD_LIBS!$PASSWD_LIBS$ac_delim
21319 INSTALL_SETUID!$INSTALL_SETUID$ac_delim
21320 SETUID_HACKS!$SETUID_HACKS$ac_delim
21321 INSTALL_DIRS!$INSTALL_DIRS$ac_delim
21322 NEED_SETUID!$NEED_SETUID$ac_delim
21323 INSTALL_PAM!$INSTALL_PAM$ac_delim
21324 HAVE_PAM_FAIL_DELAY!$HAVE_PAM_FAIL_DELAY$ac_delim
21325 NEW_LOGIN_COMMAND!$NEW_LOGIN_COMMAND$ac_delim
21326 NEW_LOGIN_COMMAND_P!$NEW_LOGIN_COMMAND_P$ac_delim
21327 DEFAULT_IMAGES_P!$DEFAULT_IMAGES_P$ac_delim
21328 DEFAULT_IMAGE_DIRECTORY!$DEFAULT_IMAGE_DIRECTORY$ac_delim
21329 DEFAULT_TEXT_FILE!$DEFAULT_TEXT_FILE$ac_delim
21330 WITH_BROWSER!$WITH_BROWSER$ac_delim
21331 OBJCC!$OBJCC$ac_delim
21332 EXES_OSX!$EXES_OSX$ac_delim
21333 SCRIPTS_OSX!$SCRIPTS_OSX$ac_delim
21334 MEN_OSX!$MEN_OSX$ac_delim
21335 PASSWD_SRCS!$PASSWD_SRCS$ac_delim
21336 PASSWD_OBJS!$PASSWD_OBJS$ac_delim
21337 XMU_SRCS!$XMU_SRCS$ac_delim
21338 XMU_OBJS!$XMU_OBJS$ac_delim
21339 XMU_LIBS!$XMU_LIBS$ac_delim
21340 SAVER_GL_SRCS!$SAVER_GL_SRCS$ac_delim
21341 SAVER_GL_OBJS!$SAVER_GL_OBJS$ac_delim
21342 SAVER_GL_LIBS!$SAVER_GL_LIBS$ac_delim
21343 LOCK_SRCS!$LOCK_SRCS$ac_delim
21344 LOCK_OBJS!$LOCK_OBJS$ac_delim
21345 JPEG_EXES!$JPEG_EXES$ac_delim
21346 GL_EXES!$GL_EXES$ac_delim
21347 RETIRED_GL_EXES!$RETIRED_GL_EXES$ac_delim
21348 SUID_EXES!$SUID_EXES$ac_delim
21349 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
21350 GL_MEN!$GL_MEN$ac_delim
21351 GL_KLUDGE!$GL_KLUDGE$ac_delim
21352 GLE_EXES!$GLE_EXES$ac_delim
21353 GLE_KLUDGE!$GLE_KLUDGE$ac_delim
21354 GNOME24!$GNOME24$ac_delim
21355 GNOME22!$GNOME22$ac_delim
21356 NOGNOME!$NOGNOME$ac_delim
21357 HACKDIR!$HACKDIR$ac_delim
21358 HACKDIR_FULL!$HACKDIR_FULL$ac_delim
21359 GTK_DATADIR!$GTK_DATADIR$ac_delim
21360 PO_DATADIR!$PO_DATADIR$ac_delim
21361 HACK_CONF_DIR!$HACK_CONF_DIR$ac_delim
21362 GTK_EXTRA_OBJS!$GTK_EXTRA_OBJS$ac_delim
21363 APPDEFAULTS!$APPDEFAULTS$ac_delim
21364 DEPEND!$DEPEND$ac_delim
21365 DEPEND_FLAGS!$DEPEND_FLAGS$ac_delim
21366 DEPEND_DEFINES!$DEPEND_DEFINES$ac_delim
21367 LIBOBJS!$LIBOBJS$ac_delim
21368 LTLIBOBJS!$LTLIBOBJS$ac_delim
21369 _ACEOF
21370
21371   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
21372     break
21373   elif $ac_last_try; then
21374     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21375 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21376    { (exit 1); exit 1; }; }
21377   else
21378     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21379   fi
21380 done
21381
21382 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21383 if test -n "$ac_eof"; then
21384   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21385   ac_eof=`expr $ac_eof + 1`
21386 fi
21387
21388 cat >>$CONFIG_STATUS <<_ACEOF
21389 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21390 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21391 _ACEOF
21392 sed '
21393 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21394 s/^/s,@/; s/!/@,|#_!!_#|/
21395 :n
21396 t n
21397 s/'"$ac_delim"'$/,g/; t
21398 s/$/\\/; p
21399 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21400 ' >>$CONFIG_STATUS <conf$$subs.sed
21401 rm -f conf$$subs.sed
21402 cat >>$CONFIG_STATUS <<_ACEOF
21403 :end
21404 s/|#_!!_#|//g
21405 CEOF$ac_eof
21406 _ACEOF
21407
21408
21409 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21410 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21411 # trailing colons and then remove the whole line if VPATH becomes empty
21412 # (actually we leave an empty line to preserve line numbers).
21413 if test "x$srcdir" = x.; then
21414   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21415 s/:*\$(srcdir):*/:/
21416 s/:*\${srcdir}:*/:/
21417 s/:*@srcdir@:*/:/
21418 s/^\([^=]*=[     ]*\):*/\1/
21419 s/:*$//
21420 s/^[^=]*=[       ]*$//
21421 }'
21422 fi
21423
21424 cat >>$CONFIG_STATUS <<\_ACEOF
21425 fi # test -n "$CONFIG_FILES"
21426
21427
21428 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
21429 do
21430   case $ac_tag in
21431   :[FHLC]) ac_mode=$ac_tag; continue;;
21432   esac
21433   case $ac_mode$ac_tag in
21434   :[FHL]*:*);;
21435   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21436 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21437    { (exit 1); exit 1; }; };;
21438   :[FH]-) ac_tag=-:-;;
21439   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21440   esac
21441   ac_save_IFS=$IFS
21442   IFS=:
21443   set x $ac_tag
21444   IFS=$ac_save_IFS
21445   shift
21446   ac_file=$1
21447   shift
21448
21449   case $ac_mode in
21450   :L) ac_source=$1;;
21451   :[FH])
21452     ac_file_inputs=
21453     for ac_f
21454     do
21455       case $ac_f in
21456       -) ac_f="$tmp/stdin";;
21457       *) # Look for the file first in the build tree, then in the source tree
21458          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21459          # because $ac_f cannot contain `:'.
21460          test -f "$ac_f" ||
21461            case $ac_f in
21462            [\\/$]*) false;;
21463            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21464            esac ||
21465            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21466 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21467    { (exit 1); exit 1; }; };;
21468       esac
21469       ac_file_inputs="$ac_file_inputs $ac_f"
21470     done
21471
21472     # Let's still pretend it is `configure' which instantiates (i.e., don't
21473     # use $as_me), people would be surprised to read:
21474     #    /* config.h.  Generated by config.status.  */
21475     configure_input="Generated from "`IFS=:
21476           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21477     if test x"$ac_file" != x-; then
21478       configure_input="$ac_file.  $configure_input"
21479       { echo "$as_me:$LINENO: creating $ac_file" >&5
21480 echo "$as_me: creating $ac_file" >&6;}
21481     fi
21482
21483     case $ac_tag in
21484     *:-:* | *:-) cat >"$tmp/stdin";;
21485     esac
21486     ;;
21487   esac
21488
21489   ac_dir=`$as_dirname -- "$ac_file" ||
21490 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21491          X"$ac_file" : 'X\(//\)[^/]' \| \
21492          X"$ac_file" : 'X\(//\)$' \| \
21493          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21494 echo X"$ac_file" |
21495     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21496             s//\1/
21497             q
21498           }
21499           /^X\(\/\/\)[^/].*/{
21500             s//\1/
21501             q
21502           }
21503           /^X\(\/\/\)$/{
21504             s//\1/
21505             q
21506           }
21507           /^X\(\/\).*/{
21508             s//\1/
21509             q
21510           }
21511           s/.*/./; q'`
21512   { as_dir="$ac_dir"
21513   case $as_dir in #(
21514   -*) as_dir=./$as_dir;;
21515   esac
21516   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21517     as_dirs=
21518     while :; do
21519       case $as_dir in #(
21520       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21521       *) as_qdir=$as_dir;;
21522       esac
21523       as_dirs="'$as_qdir' $as_dirs"
21524       as_dir=`$as_dirname -- "$as_dir" ||
21525 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21526          X"$as_dir" : 'X\(//\)[^/]' \| \
21527          X"$as_dir" : 'X\(//\)$' \| \
21528          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21529 echo X"$as_dir" |
21530     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21531             s//\1/
21532             q
21533           }
21534           /^X\(\/\/\)[^/].*/{
21535             s//\1/
21536             q
21537           }
21538           /^X\(\/\/\)$/{
21539             s//\1/
21540             q
21541           }
21542           /^X\(\/\).*/{
21543             s//\1/
21544             q
21545           }
21546           s/.*/./; q'`
21547       test -d "$as_dir" && break
21548     done
21549     test -z "$as_dirs" || eval "mkdir $as_dirs"
21550   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21551 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21552    { (exit 1); exit 1; }; }; }
21553   ac_builddir=.
21554
21555 case "$ac_dir" in
21556 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21557 *)
21558   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21559   # A ".." for each directory in $ac_dir_suffix.
21560   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21561   case $ac_top_builddir_sub in
21562   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21563   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21564   esac ;;
21565 esac
21566 ac_abs_top_builddir=$ac_pwd
21567 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21568 # for backward compatibility:
21569 ac_top_builddir=$ac_top_build_prefix
21570
21571 case $srcdir in
21572   .)  # We are building in place.
21573     ac_srcdir=.
21574     ac_top_srcdir=$ac_top_builddir_sub
21575     ac_abs_top_srcdir=$ac_pwd ;;
21576   [\\/]* | ?:[\\/]* )  # Absolute name.
21577     ac_srcdir=$srcdir$ac_dir_suffix;
21578     ac_top_srcdir=$srcdir
21579     ac_abs_top_srcdir=$srcdir ;;
21580   *) # Relative name.
21581     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21582     ac_top_srcdir=$ac_top_build_prefix$srcdir
21583     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21584 esac
21585 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21586
21587
21588   case $ac_mode in
21589   :F)
21590   #
21591   # CONFIG_FILE
21592   #
21593
21594   case $INSTALL in
21595   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21596   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21597   esac
21598 _ACEOF
21599
21600 cat >>$CONFIG_STATUS <<\_ACEOF
21601 # If the template does not know about datarootdir, expand it.
21602 # FIXME: This hack should be removed a few years after 2.60.
21603 ac_datarootdir_hack=; ac_datarootdir_seen=
21604
21605 case `sed -n '/datarootdir/ {
21606   p
21607   q
21608 }
21609 /@datadir@/p
21610 /@docdir@/p
21611 /@infodir@/p
21612 /@localedir@/p
21613 /@mandir@/p
21614 ' $ac_file_inputs` in
21615 *datarootdir*) ac_datarootdir_seen=yes;;
21616 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21617   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21618 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21619 _ACEOF
21620 cat >>$CONFIG_STATUS <<_ACEOF
21621   ac_datarootdir_hack='
21622   s&@datadir@&$datadir&g
21623   s&@docdir@&$docdir&g
21624   s&@infodir@&$infodir&g
21625   s&@localedir@&$localedir&g
21626   s&@mandir@&$mandir&g
21627     s&\\\${datarootdir}&$datarootdir&g' ;;
21628 esac
21629 _ACEOF
21630
21631 # Neutralize VPATH when `$srcdir' = `.'.
21632 # Shell code in configure.ac might set extrasub.
21633 # FIXME: do we really want to maintain this feature?
21634 cat >>$CONFIG_STATUS <<_ACEOF
21635   sed "$ac_vpsub
21636 $extrasub
21637 _ACEOF
21638 cat >>$CONFIG_STATUS <<\_ACEOF
21639 :t
21640 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21641 s&@configure_input@&$configure_input&;t t
21642 s&@top_builddir@&$ac_top_builddir_sub&;t t
21643 s&@srcdir@&$ac_srcdir&;t t
21644 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21645 s&@top_srcdir@&$ac_top_srcdir&;t t
21646 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21647 s&@builddir@&$ac_builddir&;t t
21648 s&@abs_builddir@&$ac_abs_builddir&;t t
21649 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21650 s&@INSTALL@&$ac_INSTALL&;t t
21651 $ac_datarootdir_hack
21652 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21653
21654 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21655   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21656   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21657   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21658 which seems to be undefined.  Please make sure it is defined." >&5
21659 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21660 which seems to be undefined.  Please make sure it is defined." >&2;}
21661
21662   rm -f "$tmp/stdin"
21663   case $ac_file in
21664   -) cat "$tmp/out"; rm -f "$tmp/out";;
21665   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21666   esac
21667  ;;
21668   :H)
21669   #
21670   # CONFIG_HEADER
21671   #
21672 _ACEOF
21673
21674 # Transform confdefs.h into a sed script `conftest.defines', that
21675 # substitutes the proper values into config.h.in to produce config.h.
21676 rm -f conftest.defines conftest.tail
21677 # First, append a space to every undef/define line, to ease matching.
21678 echo 's/$/ /' >conftest.defines
21679 # Then, protect against being on the right side of a sed subst, or in
21680 # an unquoted here document, in config.status.  If some macros were
21681 # called several times there might be several #defines for the same
21682 # symbol, which is useless.  But do not sort them, since the last
21683 # AC_DEFINE must be honored.
21684 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21685 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
21686 # NAME is the cpp macro being defined, VALUE is the value it is being given.
21687 # PARAMS is the parameter list in the macro definition--in most cases, it's
21688 # just an empty string.
21689 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
21690 ac_dB='\\)[      (].*,\\1define\\2'
21691 ac_dC=' '
21692 ac_dD=' ,'
21693
21694 uniq confdefs.h |
21695   sed -n '
21696         t rset
21697         :rset
21698         s/^[     ]*#[    ]*define[       ][      ]*//
21699         t ok
21700         d
21701         :ok
21702         s/[\\&,]/\\&/g
21703         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
21704         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
21705   ' >>conftest.defines
21706
21707 # Remove the space that was appended to ease matching.
21708 # Then replace #undef with comments.  This is necessary, for
21709 # example, in the case of _POSIX_SOURCE, which is predefined and required
21710 # on some systems where configure will not decide to define it.
21711 # (The regexp can be short, since the line contains either #define or #undef.)
21712 echo 's/ $//
21713 s,^[     #]*u.*,/* & */,' >>conftest.defines
21714
21715 # Break up conftest.defines:
21716 ac_max_sed_lines=50
21717
21718 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
21719 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
21720 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
21721 # et cetera.
21722 ac_in='$ac_file_inputs'
21723 ac_out='"$tmp/out1"'
21724 ac_nxt='"$tmp/out2"'
21725
21726 while :
21727 do
21728   # Write a here document:
21729     cat >>$CONFIG_STATUS <<_ACEOF
21730     # First, check the format of the line:
21731     cat >"\$tmp/defines.sed" <<\\CEOF
21732 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
21733 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
21734 b
21735 :def
21736 _ACEOF
21737   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
21738   echo 'CEOF
21739     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
21740   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
21741   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
21742   grep . conftest.tail >/dev/null || break
21743   rm -f conftest.defines
21744   mv conftest.tail conftest.defines
21745 done
21746 rm -f conftest.defines conftest.tail
21747
21748 echo "ac_result=$ac_in" >>$CONFIG_STATUS
21749 cat >>$CONFIG_STATUS <<\_ACEOF
21750   if test x"$ac_file" != x-; then
21751     echo "/* $configure_input  */" >"$tmp/config.h"
21752     cat "$ac_result" >>"$tmp/config.h"
21753     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
21754       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21755 echo "$as_me: $ac_file is unchanged" >&6;}
21756     else
21757       rm -f $ac_file
21758       mv "$tmp/config.h" $ac_file
21759     fi
21760   else
21761     echo "/* $configure_input  */"
21762     cat "$ac_result"
21763   fi
21764   rm -f "$tmp/out12"
21765  ;;
21766
21767   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21768 echo "$as_me: executing $ac_file commands" >&6;}
21769  ;;
21770   esac
21771
21772
21773   case $ac_file$ac_mode in
21774     "default-1":C)
21775
21776 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21777 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21778   rm -f intltool-extract.out
21779 else
21780   mv -f intltool-extract.out intltool-extract
21781 fi
21782 chmod ugo+x intltool-extract
21783 chmod u+w intltool-extract
21784
21785 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21786 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21787   rm -f intltool-merge.out
21788 else
21789   mv -f intltool-merge.out intltool-merge
21790 fi
21791 chmod ugo+x intltool-merge
21792 chmod u+w intltool-merge
21793
21794 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21795 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21796   rm -f intltool-update.out
21797 else
21798   mv -f intltool-update.out intltool-update
21799 fi
21800 chmod ugo+x intltool-update
21801 chmod u+w intltool-update
21802
21803  ;;
21804     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
21805         rm -f po/stamp-it po/stamp-it.tmp
21806         > po/stamp-it.tmp
21807         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21808         mv po/stamp-it.tmp po/stamp-it
21809       esac ;;
21810
21811   esac
21812 done # for ac_tag
21813
21814
21815 { (exit 0); exit 0; }
21816 _ACEOF
21817 chmod +x $CONFIG_STATUS
21818 ac_clean_files=$ac_clean_files_save
21819
21820
21821 # configure is writing to config.log, and then calls config.status.
21822 # config.status does its own redirection, appending to config.log.
21823 # Unfortunately, on DOS this fails, as config.log is still kept open
21824 # by configure, so config.status won't be able to write to it; its
21825 # output is simply discarded.  So we exec the FD to /dev/null,
21826 # effectively closing config.log, so it can be properly (re)opened and
21827 # appended to by config.status.  When coming back to configure, we
21828 # need to make the FD available again.
21829 if test "$no_create" != yes; then
21830   ac_cs_success=:
21831   ac_config_status_args=
21832   test "$silent" = yes &&
21833     ac_config_status_args="$ac_config_status_args --quiet"
21834   exec 5>/dev/null
21835   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21836   exec 5>>config.log
21837   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21838   # would make configure fail if this is the last instruction.
21839   $ac_cs_success || { (exit 1); exit 1; }
21840 fi
21841
21842
21843 ###############################################################################
21844 #
21845 #       Print some warnings at the end.
21846 #
21847 ###############################################################################
21848
21849 warn_prefix_1="    Warning:"
21850 warn_prefix_2="       Note:"
21851 warn_prefix="$warn_prefix_1"
21852
21853 warning=no
21854 warnsep='    #################################################################'
21855
21856 warnpre() {
21857   if test "$warning" = no ; then
21858     echo '' ; echo "$warnsep" ; echo ''
21859     warning=yes
21860   fi
21861 }
21862
21863 warn() {
21864   warnpre
21865   if test "$warning" = long ; then echo '' ; fi
21866   warning=yes
21867   rest="$@"
21868   echo "$warn_prefix $rest"
21869 }
21870
21871 warnL() {
21872   was=$warning
21873   warnpre
21874   warning=yes
21875   if test "$was" != no ; then echo '' ; fi
21876   rest="$@"
21877   echo "$warn_prefix $rest"
21878 }
21879
21880 warn2() {
21881   rest="$@"
21882   echo "             $rest"
21883   warning=long
21884 }
21885
21886 note() {
21887   warn_prefix="$warn_prefix_2"
21888   warn $@
21889   warn_prefix="$warn_prefix_1"
21890 }
21891
21892 noteL() {
21893   warn_prefix="$warn_prefix_2"
21894   warnL $@
21895   warn_prefix="$warn_prefix_1"
21896 }
21897
21898
21899 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21900   warn 'The SGI saver extension was requested, but was not found.'
21901 fi
21902
21903 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21904   warn 'The XIdle extension was requested, but was not found.'
21905 fi
21906
21907 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21908   warn 'The XSHM extension was requested, but was not found.'
21909 fi
21910
21911 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21912   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21913 fi
21914
21915 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21916   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21917 fi
21918
21919 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21920   warn 'The DPMS extension was requested, but was not found.'
21921 fi
21922
21923 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21924   warn 'The Xinerama extension was requested, but was not found.'
21925 fi
21926
21927 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21928   warn 'The XF86VMODE extension was requested, but was not found.'
21929 fi
21930
21931 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21932   warn 'The RANDR extension was requested, but was not found.'
21933 fi
21934
21935 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21936   warn "Checking of /proc/interrupts was requested, but it's bogus."
21937 fi
21938
21939 if test "$pkg_config" = false ; then
21940   warnL 'The "pkg-config" program was not found.  Without that,'
21941   warn2 "detection of the various GTK libraries won't work."
21942 else
21943   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21944   if test "x$pkgerr" != "x" ; then
21945     warnL 'The "pkg-config" program produces errors.  This often causes'
21946     warn2 "detection of the various GTK libraries to malfunction."
21947     warn2 "The errors are:"
21948     echo ''
21949     echo "$pkgerr" | sed 's/^/             > /g'
21950   fi
21951 fi
21952
21953 if test "$gtk_halfassed" != no ; then
21954   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21955   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21956   warn2 "Perhaps some of the development packages are not installed?"
21957   if test "$have_gtk" = yes ; then
21958     v="$ac_gtk_version_string"
21959     warn2 "GTK $v is also installed, so it will be used instead."
21960     warn2 "Please read the above output and the \`config.log' file"
21961     warn2 "for more details."
21962   fi
21963 fi
21964
21965 motif_warn2() {
21966   warn2 'Though the Motif front-end to xscreensaver is still'
21967   warn2 'maintained, it is no longer being updated with new'
21968   warn2 'features: all new development on the xscreensaver-demo'
21969   warn2 'program is happening in the GTK version, and not in the'
21970   warn2 'Motif version.  It is recommended that you build against'
21971   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21972 }
21973
21974 if test "$have_motif" = no -a "$have_gtk" = no; then
21975
21976   if test "$with_motif" = yes; then
21977     warnL "Neither the GTK nor Motif libraries were found; the"
21978     warn2 "\`xscreensaver-demo' program requires one of these."
21979     echo ''
21980     motif_warn2
21981   else
21982     warnL "The GTK libraries do not seem to be available; the"
21983     warn2 "\`xscreensaver-demo' program requires them."
21984 #   echo ''
21985 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21986 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21987 #   motif_warn2
21988   fi
21989
21990 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21991   warnL "Use of Motif was requested, but it wasn't found;"
21992   warn2 "Gtk will be used instead."
21993
21994 elif test "$jurassic_gtk" = yes ; then
21995
21996   pref_gtk=2.0
21997
21998   v="$ac_gtk_version_string"
21999   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22000     warnL "Use of Gtk was requested, but its version number is unknown;"
22001   elif test "$with_gtk_req" = yes ; then
22002     warnL "Use of Gtk was requested, but it is version $v;"
22003   else
22004     warnL "Gtk was found on this system, but it is version $v;"
22005   fi
22006
22007   warn2 "Gtk $pref_gtk or newer is required."
22008
22009 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22010   warnL "Use of Gtk was requested, but it wasn't found."
22011 fi
22012
22013
22014 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22015   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22016   warn2 "headers were not found.  That can't be good.  Please"
22017   warn2 "install the GDK-Pixbuf development kit and re-configure."
22018 fi
22019
22020 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22021
22022   preferred_lesstif=0.92
22023
22024   if test "$lesstif_version" = unknown; then
22025     warnL "Unable to determine the LessTif version number!"
22026     warn2 "Make sure you are using version $preferred_lesstif or newer."
22027     warn2 "See <http://www.lesstif.org/>."
22028
22029   elif test \! $lesstif_version -gt 82; then
22030     warnL "LessTif version $lesstif_version_string is being used."
22031     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22032     warn2 "use with XScreenSaver; it is strongly recommended"
22033     warn2 "that you upgrade to at least version $preferred_lesstif!"
22034     warn2 "See <http://www.lesstif.org/>."
22035   fi
22036 fi
22037
22038
22039 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22040   warn  'Motif is being used, and GTK is not.'
22041   echo  ''
22042   motif_warn2
22043 fi
22044
22045
22046 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22047   warnL 'Use of XPM was requested, but it was not found.'
22048 fi
22049
22050 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22051   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22052 fi
22053
22054 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
22055    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
22056
22057   if test "$with_gdk_pixbuf_req" = yes ; then
22058     true
22059   elif test "$with_gdk_pixbuf_req" = no ; then
22060     warnL 'The GDK-Pixbuf library is not being used.'
22061   else
22062     warnL 'The GDK-Pixbuf library was not found.'
22063   fi
22064
22065   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22066     true
22067   elif test "$with_xpm_req" = no ; then
22068     warnL 'The XPM library is not being used.'
22069   else
22070     warnL 'The XPM library was not found.'
22071   fi
22072
22073   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
22074     warn2 'The XPM library is being used instead.'
22075   fi
22076
22077   if test "$gdk_pixbuf_halfassed" = yes ; then
22078     echo ''
22079     warn2 'More specifically, we found the headers, but not the'
22080     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22081     warn2 "system, or something else went wrong.  The \`config.log'"
22082     warn2 'file might contain some clues.'
22083   fi
22084
22085   echo ''
22086   warn2 'Some of the demos will not use images as much as they could.'
22087   warn2 'You should consider installing GDK-Pixbuf and re-running'
22088   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
22089   warn2 'provides support for more image formats.)'
22090 fi
22091
22092
22093 if test "$have_jpeg" = no ; then
22094   if test "$with_jpeg_req" = yes ; then
22095     warnL 'Use of libjpeg was requested, but it was not found.'
22096   elif test "$with_jpeg_req" = no ; then
22097     noteL 'The JPEG library is not being used.'
22098   else
22099     noteL 'The JPEG library was not found.'
22100   fi
22101
22102   if test "$jpeg_halfassed" = yes ; then
22103     echo ''
22104     warn2 'More specifically, we found the headers, but not the'
22105     warn2 'library; so either JPEG is half-installed on this'
22106     warn2 "system, or something else went wrong.  The \`config.log'"
22107     warn2 'file might contain some clues.'
22108     echo ''
22109   fi
22110
22111   if test "$have_gdk_pixbuf" = no ; then
22112     warn2 "This means that it won't be possible for the image-manipulating"
22113     warn2 "display modes to load files from disk; and it also means that"
22114     warn2 "the \`webcollage' program will be much slower."
22115   else
22116     warn2 "This means the \`webcollage' program will be much slower."
22117   fi
22118 fi
22119
22120
22121 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22122   preferred_mesagl=3.4
22123   mgv="$ac_mesagl_version_string"
22124   pgl="$preferred_mesagl"
22125
22126   if test "$ac_mesagl_version" = unknown; then
22127     true
22128     # warnL "Unable to determine the MesaGL version number!"
22129     # warn2 "Make sure you are using version $preferred_mesagl or newer."
22130
22131   elif test \! "$ac_mesagl_version" -gt 2006; then
22132     warnL "MesaGL version number is $mgv --"
22133     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22134     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22135
22136   elif test \! "$ac_mesagl_version" -gt 3003; then
22137     warnL "MesaGL version number is $mgv --"
22138     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22139     warn2 "that you upgrade to $pgl or newer."
22140   fi
22141 fi
22142
22143 if test "$have_gl" = no ; then
22144   if test "$with_gl_req" = yes ; then
22145     warnL 'Use of GL was requested, but it was not found.'
22146   elif test "$with_gl_req" = no ; then
22147     noteL 'The OpenGL 3D library is not being used.'
22148   else
22149     noteL 'The OpenGL 3D library was not found.'
22150   fi
22151
22152   if test "$gl_halfassed" = yes ; then
22153     echo ''
22154     warn2 'More specifically, we found the headers, but not the'
22155     warn2 'libraries; so either GL is half-installed on this'
22156     warn2 "system, or something else went wrong.  The \`config.log'"
22157     warn2 'file might contain some clues.'
22158   fi
22159
22160   echo ''
22161   warn2 'Those demos which use 3D will not be built or installed.'
22162   warn2 'You might want to consider installing OpenGL and'
22163   warn2 "re-running configure.  If your vendor doesn't ship"
22164   warn2 'their own implementation of OpenGL, you can get a free'
22165   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22166   warn2 'info, see <http://www.opengl.org/>.'
22167
22168 fi
22169
22170
22171 if test "$have_gl" = yes -a "$have_gle" = no ; then
22172
22173  # nobody cares about this; don't print the warning unless it was
22174  # requested and not found, or halfway-found.
22175  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22176
22177   if test "$with_gle_req" = yes ; then
22178     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22179     warn2 'it was not found (though the OpenGL library was found, and'
22180     warn2 'is being used.)'
22181   elif test "$with_gle_req" = no ; then
22182     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22183     warn2 'library is not.'
22184   else
22185     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22186     warn2 'was not.'
22187   fi
22188
22189   if test "$gle_halfassed" = yes ; then
22190     echo ''
22191     warn2 'More specifically, we found the headers, but not the'
22192     warn2 'libraries; so either GLE is half-installed on this'
22193     warn2 "system, or something else went wrong.  The \`config.log'"
22194     warn2 'file might contain some clues.'
22195   fi
22196
22197   echo ''
22198   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22199   warn2 'will not be built or installed.  You might want to consider'
22200   warn2 'installing GLE and re-running configure.  You can find the'
22201   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22202   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22203
22204  fi
22205 fi
22206
22207
22208 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22209   warn 'Use of XReadDisplay was requested, but it was not found.'
22210 fi
22211
22212 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22213   warn 'Use of Kerberos was requested, but it was not found.'
22214 fi
22215
22216 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22217   warn 'Use of PAM was requested, but it was not found.'
22218 fi
22219
22220 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22221   warn 'Use of shadow passwords was requested, but they were not found.'
22222 fi
22223
22224 if test "$ac_macosx" = yes ; then
22225   if test "$enable_locking" = yes ; then
22226     warn  "You have specified --enable-locking on MacOS X."
22227     warn2 "THIS DOES NOT WORK!  Don't do this!"
22228   fi
22229 fi
22230
22231
22232 # You are in a twisty maze of namespaces and syntaxes, all alike.
22233 # Fuck the skull of Unix.
22234 #
22235 bindir=`eval eval eval eval eval eval eval echo $bindir`
22236 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
22237 HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
22238
22239 # canonicalize slashes.
22240 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22241 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22242 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22243
22244
22245 # Sanity check the hackdir
22246 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22247   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22248     echo ""
22249     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22250                    There will be an executable installed with that name, so
22251                    that can't be the name of a directory as well.  Please
22252                    re-configure with a different directory name." >&5
22253 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22254                    There will be an executable installed with that name, so
22255                    that can't be the name of a directory as well.  Please
22256                    re-configure with a different directory name." >&2;}
22257    { (exit 1); exit 1; }; }
22258   fi
22259 done
22260
22261
22262 do_dir_warning=no
22263
22264 # Now let's warn if there's a previous RPM version already installed.
22265 # But don't bother with this test if we are currently *building* an RPM.
22266
22267 if test -z "$RPM_PACKAGE_VERSION" ; then
22268
22269   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
22270
22271   # M4 sucks!!
22272
22273   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
22274         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
22275         head -1`
22276
22277
22278   if test \! -z "$rpmv" ; then
22279     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22280     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
22281
22282     warning=no
22283     warnL "There is already an installed RPM of xscreensaver $rpmv"
22284     warn2 'on this system.  You might want to remove it ("rpm -ve")'
22285     warn2 'before running "make install" in this directory.'
22286     echo ""
22287     warn2 "Alternately, you could build this version of xscreensaver"
22288     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
22289     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
22290     warn2 "See the RPM documentation for more info."
22291     echo ""
22292
22293     if test "$rpmbdir" = "$rpmhdir" ; then
22294       warn2 "The RPM version was installed in $rpmbdir/."
22295       do_dir_warning=yes
22296     else
22297       warn2 "The RPM version was installed in $rpmbdir/,"
22298       warn2 "with demos in $rpmhdir/."
22299     fi
22300   fi
22301 fi
22302
22303 # Also warn if there's a Debian package installed.
22304 #
22305 debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
22306 debv=''
22307 for dpkg in $debnames ; do
22308   if test -z "$debv"; then
22309     debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
22310   fi
22311 done
22312
22313 if test \! -z "$debv" ; then
22314   debbdir=`dpkg -L $debnames 2>/dev/null | \
22315             sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
22316   debhdir=`dpkg -L $debnames 2>/dev/null | \
22317             sed -n 's@^\(.*/\)popsquares$@\1@p'`
22318   if test -z "$debbdir" ; then debbdir='???'; fi
22319   if test -z "$debhdir" ; then debhdir='???'; fi
22320
22321   warning=no
22322   warnL "There is already an installed dpkg of xscreensaver"
22323   warn2 "version \"$debv\" on this system."
22324   echo ""
22325   warn2 "The dpkg was installed in $debbdir,"
22326   warn2 "with demos in $debhdir."
22327 fi
22328
22329
22330 if test "${bindir}" = "${HACKDIR}" ; then
22331   do_dir_warning=yes
22332 fi
22333
22334 if test "$do_dir_warning" = yes; then
22335   echo ""
22336   echo "$warnsep"
22337   echo ""
22338   echo '      When you run "make install", the "xscreensaver",'
22339   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
22340   echo "      will be installed in ${bindir}/."
22341   echo ""
22342   echo "      The various graphics demos (190+ different executables) will"
22343   echo "      be installed in ${HACKDIR}/."
22344   echo ""
22345   echo "      If you would prefer the demos to be installed elsewhere,"
22346   echo "      you should re-run configure with the --with-hackdir=DIR"
22347   echo "      option.  For more information, run \`./configure --help'."
22348   warning=yes
22349 fi
22350
22351 if test "$warning" != no; then
22352   echo '' ; echo "$warnsep" ; echo ''
22353 fi
22354
22355 if test "$do_dir_warning" = no; then
22356   if test "$warning" = no; then
22357     echo ''
22358   fi
22359   echo "User programs will be installed in ${bindir}/"
22360   echo "Screen savers will be installed in ${HACKDIR}/"
22361   echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
22362   echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
22363   echo ''
22364 fi